Explanation for 512 Byte Limit on Arduino BLE Characteristics


I am wondering why there is a 512 Byte limit on the BLE characteristic size? Is this to keep the data transmission rate slower? Can I change it to, say, 10,000?

I am currently modifying the ArduinoBLE library for faster real-time transmission of a 3-byte protocol I developed and am looking for speed optimizations.


Sorry, I have no answer for your question to the 512 Bytes. But ...

I am interested to hear/read more about your real-time transmission.
I am developing my own library for a real-time communication on Nano BLE 33 (bypassing mbedOS and ArduinoBLE) based on non-connectable and non-scannable advertise-pdus. My aim is to transfer 6x16Bit (acceleration and gyro) with 10 measurements per second for each of about 50 devices (distributed multi-channel measurement).

Hi profrob. I suggest using the standard ArduinoBLE library functions for this transmission, except when before transmitting the packets, you should include a buffer which holds <27 bytes of payload (3 packets at a time). You can also try larger values <125 bytes but I had some reliability issues with the board stalling.

Send these packets to a peripheral or relay board to be sent serially or through another BLE transmission to your computer/device. You could also run the Bluetooth transmission concurrently to your board's CPU activities for more speed optimization.

With this method, I was able to get 40kbps which satisfies your desired throughput.

Thank you very much for the answer.
It is a pity, that we did not met earlier for discussing the usage of the library.
I have no experience with the ArduinoBLE library, because it does not fit to my own environment based on software-timer scheduled state machines.
But I thought about using ArduinoBLE without my environment (about 6 month ago) and the main problem for me was to build a network with 50 devices transferring 10 measurements (6*16Bit) per second. I had no idea how to do this.

Now I nearly finished my own protocol with a master/slave structure (1 master, 50 slaves). The master is polling the slaves. With response time-out of about 1 ms I can control the channel quality and I am working on a channel switching which is fast enough to guarantee the measurement rate also in case of disturbances by other radio transmitters (WLAN).

1 Like