Comparing version 0.1.2 to 0.1.3
@@ -68,2 +68,6 @@ var debug = require('debug')('bluez'); | ||
if (properties.Name === 'undefined') { | ||
properties.Name = undefined; | ||
} | ||
var address = properties.Address; | ||
@@ -80,6 +84,8 @@ var advertisement = { | ||
if (uuid.match(/^0000.{4}00001000800000805f9b/)) { | ||
uuid = uuid.substring(4, 8); | ||
if (uuid !== '') { | ||
if (uuid.match(/^0000.{4}00001000800000805f9b/)) { | ||
uuid = uuid.substring(4, 8); | ||
} | ||
advertisement.serviceUuids.push(uuid); | ||
} | ||
advertisement.serviceUuids.push(uuid); | ||
} | ||
@@ -86,0 +92,0 @@ |
@@ -84,3 +84,3 @@ var debug = require('debug')('bindings'); | ||
kCBMsgArgAlert: 1, | ||
kCBMsgArgName: 'node' | ||
kCBMsgArgName: 'node-' + (new Date()).getTime() | ||
}); | ||
@@ -87,0 +87,0 @@ }; |
@@ -25,2 +25,4 @@ var debug = require('debug')('noble'); | ||
function Noble() { | ||
this.state = 'unknown'; | ||
this._bindings = bindings; | ||
@@ -57,2 +59,5 @@ this._peripherals = {}; | ||
debug('stateChange ' + state); | ||
this.state = state; | ||
this.emit('stateChange', state); | ||
@@ -59,0 +64,0 @@ }; |
@@ -5,3 +5,3 @@ { | ||
"description": "A node.js BLE (Bluetooth low energy) library.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -128,3 +128,3 @@ noble | ||
state = <"unknown" | "resetting" | "unsupported" | "unsupported" | "unauthorized" | "poweredOff" | "poweredOn"> | ||
state = <"unknown" | "resetting" | "unsupported" | "unauthorized" | "poweredOff" | "poweredOn"> | ||
@@ -131,0 +131,0 @@ noble.on('stateChange', callback(state)); |
Sorry, the diff of this file is not supported yet
125505
25
2776