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

Avoid "Bluetooth pairing request" alert on iOS

Hi.

I have an application that needs a low security encryption. Therefore I want to use "Just works" encryption. The pairing process is assumed to be in a "safe" place.

But iOS are prompting with the "Bluetooth pairing request" alert before every connection. And I thing that it is very annoying and irrelevant. I can accept the first alert, but not later.

I am using 7.2 softdevice on a nRF 51822.

Is it possible to suppress this message either from the BLE device (or perhaps in the iOS App).

Kasper

Parents
  • This page describes what parameters needs to be set in order for the peripheral to use Just Works.

    When this is used correctly you should not get a prompt from iOS regarding the pairing request.

  • Thanks for you help shishab, so far. And you were right the call to sd_ble_gap_sec_params_reply did return with error (16=NRF_ERROR_INVALID_ADDR). I believe that the parameter p_sec_keyset cannot be NULL in this case, as suggested on the "Message Sequence Charts" as linked to before. The comment in the header file also describes the possibility to pass a NULL. I think I need more changes. So far I have changed following (probably not compleate list) from the uart example:

    • BLE_GAP_CONN_SEC_MODE_SET_OPEN changed to BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM
    • Parameters to sd_ble_gap_sec_params_reply
    • Upgraded from SD 7.2 to 8.0 (might need further changes) (main.c and ble_* files kept)

    But then I tried to change BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM, and correct in main.c. I expect that it should be more correct. But then no smp pairing request was performed. (and no call of sd_ble_gap_sec_info_reply).

    Maybe I should try to start all over from a new copy of the new version of the BLE UART example.

Reply
  • Thanks for you help shishab, so far. And you were right the call to sd_ble_gap_sec_params_reply did return with error (16=NRF_ERROR_INVALID_ADDR). I believe that the parameter p_sec_keyset cannot be NULL in this case, as suggested on the "Message Sequence Charts" as linked to before. The comment in the header file also describes the possibility to pass a NULL. I think I need more changes. So far I have changed following (probably not compleate list) from the uart example:

    • BLE_GAP_CONN_SEC_MODE_SET_OPEN changed to BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM
    • Parameters to sd_ble_gap_sec_params_reply
    • Upgraded from SD 7.2 to 8.0 (might need further changes) (main.c and ble_* files kept)

    But then I tried to change BLE_GAP_CONN_SEC_MODE_SET_ENC_WITH_MITM to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM, and correct in main.c. I expect that it should be more correct. But then no smp pairing request was performed. (and no call of sd_ble_gap_sec_info_reply).

    Maybe I should try to start all over from a new copy of the new version of the BLE UART example.

Children
No Data
Related