How to use the @abandonware/noble.stopScanning function in @abandonware/noble

To help you get started, we’ve selected a few @abandonware/noble examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CANDY-LINE / node-red-contrib-generic-ble / src / generic-ble.js View on Github external
function onStateChange(state) {
  if (state === 'poweredOn') {
    noble.startScanning([], true);
  } else {
    noble.stopScanning();
  }
}
github CANDY-LINE / node-red-contrib-generic-ble / src / generic-ble.js View on Github external
RED.events.on('runtime-event', (ev) => {
    if (TRACE) {
      RED.log.info(`[GenericBLE]  ${JSON.stringify(ev)}`);
    }
    if (ev.id === 'runtime-state') {
      noble.stopScanning();
      bleDevices.flushAll();
      startBLEScanning(RED);
    }
  });
github thegecko / webbluetooth / src / adapter.ts View on Github external
public stopScan(_errorFn?: (errorMsg: string) => void): void {
        this.discoverFn = null;
        noble.stopScanning();
    }
github LedgerHQ / ledgerjs / packages / hw-transport-node-ble / src / platform.js View on Github external
return () => {
      noble.removeListener("discover", onDiscover);
      noble.stopScanning();
    };
  });