You are reading a single comment by @Joost and its replies. Click here to read the full conversation.
  • Thank you both,

    this works great it seems:

    gatt.device.on('gattserverdisconnected',­ function(reason) {console.log("gattserverdisconnected, Grund: "+ reason+" Zeit: " + (getTime() -t) + " sec"); disconnect(reason);} ); 
    

    with variable t being set earlier upon successful connect.

    with reason 8 triggered when the BLE server (my sensor) goes out of reach (loss of reception) and reason (int) 19 gets triggered when the sensor shuts down due to inactivity.

    Thanks again,

    Joost

About

Avatar for Joost @Joost started