cordova-plugin-ble-central icon indicating copy to clipboard operation
cordova-plugin-ble-central copied to clipboard

Starting to receive notifications fails

Open Juarrow opened this issue 4 years ago • 6 comments

(I'm using Android 9)

Every time i try to subscribe to notifications i get the error

Set notification failed for 000036f6-0000-1000-8000-00805f9b34fb

But when i register for notifications from within a native test app on the same characteristic, it works just fine.

Juarrow avatar Jul 16 '20 12:07 Juarrow

I have used the startNotification successfully with devices implementing BLE 4.1 and 4.2 on Android 8.1 platform. When I use the same code in Android platform 9 or above, the BLE 4.1 device does not return anything (success or error) - the BLE 4.2 device continues to work fine (it is not the location permission etc. which are set).

Both the BLE 4.1 and 4.2 device scan, connect, disconnect, read, write works. This issue is only for the startNotification. Not sure what might be different.

SSGitAdmin avatar Oct 22 '20 22:10 SSGitAdmin

@SSDevAdmin @Juarrow I facing the same issue, did you guys fixed it?

nolife08021 avatar Jan 13 '21 07:01 nolife08021

I temporarily did a timer based loop read of the characteristics (they were read and notify)... not the desired solution, but was a workaround. The original notification issue is still persisting.

SSGitAdmin avatar Jan 13 '21 08:01 SSGitAdmin

oh, okay i will try it if still haven't found any solution. thanks

nolife08021 avatar Jan 13 '21 08:01 nolife08021

By using Wireshark, I found the value of notifiction is still "0" not "1"after running ble.startnotification() on my andriod phone, that means notify is disable and any data can not be received from periperal, seems function ble.startnotification did not set CCCD descriptor.

lon2347 avatar Jan 31 '21 12:01 lon2347

Is this issue still occurring for anyone?

peitschie avatar Jun 29 '22 01:06 peitschie

Closing due to inactivity

peitschie avatar Jan 29 '24 03:01 peitschie