- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to support a BLE Peripheral Characteristic which has to deliver data blobs with a payload of several hundred bytes (more than 255). Since I have no control over the BLE Central which connects to my BLE Peripheral I cannot implement a custom protocol. The BLE Central relies on the Blob Read functionality.
I tried the long_characteristic_support routine bleprofile_WriteHandleData() which allows me to support BLE Characteristics of up to 255 bytes but unfortunately this is not large enough.
The sample app „long_characteristic“ found in the SDK 2.1.1 states in the comment that it supports characteristic values of larger than 512 octets but this is simply wrong. The maximum number of bytes I can use here is 255 due to the fact that in both the GATT database and the BLEPROFILE_DB_PDU the length field is only 8 bits.
How can I support Blob read with more than 255 bytes?
Solved! Go to Solution.
- Labels:
-
ReadWrite Characteristics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Stefan,
I amended the long_characteristic.c and .h code so I could try different sizes. I can read a long characteristic of up to 224 bytes without error. At 240 bytes the peripheral disconnects unexpectedly - I haven't looked at what goes over the air, but it looks like there is some other limit in place also. I did not try sizes which are not a multiple of 16 bytes.