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

Unable to perform DFU over Thread

I'm trying to run the Thread DFU examples on nRF52840, unfortunately I can't get them to work. On the client, I got the bootloader set up and ready, with the client application, I also got the upgrade app pkg done.

The nrfutil package seems kind of working, but probably not 100%. It flashed the device nicely, and started to send trigger packets (I tried both multicast and specific client device addresses), and the client is receiving the trigger packets. But, when client tries to ask for init packet, nrfutil doesnt seem to receive it. I do see that both nRF devices are connected and within the same network (ping works, I can see the router table output on the client having both devices etc.) But, it seems that nrfutil is not able to receive anything from NCP, i.e. the communication there is one-way only. Even if I added some debug statements to tncp.py/_wpan_receive, it doesn't seem to be ever called. (When nrfutil starts, it does succesfully set few spinel properties like panid, though). Even if I do call coap manually from client's CLI, nrfutil doesnt seem to receive it.

So, the resulting situation is that when I start nrfutil, it transfers a number of trigger packets, and prints out timeouts, and the client is receiving them, asks for init packets, but also retries few times with timeouts.

Any suggestions?

  • Which version of nrfutil are you using? (Check with nrfutil version) Could you post the output of nrfutil with the --verbose option enabled?

  • I'm using version taken from git few days ago - commit a63e118. It outputs:

    nrfutil version 3.3.2
    11-07 14:04:01  __main__     INFO     PyPi URL: pypi.python.org/.../nrfutil
    11-07 14:04:01  __main__     DEBUG    GitHub URL: github.com/.../pc-nrfutil
    

    Originally I started with pip install nrfutil, which gave me:

    nrfutil version 3.3.2
    PyPi URL: pypi.python.org/.../nrfutil
    

    and the same behavior.

    Also, I'm using MacOS, if that changes anything.

  • Did you follow these instructions for testing? What is the output of nrfutil dfu thread command in step 6.b.? (please enable verbose output)

  • Yes, I did follow those instructions. Sadly they have a bug, which caused me to do some severe debugging. The settings.hex file is merged in nRF52 mode, which places settings at 0x7f000 instead of 0xff000 for nRF52840. After I fixed it, bootloader started to launch the client application properly. With the debugs, it does print this: https://pastebin.com/6QRAHvd5 When it is re-transmitting trigger packets, the client is re-transmitting init packet requests. Behaviour is the same if I omit the -a and use default ff03::1 multicast.

  • As there seem to be a problem with communication between NCP and nrfuitl, it might be a problem with pyspinel. Unfortunately we have'nt bound to a specific tag of pyspinel in the recent relase of nrfutil, hence it always downloads the most recent version of pyspinel.

    What I suggest to try is to replace pyspinel with pyspinel == 1.0.0a1 in requirements.txt of nrfutil and update the pyspinel package.

1 2