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

ANCS service migration

Dear Team,

I am migrating the ANCS client application from SDK-12.3 to SDK-15.3 version.

Please find my below observations in SDK-15.3.

Erase the flash completely and load the the  firmware  [ Using the ANCS client service code available in SDK-15.3 version]

Erase the phone bonding info in the IPhone.

<1> Pair the Iphone. <Success>

<2> Will make call to the Iphone and I could see the notification. Fetch the attributes of the notification. Print it on the console. <Success>

<3> Now restart the device <NRF52832>

 -->IPhone automatically gets connected.

--> I could also see that ANCS Database discovery also success.

--> Prints the notification messages [Missed call log]

<4>Now make a call to IPhone

 --> I could see the notification in the log, and attribute request for the notification is in progress.

 -->  Now I could see BLE_GAP_EVT_DISCONNECTED is received in the event handler.

Note: In SDK-12.3 the above mentioned scenario works perfectly fine.

Please let me know if you have any suggestions.

  • Hi Vidar,

    I was storing the ANCS handles into persistent memory but when connecting to the  previously bonded device instead of reading from the flash I was again trying to get the handles by starting the DB discovery. Now I have removed the code to store the ANCS handles in the persistent  memory.

    After this changes I am not seeing reconnect issue after connecting to previously bonded device.

    I would like to understand the side effects of storing the handles in the persistent memory and doing the DB discovery again for the bonded device. 

  • Hi,

    The only drawback is that you will need to perform service discovery on every connection even if the attribute table didn't change. So it adds a bit of overhead. But you don't need to store attribute handles to flash if you're doing the DB discovery anyway. Then you can just disable attribute caching. 

Related