cancel
Showing results for 
Search instead for 
Did you mean: 

How to get all 27 bytes of payload in BlueNRG.

PDavi
Associate

I have a custom primary service (in server role) with a R/W characteristic set for 27 bytes of data and GATT_NOTIFY_WRITE_REQ event mask. My android client app is sending a verified 27 byte payload to this characteristic. I only get events with 20 byte data length and only the first 20 bytes of the payload in the data buffer. hci_read_buffer_size returns 27 bytes as the packet length. HOW do I obtain the full 27 byte payload??

1 REPLY 1
Winfred LU
ST Employee

Do you see 1 or 2 write requests?

Maybe the GATT write request is fragmented into 2 packets (L2CAP fragmentations) -

the first one has 23 bytes ATT PDU (3-byte opcode + 20-byte data), and the second has 7-byte ATT PDU.

Please try to use ACI_GATT_ATTRIBUTE_MODIFIED_EVENT event instead.