public void disconnect() {
		if (isConnected()) {
			cons.appendText("Closing connection !");
			if (state.printing) {
				//state.printing = false;
				setPrintMode(false,true);
			}
			try {
				state.connected = false;
				state.connecting = false;
				state.reset = false;
				mConn.closeDevice();
				if (runner != null && runner != Thread.currentThread())
					runner.interrupt();
			} catch (Exception e) {
				e.printStackTrace();
				if (runner != null && runner != Thread.currentThread())
					runner.interrupt();
			}
			runner = null;
		}
		cons.updateState(States.DISCONNECTED,States.CONNECTMSG,0);
	}