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

DFU Passkey and Whitelist

I am trying to use whitelisting and a passkey to add security for my application. So far I have the passkey set up so that it is working on the master control panel on PC, but for some reason it is not working on the iOS app. I also am not sure that I am implementing the whitelist correctly. I want to be able to bond to the device using a passkey, and then program OTA using the DFU service. I have attached my main.c file to look at. (I am using sd130 v.2 and SDK 11).

These messages just keep popping up in the log and repeating nonstop image description

Parents
  • I think you are using S130 2.0.0-7.alpha, together with SDK 11.0.0-2.alpha. I would recommend using S130 2.0.1, since this is a production release. Use this with SDK 11.0.0. It is available here. Under nRF5_SDK.

    You are calling sd_ble_gap_authenticate() every time on_ble_evt(), which means that you send a security request to the central every time you get a BLE event from the SoftDevice. Remove it.

  • That should not help at all, you should have the exact same behavior. The events from the SoftDevice are sent to ble_evt_dispatch() first, it forwards the events to on_ble_evt() and more. You cannot pair before you connect. It is not possible. If you want to send a security request after you have connected you can use the BLE_GAP_EVT_CONNECTED event. Please be aware that it is the central that actually decides if it want to respond to the security request from the peripheral, and send a pairing request.

Reply
  • That should not help at all, you should have the exact same behavior. The events from the SoftDevice are sent to ble_evt_dispatch() first, it forwards the events to on_ble_evt() and more. You cannot pair before you connect. It is not possible. If you want to send a security request after you have connected you can use the BLE_GAP_EVT_CONNECTED event. Please be aware that it is the central that actually decides if it want to respond to the security request from the peripheral, and send a pairing request.

Children
No Data
Related