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 5.15.2 Windows 10 BLE (QLowEnergyService::UnknownError, The process is being used by another process.)

Qt 5.15.2 Windows 10 BLE (QLowEnergyService::UnknownError, The process is being used by another process.)

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 854 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.
  • Q Offline
    Q Offline
    Queequeg
    wrote on last edited by Queequeg
    #1

    Hi folks.

    I am trying to create an application to read data from a BLE device. This is my first experience with Qt in general.

    Using the Qt examples, I created a code that successfully searches for devices, successfully connects to the device, finds all the services of the device, but I cannot get the characteristics of the service using the discoverDetails() method.

    When trying to use discoverDetails(), I get stateChanged() signals with QLowEnergyService::DiscoveringServices signals (which seems to be correct), but then the error() slot is called with the error QLowEnergyService::UnknownError.

    I am using Windows 10 Pro 20H2, with a Bluetooth CSR 4.0 adapter.
    The Qt examples (LowEnergyScanner and HeartRate-Game) work fine.

    Can anyone help? Header file and source code:
    Header - https://pastebin.com/04mnYQZr
    Code - https://pastebin.com/ufRefgxE

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Queequeg
      wrote on last edited by
      #2

      I select the service from Qlist<QBluetoothUuid> as indicated in the documentation for createServiceObject() but an error occurs.
      Screenshot 2021-01-27 024329.png

      An adapter error appears to occur, is the device busy? But why does everything work with examples? Windows error? But then again, why does everything work with examples?
      Screenshot 2021-01-27 024554.png

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Queequeg
        wrote on last edited by Queequeg
        #3

        Installed Ubuntu 20.10, installed Qt 5.15.2 and my program seems to work fine!
        The question is, why doesn't it work on Windows 10, but works on Ubuntu? That being said, the Qt examples work fine on WIndows 10 as well as on Ubuntu, but my program doesn't work. Why?
        And I went through all the services of my BLE device, each service works great, the search works great. But not on Windows. Help, my head is broken.
        Screenshot from 2021-01-28 00-24-59.png

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          Queequeg
          wrote on last edited by
          #4

          Trillions of years later, I returned to this program, and solved my problem by simply switching the discoveryFinished() slot in Qt::QueuedConnection.
          01dca4d8-c806-44b1-8977-a6564f40e7a5-image.png

          P X 2 Replies Last reply
          2
          • O Offline
            O Offline
            onewizzardboi
            wrote on last edited by
            #5

            You are a god! I had absolutely no idea what was causing that error.

            1 Reply Last reply
            0
            • Q Queequeg

              Trillions of years later, I returned to this program, and solved my problem by simply switching the discoveryFinished() slot in Qt::QueuedConnection.
              01dca4d8-c806-44b1-8977-a6564f40e7a5-image.png

              P Offline
              P Offline
              panth
              Banned
              wrote on last edited by
              #6
              This post is deleted!
              1 Reply Last reply
              0
              • Q Queequeg

                Trillions of years later, I returned to this program, and solved my problem by simply switching the discoveryFinished() slot in Qt::QueuedConnection.
                01dca4d8-c806-44b1-8977-a6564f40e7a5-image.png

                X Offline
                X Offline
                XieBei
                Banned
                wrote on last edited by
                #7
                This post is deleted!
                1 Reply Last reply
                0

                • Login

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