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

Thread DFU

I want to program the firmware into a nrf52840 on our custom board to be the NCP and do the DFU over thread. I can not use the DK board and have the nrfutil load the firmware.

I also need to be able to change the thread masterkey.  Is the source code available as an example. Or a precompiled Hex file I program into the 52840

I would prefer to have the source so I can add a serial bootloader and update the NCP itself in the future.

Parents
  • I also need this to have USB serial support.

    Is this something Nrdic is going to support DFU over thread through a USB port. Or can you make the source code for the DFU NCP and I will add the USB myself.

  • Hello,

    Sorry for the late reply.

     

    Jay said:
    But the ncp hex file in thegithub nrfutil  project is not a DFU able project is it?

     It doesn't contain self-updates, no. But it is possible to update to and from this FW using a USB serial bootloader.

     

    Jay said:
    The NCP in the nrfutil also has the nordic IOT included to do the DFU correct?

     What do you mean by "the nordic IOT included"?

    As I see it, it sounds like you have a couple of options.

    1: If the Linux computer is a fairly strong computer, you could run nrfjprog from it, and program the nRF the "normal" way directly via the SWD pins. That would require something more than just the USB connected.

    2: If only the USB being connected is a demand from your side, then you could program a USB bootloader to the nRF52840 connected to the Linux Computer. You can use this FW to switch between the NCP application and the DFU FW. Is that a possibility?

    Best regards,

    Edvin

  • Adding a bootloader to the NCP would be the option for us. Also as I understand it now the NCP is using the the serial port to communicate with the Segger chip on the DK board. Then the segger chip does the USB to serial translation.  We would need to add the USB serial functionality to the NCP.   

  • Hello,

    That is true. nrfutil will probably by default use the serial (UART) interface between the programmer chip and the nRF52840. 

    It looks like the hex file that is programmed to the nRF52840 by nrfutil is just a default NCP example from the nRF5 SDK. 

    However, I have some good and some bad news. I set up a Thread DFU test, using 2x nRF52840 DKs. 

    Normal DFU using nrfutil and "nrfutil dfu thread -f ..." works just fine.

    Then I tried to flash the thread\ncp\ftd\uart example, and then the "nrfutil dfu thread ..." without the -f flag works as well.

    However, when I tried the ncp\ftd\usb example, it doesn't work out of the box using nrfutil. It throws an error saying it can't reset the device, so it looks like you need to do some changes to nrfutil.

    So the bad news are that you need to do some modifications and rebuild nrfutil. The good news is that you can use the default NCP example from the SDK.

    If you can use this example for everything you need to do with the connected USB device, then you are almost there already. If you need to use another project, you need to add a USB bootloader that you can use to change between the NCP example and your custom project.

    nrfutil's source code is available here:

    https://github.com/NordicSemiconductor/pc-nrfutil 

    Best regards,

    Edvin

  • Thanks I did not realize the coap was done with spinel.

Reply Children
No Data
Related