You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to connect to my Arduino via BLE using this library. But for some reason the services array are always empty:
Here's my code
noble.on('stateChange',function(state){if(state==='poweredOn'){//// Once the BLE radio has been powered on, it is possible// to begin scanning for services. Pass an empty array to// scan for all services (uses more time and power).//console.log('scanning...');noble.startScanning(['0000222000001000800000805f9b34fb'],false);}else{noble.stopScanning();}})noble.on('discover',function(peripheral){console.log(peripheral);// we found a peripheral, stop scanningnoble.stopScanning();console.log("scanning stopped")peripheral.connect(err=>{peripheral.discoverServices(['0000222000001000800000805f9b34fb'],function(err,services){console.log({error: err,service: services});});})});
And this is the output:
The text was updated successfully, but these errors were encountered:
I am trying to connect to my Arduino via BLE using this library. But for some reason the services array are always empty:
Here's my code
And this is the output:
The text was updated successfully, but these errors were encountered: