Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find the UUID of serial port Bluetooth device?

Tags:

I want to receive data from the serial port bluetooth device to android phone. But i don't know the UUID of that device how to find the UUID of that device?

like image 908
user555910 Avatar asked Jan 08 '11 05:01

user555910


People also ask

How do I find my Bluetooth UUID?

If you want to get the UUID of a Bluetooth device in Android, there are a few different ways to do it. One way is to use the BluetoothAdapter. getRemoteDevice(String address) method. This will return a BluetoothDevice object, which has a getUuids() method that will return an array of UUIDs.

What is UUID in Bluetooth?

The UUID stands for Universally Unique Identifier. UUID is an simple 128 bit digit which uniquely distributed across the world. Bluetooth sends data over air and all nearby device can receive it.

What is serial port in Bluetooth?

Serial Port Profile (SPP) It's is one of the more fundamental Bluetooth profiles (Bluetooth's original purpose was to replace RS-232 cables after all). Using SPP, each connected device can send and receive data just as if there were RX and TX lines connected between them.


2 Answers

Extending what pwc said about the UUID being 0x1101, this is the 16 bit version of the UUID as far as I can tell. I could not work out how to instantiate an UUID with a 16 bit UUID. But as this post says you can do it by:

private static final UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");

This worked for me to connect to a serial bluetooth module I bought from Deal Extreme

like image 133
Olly Avatar answered Sep 21 '22 05:09

Olly


If the device is using serial port profile, then yes, it is simply:

0x1101 

For other pre-defined options, see the list of pre-defined UUIDs as listed in javax.bluetooth:

UUID.

like image 26
MattF Avatar answered Sep 21 '22 05:09

MattF