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

DFU with bonds and nrf52810

Hi, 

I have a working application with Buttonless Secure DFU Service wich runs on nRF52832. I'm able to perform DFU without bonds, but I want to use bonding in my application. 

I have modified the following define in my application NRF_DFU_BLE_BUTTONLESS_SUPPORTS_BONDS 1 and NRF_DFU_BLE_REQUIRES_BONDS 1 in the bootloader. I have also generated a bootloader_settings_page for my application and I'm flashing it together with the bootloader, but function nrf_dfu_settings_peer_data_is_valid still returns false. Isn't supposed the bootloader_settings_page to avoid this?

I also have another question: if I want one of my services to require encryption, but no MITM protection (BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM) is it required for the bootloader and DFU Buttonless Service to have bond support?

Parents
  • Hi Adriana, 

    nrf_dfu_settings_peer_data_is_valid() returns false because there is no bond information inside the bootloader setting. 

    To be able to test the DFU bootloader with bond, you would need to let the buttonless application run first, then perform a bond with a central device (a phone for example) then you can switch to the bootloader and nrf_dfu_settings_peer_data_is_valid () should return true.

     

    Setting BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM to a characteristic, will cause the characteristic to reject any read and/or write before the link is encrypted. In your case, as you want the link to be encrypted before bootloader mode can be triggered, you can set the characteristic to be with BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM  property. But it's not mandatory. What mandatory is that the bond information should be stored in bootloader setting. 

     

Reply
  • Hi Adriana, 

    nrf_dfu_settings_peer_data_is_valid() returns false because there is no bond information inside the bootloader setting. 

    To be able to test the DFU bootloader with bond, you would need to let the buttonless application run first, then perform a bond with a central device (a phone for example) then you can switch to the bootloader and nrf_dfu_settings_peer_data_is_valid () should return true.

     

    Setting BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM to a characteristic, will cause the characteristic to reject any read and/or write before the link is encrypted. In your case, as you want the link to be encrypted before bootloader mode can be triggered, you can set the characteristic to be with BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM  property. But it's not mandatory. What mandatory is that the bond information should be stored in bootloader setting. 

     

Children
Related