How to configure periPheral to send data when a command from central is received?

4 posts / 0 new
Last post
Bharath
Offline
Last seen:1 year 5 months ago
加入:2016-04-14 07:03
How to configure periPheral to send data when a command from central is received?

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:
MT_dialog
Offline
Last seen:3 months 3 days ago
工作人员
加入:2015-06-08 11:34
Hi Bharath,

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

Bharath
Offline
Last seen:1 year 5 months ago
加入:2016-04-14 07:03
Sorry for the confusion. My

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.

MT_dialog
Offline
Last seen:3 months 3 days ago
工作人员
加入:2015-06-08 11:34
Hi Bharath,

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