evothings / cordova-ble

Bluetooth Low Energy plugin for Cordova
http://www.evothings.com/
Apache License 2.0
242 stars 103 forks source link

No error callback when trying to read characteristics if BLE is turned off #80

Open u84six opened 8 years ago

u84six commented 8 years ago

When I make a call to BLE and the BLE device turns off, I'm not getting any kind of timeout and callbackContext.error() isn't ever called. It seems to hang in the Android BLE/GATT (example: if readCharacteristic is called, there's no timeout or error if it can't communicate with the device). How have you gotten around this?

fredrikeldh commented 8 years ago

I'm unsure what you mean by "gotten around".

Our apps, such as they are, have a "Disconnect" button, which the user can press.

u84six commented 8 years ago

I'm talking about making a request to BLE like readCharacteristic when the BLE device turns off. When that happens, readCharacteristic doesn't return an error if it can't communicate with the device, and seem to just hang at the Android SDK.