This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

[NRF51822] Function to check if BLE is connected or not

Is there a function within the nRF51822 SDK to check if BLE is connected or not (or to check general BLE connection state)?

Thanks.

Parents
  • 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

Reply
  • 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

Children
No Data
Related