Home/Support/Support Forum/CoAP on XBee3

CoAP on XBee3

0 votes
There is a bit of documentaiton on CoAP here:


but it tells you to download a CoAP library from https://pypi.org/project/CoAPthon/ 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 (https://docs.micropython.org/en/latest/library/ussl.html#functions) which does not support datagrams.
asked Dec 28, 2020 in XBee3 Cellular by wz2b New to the Community (48 points)

Please log in or register to answer this question.

1 Answer

0 votes

The CoAP example/documentation you linked to is under the section for performing CoAP using transparent mode on the XBee device -- https://www.digi.com/resources/documentation/Digidocs/90002258/Default.htm#containers/cont_examples_iot_protocols.htm

XBee Cellular and XBee 3 Cellular do not currently support DTLS.
answered Dec 28, 2020 by tckr Veteran of the Digi Community (473 points)
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?