Author Topic: LAMW Bluetooth connection  (Read 1338 times)


  • Newbie
  • Posts: 1
LAMW Bluetooth connection
« on: February 03, 2018, 04:54:19 pm »
Hello, dear colleagues.

I’m  new to Lazarus and LAMW and Android programming.
I’m trying to make some simple bluetooth communication app. I was using MAXX Bluetooth terminal example as a starting point. So I have the following problem.

When I build a list of discovered devices I use 3 different functions:

If target device is paired and its bluetooth module is set in a mode: “expose yourself for new connections”, then that device is listed in  jBluetooth.GetReachablePairedDevices() result. It can be then accessed using jBluetooth.GetReachablePairedDeviceByAddress function and connection is easily established between Client part and listening Server part (using jBluetoothClientSocket.SetDevice();  jBluetoothClientSocket.SetUUID('00001101-0000-1000-8000-00805F9B34FB');  jBluetoothClientSocket.Connect();)

So the question is: When target device has its bluetooth on, is paired with the client but is not in “expose yourself for new connections” mode, it is then listed in jBluetooth.GetPairedDevices() result. But how to get its handler and set connection to it? I believe it should be possible since the same 2 devices can exchange data, e.g sending files to each other from  file managers in that state.

Thank you
« Last Edit: February 03, 2018, 05:43:21 pm by yurets_z »