Take the 2-minute tour ×

I have spent some time researching Android's ability to communicate with bluetooth devices that are designed to communicate over a Bluetooth COM port on a PC. I haven't been able to find a definitive answer, so I thought I'd ask here. I want to make sure that this is possible with Android.

I am new to Bluetooth communications, but the research I've done so far lead me to RFCOMM which somewhat sounded like what I wanted. Unfortunately, I'm still unable to confirm that this is in fact possible.

Any help/resources on this would be greatly appreciated.

share|improve this question
How is it designed to communicate over a bluetooth COM port? The com port is on the PC, the bluetooth device I assume is not, but connecting to the PC. –  James Black Jul 3 '11 at 19:54
So I'm not entirely sure, the instructions for the bluetooth device says to pair it over a bluetooth COM port. Is there something specific I should be looking for? Like I said, still trying to wrap my head around this stuff. –  Joe M Jul 4 '11 at 3:29
Just try to write code to pair the devices and see what happens. –  James Black Jul 4 '11 at 15:52

1 Answer 1

up vote 6 down vote accepted

Yes, Android can connect to Bluetooth COM ports on PC's. I am currently developing such an application. Here is a code example (Ite requires the bluetooth permissions te be set in the Manifest.xml file):

<uses-permission android:name="android.permission.BLUETOOTH" />


BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
if (adapter == null) {
    // Device does not support Bluetooth
    finish(); //exit

if (!adapter.isEnabled()) {
//make sure the device's bluetooth is enabled
    Intent enableBluetooth = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
    startActivityForResult(enableBluetooth, REQUEST_ENABLE_BT);

final UUID SERIAL_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); //UUID for serial connection
mac = "00:15:83:3D:0A:57"; //my laptop's mac adress
device = adapter.getRemoteDevice(mac); //get remote device by mac, we assume these two devices are already paired

 // Get a BluetoothSocket to connect with the given BluetoothDevice
BluetoothSocket socket = null;
OutputStream out = null;
try {
    socket = device.createRfcommSocketToServiceRecord(SERIAL_UUID); 
} catch (IOException e) {}

try {           
    out = socket.getOutputStream();
    //now you can use out to send output via out.write
} catch (IOException e) {}
share|improve this answer
what about if I need to handle timeouts for reading/writing on the socket using the BluetoothSocket? I'm developing an Android app that connects using your method, but I still can't handle timing, and it's really important as my remote bluetooth device is a bit... special. –  Sonhja Oct 19 '11 at 8:54
I havnt done that myself but the methods described here might help: developer.android.com/reference/android/bluetooth/… and developer.android.com/reference/android/bluetooth/… –  Konsalik Oct 24 '11 at 10:40

Your Answer


