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!
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!
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
Hi ovrebekk, do you have any example to add services or some reference?
Hi ovrebekk, do you have any example to add services or some reference?
There is no simple example for this, no, but essentially you can just look at how the services are configured in the standard examples. Whether you add a service before you start a connection or after the basic principle is the same.
Best regards
Torbjørn