Wiznet makers

Aimee0

Published May 27, 2024 ©

17 UCC

5 WCC

8 VAR

0 Contests

0 Followers

0 Following

RP2040 FreeRTOS COAP

This project is about COAP library in RP2040-HAT-FREERTOS-C.

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

1.Project 

Integrate microcoap library to RP2040-HAT-FREERTOS-C project.

link : https://github.com/1248/microcoap

2.Microcoap

Microcoap is a lightweight CoAP library designed to provide basic CoAP functionality in resource-constrained environments.


Standard Library vs Lightweight Library 

Standard Coap library

  • Ex) libcoap, coap.net etc...
  • Advantage  
    • Rich features: Provides advanced features such as block transfer, observation, and security (DTLS).
    • Scalability: Suitable for complex applications requiring a wide range of CoAP functions.
  • Weakness
    • Resource Requirements: Consume more memory and CPU resources, which can be inefficient in limited resource environments such as RP2040.
       

Lightweight Coap Library

  • Ex) microcoap, nanocoap, smcp etc...
  • Advantage  
    • Lightweight: Very low memory and CPU usage.
    • Simple integration: Small and simple code base for quick and easy integration.
  • Weakness
    • Limited features: Basic CoAP message processing only. No advanced features (block transfer, security, etc.).

3.Example Code

 

4.How to use

Download libcoap

lilnk : https://github.com/obgm/libcoap

$ cmake -E remove_directory build
$ cmake -E make_directory build
$ cd build
$ cmake .. -DENABLE_DOCS=OFF -DDTLS_BACKEND=openssl
$ cmake --build .
$ cd Debug

 

Load program to Pico Board

Temperature

Light on

 

Light off

 

 

 

 

Documents
  • RP2040-HAT-FREERTOS-COAP_C

Comments Write