Hello,
I am using simple_peripheral application and i want to send and receive data from Master. I have tested with 100 bytes of data i can receive and send to Master.
But when the data is larger than 100 bytes i am able to receive it correctly from master. But When i send data (using the notifications) from simple_peripheral to Mater it sends only 100 bytes correct.
After that it starts repeating the data from first index. I have tested with 100 bytes, 200 bytes , 250 bytes and 600 bytes of data and only found success for 100 bytes. Following is the code i am using to send data through notifications
void sendData( uint16_t connHandle, uint8_t *offset ) { uint16_t length = 20; // If notifications enabled uint16_t value = GATTServApp_ReadCharCfg(connHandle, myccDes); if (value & GATT_CLIENT_CFG_NOTIFY) { attHandleValueNoti_t noti; noti.len = length; noti.pValue = GATT_bm_alloc(connHandle, ATT_HANDLE_VALUE_NOTI, noti.len, ¬i.len); if (noti.pValue != NULL) { gattAttribute_t *pAttr; pAttr= GATTServApp_FindAttr(dmyServiceAttrTbl, GATT_NUM_ATTRS(domServiceAttrTbl), &tramsmissionCharVal); noti.handle = pAttr->handle; memcpy(noti.pValue , dataBuffer + offset[0] , length); // dataBuffer has all the data if (GATT_Notification(connHandle, ¬i, FALSE) != SUCCESS) { GATT_bm_free((gattMsg_t *)¬i, ATT_HANDLE_VALUE_NOTI); } } } }
Can you please help me? Is there any limit from stack that it does not supporting more data?
Following is the result of my test green data is sent from Master and black is the data received from slave.
test result with 100 bytes
0106010101010101010101010101010101010206020202020202020202020202020202020306030303030303030303030303030303030
406040404040404040404040404040404040506050505050505050505050505050505050606065d5e5f61626364
01060101010101010101010101010101010102060202020202020202020202020202020203060303030303030303030303030303030304
06040404040404040404040404040404040506050505050505050505050505050505050606065d5e5f61626364
test rest with 120 bytes
01070101010101010101010101010101010102070202020202020202020202020202020203070303030303030303030303030303030
3040704040404040404040404040404040404050705050505050505050505050505050505060731323334ef03f0f10107010101010101010101010101010101010207
0107010101010101010101010101010101010207020202020202020202020202020202020307030303030303030303030303030303030
40704040404040404040404040404040404050705050505050505050505050505050505060731323334ef03f0f1f2f3060606060606070731323334ef03f0f1f2f3
waiting for your kind reply.
Regards