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

ANCS problem

Hi all, I find a problem when testing the ANCS program. It seems that after you connect the device with ANCS with an iphone, you cannot connect the device with another iphone even if you forget the device on settings. And I find that if you want to pair with another iphone, you need to select the device on settings again and when the dialog box appears to remind you of pairing or not, choose "cancel" to cancel the pairing. Then you can pair with another iphone. Now the question is that I want to directly pair with another iphone, simply after I forget the device on settings without the following operation. How can I modify the program? SDK version:9.0.0 SoftDevice version:8.0 Best Regards!

Parents
  • The ANCS example will advertise using a whitelist once bonded. This means connection requests from unknown devices will be ignored. You can disable the whitelist by triggering BSP_EVENT_WHITELIST_OFF (main.c line 649) in the bsp_event_handler (push button 1 to disable the whitelist).

    Alternatively you can turn off the whitlist altogether by changing options.ble_adv_whitelist_enabled in advertising init() (main.c line 808).

  • Thank you for your help. I finally resolved this problem by disabling the whitelist function. Now I hava another question. I use "lightblue" APP to test my code. Everytime I back to the "peripherals nearby" page, the name of my device will turn grey. And I have to forget the device on settings, if I want to use lightblue to connect it again. Now the question is how should I do to keep my device avertising after I back to the peripherals nearby page? Thank you.

Reply
  • Thank you for your help. I finally resolved this problem by disabling the whitelist function. Now I hava another question. I use "lightblue" APP to test my code. Everytime I back to the "peripherals nearby" page, the name of my device will turn grey. And I have to forget the device on settings, if I want to use lightblue to connect it again. Now the question is how should I do to keep my device avertising after I back to the peripherals nearby page? Thank you.

Children
No Data
Related