(self)
Disconnects any connected device, stops the background receiving thread
        and closes the spawned gatttool process.
        disconnect.
Disconnects any connected device, stops the background receiving thread
        and closes the spawned gatttool process.
        disconnect.
Disconnects any connected device stops the background receiving thread and closes the spawned gatttool process . disconnect .
def stop(self):
        """
        Disconnects any connected device, stops the background receiving thread
        and closes the spawned gatttool process.
        disconnect.
        """
        self.disconnect(self._connected_device)
        if self._running.is_set():
            log.info('Stopping')
        self._running.clear()

        if self._con and self._con.isalive():
            while True:
                if not self._con.isalive():
                    break
                self.sendline('exit')
                time.sleep(0.1)
            self._con.close()
            self._con = None
def stop ( self ) : self . disconnect ( self . _connected_device ) if self . _running . is_set ( ) : log . info ( 'Stopping' ) self . _running . clear ( ) if self . _con and self . _con . isalive ( ) : while True : if not self . _con . isalive ( ) : break self . sendline ( 'exit' ) time . sleep ( 0.1 ) self . _con . close ( ) self . _con = None