Ganglion BLE dropped packet IDs (with Android library)
As we are currently still working on the BLE to Android library, I noticed some pretty severe packet loss, which comes out to about a third of all packets.
https://pastebin.com/McjdMhm2
What seems really worrying is that frequently 50+ packets seem to be dropped, which looks like this
01-06 22:12:06.725 3661-4145/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 146
01-06 22:12:06.760 3661-3686/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 0
01-06 22:12:06.762 3661-3686/com.example.david.mymind_v2 E/GanglionBluetoothLeService: Warning: dropped 54 packets.
01-06 22:12:06.764 3661-3687/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 101
or this
01-06 22:12:10.871 3661-3687/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 122
01-06 22:12:10.904 3661-3686/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 0
01-06 22:12:10.906 3661-3686/com.example.david.mymind_v2 E/GanglionBluetoothLeService: Warning: dropped 78 packets.
01-06 22:12:10.908 3661-3686/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 101
or this
01-06 22:13:26.127 3661-3751/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 137
01-06 22:13:26.131 3661-3751/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 0
01-06 22:13:26.132 3661-3751/com.example.david.mymind_v2 E/GanglionBluetoothLeService: Warning: dropped 63 packets.
01-06 22:13:26.134 3661-3751/com.example.david.mymind_v2 E/GanglionBluetoothLeService: PacketID 101
Whenever this happens, it always resets to a raw packet and I was wondering if there are even that many packets lost or if thats some kind of bug where it starts over with the packet IDs?
Comments
Could you share some code? I don’t have an Android but I’ve written enough ganglion drivers to see if something is up!
I totally agree though, the Ganglion as of today is running close enough to the max. On some MacOS computers, even very new models, the BLE is at the upper limit of and packets are dropped! I have been working hard to make a new driver based on BLED112 which is a dongle that will handle the bluetooth comms.
I think we need to reduce the data rate though, especially to support these lower end devices. We could do a high pass filter on the ganglion microcontroller, such as 0.5Hz, and then downsample to 14/16 bits instead of 18/19 and reduce the number of times we need to send data out of the Ganglion.
I agree, if you took from Google sample code and are not doing anything else in the processing, then the issue is that these packets must not be getting to the software layer stack.
I did not get to it yet and since I haven't done this at all it will probably be quite a bit of work.
Thanks for the suggestions to both of you, I'll keep you updated.