Literally all you need is:
// change advertising var data = {a:1,b:2}; NRF.setAdvertising({},{ showName:false, manufacturer:0x0590, manufacturerData:JSON.stringify(data) }); // start scanning NRF.setScan(function(d) { console.log(d.manufacturerData); }, { filters: [{ manufacturerData:{0x0590:{}} }] });
Now it'll automatically pick up only other devices advertising with that manufacturer data
@Gordon started
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.
Literally all you need is:
Now it'll automatically pick up only other devices advertising with that manufacturer data