Skip to content

Access Denied When Executing "GetCharacteristicsForUuidAsync()" for Write Characteristic #961

Discussion options

You must be logged in to vote

For anyone who stumbles over the same stupid issue...Here's the solution:

On Windows, using .NET Framework 4.6.1+ and the WinRT libraries inside a Non-UWP application, you can only call ONCE for getting the characteristics, no matter if you call for all at once via gattDeviceService.GetCharacteristicsAsync(BluetoothCacheMode.Uncached) or for a specific one via gattDeviceService.GetCharacteristicsForUuidAsync(uuid, BluetoothCacheMode.Cached).

Any subsequent calls will fail with GattCommunicationStatus.AccessDenied...
So my solution now is to retrieve all characteristics at once and filter them locally.

That did the trick! Anyways, this is so stupid...It wasted a lot of my time now!
As it s…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@MathiasHartner
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by MathiasHartner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants