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

static Passkey add central ble_app_uart_c

Hello everyone,

I trying to communicate nrf52832 SDK 15.0 ble_app_uart(peripheral)  to ble_app_uart_c (central) with secured purpose adding static passkey but i don't get perfect examples on central side adding passkey and peer manager.  please share some example code for adding passkey in central side for better communication.

I added peer manager concept using ble_app_gls example but my code doesn't come in this case BLE_GAP_EVT_AUTH_KEY_REQUEST. i using whitelist in peripheral side it's also need central side...???

  please refer any working code.

Parents Reply Children
  • Hello simon,

    central some time makes this kind of error show

     0> <info> peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, procedure: Encryption, error: 4102
     0> <warning> peer_manager_handler: Disconnecting conn_handle 0.
     0> <info> app: Disconnected.
     0> <info> app: Erase bonds
     0> <info> app: Disconnected. conn_handle: 0x0, reason: 0x16
     0> <error> peer_manager_handler: Peer deleted successfully: peer_id: 0
     0> <info> peer_manager_handler: All peers deleted.

  • My suspicion is that the LTK is lost on the peripheral side. Could you try to do the following:

    • Erase the content of both chips
    • Build and flash ble_app_uart(with bondingl)  and ble_app_uart_c (with bonding) onto your two nRF52832's
    • Run both the examples and establish a bond
    • Erase the content from the peripheral device and reprogram it with ble_app_uart(with bondingl)
    • Try to establish a bond once again and see if the error appears

    Best regards,

    Simon

  • sorry for the long delay to replay

    I erase the chip and update the same code with bonding but still i have the same problem in connection security failed below

    00> <info> peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Bonding, error: 132

Related