StartUpdatesAsync on characteristic Android error
See original GitHub issueSteps to reproduce
-
Download xamarin-bluetooth-le from master branch
-
Launch BLE explorer
-
Coonect to a Device with custom service - with 2 characteristics
- 1 Write without Response (1)
- 1 update with Notify (2)
- try to write and update
Expected behavior
Write on characteristic 1 send data to my device Update on characteristic 2 get data when my device send data
Actual behavior
I connected to my device, discover services, and get characteristics.
- carac 1 : Write without Response (1)
- carac 2 : update with Notify (2)
when i wrote on mu (1), its ok when i try to update (2), my application give an exeption.
Crashlog
I got an exeption : “Gatt SetCharacteristicNotification FAILED.”
i check in source code and found that :
/ In order to subscribe to notifications on a given characteristic, you must first set the Notifications Enabled bit // in its Client Characteristic Configuration Descriptor. See https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx and // https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorViewer.aspx?u=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml // for details.
i dont know why
if (!_gatt.SetCharacteristicNotification(_nativeCharacteristic, true))
throw new CharacteristicReadException("Gatt SetCharacteristicNotification FAILED.");
return false 😕
Configuration
Version of the Plugin: e.g. 1.2.1
Platform: e.g. Android 4.4.2
Device: e.g. wiko rainbow 4G
Issue Analytics
- State:
- Created 7 years ago
- Comments:9
Top GitHub Comments
Same, it’s not working for me too. The event never gets triggered. Any idea?
I know this is an old thread but I am having same problem with Characteristic.ValueUpdated not firing. Have verified with nrfConnect that notification is definitely being sent from device. Have tried 1.3 and 2.0 packages.
Was there a resolution? Thanks for any info.