- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
in BLE component is Custom characteristics "MESSAGE" and in Properties are two parameters: Read and Write.
These parameters I can change by "tick" button in configure window. It's clear.
But how I can enable/disable for example Write parameter directly in C file?
I would like to have something as:
if ( i == 1) "Write is enable"
else "Write is disable"
Thanks in advance, Libor
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nope. That's the constant declared for Cypress' API usage. What you are looking for is more like this:
extern CYBLE_GATTC_WRITE_REQ_T serviceChangedCccdPacket;
serviceChangedCccdPacket.value = cccdIndFlagSetStruct;
serviceChangedCccdPacket.attrHandle = cyBle_gattc.cccdHandle;
CyBle_GattcWriteCharacteristicDescriptors(cyBle_connHandle, &serviceChangedCccdPacket);
Note: The example updates the descriptor value within the BLE callback stack, and thus it might have some call requirements to work properly.
I got this from the ANCS Example project on github: https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days/Day022_App...