Opening a Client Bluetooth Socket Connection

To initiate a communications channel to a remote device,
create a Bluetooth Socket from the BluetoothDevice object
that represents it.

To create a new connection call createRfcommSocket
ToServiceRecord on the Bluetooth Device to connect to,
passing in the UUID of the Bluetooth Server Socket accepting

If you attempt to connect to a Bluetooth Device that has
not yet been paired (bonded) with the host device, you will
be prompted to accept the pairing before the connect call    
completes, as shown in Figure

The user must accept the pairing request on both the host
and remote devices for the connection to be

connect is a blocking operation, so it’s best practice to initiate
connection requests on a background thread rather than block the UI thread until a
connection has been made.

Connecting to a remote Bluetooth server

      BluetoothDevice device = bluetooth.getRemoteDevice("00:23:76:35:2F:AA");
     BluetoothSocket clientSocket =

} catch (IOException e) {
       Log.d("BLUETOOTH", e.getMessage());


Popular posts from this blog

Bluetooth Data Transfer Example

DeCompile .apk file on ubuntu 14.04