cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to SPBT2632C2A.AT2

sz
Associate
Posted on July 17, 2014 at 18:52

Hello!

I'm trying to connect to SPBT2632C2A.AT2 of mobile applications for Android. I need SPP profile.

I took as the basis for this example

http://www.pclviewer.com/android/

Mobile device creates a couple with SPBT2632C2A.AT2 successfully.

But connection fails, an exception occurs.

Here's the code:

function ConnectDvc(Address:String) : Boolean;

var

  BA : JBluetoothAdapter;

  Dvc : JBluetoothDevice;

  Sock : JBluetoothSocket;

  UID : JUUID;                

begin

  Result := false;

  BA := TJBluetoothAdapter.JavaClass.getDefaultAdapter;

  Dvc := BA.getRemoteDevice(StringToJString(Address));

  // This is the well known SPP UUID for connection to a Bluetooth serial device

  UID := TJUUID.JavaClass.fromString(stringtojstring('00001101-0000-1000-8000-00805F9B34FB'));

  Sock := Dvc.createRfcommSocketToServiceRecord(UID);

  try

      Sock.connect;

      Result := true;

    except

      Result := false;

  end;

end;

What am I doing wrong? 

The correct

GUID

that I use

?
1 REPLY 1
Nickname1920_O
Associate II
Posted on July 21, 2014 at 14:47

Sorry dear customer,

but the Low Power RF Solutions forum is exclusively dedicated to Bluetooth Low Energy and Spirit1 devices, thus here you cannot find the right support you deserve.

Regards,

Low Power RF Solutions support team