By looking at the
CYBLE_EVT_GATTS_WRITE_REQevent in your event handler and see if the Attribute to be written (
param->attrHandle) is the one of your custom service Characteristic (you find your Attribute Handle in the generated file BLE_custom.h)?
Thanks for the speedy reply. Of course if I understood what you were saying I'd just be replying with a thank you. However...
And my handles in BLE_custom.h:
#define CYBLE_SCDATA_SERVICE_HANDLE (0x0011u) /* Handle of SCData service */
#define CYBLE_SCDATA_LOGDATA_DECL_HANDLE (0x0012u) /* Handle of LogData characteristic declaration */
#define CYBLE_SCDATA_LOGDATA_CHAR_HANDLE (0x0013u) /* Handle of LogData characteristic */
#define CYBLE_SCDATA_COMMAND_DECL_HANDLE (0x0014u) /* Handle of Command characteristic declaration */
#define CYBLE_SCDATA_COMMAND_CHAR_HANDLE (0x0015u) /* Handle of Command characteristic */
But I'm not sure what I should do next.
Been doing a bit of debugging to see what is happening. Quite tricky as you can't single step as it always ends up in an ISR. However, when CySmart does a write to either the alert characterstic or the custom one (both writewithoutresponse) then the BLE_eventHandler takes this case:
if((cyBle_eventHandlerFlag & CYBLE_CALLBACK) != 0u)
Which (I guess it's the CMD option because of the writenoresponse) then (in CyBle_IassWriteCmdEventHandler) currently does nothing if the event is a write to my custom characteristic.
I'll probably be back, but do have something to work on now.