This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 136

Hello All,

When I was testing our ble keyboard, there was a problem with the Lenovo tablet connection pairing binding. Please help me, thank you!

1. Ble keyboard is based on sdk15.3: nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_hids_keyboard\pca10040e\s112\arm5_no_packs

2. nrf52810

3. Lenovo: windows10 64bit

4. Issue: At first connect the keyboard with the tablet and pairing and bonding, then click the key to disconnect and delete the pairing bonding information, and then change the MAC address to broadcast. At this time, the tablet can scan to the device. then when i click to connect to the device that will be prompted with the following of error prompt: "peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 136". What is the cause of this? Or how to configure a new device to pair with the tablet again?

Thanks!

Pany

  • Do you have any on-air sniffer log?

    Regarding step 4: Do you deleted pairing information on peripheral (keyboard) or central (tablet) or both?

    Thanks,
    Kenneth

  • 00> <info> app: HID Keyboard example started.
    00> 
    00> <info> app:   m_whitelist_peer_cnt 2, MAX_PEERS_WLIST 8
    00> 
    00> <debug> app: pm_whitelist_get returns 1 addr in whitelist and 1 irk whitelist
    00> 
    00> <info> app: Fast advertising with whitelist.
    00> 
    00> <info> app: Connected
    00> 
    00> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
    00> 
    00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 525 bytes.
    00> 
    00> <debug> nrf_ble_gatt: Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.
    00> 
    00> <info> app: Disconnected
    00> 
    00> <info> app: Erase bonds!
    00> 
    00> <error> peer_manager_handler: Peer deleted successfully: peer_id: 0
    00> 
    00> <info> peer_manager_handler: All peers deleted.
    00> 
    00> <info> app: Fast advertising.
    00> 
    00> <info> app: Connected
    00> 
    00> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
    00> 
    00> <info> app: New Bond, add the peer to the whitelist if possible
    00> 
    00> <info> app:   m_whitelist_peer_cnt 2, MAX_PEERS_WLIST 8
    00> 
    00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 525 bytes.
    00> 
    00> <debug> nrf_ble_gatt: Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.
    00> 
    00> <info> app: HID Keyboard example started.
    00> 
    00> <info> app:   m_whitelist_peer_cnt 1, MAX_PEERS_WLIST 8
    00> 
    00> <debug> app: pm_whitelist_get returns 0 addr in whitelist and 0 irk whitelist
    00> 
    00> <info> app: Fast advertising.
    00> 
    00> <info> app: Connected
    00> 
    00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 527 bytes.
    00> 
    00> <debug> nrf_ble_gatt: Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.
    00> 
    00> <info> peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding
    00> 
    00> <info> app: New Bond, add the peer to the whitelist if possible
    00> 
    00> <info> app:   m_whitelist_peer_cnt 2, MAX_PEERS_WLIST 8
    00> 
    00> <info> app: Disconnected
    00> 
    00> <info> app: Erase bonds!
    00> 
    00> <error> peer_manager_handler: Peer deleted successfully: peer_id: 0
    00> 
    00> <info> peer_manager_handler: All peers deleted.
    00> 
    00> <info> app: Fast advertising.
    00> 
    00> <info> app: Connected
    00> 
    00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested a data length of 123 bytes.
    00> 
    00> <debug> nrf_ble_gatt: Updating data length to 27 on connection 0x0.
    00> 
    00> <debug> nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 527 bytes.
    00> 
    00> <debug> nrf_ble_gatt: Updating ATT MTU to 23 bytes (desired: 23) on connection 0x0.
    00> 
    00> <debug> nrf_ble_gatt: Data length updated to 27 on connection 0x0.
    00> 
    00> <debug> nrf_ble_gatt: max_rx_octets: 27
    00> 
    00> <debug> nrf_ble_gatt: max_tx_octets: 27
    00> 
    00> <debug> nrf_ble_gatt: max_rx_time: 1096
    00> 
    00> <debug> nrf_ble_gatt: max_tx_time: 1096
    00> 
    00> <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 136
    00> 
    00> <info> app: Disconnected
    00> 

  • Hi Kenneth,

    Thank you for your reply!

    I had deleted pairing information on peripheral (keyboard),but not deleted central (tablet).

    pany

  • Can you try to allow re-pairing by adding handling of PM_EVT_CONN_SEC_CONFIG_REQ as shown here?
    https://devzone.nordicsemi.com/f/nordic-q-a/57979/disable-bonding-and-allow-only-pairing/235212#235212

Related