I want to have more than two profiles in my app. And based on the request type I get from the central, I want to switch between these two are activate are deactivate one profile.
Please help to do this.
Device:
I want to have more than two profiles in my app. And based on the request type I get from the central, I want to switch between these two are activate are deactivate one profile.
Please help to do this.
Hi Bharath,
你可以有两个配置文件p, and not to enable them upon connection but what do you mean based on the request type from the central, i dont think that something like this is possible perhaps you will need an extra profile/service in order to act as a control point the enabling/disabling of the other profiles.
Thanks MT_dialog
Sorry for the confusion. My question is how can I send data on a characteristic when a specific request from central side is made. More clearly I want to notify data only if central requests for it.
Hi Bharath,
I am not sure if that is what you are looking for, but the central is able to enable or disable the notifications on a peripheral by writing on the peripheral's configuration characteristic, so when the central wants to be notified for the peripherals data he will write to the specific configuration characteristic, the corresponding value, and the peripheral should start sending notifications, when the central wishes to stop he will write again the off value for the notifications and the peripheral should stop notifying.
Thanks MT_dialog