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

Alert notification service setup at runtime

Hi,

We have two services, apple ANCS and Alert Notification on iOS. We try to connect it with 51822. There is an exception case the the alert notification function not working. The followings is the steps to reproduce:

  1. Close our app.
  2. Pair the device to iOS
  3. Call Alert Notification from device ANCS working and alert nortification not working, it's correct because our app hasn't opened
  4. Open our app.
  5. Call Alert Notification for device ANCS working and alert nortification not working

My question is that are there any ways we could do establish the alert notification at runtime them when we found that it hasn't been setup? Thanks.

Paul

Parents
  • I'm not quite sure I understand what you try to ask. You can add a service to the GATT Table at any time, but remember that to comply with the Bluetooth specification, you must send a Service Changed Indication to all bonded devices after having done changes to your GATT Table.

    You can also dynamically decide to look for a new service, as a GATT Client, if you for example want to first see if there is an ANCS service there, and only if you don't find that check if there is a regular Alert Notification Service. This is something you'd have to implement in your application.

    You can however never remove a service from your GATT Table. The only way you can empty your GATT Table is by disabling the softdevice, and then reenable it.

Reply
  • I'm not quite sure I understand what you try to ask. You can add a service to the GATT Table at any time, but remember that to comply with the Bluetooth specification, you must send a Service Changed Indication to all bonded devices after having done changes to your GATT Table.

    You can also dynamically decide to look for a new service, as a GATT Client, if you for example want to first see if there is an ANCS service there, and only if you don't find that check if there is a regular Alert Notification Service. This is something you'd have to implement in your application.

    You can however never remove a service from your GATT Table. The only way you can empty your GATT Table is by disabling the softdevice, and then reenable it.

Children
No Data
Related