How to enable high speed Bluetooth (3.0+HS or 4.0) in Android?

android, bluetooth

Solution

BT 3.0+HS is a scheme where the high rates are achieved by actually using Wifi physical layer. So it only works if you have the right kind of BT/Wifi combo chips that support it, which isn't really very common. Having a 4.0 device does not mean it does 3.0+HS, it just means it can do BT Low Energy, which is low data rate.

Problem

So I have a BT client and a server application on two Bluetooth 4.0 android phones. The server waits for a connection via ``` BluetoothServerSocket serverSocket = mBluetoothAdapter.listenUsingRfcommWithServiceRecord(SDP_NAME, UUID.fromString(SDP_UUID)); ``` and the client connects to it via ``` socket = device.createRfcommSocketToServiceRecord(UUID.fromString(SDP_UUID)); ``` Then, using a AsyncTask, I am sending data in an endless loop from the client to the server. ``` byte[] buffer = new byte[4096]; outputStream.write(buffer); ``` I calculated the speed and only got around 230KByte/s, which is exactly the 2,1 MBit/s that Bluetooth EDR offers. How to I send the data via Bluetooth HS (24 MBit/s)?

Original source