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

NRFutil failing to perform dfu over ble with code 0x8016.

Hello,

I've been trying to perform a dfu to a target Nordic device over Bluetooth using an nrf52840 dongle distributed by Laird, however whenever I attempt to run the command:

I get a strange error. I will post the verbose output below, but first let me tell about the environment, packages and what firmware is on my device.

This is running on a Raspberry PI 4, with Buster 10.

I have the latest version of pc-ble-driver built on the device, pc-ble-driver-py version 0.14.2, and nrfutil version 6.1.0.

My nrf52840 dongle is flashed with connectivity_6.0.0_usb_with_s140_6.1.1.hex.

Here is the output from running the command:

Update:

Some information I forgot to mention was that the target device is using s140_nrf52_6.1.1_softdevice.hex. Now I've since tried different hex files. Before I knew what was really on the target device I tried connectivity_4.1.2_usb_with_s132_5.1.0.hex because it was precompiled with pc-ble-driver-py. The behavior here was that it would perform the update, but fail at 62%. The output was this:

After figuring out what was on the target device I've tried the following hex files:

connectivity_4.1.2_usb_with_s140_6.1.1.hex

connectivity_6.1.0_usb_with_s140_6.1.1.hex

connectivity_6.1.1_usb_with_s140_6.1.1.hex

But all of these have exhibited the exact same behavior as in the original post.

  • tried connectivity_4.1.2_usb_with_s132_5.1.0.hex

    That is the correct version to use, since pc-ble-driver-py does not support SD API 6 and 7.

    The behavior here was that it would perform the update, but fail at 62%

    Does it always fail at 62% ? and with the same error-code ?

  • Hell Sigurd,

    Thank you for the reply. That is good to know about the SD. As far always failing on 62%, that is not the case. It can fail at anytime. One time it failed at 97%. However sometimes it finishes completely, but when it fails it always has that same error code.

  • Do you see any errors in the log from the other device? 

    Could you try to flash the debug variant of the bootloader on the device you are DFUing, and check the log output on that device ? 

  • My suspicion is that the PI is dropping the dongle mid dfu at time. I've been running dfus through a separate linux environment but with the same versions of nrfutil and pc-ble-driver-py and haven't had an issue there yet. I am looking into whether it is a known issue with PIs dropping usb devices from time to time.

    Edit:

    After running in the separate linux environment about 40 times, the dfu process crashes about 5% of the time. There two seperate errors that come up. NRF_ERROR_SD_RPC_NO_RESPONSE, which only came up twice, once at 99% and another at 20%. Not sure why that issue is still occurring but it was very rare.

    The second error was a little more frequent. NRF_ERROR_INVALID_PARAM. This one had the following output when it occured. It seems to have something to do with setting the MTU.

  • Do you know what could be causing the NRF_ERROR_INVALID_PARAM error from the log output I provided in my other reply to this post? I probably should have done a reply instead of editing since that probably would have sent a notification. 

1 2 3