tools/mpremote: Add support for rfc2217, serial over TCP.

Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
This commit is contained in:
Jos Verlinde
2023-08-11 13:26:17 +02:00
committed by Damien George
parent 88ecc78eb3
commit 58c2c503a9
2 changed files with 6 additions and 2 deletions

View File

@@ -76,7 +76,9 @@ class SerialTransport(Transport):
delayed = False
for attempt in range(wait + 1):
try:
if os.name == "nt":
if device.startswith("rfc2217://"):
self.serial = serial.serial_for_url(device, **serial_kwargs)
elif os.name == "nt":
self.serial = serial.Serial(**serial_kwargs)
self.serial.port = device
portinfo = list(serial.tools.list_ports.grep(device)) # type: ignore