Initial commit
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
const BeaconScanner = require('node-beacon-scanner');
|
||||
const scanner = new BeaconScanner();
|
||||
var fs = require('fs');
|
||||
// Set an Event handler for becons
|
||||
scanner.onadvertisement = (ad) => {
|
||||
console.log(JSON.stringify(ad, null, ' '));
|
||||
};
|
||||
|
||||
// Start scanning
|
||||
scanner.startScan().then(() => {
|
||||
console.log('Started to scan.') ;
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
Reference in New Issue
Block a user