public void stop() throws BITalinoException {
        try {
            socket.write(0);
            Thread.sleep(SLEEP);
            close();
        } catch (Exception e) {
            throw new BITalinoException(BITalinoErrorTypes.BT_DEVICE_NOT_CONNECTED);
        }
    }