Created
February 5, 2014 11:14
-
-
Save toru-takahashi/8821414 to your computer and use it in GitHub Desktop.
This file contains 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 Bleacon = require('bleacon'); | |
Bleacon.startScanning(); | |
var logger = require('fluent-logger'); | |
logger.configure('td.ibeacon_db', {host: 'localhost', port: 24224}); | |
Bleacon.on('discover', function(bleacon) { | |
console.log(bleacon); | |
logger.emit('ibeacon_table', { | |
uuid: bleacon.uuid, | |
major: bleacon.major, | |
minor: bleacon.minor, | |
measuredPower: bleacon.measuredPower, | |
rssi: bleacon.rssi, | |
accuracy: bleacon.accuracy, | |
proximity: bleacon.proximity | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment