MicrosoftDocs / winrt-api

WinRT reference content for developing Microsoft Universal Windows Platform (UWP) apps
Creative Commons Attribution 4.0 International
231 stars 499 forks source link

GattCharacteristic.ProtectionLevel fails #2473

Open corby opened 3 months ago

corby commented 3 months ago

I have a BLE device that has several services including one custom service with 2 characteristics. The CHARs are setup as RX/TX. The RX CHAR receives commands and the TX CHAR sends responses using NOTIFY. Everything works fine using BluetoothLEDevice to connect and read. I can also configure the CCCD on the standard CHARs to send nodifications.

Here's the problem: The custom TX CHAR has AUTHENTICATION_REQUIRED set on the CCCDescriptor. So when I call. WriteClientCharacteristicConfigurationDescriptorAsync I get an AccessDenied error and a message saying I need to enable Authentication before writing to this attribute.

I've tried the following:

I'm at a loss on how to get this device to read using windows (Linux DBus, MacOSX CoreDevice, and nRF softdevice have no issues)

I'm using python with winrt bindings

stevewhims commented 2 months ago

Thanks, @corby, I've pinged the product team subject-matter experts for help.

-Steve

stevewhims commented 2 months ago

Can you give us more information on what's meant by “doing nothing”, as in exactly how are you calling the pairing APIs and how is it failing?

Thanks!