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

Dynamically add, insert and remove BLE services at run time using s140

Hi there,

I was just wondering whether the s140 supports adding, inserting and removing BLE service and characteristics at run time. if yes, what should I pay attention to when doing so? 

Thanks in advance!

Parents
  • Hi

    If you use the 'service changed' characteristic in the GATT service you can add services dynamically, and alert the connected BLE device that the services have changed, but removing services dynamically is not supported. 

    The only way to remove a service dynamically is to disable the SoftDevice completely, re-enable it, and configure it without the service you want to remove. 

    This will obviously require any running Bluetooth connections to be taken down, and re-established once you have rebooted and reconfigured the SoftDevice. 

    Best regards
    Torbjørn

Reply
  • Hi

    If you use the 'service changed' characteristic in the GATT service you can add services dynamically, and alert the connected BLE device that the services have changed, but removing services dynamically is not supported. 

    The only way to remove a service dynamically is to disable the SoftDevice completely, re-enable it, and configure it without the service you want to remove. 

    This will obviously require any running Bluetooth connections to be taken down, and re-established once you have rebooted and reconfigured the SoftDevice. 

    Best regards
    Torbjørn

Children
Related