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

How to manually disconnect?

Hello everyone

I have kind of a basic question.

I'm not sure how to manually disconnect from a ble connection. I'm using the ble_app_uart and ble_app_uart_c examples from the 14.2 SDK

The function sd_ble_gap_disconnect(uint16_t conn_handle, uint8_t hci_status_code) wants a handler passed as an argument. What do I have to put in there?

In the examples the disconnection is made in the ble_evt_handler function where the conn_handler is taken from the ble_evt_t.

Since I don't have access to that ble event outside of the handler I tried to copy the conn_handler in the ble_evt_handler function to a global variable and then use it for my call of the disconnection funstion, but that doesn't seem to work.

What is the proper way to do this?

Thanks for any advice

Parents Reply Children
No Data
Related