Open Scooxstad opened 1 year ago
After further investigation, I've determined that Bond Management Service (0x181e) is causing the Access Denied exception when attempting to fetch its characteristics. I've worked around this issue by skipping the service entirely when iterating gatt_services in PeripheralBase.cpp, which is a sufficiently valid solution for my purposes with this library.
if (guid_to_uuid(service.Uuid()) == "0000181e-0000-1000-8000-00805f9b34fb") {
continue;
}
Excellent find, thank you very much! I'll fix this in the next release!
I'm executing a basic program that scans for a specific device, connects, and lists services and characteristics. However, there are services I know for a fact should be available despite not appearing in the peripheral's services. For the record, the services I receive are Generic Access Service (0x1800), Generic Attribute Service (0x1801), Device Information Service (0x180a) and one unspecified service (a026ee01-0a7d-4ab3-97fa-f1500f9feb8b). In addition to these I am also expecting the Fitness Machine Service (0x1826), which is not present.
When debugging the application, several exceptions are thrown and caught during the execution of
PeripheralBase::_attempt_connect()
, with a call stack trace pointing toonecoreuap\drivers\wdm\bluetooth\user\winrt\gatt\gattdeviceservice.cpp(1325)
andonecore\internal\sdk\inc\wil\opensource/wil/winrt.h(1269)
. The exception itself is80070005 Access is denied
.Debug output
While troubleshooting this, I came across the following Stackoverflow post with two answers describing possible workarounds for a similar issue. https://stackoverflow.com/q/71620883