Qt bluetooth scanner and chat example.
-
Hi guys,
I have been trying hard the last days with the bluetooth examples, i have problems with bluetooth chat example, it doesn't find any devices, this doesnt happen with scanner example where it finds multiple devices.I can't figure it how to make it bluetooth chat example to work. Any help?
Franco
-
Hi
What platform are you on ? ( and Qt version)
Windows 10 version 1507 is minimum and win 8 and win 7 does not work. -
I can't figure it how to make it bluetooth chat example to work. Any help?
Windows 10 version 1903 running on *wmware'Do you have an USB bluetooth dongle added (your BT device) to running VMWARE? Do you see it in a guest Windows?
-
@kuzulis said in Qt bluetooth scanner and chat example.:
I can't figure it how to make it bluetooth chat example to work. Any help?
Windows 10 version 1903 running on *wmware'Do you have an USB bluetooth dongle added (your BT device) to running VMWARE? Do you see it in a guest Windows?
Yes, and also i tried to compile to android and run the program in a samsung tablet and i have same problem, only scanner detect devices and not chat example.
-
@mrjj said in Qt bluetooth scanner and chat example.:
Hi
What platform are you on ? ( and Qt version)
Windows 10 version 1507 is minimum and win 8 and win 7 does not work.Hi mrjj, thanks for your reply.
Windows 10 version 1903 running on wmware
Qt creator 4.9.2
Qt 5.12.4 -
@Frank84 Hi,
Bluetooth chat example is composed by a server and a client, the scan from the client is filtered on a specific service which is provided by the server.
So you can see only devices which are "compatible" with the chat, which means providing the specific UUID of the service.
You can see definition of the service UUID in the example's documentation:Bluetooth uses UUIDs as unique identifiers. The chat service uses a randomly generated UUID.
static const QLatin1String serviceUuid("e8e10f95-1a70-4b27-9ccf-02010264e9c8"); serviceInfo.setServiceUuid(QBluetoothUuid(serviceUuid));
You also need to check if your server is started correctly, there is a message printed on the console if it's not the case
Cannot bind chat server to "00:00:00:00:00:00"
In my case I have this message because I don't have qt.bluetooth. You may also have a different address than "00:00:...".
If you want to see all devices when scanning from the client, you can remove this line
m_discoveryAgent->setUuidFilter(uuid);
inRemoteSelector::startDiscovery()
. But it does not really make sense in this context as you want to see only servers which are compatible with the chat protocol.