Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt Bluetooth - How to provide a preset PIN
Forum Updated to NodeBB v4.3 + New Features

Qt Bluetooth - How to provide a preset PIN

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 840 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    strenkwalder
    wrote on last edited by
    #1

    Hi everyone,

    I discovered the Bluetooth library from Qt a few days ago and try to implement an application that scans for devices. It the scanned device is an e-puck (a robot used in our University), it should connect to it and log all the data that it sends.

    The epuck has a name: e-puck_XXXX, where XXXX is the pin of the robot.
    I use Ubuntu (16.04) and if I pair the robot by hand, the software works fine.

    However, if I want to perform the pairing in the application with

    localDevice.requestPairing(device.address(), QBluetoothLocalDevice::Paired);
    

    or

    localDevice.requestPairing(device.address(), QBluetoothLocalDevice::AuthorizedPaired);
    

    I get

    qt.bluetooth.bluez: Failed to create pairing "org.bluez.Error.AuthenticationFailed"
    

    which ( I assume ) happens because I need a PIN.

    I was looking over the documentation and googled a lot to find a way to provide the pairing PIN. I can only Display it, but I don't know how I can hand over the PIN to QT.

    I read that I am supposed to get a popup or something, but nothing shows up. SO I cannot enter a pin or such.

    Can anyone help me or show me an alternative? I can also provide code but this is a more conceptual a question on how I do that and with which classes/functions????

    1 Reply Last reply
    1

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved