Example of C-based client when DFUing a nRF52840 via UART

Good morning,

 

In our next product (mounting a nRF52840) we will need a dual UART+BLE update channel. We have already implemented the update via BLE and we are now trying to do the same for the UART channel.

We have successfully used both the C++- and Rust-based clients you advise on your webpage (here: https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/device_mgmt/mcumgr.html) to update our device via UART. However we cannot rely on an executable to update our device and, because of project's constraints, we need to write a C-based client and embed it in our control system. This client will of course be based on mcumgr libraries.

My questions are:

 

1) Does such a C-based client exist? If so, where can we find the source code? A c++-based one would also be ok, but without the difficulties related to the use of Qt

2) If a C-based client does not exist, where can we find the sequence of operations that allow the aforementioned clients to update the MCU, and possibly the mcumgr functions associated with these operations? None of us is an C++ nor Rust expert, so we cannot easily deduce these steps from the clients you advise. Something like a sequence diagram of needed operations would be great.

 
We are using SDK version 2.8.

Kind regards,

Stefano

Parents Reply
  • Hello Alex,

    thank you for your answer. Yes, we have taken a look at both the DFU over UART example (which I use to adapt my project with the proper configuration) and the protocol definition. What we lack is the sequence of operations we need to perform to update the device, and possibly the related functions within the mcumgr library that we need to use at each step. I am sniffing the packets but honestly validating the sniffed packets and associating them to the DFU sequence can be really painful. I believe that at least a sequence of needed operations should be provided by Nordic in a tech document.

    Regards,

    Stefano

Children
Related