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

how to disconnect from central device on the peripheral side?

hi, I have a question as the title.Is that api sd_ble_gap_connect_cancel? thank you.

Parents
  • If you are looking to disconnect from a established connection, I believe you want to use something like this: err_code = sd_ble_gap_disconnect(get_conn_handle(),BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

    The sd_ble_gap_connect_cancel appears to me to be for canceling an ongoing connection attempt that hasn't yet established a connection.

Reply
  • If you are looking to disconnect from a established connection, I believe you want to use something like this: err_code = sd_ble_gap_disconnect(get_conn_handle(),BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);

    The sd_ble_gap_connect_cancel appears to me to be for canceling an ongoing connection attempt that hasn't yet established a connection.

Children
No Data
Related