Hi Claudiu,
Unfortunately there are a few pairing related issues which are still unresolved in QtBluetooth. 1.) The Bluez5 port is not 100% complete when compared to Bluez 4 (https://bugreports.qt.io/browse/QTBUG-38401) 2.) The API doesn't allow you to specify a PIN as required by your use case (https://bugreports.qt.io/browse/QTBUG-42740) 3.) The current QBLuetoothLocalDevice related Pairing API is not really suitable to cover the use cases. I started to address point 1 above in ttps://codereview.qt-project.org/#/c/85595/ but never got around to finishing it. Then again I actually believe the best fix is to have an API that can be used as agent for all pairing interactions. The capabilities are certainly available in Bluez. On the other hand I doubt that this capability is not cross platform as I doubt that Android, OSX or Win would ever allw the replacement of their agents. -- Alex ________________________________ From: interest-bounces+alexander.blasche=theqtcompany....@qt-project.org <interest-bounces+alexander.blasche=theqtcompany....@qt-project.org> on behalf of Claudiu Olteanu <olteanu.clau...@ymail.com> Sent: Sunday, May 31, 2015 20:49 To: interest@qt-project.org Subject: [Interest] [QtBluetooth] Pairing two devices Hi there! I have some problems when I try to pair two Bluetooth devices using the QTBluetooth API (QBluetoothLocaldevice class). The remote device requires a specific PIN code and when I call the requestPairing method the result is "org.bluez.Error.AuthenticationFailed". (error = 1, pairing status = 0) Is there a way to specify the PIN code? I tried to use pairingDisplayConfirmation and pairingDisplayPinCode signals, but they are never triggered after the call of requestPairing method (with QBluetoothLocalDevice::Paired enum for the second parameter). I read that for the last method the pin is automatically generated so I don't think that they can be used in my scenario . Therefore what happens when you need to insert a specific pin code? I am not sure if it helps but here are the platform and the versions of the packages used: - OS: openSUSE 13.2 (Harlequin) (x86_64) - KDE - Qt 5.4.1 - BlueZ 5.23-1.1 Cheers, Claudiu
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest