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

How to use sd_ble_gatts_service_changed?

In our product we have both a DFU profile and an application profile which is confusing Mac OS X 10.9 "Mavericks" since it caches device services unless it receives a service changed indication.

The sd_ble_gatts_service_changed requires a start and end service handle, is there a way to determine what the max used service handle is? Passing 0xFF as max causes the routine to return an error.

Parents
  • Hi,

    I have a similar case (using a bootloader and a main application with different services). In my case the central does not bond (a large number of centrals will connect and none of them need to be bonded).

    I don't quite understand how I should deal with BLE_GATTS_EVT_SYS_ATTR_MISSING. I'm currently calling sd_ble_gatts_sys_attr_set with NULL. I also don't understand what the system attributes are and how they are used.

    Also, when should I call sd_ble_gatts_service_changed (connection event, other event, etc.)? I'm guessing the phone needs to enable the service changed characteristic before I send the notification, but I don't know which callback that tells me about that.

    /Jimmie

Reply
  • Hi,

    I have a similar case (using a bootloader and a main application with different services). In my case the central does not bond (a large number of centrals will connect and none of them need to be bonded).

    I don't quite understand how I should deal with BLE_GATTS_EVT_SYS_ATTR_MISSING. I'm currently calling sd_ble_gatts_sys_attr_set with NULL. I also don't understand what the system attributes are and how they are used.

    Also, when should I call sd_ble_gatts_service_changed (connection event, other event, etc.)? I'm guessing the phone needs to enable the service changed characteristic before I send the notification, but I don't know which callback that tells me about that.

    /Jimmie

Children
No Data
Related