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. Issue with Bluetooth LE service discovery - QLowEnergyService::UnknownError
Forum Updated to NodeBB v4.3 + New Features

Issue with Bluetooth LE service discovery - QLowEnergyService::UnknownError

Scheduled Pinned Locked Moved Solved General and Desktop
bluetooth leqbluetooth
2 Posts 1 Posters 384 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.
  • A Offline
    A Offline
    akshaybabloo
    wrote on last edited by
    #1

    On Windows 10 (works fine on macOS), I have been getting QLowEnergyService::UnknownError whenever I try to rerun the application but works fine when I try to run it after a while (say 15 mins). Whenever I get the UnknownError, the QLowEnergyService::stateChanged is stuck on QLowEnergyService::DiscoveryRequired.

    I tried queuing QLowEnergyController::serviceDiscovered, as mentioned in https://forum.qt.io/topic/117241/why-qlowenergyservice-unknownerror, but that didn't help.

    Not sure what's happening here - any help is appreciated

    1 Reply Last reply
    0
    • A Offline
      A Offline
      akshaybabloo
      wrote on last edited by
      #2

      Looks like this is a known issue https://bugreports.qt.io/browse/QTBUG-80770 and https://bugreports.qt.io/browse/QTBUG-78488.

      A workaround is to add:

       QTimer::singleShot(0, [=]() {
           service->discoverDetails();
       });
      
      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