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

ANCS Issue

Hey Guys,

I'm a newbie on BLE development , I'm trying to run the example "examples\ble_peripheral\ble_app_ancs_c" , It works well first time, but it cannot receive the notifications when i forget the device in Bluetooth settings and reconnect it. 

Reproduce steps:

  1. Program the s140_nrf52_6.0.0_softdevice  by nRFgo Studio
  2. Run example "examples\ble_peripheral\ble_app_ancs_c"  with SDK version 15.0.0
  3. Run app "nRF Connect" and connect "ANCS" on iPhone side.
  4. Navigate to Bluetooth setting and forget "ANCS" device
  5. Run app "nRF Connect" and connect "ANCS"
  6. It cannot receive notifications anymore.

if i want to receive the notification i have to program the softdevice and example again. so do you have any suggestions to fix this issue?

Thanks in advance.

Best Regards,

smallkun

Parents
  • Hi,

    According the steps you have listed you delete bonding information ("forget" the device) on the iPhone, but here is no indication that you delete bonding information on the nRF side. In this case, the nRF will not allow the iPhone to bond again as it is a known bonded peer, but lacks the bonding information.

    There are two main methods handling this:

    • Delete bonding information on the nRF. In the SDK example you do this by Holding button 2 during reset or pushing button 2 during sleep (causing a BSP_EVENT_CLEAR_BONDING_DATA event).
    • Allow repairing by changing line 289 in the ANCS example in SDK 15.0.0 so that it reads: "pm_conn_sec_config_t conn_sec_config = {.allow_repairing = false};". This is more user friendly, but has the down side that it is less secure as a attacker "iPhone" can replace the bonding information of the original iPhone without any user action on the nRF side.

    BR,

    Einar

Reply Children
No Data
Related