2 years ago

#49070

test-img

David

Bluetooth SPP slower with newer version of Android

My Android app talks to my own ECG device. Everything runs perfectly fine when using an old (now discontinued) Kyocera E6560 phone that was running Android 5.5. I've recently purchased 8 different phones, running more recent versions of Android. All the new phones transfer SPP data 7 times slower than my old Kyocera phone. I can't find any new phones that can run as fast as the E6560.

I've narrowed down the speed decrease to the read() function. When I create a socket like:

bluetoothSocket = bluetoothDevice.createRfcommSocketToServiceRecord(UUID_SPP);
bluetoothSocket.connect();
inputStream = bluetoothSocket.getInputStream();

then the following line takes about 7 times longer with newer phones:

byte[] data = new byte[1024];
int dataSize = inputStream.read(data);

Any ideas why this is or what further steps I can take in debugging this?

java

android

bluetooth

android-bluetooth

0 Answers

Your Answer

Accepted video resources