I am working on a project using TinyCircuit parts and trying to send data from 2 9DOF sensors over BLE.
Unfortunately, the BLE module acquired is based on the BlueNRG-MS chipset, which specifies that the ATT_MTU is maxed at 20 bytes. So I can only send 20 bytes per message.
The problem is that I have 18 double to send, plus a counter for the sample and an identifier for the sensor. So I came up with something like:
Which concatenates the counter with two sensors [sensor number, acc XYZ, gyr XYZ, mag XYZ] and # to identify the end of a message. To send this string, I have to send 5~6 messages of 20 bytes each. I got safe messages sent by around 50ms, so I would have a sample per ~300ms, which means only 3~4 samples per second.
I am trying to search over ways to compress this string, but I don't know if it's worth it, since the compression itself might not generate good results for this string schema, and it might take longer to compress than to just send another message (rate is 20bytes per 50ms).
Do any of you guys have experience with this? What is the recommended approach to send data fast through ble? Is there a recommended way to increase the throughput or compress this string before sending it?
Thank you all in advance.