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

Pairing/bonding with ble_app_template example not working for me

Hi,

I just recently got into designing Bluetooth devices and I am experimenting with NRF51822 and BLE400 board. I managed to compile and upload the examples from SDK 11.0.0 to the device with SEGGER Embedded Studio and I can advertise and connect to the device with nRF Connect app on my Android phone.

When I try to bond with nRF Connect it just hangs up after a couple of seconds. A similar thing happens if I try to pair with the phone directly.

Is there something I have to implement in the code of the example app?

Parents
  • The error value is in p_evt->params.error_unexpected.error, you can use SEGGER_RTT_printf to print out.

    There are only 3 place where PM_EVT_ERROR_UNEXPECTED is assigned inside peer_manager, you can track them down.

    I assume you have followed the tutorial here (a bit out of date) and here ?

    Also make sure you erase the chip completely when you test. There could be that earlier data stored can cause an issue when bonding is stored.

    You can try to capture a sniffer trace to see what happens over the air.

Reply
  • The error value is in p_evt->params.error_unexpected.error, you can use SEGGER_RTT_printf to print out.

    There are only 3 place where PM_EVT_ERROR_UNEXPECTED is assigned inside peer_manager, you can track them down.

    I assume you have followed the tutorial here (a bit out of date) and here ?

    Also make sure you erase the chip completely when you test. There could be that earlier data stored can cause an issue when bonding is stored.

    You can try to capture a sniffer trace to see what happens over the air.

Children
No Data
Related