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. Problem using the btscanner example for Linux ...
Forum Updated to NodeBB v4.3 + New Features

Problem using the btscanner example for Linux ...

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.4k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    teratux
    wrote on 24 Jul 2014, 20:21 last edited by
    #1

    Hello ... today I've been trying out the QtBluetooth API on Linux 64bits. The example compiles and runs fine meaning that every Qt dependency has been installed. However, I am not able to see any adapters currently connected to the PC. I'm using a USB bluetooth dongle: Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode). I tried the bluez-test tools to see if it was a problem with the bluez underlying system since I read somewhere that QtBluetooth uses it on Linux. This is what the list-devices binary of the bluez suite has to offer:

    [ /org/bluez/hci0 ]
    Name = espi-127.bazaar
    Powered = 1
    Modalias = usb:v1D6Bp0246d0508
    DiscoverableTimeout = 180
    Alias = espi-127.bazaar
    PairableTimeout = 0
    Discoverable = 0
    Address = 00:15:83:12:18:F2
    Discovering = 0
    Pairable = 1
    Class = 0
    UUIDs = 0x1200 0x1800 0x1801 0x110e 0x110c

    I tried this code in the DeviceDiscoveryDialog constructor:

    this->localDevice->powerOn();
    std::cout << this->localDevice->allDevices().size() << std::endl;
    std::cout << this->localDevice->isValid() << std::endl;
    

    and get 0 and 0, meaning no bluetooth adapters are found and none are valid. Is there any other way to check where the problem might be?

    I'm using: Opensuse 13.1 Linux 64-bit
    QMake version 3.0
    Using Qt version 5.3.1 in /usr/lib ( from online repositories, nothing compiled by hand )

    Thanks in advance ...

    1 Reply Last reply
    0
    • A Offline
      A Offline
      ambershark
      wrote on 24 Jul 2014, 20:34 last edited by
      #2

      Do bluetooth devices on your system require a special group or root?

      Some systems need the uses added to a bluetooth group to use bt devices without being root.

      You could try a simple console application that checks for bt devices on the command line and run that as root and see if it comes up.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      0
      • T Offline
        T Offline
        teratux
        wrote on 24 Jul 2014, 20:57 last edited by
        #3

        The list-devices script in the bluez-test does just that. I ran it being the same user as the one running the Qt app. It seems to be something related with Qt in my opinion, even with hciconfig I see the dongle and with hcitool scan get the other bluetooth devices in the vecinity.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ambershark
          wrote on 24 Jul 2014, 21:48 last edited by
          #4

          I haven't used the bluetooth stuff in Qt yet so I can't comment on if it's working or not. I just figured I would tell you about some of the linux things that can get people.

          If I have some time here in a bit I will run the bt sample app and see if it works on my system and let you know. I'm using gentoo and not opensuse though. Also did you check your logs like /var/log/messages just in case there is something in there, although I doubt it.

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ambershark
            wrote on 24 Jul 2014, 22:01 last edited by
            #5

            I went to test btscanner but it didn't work for me either. It has nothing to do with btscanner though. I noticed my BT usb adapter isn't configured. Last time I redid my linux system I didn't include BT support in the kernel I bet.

            I will add support and test again but I can't do it today. I have a release I need to get to QA today so I don't have time to play. :)

            As a side note though I use bluedevil and not bluez for bt support. Maybe bluez is causing issues? I doubt it though.

            My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

            1 Reply Last reply
            0

            5/5

            24 Jul 2014, 22:01

            • Login

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