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.

          The SDK version I currently use is nRF5_SDK_for_Thread_and_Zigbee_v3.1.0_c7c4730. I see some conflicts between the BLE DFU partition and the openthread data store. Can you tell me how to change itBLE DFU memoryopenthread memory

Parents
  • Hi,

    I don't see any problems with using the BLE bootloader on the same device as a BLE+Thread app. I would suggest that you try to debug the bootloader after DFU to find out why it falls back to DFU mode instead of booting the app.  First step can be to place breakpoints in nrf_bootloader.c::dfu_enter_check() and see if it returns true. 

    The memory layout should be ok, but make sure that NRF_DFU_APP_DATA_AREA_SIZE in the bootloader project corresponds with the number of flash pages used by your application (OT Data + FDS pages if you use FDS in your app). 

  • Hi Vidar:

               I compiled  this project and generated a application hex file . File Directory is:examples\multiprotocol\ble_thread\ble_thread_dyn_mtd_coap_cli.

              And i  program softdevice and bootloader hex to board.

            From the printed data, DFU is complete, but it cannot jump to the application.ble_thread_dyn_mtd_coap_cli_pca10056_s140.hex8103.s140_nrf52_6.1.1_softdevice.hexsyc_app3.zip

              

     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_fstorage_nvmc backend.
     0> <debug> nrf_dfu_settings: Using settings page.
     0> <debug> nrf_dfu_set

  • Hi,

    I would like to test this here, but it looks like the bootloader hex is missing?

Reply Children
Related