Skip to content

RP2040 FreeRTOS COAP

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

Aimee0

Published May 27, 2024

RP2040 FreeRTOS COAP

Components

Hardware components

WIZnet parts

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

RP2040 FreeRTOS COAP, 3.Example Code
RP2040 FreeRTOS COAP, 3.Example Code
RP2040 FreeRTOS COAP, 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

4.How to use
4.How to use

Light on

4.How to use

 

Light off

4.How to use

 

 

 

 

Documents

  • RP2040-HAT-FREERTOS-COAP_C

Comments

Comments