How to block the over-the-air DFU?

Hi everyone,

I use the ble-app-buttonless-dfu example to develop my application.

I make a mutual authentication to be sure the device is connected to the right mobile app.

In the used example, the OTA DFU is always available.

The main goal is to block the DFU when the mutual authentication is not done. For the moment, I am able to refuse the DFU the application handler: ble_dfu_evt_handler. But I am blocked in a loop in app_shutdown_handler function.

Does anyone have a solution ?

Best regards

Parents
  • Hi, I am assuming that this is our older nRF5SDK related development. 

    I am not so sure what you mean by mutual authentication (probably a translate error?), but if you mean that you need pairing or bonding established before these two devices can start the OTA process, then there is no native support for it. 

    As far as I know, once you have called ble_dfu_buttonless_init and returned will have registered the DFU service already.  You would have to split this init into two parts if you want to have authentication/trigger check in between. I do not have an example to show you, but this is doable with some changes to the way you initialize the dfu and probably handling BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST a bit different and then re advertising the dfu service after you receive this Authorize request.

Reply
  • Hi, I am assuming that this is our older nRF5SDK related development. 

    I am not so sure what you mean by mutual authentication (probably a translate error?), but if you mean that you need pairing or bonding established before these two devices can start the OTA process, then there is no native support for it. 

    As far as I know, once you have called ble_dfu_buttonless_init and returned will have registered the DFU service already.  You would have to split this init into two parts if you want to have authentication/trigger check in between. I do not have an example to show you, but this is doable with some changes to the way you initialize the dfu and probably handling BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST a bit different and then re advertising the dfu service after you receive this Authorize request.

Children
No Data
Related