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

SDK 14: secure buttonless DFU

I'm trying to integrate buttonless DFU with secure bootloader with bonds with the DFU. Using SDK 14 with SD 132 v5.0.0. Using projects: secure_dfu_ble, ble_app_hrs_freertos(modified with ble_app_buttonless_dfu)

Using the nRF connect for android, I can currently tell the embedded app to go to the BL, but the application does not continue with the DFU - it connects automatically to the embedded device in the BL mode (and sees the DFU services), but unable to continue there.

There's no error in the embedded size and app_error_handler_bare is not triggered.

However I'm seeing in the nRF connect's log that it's removing the bond information. Is that OK? Could be a reason that it's unable to proceed with the secure DFU. Then how can I test the DFU and when will the app be updated? If it is OK, what should I check?

Another note, in the secure_dfu_ble_s132 project, nrf_ble_dfu.c file, there's code that shouldn't be there:

            uint16_t cccd;
        ble_gatts_value_t value =
        {
            .len     = BLE_CCCD_VALUE_LEN,
            .offset  = 0,
            .p_value = (uint8_t*)&cccd
        };

        err_code = sd_ble_gatts_value_get(m_conn_handle, BLE_UUID_GATT_CHARACTERISTIC_SERVICE_CHANGED, &value);
        APP_ERROR_CHECK(err_code);

        NRF_LOG_DEBUG("CCCD for the service changed is 0x%04x", cccd);

in line 695. Was it added by mistake or should it be somewhere else?

Thanks in advance

Related