This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Why does softdevice update with DFU not work

I have a working custom DFU bootloader based on the official bootloader from the SDK 8.1.0. Updating the normal application code works without any problem. Now I want to also update the softdevice (currently S120). Therefor I generated the update .zip file with the tool included in the MasterControlPanel version 3.9.0.6. I used the following command on the CMD:

nrf.exe dfu genpkg --softdevice s120_softdevice.hex --dev-type 0xffff --dev-revision 0xffff --sd-req 0xffff SD_DFU.zip

But when uploading this .zip file to the bootloader with the nRF Connect Android App, I can see that the bootloader breaks the communication after prevalidating the init package.

I can see that dfu_init_pkt_complete(); in dfu_transport_ble.c returns NRF_ERROR_INVALID_LENGTH. This comes from the dfu_init_prevalidate(...)function in dfu_init_template.c. The check:

if (((uint32_t)p_init_data + init_data_len) < 
        (uint32_t)&p_init_packet->softdevice[p_init_packet->softdevice_len])

goes wrong, and NRF_ERROR_INVALID_LENGTH is returned. Is it a problem on the bootloader side, or is it a problem with generating/transmitting the .zip file? Any help appreciated.

BR, BTprogrammer

Parents
  • Good morning Bjørn, thanks for that advice with the new version. When generating the package with the new nrfutil - tool, and using the standard bootloader from the SDK 11 it works and the new softdevice is uploaded. Unfortunately my custom bootloader (based on SDK8.1.0 bootloader) now breaks on a later point. I get an error NRF_ERROR_NO_MEM from hci_mem_pool_rx_produce(...) called from app_data_process(...) (dfu_transport_ble.c). Maybe you have also any idea about that?

Reply
  • Good morning Bjørn, thanks for that advice with the new version. When generating the package with the new nrfutil - tool, and using the standard bootloader from the SDK 11 it works and the new softdevice is uploaded. Unfortunately my custom bootloader (based on SDK8.1.0 bootloader) now breaks on a later point. I get an error NRF_ERROR_NO_MEM from hci_mem_pool_rx_produce(...) called from app_data_process(...) (dfu_transport_ble.c). Maybe you have also any idea about that?

Children
No Data
Related