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:
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.
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:
--> puts out a rather large list, but without names
--> shows the same full list without names, although only two devices would fit.
--> 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.