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

Disable notification/permission to pair in NRF52

Hi,

In-app when you scan for device and after it is found you press the connect and then the notification/permission to pair pops out. Our app developers are saying that we must disable this notification in our firmware, but I can't find any similar settings in nRF SDK. If I connect to the device from nRF connect I don't see any notification/permission to pair. 

Can we disable notification/permission to pair in firmware or not? 

Thanks for help

Blaz

  • Hi, 

    Unfortunately, the BLE stack automatically pops up an alert view to prompt the user to confirm or cancel the pairing process. This is something that is happening on the OS BLE stack, so you won´t be able to prevent it from appearing from the application unless you don't use encrypted characteristics. The bonding process is triggered when you try to read an encrypted characteristic. 

    -Amanda H.

  • Dear Amanda,

    Thank you for your support. 

    Our application was developed from ble_app_bms example. Our BLE security settings were set to pair/no bonding. From your answers, I assume that we must set up BLE connection no pair no bonding?

    Form the instructions form your site it is written No pairing/bonding: NULL (or do not call pm_sec_params_set)

    I have disabled the pm_sec_params_set function and the app is still working. When I connect to the device after a few seconds I get time out message and disconnection of the BLE connection: BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION.

    I find timeouts with disconnection in ble_evt_handler:

    case BLE_GATTC_EVT_TIMEOUT:
    // Disconnect on GATT Client timeout event.
    NRF_LOG_DEBUG("GATT Client Timeout.");
    err_code = sd_ble_gap_disconnect(p_ble_evt->evt.gattc_evt.conn_handle,
    BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
    APP_ERROR_CHECK(err_code);
    break;

    case BLE_GATTS_EVT_TIMEOUT:
    // Disconnect on GATT Server timeout event.
    NRF_LOG_DEBUG("GATT Server Timeout.");
    err_code = sd_ble_gap_disconnect(p_ble_evt->evt.gatts_evt.conn_handle,
    BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
    APP_ERROR_CHECK(err_code)

    But they are not the reason of diconnect.

    Can you please help me out where I can disable this timeout. 

    Regards, 

    Blaz 

  • Hi, 

    Bselekar said:
    Our application was developed from ble_app_bms example. Our BLE security settings were set to pair/no bonding. From your answers, I assume that we must set up BLE connection no pair no bonding?

    The Bond Management Application is an example that demonstrates how to use the Bond Management Service. The example shows how to manage the storage of bond information and how to delete bonds after they have been established. Therefore, it should set to no bonding.

    You should another example and see the Peer Manager/Usage.

    If you have a new question, please create a new support case. 

    -Amanda H. 

  • Hi,

    Thank you for your replay. Which no paring no bonding example is best to check? 

    Regards, 

    Blaz

  • Hi, 

    You could try Heart Rate Application and do not call pm_sec_params_set for no pairing/bonding. 

    -Amanda H.

Related