ble_gap_dev_authorization() function
Authorizes or deauthorizes a BLE device for a connection. This function updates the security flags of a BLE connection to authorize or deauthorize a device for the specified connection.
Arguments
conn_handle
The handle corresponding to the connection to authorize.
authorized
Authorized the device or not.
Return value
0 on success; BLE_HS_ENOTCONN if the connection handle is not found. BLE_HS_EAUTHOR if the device is not authenticated before authorization.