pairing bonding fail

Hi,

Hello everyone, I have encountered a problem in the pairing and bonding process of BLE.I use two NRF52832 development boards, one acts as a slave and the other acts as a master.Before the two peers have never been paired, the pairing and bonding can be performed normally.But after I use the function "pm_peer_delete()" to delete the bonding information on the master side,the connection will be disconnected immediately after the two peers establish a connection.

Here is the log:

SLAVE:

[2022-04-07 11:04:05.801 R]<info> peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change

<info> app: Connected


[2022-04-07 11:04:05.951 R]<info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 133

<info> app: Authorization failed with code: 133!

<info> app: Disconnected

<info> app: Disconnected reason is : 19

MASTER:

[2022-04-07 11:04:05.801 R]<info> BLE_M: Connection 0x0 established, starting DB discovery.


[2022-04-07 11:04:05.921 R]<info> BLE_M: BLE_GAP_EVT_AUTH_STATUS

<info> BLE_M: Authorization failed with code: 133!

<error> nrf_ble_gq: SD GATT procedure (4) failed on connection handle 0 with error: 0x00000008.

<info> BLE_M: Disconnected. conn_handle: 0x0, reason: 0x16

I would like to know what is the reason for the above problem?

According to the following technical Q&A:

https://devzone.nordicsemi.com/f/nordic-q-a/43907/nfc-ble-pairing-connection-issue

The cause of the above problem seems to be that I did not delete the bonding information on the slave side, so I deleted the bonding information on the slave side, and both peers can indeed re-pair and bond.

But I think there is a phenomenon that one of the two peers deletes the existing bonding information. If the other peer does not delete the bonding information, the two devices cannot be reconnected.Is there a better way that the paired peers can delete the bonding information at will, and then both can reconnect without relying on whether the other peer also deletes it?

Parents
  • Hi

    I might be misunderstanding your latest question, but what do you mean by "recorded up to 4" here? If you're only bonding to two devices, why would you record up to 4 "types" of bonding info, and how would this record ever exceed 4? Sorry if I'm not understanding what you're trying to do, but please try explaining in detail what exactly you mean here.

    What SDK version are you using? I think the peer manager storage data section should be helpful for storing data using the peer manager.

    Best regards,

    Simon

  • Hi,

    Sorry for not expressing clearly.

    There are three classes of devices in my system,one is BLE master, another is BLE slave whose name is "SLAVE_CLASS_A" we can call it class A device, and the last one is also BLE slave but whose name is "SLAVE_CLASS_B" we can call it class B device.The master can connect up to four class A devices and four class B devices at the same time,in this way, the master will record at most eight devices bonding information.When the master has stored the bonding information of four class A devices and four class B devices, when another new class A device arrives, the master must delete the earliest recorded of class A device bonding information.

    So the problem I need to solve is that I must know whether the bonding record stored in the FLASH belongs to a class A device or a class B device, and the order in which the records are stored.

    The SDK version i used is 17.0.2.

Reply
  • Hi,

    Sorry for not expressing clearly.

    There are three classes of devices in my system,one is BLE master, another is BLE slave whose name is "SLAVE_CLASS_A" we can call it class A device, and the last one is also BLE slave but whose name is "SLAVE_CLASS_B" we can call it class B device.The master can connect up to four class A devices and four class B devices at the same time,in this way, the master will record at most eight devices bonding information.When the master has stored the bonding information of four class A devices and four class B devices, when another new class A device arrives, the master must delete the earliest recorded of class A device bonding information.

    So the problem I need to solve is that I must know whether the bonding record stored in the FLASH belongs to a class A device or a class B device, and the order in which the records are stored.

    The SDK version i used is 17.0.2.

Children
No Data
Related