5 years, 2 months ago.

BLE uart transmitting in bursts

Hi, I had quite a lot of problems with BLE lately, now that most of them are resolved, I still experience strange behaviour. when transmitting data bigger than the MTU size, I split the data into 20byte packages and send them out one after another. After every transmitted package I wait for the transmit complete event and then send the next one. However, most of the time (?) I receive the data in burst of 3 packages, meaning that 3 packages aka 60 bytes are sent out real fast, then a little delay, then 60 bytes again and so on. anyone experienced that before?

Ps. I am really thankful for the support you guys give here, you helped me out a lot before.

1 Answer

5 years, 2 months ago.

Hi Jonas,

Do you have any sniffer trace for this scenario? The sniffer trace would be the best way for understanding what's going on during the transfer.

How's the connection parameter? Do you set slave latency?

Here is a suggestion, I assume you are using BLE app on mobile to receive data and calculate the time, mobile is not dedicated on BLE, so the data receiving may be delayed. I would suggest you to write another BLE master application running on another device to receive data, or maybe you could try use different phone, in my experience, iPhone does better than Andriod phones.

Thanks,

Desmond, team Mbed

Hi, I added the sniffer trace here [ https://drive.google.com/open?id=1MsLEUvfWDohDz203RioZLsS_sCGqBJyY ], you can see the data transmission start at packet 1866.

posted by Jonas Woerner 12 Feb 2019

From the trace, the delay looks caused by the slave latency, have you tried not set slave latency?

What BLE stack are you using? Cordio or SoftDevice?

Is there any reason you want to split the packet in application layer? BLE stack is able to do fragmentation according MTU size.

posted by Desmond Chen 14 Feb 2019