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

ANCS Sample doesn't work after rebooting iOS Device

I'm testing ble_app_ancs experimental sample.

It seems working first connection. But after rebooting iOS Device, or Turn Off/On bluetooth function on iOS Device, ANCS does't work.

After delete bonding both evaluation board and iOS Device, it works again. Is there any infomation about this issue?

Testing Environment

iOS Device iPod touch 5th Gen. iOS 7.0.3 iPhone 5 iOS 7.0.3

BLE Board nrf6310 Rev 1.4 nrf6350 Rev 2.0 PCA10004 Rev 2.1.0 Softdevice 6.0.0-5beta

Parents
  • I'm not able to replicate this problem. What do you do with the Development Kit when turning off Bluetooth on the iOS device?

    Also, which SDK version are you working with?

    Edit: I've now managed to reproduce this problem, and it turns out that this is actually a problem with Apple's implementation. There are two facets to it:

    1. CCCD values are apparently lost when Bluetooth is turned off and on. You can verify this by reading out the CCCDs on reconnection, and see that they are 0.

    When this happens, the Peripheral does not get any new notifications before it re-writes CCCD values, which isn't usually done except when initially bonding. This is a spec violation, and has been reported to Apple.

    1. When booting, the iOS device will connect to Peripheral devices before having populated the GATT Table fully. This means that when the iOS device is turned off and on, the Peripheral device may not actually see the ANCS. I haven't gotten around to verify this properly, but if you register for Service Changed indication, it could be that you'll get one when the service is added. This would have to be done before the iOS device is turned off. An alternative is to retry service discovery some time after connection if you didn't find it initially.
Reply
  • I'm not able to replicate this problem. What do you do with the Development Kit when turning off Bluetooth on the iOS device?

    Also, which SDK version are you working with?

    Edit: I've now managed to reproduce this problem, and it turns out that this is actually a problem with Apple's implementation. There are two facets to it:

    1. CCCD values are apparently lost when Bluetooth is turned off and on. You can verify this by reading out the CCCDs on reconnection, and see that they are 0.

    When this happens, the Peripheral does not get any new notifications before it re-writes CCCD values, which isn't usually done except when initially bonding. This is a spec violation, and has been reported to Apple.

    1. When booting, the iOS device will connect to Peripheral devices before having populated the GATT Table fully. This means that when the iOS device is turned off and on, the Peripheral device may not actually see the ANCS. I haven't gotten around to verify this properly, but if you register for Service Changed indication, it could be that you'll get one when the service is added. This would have to be done before the iOS device is turned off. An alternative is to retry service discovery some time after connection if you didn't find it initially.
Children
Related