As a receiver I tried the LogiLink BT0015 (100 meter range), Conceptronic 1004108 CBT40NANO (100 meter range) and CSR 4.0 (20 meter range). As a transmitter I use a stickNfind.
I created a test script to receive uuid and rssi values for BLE devices I'm interested in:
Code: Select all
var winston = require('winston');
var logger = new (winston.Logger)({
transports: [
new winston.transports.Console(),
new winston.transports.File({ filename: '/home/pi/bluetooth.log' })
]
});
var noble = require('noble');
noble.startScanning([], true);
var addressesToTrack = ['ec...', 'c0...'];
Array.prototype.contains = function(k, callback) {
var self = this;
return (function check(i) {
if (i >= self.length) {
return callback(false);
}
if (self[i] === k) {
return callback(true);
}
return process.nextTick(check.bind(null, i+1));
}(0));
}
noble.on('discover', function(peripheral) {
addressesToTrack.contains(peripheral.uuid, function(found) {
if (found) {
logger.warn(peripheral.uuid, ' ', peripheral.rssi);
}
});
});
If anyone is doing something similar or is interested in something similar please leave your comments. Thanks
