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

Thread+BLE,DFU through ble

Hi, nordic engineer:

         Our project has a function, that is, BLE+Thread coexists. We hope that the mobile phone can upgrade the device through BLE. Can this idea be realized?
       I tried to burn softdecvice+bootloader, then use the mobile phone to give the device DFU. After the upgrade is completed, let the device power off and restart, the device does not jump to the application, but enters DFU mode again.

  • Hi.

    At the moment, DFU through BLE for our Thread examples are not possible.

    You can do DFU with Thread, like this example shows, check this tutorial for that.

    I will inform the development team about this feature request :-)

    Best regards,

    Andreas
  • Hi ,AndreasF

         Thank you very much for your reply so fast. Yes, I know that there is DFU function of open thread, but we have an idea. We want to connect a device with a mobile phone and then upgrade it by BLE. Give a device upgrade instead of all. Equipment. Can this be achieved?

  • Hi.

    Unfortunately no, at the moment this is not possible. I have as I said informed the development team about this feature request :-)

    Best regards,

    Andreas

  • Hi Noa-Ben,

    Please take a look at the BLE+Zigbee DFU Server example. It contains the functionality that you look for (the server side is upgradeable by a regular DFU over BLE, implemented as Application-level BLE DFU with background DFU bootloader).

    Porting this example to Thread requires some effort, but at least you can take a look at the sdk_config.h file to get a tip how to configure DFU modules. Additionally, it shows that such functionality should be possible to implement.

    If a device does not enter the new application, most likely the upgrade process has failed. Try to debug the bootloader code to see which firmware validation step has failed.

    Kind Regards,

    Tomchy

  • Hi tomchy:

    1.   I first burn ble bootloader+softdevice, DFU file is thread+ble, the prompt is as follows, I am not sure whether it has been successfully burned.After restart,it will into dfu mode again.
    • 0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000765B8, src=0x2000964C, len=144 bytes), queue usage: 1
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000765B8, pending 1
      0> <debug> nrf_dfu_ble: Freeing buffer 0x2000964C
      0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
      0> <debug> nrf_dfu_req_handler: Offset:329288, CRC:0x3B4A5154
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data
      0> <debug> nrf_dfu_req_handler: Whole firmware image received. Postvalidating.
      0> <debug> nrf_dfu_validation: Hash verification. start address: 0x26000, size: 0x50648
      0> <debug> nrf_dfu_validation: Invalidating old application in bank 0.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 1
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A318, len=896 bytes), queue usage: 2
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 3
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A698, len=896 bytes), queue usage: 4
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> app: timer_stop (0x20005944)
      0> <debug> app: timer_activate (0x20005944)
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 4
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 3
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 2
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 1
      0> <debug> nrf_dfu_req_handler: All flash operations have completed. DFU completed.
      0> <debug> app: Shutting down transports (found: 1)
      0> <debug> nrf_dfu_ble: Shutting down BLE transport.
      0> <debug> nrf_dfu_ble: Disconnecting.
      0> <debug> nrf_dfu_ble: BLE transport shut down.
      0> <debug> app: Resetting bootloader.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> app: Inside main
      0> <debug> app: In nrf_bootloader_init
      0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
      0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
      0> <debug> nrf_dfu_settings: Using settings page.
      0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <debug> app: Enter nrf_bootloader_fw_activate
      0> <debug> app: Valid App
      0> <debug> app: Enter nrf_dfu_app_continue
      0> <debug> app: No copy needed
      0> <debug> app: Setting app as valid
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A318, len=896 bytes), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A698, len=896 bytes), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
      0> <debug> app: Resetting bootloader.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> app: Inside main
      0> <debug> app: In nrf_bootloader_init
      0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
      0> <debug> nrf_dfu_flash: Initializing nrf_fstor

    2.    This is the DFU file that burns the BLE_UART example. It will not enter DFU mode after restarting.

    • 0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_WRITE (data)
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x0002D2DC, src=0x20009834, len=24 bytes), queue usage: 0
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x0002D2DC, pending 0
      0> <debug> nrf_dfu_ble: Freeing buffer 0x20009834
      0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)
      0> <debug> nrf_dfu_req_handler: Offset:29428, CRC:0xB857F718
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)
      0> <debug> nrf_dfu_req_handler: Whole firmware image received. Postvalidating.
      0> <debug> nrf_dfu_validation: Hash verification. start address: 0x26000, size: 0x72F4
      0> <debug> nrf_dfu_validation: Invalidating old application in bank 0.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A318, len=896 bytes), queue usage: 1
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 2
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A698, len=896 bytes), queue usage: 3
      0> <debug> nrf_dfu_req_handler: Request handling complete. Result: 0x1
      0> <debug> app: timer_stop (0x20005944)
      0> <debug> app: timer_activate (0x20005944)
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 3
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 2
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
      0> <debug> nrf_dfu_req_handler: All flash operations have completed. DFU completed.
      0> <debug> app: Shutting down transports (found: 1)
      0> <debug> nrf_dfu_ble: Shutting down BLE transport.
      0> <debug> nrf_dfu_ble: Disconnecting.
      0> <debug> nrf_dfu_ble: BLE transport shut down.
      0> <debug> app: Resetting bootloader.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> app: Inside main
      0> <debug> app: In nrf_bootloader_init
      0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
      0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
      0> <debug> nrf_dfu_settings: Using settings page.
      0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <debug> app: Enter nrf_bootloader_fw_activate
      0> <debug> app: Valid App
      0> <debug> app: Enter nrf_dfu_app_continue
      0> <debug> app: No copy needed
      0> <debug> app: Setting app as valid
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FF000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FF000, len=1 pages), queue usage: 0
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FF000, pending 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FF000, src=0x2000A318, len=896 bytes), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FF000, pending 0
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A698, len=896 bytes), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
      0> <debug> app: Resetting bootloader.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> app: Inside main
      0> <debug> app: In nrf_bootloader_init
      0> <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
      0> <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
      0> <debug> nrf_dfu_settings: Using settings page.
      0> <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
      0> <debug> app: Enter nrf_bootloader_fw_activate
      0> <info> app: No firmware to activate.
      0> <debug> app: App is valid
      0> <debug> nrf_dfu_settings_svci: Erasing settings page additional data.
      0> <info> nrf_dfu_settings: Backing up settings page to address 0xFE000.
      0> <debug> nrf_dfu_settings: Writing settings...
      0> <debug> nrf_dfu_settings: Erasing old settings at: 0x000FE000
      0> <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x000FE000, len=1 pages), queue usage: 0
      0> <debug> nrf_dfu_flash: Flash erase success: addr=0x000FE000, pending 0
      0> <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x000FE000, src=0x2000A698, len=896 bytes), queue usage: 1
      0> <debug> nrf_dfu_flash: Flash write success: addr=0x000FE000, pending 0
      0> <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
      0> <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
Related