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

How to get handle and disconnect peripheral?

I need to send a disconnect command from the app layer. I've seen a few other posts that say to use uint32_t sd_ble_gap_disconnect. One post had this line of code as an answer sd_ble_gap_disconnect(get_conn_handle(),BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

However, get_conn_handle() is not a function call from the SDK and I don't see any functions that can get the connection handle. How can I get the connection handle in order to call sd_ble_gap_disconnect.

Parents Reply Children
No Data
Related