You are reading a single comment by @DanDyse and its replies. Click here to read the full conversation.
  • Hi again,

    I want my puck to wait a little longer before going into code that changes its name and advertising behaviour. But want it to wait only if a certain device is around (e.g. my iPhone).
    So I tried to do a scan or a request ... but this never returns ANY names of the devices, even with higher timeouts and "active" being true?!
    "namePrefix" does not make a difference when using findDevices – it just lists all, regardless of what I set. "namePrefix" does the opposite when using requestDevice – it never finds any, even if I just set one letter. Yes, I can see plenty of devices around using nRF-Connect including the ones I want the Puck to find.
    This is what I have tried:

    NRF.findDevices(function(devices) { console.log(devices);}, {timeout : 5000, active : true, filters : [{ manufacturerData:{0x004c:{}} }] });
    

    --> puts out a rather large list, but without names

    NRF.findDevices(function(devices) { console.log(devices);}, {timeout : 5000, active : true, filter : [{ namePrefix: 'S' }] });
    

    --> shows the same full list without names, although only two devices would fit.

    NRF.requestDevice({timeout : 5000, active : true, filters : [{ namePrefix: 'S' }] });
    

    --> times out without any result

    I have tried setting timeout to 10 or even 30 seconds – no difference. I must be doing something fundamentally wrong. Please advise.

About

Avatar for DanDyse @DanDyse started