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

BLE GATT Services Change Without System Reset

Hello,

We want to support two mutually exclusive services, that is, while one is active, the other one will be hidden, once the gatt table is updated, we could send the services changed indication to the host using the function call sd_ble_gatts_service_changed(), but while there is sd_ble_gatts_service_add() function to add a service to the gatt table, it seems there is no function available to take it out, is this the case? Someone suggest to me that I can do a system reset to do the switch, but system reset is not allowed in our application.

Best Regards, Joseph

Parents
  • We have a similiar scenario (services are activated and disabled based on runtime conditions, e.g. whether a communication partner is present).

    According to my research, it is not possible to remove services/characteristics without a complete reset of the SoftDevice (which means cutting all connections in a multi connection / multi role environment). One reason might be that no robust garbage collection can be performed on embedded systems with a very limited amount of RAM. Garbage collection would be needed for dynamic re-configuration.

    Never the less, it would be nice to have an official confirmation from the Nordic staff that removing services/characteristics during runtime is not possible and will not be possible in the near future.

Reply
  • We have a similiar scenario (services are activated and disabled based on runtime conditions, e.g. whether a communication partner is present).

    According to my research, it is not possible to remove services/characteristics without a complete reset of the SoftDevice (which means cutting all connections in a multi connection / multi role environment). One reason might be that no robust garbage collection can be performed on embedded systems with a very limited amount of RAM. Garbage collection would be needed for dynamic re-configuration.

    Never the less, it would be nice to have an official confirmation from the Nordic staff that removing services/characteristics during runtime is not possible and will not be possible in the near future.

Children
No Data
Related