Commit 0250a21c authored by Donald Chen's avatar Donald Chen
Browse files

fix finding bmdeval service uuid

parent cba91305
......@@ -38,7 +38,16 @@ const rigadoSensorBeacon = function (peripheral) {
// TODO: the local name and uuid may need to be configureable
rigadoSensorBeacon.is = function (peripheral) {
return (peripheral.advertisement.localName === 'EvalDemo' || peripheral.uuid === BMDEVAL_UUID_SERVICE);
var result = false
if( peripheral
&& peripheral.advertisement
&& (peripheral.advertisement.localName == 'EvalDemo'
|| peripheral.advertisement.serviceUuids.includes(BMDEVAL_UUID_SERVICE))) {
result = true
}
return result
};
NobleDevice.Util.inherits(rigadoSensorBeacon, NobleDevice);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment