Hey i'm trying to to do different things depending on what reason the ble disconnect says. Hard to view this live and debug.
Got a MDBT42Q module hooked up the bangle. I wish to differentiate the gatt.device.disconnect() (user terminated disconnection) event and the event when range is reason to disconnect. Is this possible ? and what events might those be ? and how do i check them.
Currently i do this with no luck, it seems that the same event is fired for both types of disconnection.
NRF.on('disconnect', function (reason) {
if (reason !== BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION) {
standardBuzz();
}
connected = false;
});
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.
Hey i'm trying to to do different things depending on what reason the ble disconnect says. Hard to view this live and debug.
Got a MDBT42Q module hooked up the bangle. I wish to differentiate the gatt.device.disconnect() (user terminated disconnection) event and the event when range is reason to disconnect. Is this possible ? and what events might those be ? and how do i check them.
Currently i do this with no luck, it seems that the same event is fired for both types of disconnection.
Standard buzz never happends.