How to use the bleno.setServices function in bleno

To help you get started, we’ve selected a few bleno 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 DigitalSecurity / btlejuice / fake.js View on Github external
return function(error){
      if (!error) {
        //console.log('[setup] services registered'.yellow);
        _this.logger.info('BTLE services registered');

        /* Register services. */
        bleno.setServices(_this.services);

        /* Fix handles. */
        if (_this.keepHandles) {
          _this.logger.info('Fixing Bleno handles ...');
          _this.fixBlenoHandles(profile, _this.services);
        }

      } else {
        //console.log('[setup] error while registering services !'.red);
        _this.logger.error('cannot register services !');
      }
    };
  })(this));
github dawsontoth / zwifit / src / bluetooth / index.js View on Github external
function onAdvertisingStarted(error) {
	if (error) {
		console.error(error);
		return;
	}
	bleno.setServices(services);
}

bleno

A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals

MIT
Latest version published 6 years ago

Package Health Score

54 / 100
Full package analysis