Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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)?

like image 662
The Big Fat Panda Avatar asked Mar 13 '13 10:03

The Big Fat Panda


People also ask

How to enable Bluetooth in Android?

This example demonstrates How to enable Bluetooth in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. In the above code, we have taken a text view to show Bluetooth status.

What is high-speed Bluetooth?

Bluetooth 3.0+HS is the high-speed Bluetooth version that is capable of transferring data at high speeds. The range hasn’t changed much, but the ideal 10-m distance is sufficient for data transfers. It can be paired with devices having previous versions of the Bluetooth.

What is Bluetooth 4 0 technology?

Bluetooth 4.0 is the low power consumption version of Bluetooth technology. The data transfer speed hasn’t changed much; 1 Mbps is what this version offers. But, it puts devices to sleep when not in use, so one doesn’t need to shut down the hardware after the data is transferred.

Does Android Bluez support Bluetooth?

A bit more digging reveals that Android 2.2 (and below) doesn’t even support Bluetooth 3.0 – the BlueZ library that it uses is old and works only up to Bluetooth 2.1+EDR. You can check Bluetooth support info for the other Android versions over at their dev site (there’s no info on Gingerbread though).


2 Answers

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.

like image 158
TJD Avatar answered Nov 15 '22 01:11

TJD


I understand that Google has not opened up the API's required to drive the function built in the 4.0 chips. Since the functionality works on laptops and various Windows OS's maybe the mobile Window OS is closer or capable of operating such with a software patch. I think the priority for Google is to work on low battery before HS.

Also I think that Wireless operators were not keen on allowing high speed tethering for free, which has killed the software development efforts.

like image 26
user2187808 Avatar answered Nov 14 '22 23:11

user2187808