Hi,
using cc2541 as a slave / server. I defined a new profile with a 20 byte large characteristic. On the Characteristic Declaration I set the read / write / write_no_rsp / notify / indicate property. Master enables notification.
The Profile Attributes Table is very similar to the simplekeys Profile Attributes Table. I'm using this profile to transfere a quantity of data (1-200 bytes).
When my ReadAttrCB is called and the bytes to send are > 20 bytes, I want to send one or more notifications including the remaining bytes.
bStatus_t GeberitFrame_SetParameter(uint8 param, uint8 len, void* pValue) { osal_memcpy(&frameCharacteristic[0], pValue, len) if(GATTServApp_ProcessCharCfg(frameCharacteristicClientConfig, &frameCharacteristic[0], FALSE, frameAttrTbl, GATT_NUM_ATTRS(frameAttrTbl), INVALID_TASK_ID) == SUCCESS) { ret = SUCCESS; } else { ret = FAILURE; } }
The return value of GATTServApp_ProcessCharCfg is SUCCES, but the data sent is corrupted (receiving the notification but the received bytes totally differ from the bytes I wanted to send).
Using GATT_Notification(0, ¬i, FALSE) works well.
attHandleValueNoti_t noti;
osal_memcpy(noti.value, pValue, len); noti.handle = 0x03; noti.len = 20; GATT_Notification(0, ¬i, FALSE)
What could be the reason for that?
greetings