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

Application service UUID gone after secure OTA DFU

Hello, 

I am using nRF52832 on SES v4.12 with SDK v15.3 and SD v6.1.1 on a custom board.

Background: 

I want to perform OTA DFU and with that i have two services enabled (secure dfu buttonless and NUS). I was facing OTA DFU issue in which i was getting CRC does not match error. This has been resolved here - https://devzone.nordicsemi.com/f/nordic-q-a/55653/dfu-crc-does-not-match-error

So, i have been able to perform OTA update. 

The package that i created includes BL+SD+APP. 

Problem: 

Once i perform the update and connect again, i only see one service, which is Secure DFU service and the other which is the main application service ID (NUS) is gone. I looked in the forum and found this -https://devzone.nordicsemi.com/f/nordic-q-a/39982/after-ota-dfu-bootloader-application-gone

But i do not quite fully understand as to what is to be done here. Could you please highlight on what is required for a proper DFU process? From what i understand from the post and infocenter that it is still a single update, so BL+SD+APP merged together should work fine internally. 

EDIT:

Zip created has only application hex in it. BL+SD+APP is programmed directly using nrfjprog. 

Please let me know if you require more information. 

Thanks a lot!

-SK

  • Okay, tried doing OTA DFU. Still not working. 

    Error 0x85 - GATT Error. Before this happens, device resets. 

  • logs from the bootloader as i try to do DFU

    <debug> app: In nrf_bootloader_init
    
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    
    <debug> nrf_dfu_settings: Using settings page.
    
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <debug> app: Enter nrf_bootloader_fw_activate
    
    <info> app: No firmware to activate.
    
    <debug> app: App is valid
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    
    <debug> app: In nrf_bootloader_init
    
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    
    <debug> nrf_dfu_settings: Using settings page.
    
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <debug> app: Enter nrf_bootloader_fw_activate
    
    <info> app: No firmware to activate.
    
    <debug> app: App is valid
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    
    <debug> app: In nrf_bootloader_init
    
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    
    <debug> nrf_dfu_settings: Using settings page.
    
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Writing settings...
    
    <debug> nrf_dfu_settings: Erasing old settings at: 0x0007E000
    
    <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0007E000, len=1 pages), queue usage: 0
    
    <debug> nrf_dfu_flash: Flash erase success: addr=0x0007E000, pending 0
    
    <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x0007E000, src=0x20005DE4, len=896 bytes), queue usage: 1
    
    <debug> nrf_dfu_flash: Flash write success: addr=0x0007E000, pending 0
    
    <debug> app: Enter nrf_bootloader_fw_activate
    
    <info> app: No firmware to activate.
    
    <debug> app: App is valid
    
    <debug> app: DFU mode requested via GPREGRET.
    
    <info> nrf_bootloader_wdt: WDT is not enabled
    
    <debug> app: in weak nrf_dfu_init_user
    
    <debug> app: timer_stop (0x200057D8)
    
    <debug> app: timer_activate (0x200057D8)
    
    <info> app: Entering DFU mode.
    
    <debug> app: Initializing transports (found: 1)
    
    <debug> nrf_dfu_ble: Initializing BLE DFU transport
    
    <debug> nrf_dfu_ble: Setting up vector table: 0x00072000
    
    <debug> nrf_dfu_ble: Enabling SoftDevice.
    
    <debug> nrf_dfu_ble: Configuring BLE stack.
    
    <debug> nrf_dfu_ble: Enabling the BLE stack.
    
    <debug> nrf_dfu_ble: Copying peer data
    
    <debug> nrf_dfu_ble: Using default advertising name
    
    <debug> nrf_dfu_ble: Advertising...
    
    <debug> nrf_dfu_ble: BLE DFU transport initialized.
    
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_sd backend.
    
    <debug> app: Enter main loop
    
    <debug> nrf_dfu_ble: Connected
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    
    <debug> nrf_dfu_ble: max_conn_interval: 12
    
    <debug> nrf_dfu_ble: min_conn_interval: 12
    
    <debug> nrf_dfu_ble: slave_latency: 0
    
    <debug> nrf_dfu_ble: conn_sup_timeout: 600
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_SEC_INFO_REQUEST
    
    <debug> nrf_dfu_ble: Sending Service Changed indication
    
    <debug> nrf_dfu_ble: Finished handling conn sec update
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    
    <debug> nrf_dfu_ble: max_conn_interval: 6
    
    <debug> nrf_dfu_ble: min_conn_interval: 6
    
    <debug> nrf_dfu_ble: slave_latency: 0
    
    <debug> nrf_dfu_ble: conn_sup_timeout: 500
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_CONN_PARAM_UPDATE
    
    <debug> nrf_dfu_ble: max_conn_interval: 12
    
    <debug> nrf_dfu_ble: min_conn_interval: 12
    
    <debug> nrf_dfu_ble: slave_latency: 0
    
    <debug> nrf_dfu_ble: conn_sup_timeout: 600
    
    <debug> nrf_dfu_ble: Received BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST (request: 517, reply: 247).
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST.
    
    <debug> nrf_dfu_ble: Received BLE_GAP_EVT_DATA_LENGTH_UPDATE (251, max_rx_time 2120).
    
    <debug> app: In nrf_bootloader_init
    
    <debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
    
    <debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
    
    <debug> nrf_dfu_settings: Using settings page.
    
    <debug> nrf_dfu_settings: Copying forbidden parts from backup page.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
    
    <debug> app: Enter nrf_bootloader_fw_activate
    
    <info> app: No firmware to activate.
    
    <debug> app: App is valid
    
    <debug> nrf_dfu_settings_svci: Erasing settings page additional data.
    
    <info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
    
    <debug> nrf_dfu_settings: Writing settings...
    
    <debug> nrf_dfu_settings: Erasing old settings at: 0x0007E000
    
    <debug> nrf_dfu_flash: nrf_fstorage_erase(addr=0x0x0007E000, len=1 pages), queue usage: 0
    
    <debug> nrf_dfu_flash: Flash erase success: addr=0x0007E000, pending 0
    
    <debug> nrf_dfu_flash: nrf_fstorage_write(addr=0x0007E000, src=0x20005DE4, len=896 bytes), queue usage: 1
    
    <debug> nrf_dfu_flash: Flash write success: addr=0x0007E000, pending 0
    
    <debug> app: Running nrf_bootloader_app_start with address: 0x00001000
    
    <debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
    
    

  • Okay so i noticed that for the previous SDK 14.2 i used inactivity timer value as 10000. 

    Increasing the value to 120000 as was default, i did not see any GATT error while doing OTA DFU.

Related