Hi, > It works fine, if I have paired it outside of the app. How do I pair it > inside the app?
QBluetoothLocalDevice might be useful for you, see https://doc.qt.io/qt-6/qbluetoothlocaldevice.html#requestPairing On Wed, 9 Apr 2025 at 05:22, Scott Bloom <sc...@towel42.com> wrote: > > 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 > > > > > > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest