How to use the bleno.stopAdvertising 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 dawsontoth / zwifit / src / bluetooth / index.js View on Github external
function onStateChanged(state) {
	if (state === 'poweredOn') {
		current.poweredOn = true;
		console.log('Bluetooth: Powered On.');
		bleno.startAdvertising(constants.NAME, serviceUUIDs);
	}
	else {
		current.poweredOn = false;
		console.log('Bluetooth: Powered Off.');
		bleno.stopAdvertising();
	}
}

bleno

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

MIT
Latest version published 7 years ago

Package Health Score

54 / 100
Full package analysis