HID example how to disable automatically bound

Hi,

I'm using SDK17.02 HID example on nRF52810.

What can I do so that my device is not automatically bound when it connects with other new devices.

Parents
  • Hi Taylor, 

    By default when a phone connect to a HID device it will automatically request bonding. It's the default behavior because HID device is usually a keyboard or mouse so the link should be encrypted. 

    You can reject the pairing request from the phone if the device doesn't want to bond at the moment. 

    You can have a look at this post: Option to disable Peer Manager 

    Note that you can block connection from unwanted device by using whitelisting. This way you don't need to modify the peer manager. 

  • Hi Hung Bui,

    There is a new question.

    I have enabled automatically request bonding. When I want to  automatically disconnect with a phone,  my device will automatically connecting again. For example the  battery on low power.

    I have tried using sd_ble_gap_disconnect and stopping advertising immediately, it doesn't work.

    BTW, I could not delete bonding information because my device need to connect automatically when I start advertising again.

     

Reply
  • Hi Hung Bui,

    There is a new question.

    I have enabled automatically request bonding. When I want to  automatically disconnect with a phone,  my device will automatically connecting again. For example the  battery on low power.

    I have tried using sd_ble_gap_disconnect and stopping advertising immediately, it doesn't work.

    BTW, I could not delete bonding information because my device need to connect automatically when I start advertising again.

     

Children
Related