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

Bluetooth pairing

Our device allows only one device to pair and delete the original pairing information when there is a new device paired. Restore the original pairing information if there is no new device pairing. There is now a problem with restoring the original pairing information.

first       :   I load the peer data      pm_peer_data_bonding_load();

second :   I delete the peer data     pm_peers_delete();

third     :   I  recove the peer data       pm_peer_new();

after this ,my device can be connected but it can not translate data (our device is a mouse).

is there anythings else I should do .

Parents
  • Hi yangshuanghua, 

    calling pm_peers_delete() will permanently delete all peer data for all stored peers as stated in the documentation.   pm_peer_new  manually adds a new peer and the bonding data this provided as an input to the function to persistent storage. 

    after this ,my device can be connected but it can not translate data (our device is a mouse).

     Have you ensured that the bonding data is deleted on the central side as well? Do you have a sniffer trace of the communication between the nRF device and the BLE central it connects to after you deleted the peer data and then added a new peer with the new bonding data?

    Best regards

    Bjørn

Reply
  • Hi yangshuanghua, 

    calling pm_peers_delete() will permanently delete all peer data for all stored peers as stated in the documentation.   pm_peer_new  manually adds a new peer and the bonding data this provided as an input to the function to persistent storage. 

    after this ,my device can be connected but it can not translate data (our device is a mouse).

     Have you ensured that the bonding data is deleted on the central side as well? Do you have a sniffer trace of the communication between the nRF device and the BLE central it connects to after you deleted the peer data and then added a new peer with the new bonding data?

    Best regards

    Bjørn

Children
Related