You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But then I stumbled upon a problem when I tried calling StartNotificationsAsync on Linux. It kept throwing a NotSupportedException, saying 'properties not supported':
The thing is, when I looked into the GattCharacteristic.linux.cs file, I noticed that the GetProperties method always returns a zero value. This means, no matter what device we're dealing with, it'll inevitably fail to register a callback function because of this:
I think there are a couple of issues which need addressing. The casting issue can be worked around by using the IGattCharacteristic1 throughout rather than the GattCharacteristic helper as it has no public constructor. This will require implementing the logic around property change notification to hook up the events.
The cross-platform code implemented a check that the characteristic supports either Notify or Indicate properties to allow you to start monitoring change events and this breaks the Linux implementation because it doesn't have a direct equivalent of the Properties property. However I believe the IGattCharacteristic1 now has a Flags property with these flags as strings so this can be converted to enum values. I don't have my Linux development environment setup but will look into this soon and hopefully get these issues resolved.
Hello,
When trying to get all characteristics of service this will always occur on Ubuntu 22.04 but on windows won't:
Here's the code:
and here's the sourcecode of
PlatformGetCharacteristics
:Wondering if any one knows how to solve this? Thanks in advance!
The text was updated successfully, but these errors were encountered: