How to use the @abandonware/noble._peripherals 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 urish / real-trex-runner / firmware / src / button.js View on Github external
peripheral.once('disconnect', () => {
        console.log('disconnected');
        // Clean noble's peripheral cache
        noble._peripherals = {};
        connectionListener(false);
        scanButton();
      });
    }
github CANDY-LINE / node-red-contrib-generic-ble / src / generic-ble.js View on Github external
return new Promise((resolve) => {
          let peripheral = noble._peripherals[obj._peripheralId];
          if (obj.notifiable && peripheral && peripheral.state === 'connected') {
            delete obj.dataListener;
            obj.object.unsubscribe(resolve);
          } else {
            return resolve();
          }
        });
      },