Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
GattCharacteristic maximum size?
In the Advanced Samples section on BLE docs, High Data Rate Low Latency Transfers (https://docs.mbed.com/docs/ble-intros/en/latest/AdvSamples/HighData/#often)...it is said that a characteristic with larger data bytes can be declared as follows:
WriteOnlyArrayGattCharacteristic<uint8_t, NUM_BYTES> writeTo(uuid, valuePtr,
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE);
My question is that what is the maximum NUM_BYTES that can be used? As in, what is the maximum size of data that can be encapsulated in a characteristic?
Question relating to:
1 Answer
10 years ago.
Hi Anas,
I believe the Bluetooth specification states that the maximum size of an attribute is 512 bytes; therefore, since a Characteristic is basically a collection of attributes, that would be the maximum size of your data attribute.
This is the specification: https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=286439 Have a look at section 3.2.9.