This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BLOB Read possible bug

Other Parts Discussed in Thread: CC2540

Hi

Anyone tried BLOB read with the master usb dongle provided with the CC2540 devkit? It seems to be buggy.

Created a new profile which has a new attribute - longer than 20 bytes - attr handle is 0x0049 (will appear later in examples).

The attribute can be queried with the HCI command 0xFD0A (HCI_EXT_ATT_READ_REQ in examples) - the first 19 bytes will be sent back.

It also works with BLOB query 0xFD0C (HCI_EXT_ATT_READ_BLOB_REQ) if the offset is 0 (zero). Any other offset than 0 will trigger "attribute cannot be read with BLOB read" error. What I do not understand why it doesn't trigger the same error with offset zero (if I defined something bad in the profile description table - what might happen since i'm still learning)

 

Example packages:

 

Reading attribute 0x0049 with BLOB query 0xFD0C and offset 0: Tx: 01 0C FD 06 00 00 49 00 00 00

The result is a valid response: 04 FF 19 0D 05 00 00 00 13 4C 6F 6E 67 20 73 74 72 69 6E 67 20 0D 0A 20 54 65 73 74 04 FF 06 0D 05 1A 00 00 00

Parsed this looks like: Event Type/Vendor event/ 0x050d (READ BLOB Response)/Connection handle=0x0000/Data length=19/Data bytes
Which is fine - the data bytes are the ones what I initialized in the profile ("Long string \r\n test")

 

Reading attribute 0x0049 with BLOB query 0xFD0C and offset 1: Tx: 01 0C FD 06 00 00 49 00 01 00 (The only difference is the 2 byte offset at the end)
The result is error response:  04 FF 0A 01 05 00 00 00 04 0C 49 00 0B
Parsed this looks like: Event type/Vendor event/0x0501 (ATT Error)/Connection handle=0x0000/Request code:0x0c/attribute handle=0x0049/errorcode=0x0B
This error according to the vendor specific HCI guide (TI_BLE_Vendor_Specific_HCI_Guide.pdf) is The attribute cannot be read or written using the Read Blob Request.
The strange thing is that the request does not reach the profile's Profile_ReadAttrCB function registered with GATTServApp_RegisterService (tried with debugger and also with the led). The error is triggered somewhere on lower level in the ATT service.
The BTool's Special Commands/BLOB request is buggy (mixing up the attribute handle with the offset) so it doesn't helped too much on trials.
regards,
Brown.