Ok, if you put a cutting edge firmware on there, you can now do:
NRF.requestDevice({filters:[{id:"xx:xx:xx:xx:xx:xx random"}]}).then(function(dev) {
if (dev.manufacturerData)
print("State is "+dev.manufacturerData[0]);
})
or:
NRF.requestDevice({filters:[{manufacturerData:{0x0590:{}}}]}).then(function(dev) {
print("State is "+dev.manufacturerData[0]);
})
or even the following, which will use setScan, but with filters to quickly filter out anything you're not interested in:
NRF.setScan(function(dev) {
print("State is "+dev.manufacturerData[0]);
}, {filters:[{manufacturerData:{0x0590:{}}}]});
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Ok, if you put a cutting edge firmware on there, you can now do:
or:
or even the following, which will use
setScan
, but with filters to quickly filter out anything you're not interested in: