evothings / cordova-ble

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

readAllServiceData Setting issue #100

Closed LAIZIHYIN closed 7 years ago

LAIZIHYIN commented 8 years ago

I installed the ble plugin in my cordova project, now I have this build failed issue. I use the connection, I want to use readAllServiceData function, but not executed and no error message, can I Setting it wrong?

my code image

console.message image

ghost commented 8 years ago

@LAIZIHYIN Hello, there might be an error when reading services/characteristics. Does it work to run any one the Evothings BLE example apps? Would be interesting to see if the EasyBLE library would work. I have not used the readAllServiceData function myself for a while.

To make it easier to debug an see where things go wrong, yoy could make a copy of the readAllServiceData function and rename it to eg myReadAllServiceData. The source code is here: https://github.com/evothings/cordova-ble/blob/master/ble.js#L672

Like this:

function myReadAllServiceData(deviceHandle, win, fail) 
// paste code here and insert log statements to trace execution
ghost commented 7 years ago

@LAIZIHYIN Hello, just want to say there is a new release of the BLE plugin, version 2.0.0, see release notes here: https://github.com/evothings/cordova-ble/releases/tag/2.0.0

This version has improved support for reading services and many more AIp updates and additions.

Did you get around to do further debugging of the read services problem?

ghost commented 7 years ago

Closing this issue due to inactivity, let me know if to reopen.