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. QLowEnergyService error when discoverDetails called on Windows 10
Qt 6.11 is out! See what's new in the release blog

QLowEnergyService error when discoverDetails called on Windows 10

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 347 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.
  • V Offline
    V Offline
    VSlava
    wrote on last edited by
    #1

    We have our own Bluetooth device with internal protocol. Device provides service with custom UUID.
    Running Qt app on W10 causes error when service is discovered with output listed at the end.
    When app runs on Windows11 or macOS - nor problem, all works.

    Same result if I just use heartrate-game example and substitute UUID with our own ID. It is not possible to discover service, internal error happends.

    code looks like:
    ....
    pqservice=p_lecontroller->createServiceObject( aserviceid );
    if(pqservice)
    { connect(pqservice, &QLowEnergyService::characteristicRead,
    this, &BLEService::characteristicRead);
    connect(pqservice, &QLowEnergyService::characteristicWritten,
    this, &BLEService::characteristicWritten);
    connect(pqservice, &QLowEnergyService::stateChanged,
    this, &BLEService::stateChanged);
    connect(pqservice, &QLowEnergyService::errorOccurred,
    this, &BLEService::errorOccurred);
    connect(pqservice, &QLowEnergyService::descriptorWritten,
    this, &BLEService::descriptorWritten);
    connect(pqservice, &QLowEnergyService::descriptorRead,
    this, &BLEService::descriptorRead);
    connect(pqservice, &QLowEnergyService::characteristicChanged,
    this, &BLEService::characteristicChanged);
    pqservice->discoverDetails(QLowEnergyService::SkipValueDiscovery);

    then calback called:

    void BLEService::stateChanged(QLowEnergyService::ServiceState newState)
    { switch (newState)
    { case QLowEnergyService::RemoteServiceDiscovered:
    qDebug()<<" RemoteServiceDiscovered ";

    and after that

    void BLEService::errorOccurred(QLowEnergyService::ServiceError newError)
    { qDebug()<<" QLowEnergyService errorOccurred ";
    switch(newError)
    {
    case QLowEnergyService::UnknownError:
    qDebug()<<"UnknownError";
    break;

    To be sure it is not problem of driver or device, i used "BluetoothLE example" from Microsoft for UWP build on VS 2022 on W10, same controller, same device, same UUID works without problems.

    Output is:

    *RemoteServiceDiscovering
    onecoreuap\drivers\wdm\bluetooth\user\winrt\gatt\gattdeviceservice.cpp(1386)\Windows.Devices.Bluetooth.dll!00007FFCF98BDEBB: (caller: 00007FFCF98BD212) Exception(1) tid(4d2c) 80070020 The process cannot access the file because it is being used by another process.

    Exception at 0x7ffd4790cd29, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in Windows_Devices_Bluetooth

    Exception at 0x7ffd4790cd29, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in Windows_Devices_Bluetooth
    onecoreuap\drivers\wdm\bluetooth\user\winrt\gatt\gattdeviceservice.cpp(1197)\Windows.Devices.Bluetooth.dll!00007FFCF99893C4: (caller: 00007FFCF98BEB43) ReturnHr(37) tid(4d2c) 80070020 The process cannot access the file because it is being used by another process.
    Msg:[onecoreuap\drivers\wdm\bluetooth\user\winrt\gatt\gattdeviceservice.cpp(1386)\Windows.Devices.Bluetooth.dll!00007FFCF98BDEBB: (caller: 00007FFCF98BD212) Exception(1) tid(4d2c) 80070020 The process cannot access the file because it is being used by another process.
    ]
    onecoreuap\drivers\wdm\bluetooth\user\winrt\gatt\gattdeviceservice.cpp(1593)\Windows.Devices.Bluetooth.dll!00007FFCF98BF38B: (caller: 00007FFCF98C485F) Exception(2) tid(4d2c) 80070020 The process cannot access the file because it is being used by another process.

    Exception at 0x7ffd4790cd29, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in Windows_Devices_Bluetooth

    Exception at 0x7ffd4790cd29, code: 0xe06d7363: C++ exception, flags=0x1 (execution cannot be continued) (first chance) in Windows_Devices_Bluetooth
    QLowEnergyService errorOccurred
    UnknownError*

    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