def discover(cls): """Return tuple with discovered serial connection.""" for port in serialenum.enumerate(): ser = _SerialCommand(port, 19200) if ser.exec_cmd(_commands.test) is not None: return cls((port, 19200)) return None
def available_ports(): return serialenum.enumerate()