Custom Profile , process of enable notification for send data

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi

   

I create a custom server profile, after creating connection with client I send notify from client , I got event CYBLE_EVT_GATTS_WRITE_REQ , in this event I just send data to client using CyBle_GattsNotification() method  , once it sent to client  but after that again when I sent data it not sent. Is there anything I missed in these process which I have to enable or disable anywhere in my code. if there then please prove API for that. Thanks in advance.

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

What do you want to do? The only reason to do something with a write request is to enable notifications for a certain attribute.

   

Normally you just set an attribute to a new value, and the client will read it once in a while. If notifications are enabled, use the notification call to send the updated value directly (at the cost of battery life). As long as you regularly process the BLE events in you main loop, everything is fine.

   

Maybe have a look at the sample projects?

View solution in original post

0 Likes
1 Reply
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

What do you want to do? The only reason to do something with a write request is to enable notifications for a certain attribute.

   

Normally you just set an attribute to a new value, and the client will read it once in a while. If notifications are enabled, use the notification call to send the updated value directly (at the cost of battery life). As long as you regularly process the BLE events in you main loop, everything is fine.

   

Maybe have a look at the sample projects?

0 Likes