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

Can I create Characteristic with Notification only, no Read, no Write

Can I create Characteristic with Notification only, no Read, no Write

I can remove the //char_md.char_props.write = 1; and only the Read and Notify Properties show up in MCP (or the iPhone)

When I comment out the char_md.char_props.read = 1;

Advertising stops and I can not connect to the device.

All I need is a Notification. The server collects data on three (3) sensors, and sends the data using three (3) services. 6-bytes per service, nonstop.

So actually one characteristic with a Notification per service.

Note: I guess eventually with a client app, one would Enable the Notification, and then ignore the Read property.

Any help appreciated

Parents
  • It seems than with no delay between CCCD updates, the code freezes. So it seems with both write and read out, the Notification keeps the code busy. I now have a 2sec delay between updates, and removed write and read, and it works fine.

    Are you enabling and disabling Notifications(writting to the CCCD) or do you mean that you are notifying the value of the characteristic very often using sd_ble_gatts_hvx?

Reply
  • It seems than with no delay between CCCD updates, the code freezes. So it seems with both write and read out, the Notification keeps the code busy. I now have a 2sec delay between updates, and removed write and read, and it works fine.

    Are you enabling and disabling Notifications(writting to the CCCD) or do you mean that you are notifying the value of the characteristic very often using sd_ble_gatts_hvx?

Children
No Data
Related