Skip to main content
PDavi
Visitor II
May 31, 2019
Question

How to get all 27 bytes of payload in BlueNRG.

  • May 31, 2019
  • 1 reply
  • 597 views

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??

    This topic has been closed for replies.

    1 reply

    Winfred LU
    ST Employee
    June 3, 2019

    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.