CoAP on XBee3

There is a bit of documentaiton on CoAP here:

but it tells you to download a CoAP library from and looking at that library it does not seem to be built for micropython. I’m not sure what this documentation really is, as it refers to XBee3 but then it lists a bunch of steps to perform on a Host PC, without ever connecting the dots re: what you do on the XBee3 / Micropython side.

What’s up with this - is there a CoAP library I can just download into the XBee3?

I did find a third party library:

but it does not support DTLS which is pretty critical. I think the ssl library in the Xbee3 is ussl ( which does not support datagrams.


The CoAP example/documentation you linked to is under the section for performing CoAP using transparent mode on the XBee device –

XBee Cellular and XBee 3 Cellular do not currently support DTLS.

Thank you. If I were to find a DTLS library that worked in micropython, I should be able to do this myself by just creating the packets and sending them over a SOCK_DGRAM though?

Unfortunately I think you’ll be hard pressed to find (or write) a pure-MicroPython implementation of DTLS. But if you do, and are able to use that library from MicroPython (i.e. it doesn’t consume all available memory) then yes, absolutely.

In future firmware versions Digi may be able to incorporate DTLS functionality. No guarantees on when or if that might happen.

For our own reference, are you using your own CoAP server with DTLS, or a third party service?