Skip to content
Ken Bannister edited this page Nov 17, 2019 · 33 revisions

nanocoap is a native implementation of CoAP for RIOT. Client messages are processed synchronously: a client waits for the the function that sends the request to return with the response. A CoAP server runs in a dedicated application thread.

Feature Status

Feature Description
Confirmable message type Supports piggybacked ACKs
Block extension Complete
Observe extension Not implemented

Learning More

See the online API documentation for nanocoap itself, as well as generic CoAP definitions. Also, see the examples/nanocoap_server app.

Open PRs

Topic Status

See all open 'nanocoap' PRs and Issues. See all CoAP-tagged PRs and Issues.

Roadmap

See #9309 for combined gcoap and nanocoap roadmap for options handling. As of 11/2018, much of this work has been completed.

The blockwise API was completed with #10732. However, some old implementations remain; see candidate list below. Deprecate them and replace usage as appropriate.

  • coap_put_option_block1() -- replace with coap_opt_put_block1_control()
  • coap_put_block1_ok() -- currently a wrapper around coap_put_option_block1(); still necessary?
  • coap_get_blockopt() -- replace with coap_get_block()?
  • coap_block1_t -- rename to coap_block_t

#12074 adds coap_opt_get_next() to the nanocoap interface to iterate over options. Replace use of the nanocoap internal coap_iterate_option(), which only iterates over a single option.

#11093 adds definitions for the new methods FETCH, PATCH, and iPATCH. Add full support for them.

Extend nanocoap_request() to allow sending a request non-confirmably.

Milestones

Release Description
2019.10 Complete blockwise implementation (#10732)
2018.10 Added Block2 server support (#8932)
2018.10 Get/Put specific string options based on generic string option functions (#8920).
2018.07 Generalize nanocoap_get() to nanocoap_request() (#9086).
2018.07 Use coap_pkt_t to create message, and use this to provide a simpler API for options (#9085).
2018.04 Added Block1 server support (#8788).
2018.01 Integrate as RIOT module (#8123). Historically was an external package.
Clone this wiki locally