One of my products establishes a Bluetooth (classic) connection with my device and streams live data to my app, this is a medical device.
Packets are 32 bytes in length and sent every 100ms.
On my old Nexus 7 with Android 6.0.1, the packets are always received and decoded by my app approximately 100ms (+- 20ms or so jitter) and the graphing is smooth on screen.
On a much newer Samsung Tab A7 Lite with Android 13, the packets arrive every 100ms with less jitter for the first 4 seconds, then from precisely 4000 milliseconds onwards I get multiple packets in rapid succession every 500ms or so, which makes the onscreen graphing looking jumpy.
It is completely reproducible and always occurs exactly when 4 seconds of streaming has occurred - see log output below, the green is milliseconds between last packet being handled and current packet being handled (green pre 4000 ms, pink after) and the red is milliseconds since streaming started.
Does anyone have any idea as to whether this 4000ms could be a clue as to why this is happening? I am using AsyncStreams and there is no real overhead in my packet handling so these timings are the timings of when data arrives in the AsyncStreams NewData event.
Packets are 32 bytes in length and sent every 100ms.
On my old Nexus 7 with Android 6.0.1, the packets are always received and decoded by my app approximately 100ms (+- 20ms or so jitter) and the graphing is smooth on screen.
On a much newer Samsung Tab A7 Lite with Android 13, the packets arrive every 100ms with less jitter for the first 4 seconds, then from precisely 4000 milliseconds onwards I get multiple packets in rapid succession every 500ms or so, which makes the onscreen graphing looking jumpy.
It is completely reproducible and always occurs exactly when 4 seconds of streaming has occurred - see log output below, the green is milliseconds between last packet being handled and current packet being handled (green pre 4000 ms, pink after) and the red is milliseconds since streaming started.
Does anyone have any idea as to whether this 4000ms could be a clue as to why this is happening? I am using AsyncStreams and there is no real overhead in my packet handling so these timings are the timings of when data arrives in the AsyncStreams NewData event.