You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • call this .... manually every 5 seconds or so, is that ok?

    Yes, that should be totally fine.

    The problem is that it can takes a long time (like 3-5 seconds) for scan to pick up the changes

    Do you know roughly how often you're getting BLE advertisements from setScan? I think it's quite likely you're in a reasonably congested area and there are so many devices it's having trouble processing fast enough

    Can NRF.requestDevice read advertising data (the state) from the other Puck?

    Yes - you'll get the exact same response you would from setScan.

    For instance if you do this it should be really nice and easy:

    NRF.requestDevice({filters:[{name:"Pixl.­js 8999"}]}).then(function(dev) {
      if (dev.manufacturerData)
        print("State is "+dev.manufacturerData[0]);
    })
    

    It's a shame you can't filter by id at the moment though - only name/services

About

Avatar for Gordon @Gordon started