So the question is how to revert the NRF.on('connect') behavior back to how it was before, where the addr argument resolves to the real fixed address instead of the advertised random one.
Honestly, I'd have thought that it was something the phone started doing. I don't know of any setting on the Puck that would be responsible for the phone reporting a random MAC address.
I'd just started looking at bonding with a pin code for this thread, so I just had a bit of a fiddle with what I'd done and realised I could add passkey pairing really easily.
Add the line NRF.setSecurity({passkey:"123456", mitm:1, display:1});
Now, when you pair you'll have to type 123456 into your phone. Since nobody else would be able to guess it, nobody else can connect - problem solved? :)
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.
Honestly, I'd have thought that it was something the phone started doing. I don't know of any setting on the Puck that would be responsible for the phone reporting a random MAC address.
I'd just started looking at bonding with a pin code for this thread, so I just had a bit of a fiddle with what I'd done and realised I could add passkey pairing really easily.
So...
NRF.setSecurity({passkey:"123456", mitm:1, display:1});
Now, when you pair you'll have to type
123456
into your phone. Since nobody else would be able to guess it, nobody else can connect - problem solved? :)