Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to specify slave device PIN when connecting via Bluetooth



  • Hi,

    I am using QT5.4.1 Bluetooth API's to connect to a slave.

    But I am not able to understand how can I specify slave device PIN when connecting to it ?
    requestPairing() doesn't take PIN as an argument.

    Most of the slave devices uses 0000/1234 as default PIN. How can I try using them both when connecting with a slave device ?

    thanks
    Ankur


  • Moderators

    @ankurtyagi
    see QBluetoothLocalDevice signals.
    (pairingDisplayConfirmation and pairingDisplayPinCode)



  • Thanks for the reply.

    But these signals are emitted after requestPairing().

    I am trying to understand what is the default PIN used with requestPairing() and how I can use a different PIN.

    Regards
    Ankur



  • @ankurtyagi said:

    Thanks for the reply.

    But these signals are emitted after requestPairing().

    I am trying to understand what is the default PIN used with requestPairing() and how I can use a different PIN.

    Regards
    Ankur

    Maybe you can get a liitle help from one of my old stackoverflow post. The printer works now, but I think I've configured it on OS level, not with Qt and then it started pairing without PIN code window.



  • @MarkoSan
    In response to your post, it was mentioned to use QDBus for specifying custom PIN but couldn't find any reference for that.

    But it is bit weird that Qt doesn't support this functionality as it is a common requirement.


Log in to reply