Is there a function within the nRF51822 SDK to check if BLE is connected or not (or to check general BLE connection state)?
Thanks.
Hi there,
Right now there is no function for this in the SDK. The SDK applications and libraries use the BLE_GAP_EVT_CONNECTED and BLE_GAP_EVT_DISCONNECTED events triggered by the SoftDevice to update the link status. If you are interested, you may refer to the functions on_connect, on_disconnect and ble_hrs_sensor_contact_supported_set in ble_hrs.c to see how this is done.
Cheers, Balaji
Hi there,
Right now there is no function for this in the SDK. The SDK applications and libraries use the BLE_GAP_EVT_CONNECTED and BLE_GAP_EVT_DISCONNECTED events triggered by the SoftDevice to update the link status. If you are interested, you may refer to the functions on_connect, on_disconnect and ble_hrs_sensor_contact_supported_set in ble_hrs.c to see how this is done.
Cheers, Balaji