BLE delay problem in stream mode but every functions will eventually work??????
I have encountered high delay problem in stream mode(Tens of seconds of delay) but all the functions will eventually work????
The detail of the problem:
I made an app to control the MMR as you can see in this screenshot
When I click the "start" button, the APP start to receive the data. Then I click the "savedata" button, the app got stuck(but the data stream is still going on, I can still read the data on my app). After tens of seconds of delay, the app return to normal and begin to save data. When I click the "stopsaving" button, the app got stuck again(but the data saving is still going on). After tens of seconds of delay, the app return to normal and stop saving data. Also, when I want to click the "stop" button to disconnect the MMR, I still need to wait for tens of seconds.
In short, the only problem is DELAY and all the functions will eventually work.
Comments
You will need to do a deep down dive of the bluetooth level communications to see what the delay is.
It could just be that your antenna is being used for other things (remember your ble antenna is shared with all your wifi and other ble communications so it could just be that).
Also make sure you aren't disconnecting and reconnecting between calls.
I solved this problem, it turned out I send an extremely long handler.
@pekky, thanks for the update!