Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
6.3.0
-
None
-
-
Foundation PM Staging
Description
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