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

is it possible to recognize device side , if ble disconnected host has gone to sleep or it has got device bonding infos deleted?

To the kind attention of Nordic support team,

In case of a device and host ble bonded, I'm giving a look at disconnection reasons codes due to (1) host entering sleeping mode, and

(2) removing bonding infos only host side. Disconnection reason seems to be the same in both case (BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) decoding

p_ble_evt->evt.gap_evt.params.disconnected.reason
according to

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v6.1.1%2Fgroup___b_l_e___h_c_i___s_t_a_t_u_s___c_o_d_e_s.html&resultof=%22BLE%5FHCI%5FSTATUS%5FCODE%22%20

Can you please confirm?

So there is no way to distinguish device side those two scenarios?

Thank you for your kind suggestions

Best regards

Parents
  • Hi, 

    Please clarify what you meant by "host", did you mean the central device ?


    1. If the device enters sleep mode and doesn't keep the connection, you should receive  BLE_HCI_CONNECTION_TIMEOUT  on the peer

    2. If the central device lost bond information and it request new bond and it's not accepted by the peripheral, the peripheral will send "Pairing not supported" . Disconnection or not it depends on the application. 

    I would suggest you to use a sniffer trace to get deeper information about the connection and how it's terminated. 

Reply
  • Hi, 

    Please clarify what you meant by "host", did you mean the central device ?


    1. If the device enters sleep mode and doesn't keep the connection, you should receive  BLE_HCI_CONNECTION_TIMEOUT  on the peer

    2. If the central device lost bond information and it request new bond and it's not accepted by the peripheral, the peripheral will send "Pairing not supported" . Disconnection or not it depends on the application. 

    I would suggest you to use a sniffer trace to get deeper information about the connection and how it's terminated. 

Children
No Data
Related