You are reading a single comment by @Gustav and its replies. Click here to read the full conversation.
  • 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_CONNECTIO­N) {
          standardBuzz();
        }
        connected = false;
      });
    

    Standard buzz never happends.

About

Avatar for Gustav @Gustav started