[Interest] QBluetooth connection/pairing issue
Scott Bloom
scott at towel42.com
Wed Apr 9 04:21:17 CEST 2025
I am working on a tool that connects to a BT serial port device on windows 11
I have the scan working, and can select the device, giving me a QBluetoothServiceInfo
I can get the address via QBluetoothServiceInfo::device().address();
I can save this value to the registry, and reconnect on the startup of the tool.
However, I can't figure out for the life of me how to "pair" the device.
I turned on all the Bluetooth logging, hoping to see something, via
QLoggingCategory::setFilterRules( QStringLiteral( "qt.bluetooth* = true" ) );
But that didn't help.
I construct the socket via
socket = new QBluetoothSocket( QBluetoothServiceInfo::RfcommProtocol);
I connect to all the socket signals, and never see a request or failure due to not being paired.
I then use
Socket->connectToService( address, QBluetoothUuid::ServiceClassUuid::SerialPort )
It works fine, if I have paired it outside of the app. How do I pair it inside the app?
TIA,
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20250409/c311b945/attachment.htm>
More information about the Interest
mailing list