This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE service configuration help requiered. Update speed over 100hz

Hello, sorry to bother once more.

I am new to the nRF world and bluetooth in general, I am trying to build a device /app that gets data from 3 sensors. 2 of which operate at 100hz+ and the third one at around 1-2hz

Each device collects data on 3 axis.

So I have 3 custom BLE services with 3 custom characteristics that I created. Those char receive floats as byte arrays of 4 bytes.

Currently I have the timers of service A & B at 10ms to match the 100hz rate. When the timer expire, I read the value from the sensors through i2c and send the results through ble sd_ble_gatts_hvx().

So I have 3 updates every 10ms of 32bits floats for both A and B.

My other service C does the same thing but with 1000ms timer.

Independently those services work fine, when ever I turn on notifications I get my data on the nRF connect app on my phone. Though I don´t see the numbers update every 10ms, but Im guessing this is due to my phone or the app rendering capabilities.

My problem is that whenever I turn all 3 services on at the same time, A and B get their updates. But C never does.

I am guessing there is a bottleneck, and I am sending too much data, too fast, and the packets get filled before C ever has a chance to post up its values.

I have tried to alter the conn intervals and dropped it to the minimum, 7.5ms and 20ms for the max, the connection works, but the problem remains the same.

I tried to send smaller data instead of floats, send int16_t but still experience the same issue, even with both solution combined, C still does not update when A and B are on.

Could anyone point me in the right direction, what article or post could I read, what config should I tweak, or how to organize my data to fix this issue?

I tried to alter the MTU to make the packets bigger, but that seems to crash my app, it does not advertise if I mess with that.

Thanks in advance.

Related