This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

DFU project

I try to create coap server project and it should by  updateable by DFU. I merge project simple coap server and thread dfu client, and I keep  instructions in documentation to build it and run DFU. But Server doesnt response to coap requests and when I start multicast DFU process server is not updated. and when I try to start unicast DFU it waiting to promote a router. 

Parents Reply
  • Hi Frantisek,

    Sorry for the late reply. I have discuss the issue with a collegue of mine working in the Thread team. We don't think these two examples can run in parallel.

    What is happening now is that enabling the built-in CoAP (from the OpenThread library) results in it getting all CoAP traffic, so the DFU packets are not handled by the second CoAP implementation, since the built-in CoAP binds to a specific port, so both DFU_UDP_PORT and OT_DEFAULT_COAP_PORT are defined as the same port. 

    #define OT_DEFAULT_COAP_PORT 5683 ///< Default CoAP port, as specified in RFC 7252

    The OpenThread built-in CoAP is much simpler an limited than the external used in the DFU, therefore our recommendation is not enabling the OT CoAP, and rather build your server application using the external CoAP.

    When using the external CoAP library you can create a separate resource with coap_resource_create(), it takes a callback and a resource name, which is the URI path. The examples in nRF5_SDK/examples/iot/coap/ipv6/client and server could be used as a reference.

    Best regards,

    Marjeris

Children
Related