I'm having performance issues when reading multiple consecutive GATTs using the Android BLE API.
I can read about 10 packets per second in just 5 or 6 seconds. After I read the ~ 65 packet, throughput is reduced to about 1 packet every 1.5 seconds.
I have done some tests and it seems that the internal BLE is getting very slow. In this case, it takes about 750 ms from the Java GATT read call to the peripheral device (there is no bottleneck in the peripheral device) and about 750 ms from the Java API callback.
It seems to me that this is a poor implementation of the BLE stack, because when I disconnect from the device (maybe some resources are cleared) and then reconnect back, I can reproduce the same problem: it reads about 10 packets / s for the first 5 or 6 seconds (~ 65 packets), then it becomes slow.
I tested it with Galaxy S4 and Nexus 4 devices. Same thing with both.
Any suggestions for improving it?
source
share