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

HOW CAN I VOLUNTARILY DISCONNECT BLE DEVICES.

Dear all: When the PC1001 board connected with other BLE devices, how i can voluntarily disconnect them?
it seems that the use of the sd_ble_gap_disconnect function has some errors with invalid params . what should i do ? attach my use: err_code = sd_ble_gap_disconnect(m_conn_handle,
BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION); APP_ERROR_CHECK(err_code);

Parents
  • There are only two allowed disconnect reasons, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and BLE_HCI_CONN_INTERVAL_UNACCEPTABLE, of which the latter should only be used if the connection intervals are in fact unacceptable to your application.

    Most often the BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION code is therefore the one that should be used.

    I've requested the documentation on this to be improved in future versions.

Reply
  • There are only two allowed disconnect reasons, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and BLE_HCI_CONN_INTERVAL_UNACCEPTABLE, of which the latter should only be used if the connection intervals are in fact unacceptable to your application.

    Most often the BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION code is therefore the one that should be used.

    I've requested the documentation on this to be improved in future versions.

Children
Related