Created
February 12, 2014 00:26
-
-
Save sandeepmistry/8947414 to your computer and use it in GitHub Desktop.
node.js script to mimic the iBeacons at Mobile World Congress 2014 - http://mwc.mobisfera.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bleno = require('bleno'); | |
var uuid = 'B9407F30-F5F8-466E-AFF9-25556B57FE6D'.replace(/-/g, ''); | |
var major = 21047; | |
var minorStart = 0; | |
var minorEnd = 5; | |
var measuredPower = -59; | |
console.log("MWC Scavenger Hunt"); | |
var minor = minorStart; | |
setInterval(function() { | |
bleno.stopAdvertising(); | |
if (minor > minorEnd) { | |
process.exit(0); | |
} | |
console.log('minor = ' + minor); | |
bleno.startAdvertisingIBeacon(uuid, major, minor, measuredPower); | |
minor++; | |
}, 2000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment