Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ BeaconParser.prototype.parse = function(peripheral) {
BeaconParser.prototype._detectBeaconType = function(peripheral) {
let ad = peripheral.advertisement;
let manu = ad.manufacturerData;
// iBeacon
if(manu && manu.length >= 4 && manu.readUInt32BE(0) === 0x4c000215) {
return 'iBeacon';
}
// Eddiystone
let eddystone_service = ad.serviceData.find((el) => {
return el.uuid === this._EDDYSTONE_SERVICE_UUID;
Expand All @@ -91,6 +87,10 @@ BeaconParser.prototype._detectBeaconType = function(peripheral) {
return 'eddystoneEid';
}
}
// iBeacon
if(manu && manu.length >= 4 && manu.readUInt32BE(0) === 0x4c000215) {
return 'iBeacon';
}
// Estimote Telemetry
let telemetry_service = ad.serviceData.find((el) => {
return el.uuid === this._ESTIMOTE_TELEMETRY_SERVICE_UUID;
Expand All @@ -106,4 +106,4 @@ BeaconParser.prototype._detectBeaconType = function(peripheral) {
return '';
};

module.exports = new BeaconParser();
module.exports = new BeaconParser();