However, it seems newer Android phones use a random MAC address for each connection so that may not work, and it's also possible they they will just repeatedly try to connect to the device.
I don't know if this works for you, but you could actually change the MAC address of the Puck itself each time? That should stop the auto-reconnects: http://www.espruino.com/Reference#l_NRF_setAddress
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.
Just to make sure I understand - you're connecting to the Puck from a device like a PC or phone?
You can write some code that runs on the
connect
event, looks at the address, and then callsNRF.disconnect()
? http://www.espruino.com/BLE+Security#disconnect-when-an-unknown-address-is-found-whitelisting-However, it seems newer Android phones use a random MAC address for each connection so that may not work, and it's also possible they they will just repeatedly try to connect to the device.
I don't know if this works for you, but you could actually change the MAC address of the Puck itself each time? That should stop the auto-reconnects: http://www.espruino.com/Reference#l_NRF_setAddress