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

what's the difference between disconnection reason 0x13 and 0x16?

what's the detail difference between BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION and BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION?

Parents
  • When you pass a disconnect reason, you should always use what you want the peer device to see. This means that when you disconnect from your side, you should pass BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION. However, when you then get the disconnect event, you'll see that it has the BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION reason, as seen by the link layer.

    The same can be seen if you do a disconnect from MCP. In the disconnected event on the nRF51 side, you'll see BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as reason, but if you look in MCP's log pane, you'll see BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION.

    Edit: Complete rewrite, as my initial answer was plain wrong.

Reply
  • When you pass a disconnect reason, you should always use what you want the peer device to see. This means that when you disconnect from your side, you should pass BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION. However, when you then get the disconnect event, you'll see that it has the BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION reason, as seen by the link layer.

    The same can be seen if you do a disconnect from MCP. In the disconnected event on the nRF51 side, you'll see BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION as reason, but if you look in MCP's log pane, you'll see BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION.

    Edit: Complete rewrite, as my initial answer was plain wrong.

Children
Related