I'm trying to prevent the puck from automatically reconnecting to a device that it has previously been connected to and paired with. So after the puck has been connected and paired with a device, I want to action a reset/power cycle of the puck and for it to not connect to the device again unless I go through the connection process again on the device.
I know that I can just select "forget this device" from bluetooth settings on the device, but I want a way of implementing this from the puck itself (ie via a button press).
My initial plan was to set it to create a device name containing a random string on init, and then calling a reset() on the button press. This plan failed as the phone/laptop device that the puck has been paired with ignores the fact that the bluetooth device name has changed and still reconnects. I assume it looks at the underlying MAC address instead.
Does anybody know a way of implementing this?
Perhaps there is a mode I can set which enables connection without pairing?
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.
I'm trying to prevent the puck from automatically reconnecting to a device that it has previously been connected to and paired with. So after the puck has been connected and paired with a device, I want to action a reset/power cycle of the puck and for it to not connect to the device again unless I go through the connection process again on the device.
I know that I can just select "forget this device" from bluetooth settings on the device, but I want a way of implementing this from the puck itself (ie via a button press).
My initial plan was to set it to create a device name containing a random string on init, and then calling a reset() on the button press. This plan failed as the phone/laptop device that the puck has been paired with ignores the fact that the bluetooth device name has changed and still reconnects. I assume it looks at the underlying MAC address instead.
Does anybody know a way of implementing this?
Perhaps there is a mode I can set which enables connection without pairing?
Many thanks.