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.

Sending larger data/multiple packets

Hi,

For BLE, if I want to send data that is more than 20 bytes in a connection event. Does the programs split them up and let you send them or would I have to implement my own code? I see that others had sent multiple packets but I was not sure if they had to add their own code to the sample codes or not. If they did, was it similar to the data throughput example? Also I read that the attribute value can be up to 512 bytes but is that possible with BLE devices yet? I tried to find that explanation in the Core specs but I couldn't find it. Thank you.

Serena

  • Yes, your code has to handle breaking up larger packets / stream in to multiple 20 byte characteristic transmissions. Yes, characteristics can be that large but when they are larger than 20 bytes you must  read / write them using multiple read and writes. The limitation is packet size. BLE is intended for low power / low latency, hence small packets...

  • 23 bytes is the limitation of GATT_Notification. You can have a look at the data structure of its second input parameter attHandleValueNoti_t and will see. If you want to send more than this limited bytes, you need to break down them to several part as in throughput example. Like the example, it is quite easy to set up a event and keeps trigger it to send data until you finish.