Closed matteocodogno closed 8 years ago
Yah, you can't read/write/subscribe until discovery has completed. Read doesn't necessarily need to be inside the discover callback, but it needs to be called after discovery has completed.... minor distinction.
Thanks for the explanation!
I've another question, I'm developing my first app with bluetooth features so I'm a noob. If I need send a command to bluetooth device and after read the response, I need subscribe a service, write the command on correct service/characteristic and wait the response?
I'm sorry if it's a stupid question
No worries, that's good approach. Subscribe, write command, and then wait for response.
Thank you so much 😊
Matteo Codogno Analyst Programmer presso wellD.ch Sviluppo e restyling siti internet. Mail: codogno1990@live.it matteo.codogno.90@gmail.com Cell: +39 349 1390855 Sito: www.pongolab.com
2016-03-01 22:44 GMT+01:00 Rand Dusing notifications@github.com:
No worries, that's good approach. Subscribe, write command, and then wait for response.
— Reply to this email directly or view it on GitHub https://github.com/randdusing/ng-cordova-bluetoothle/issues/8#issuecomment-190919913 .
Is there any reason why the function read works only if executed inside the callback of function discover ?