noble / noble

A Node.js BLE (Bluetooth Low Energy) central module
MIT License
3.41k stars 864 forks source link

how to go out ouf discover loop when a specific service/characteristic is found #943

Open ilker-aktuna opened 4 years ago

ilker-aktuna commented 4 years ago

Hi,

I could not figure out how to go out ouf discover loop when a specific service/characteristic is found. is it possible ?

how ?

jjakob666 commented 4 years ago

easy just do a setTimeout to call another function to handle what you want to do, and do a return; after that which returns from the event that got fired in the discover loop