micropython/tools
Michael Mogenson 921f397acb tools/mpremote: Only auto connect to serial device with USB VID/PID.
On MacOS and Windows there are a few default serial devices that are
returned by `serial.tools.list_ports.comports()`. For example on MacOS:

```
{'description': 'n/a',
 'device': '/dev/cu.Bluetooth-Incoming-Port',
 'hwid': 'n/a',
 'interface': None,
 'location': None,
 'manufacturer': None,
 'name': 'cu.Bluetooth-Incoming-Port',
 'pid': None,
 'product': None,
 'serial_number': None,
 'vid': None}

{'description': 'n/a',
 'device': '/dev/cu.wlan-debug',
 'hwid': 'n/a',
 'interface': None,
 'location': None,
 'manufacturer': None,
 'name': 'cu.wlan-debug',
 'pid': None,
 'product': None,
 'serial_number': None,
 'vid': None}
```

Users of mpremote most likely do not want to connect to these ports. It
would be desirable if mpremote did not select this ports when using the
auto connect behavior. These serial ports do not have USB VID or PID
values and serial ports for Micropython boards with FTDI/serial-to-USB
adapter or native USB CDC/ACM support do.

Check for the presence of a USB VID / PID int value when selecting a
serial port to auto connect to. All serial ports will still be listed by
the `list` command and can still be selected by name when connecting.

Signed-off-by: Michael Mogenson <michael.mogenson@gmail.com>
2022-11-25 17:20:14 -05:00
..
autobuild
mpremote tools/mpremote: Only auto connect to serial device with USB VID/PID. 2022-11-25 17:20:14 -05:00
.gitattributes
.gitignore
cc1
ci.sh tools/ci.sh: Don't print python2 version. 2022-11-23 10:32:55 +11:00
codeformat.py shared/tinyusb: Further refactor static USB device implementation. 2022-11-11 16:47:36 +11:00
codestats.sh
dfu.py
file2h.py
gen-changelog.sh
gen-cpydiff.py tools/gen-cpydiff.py: Use os.path.join and os.path.isdir. 2022-11-15 23:17:26 +11:00
insert-usb-ids.py
makemanifest.py tools/makemanifest.py: Fix printing of mpy_cross.CrossCompileError. 2022-11-02 14:06:18 +11:00
manifestfile.py
metrics.py
mpy-tool.py py/persistentcode: Only emit sub-version if generated code has native. 2022-10-25 14:57:04 +11:00
mpy_bin2res.py
mpy_cross_all.py
mpy_ld.py
pyboard.py
pydfu.py
tinytest-codegen.py
uf2conv.py
uf2families.json
uncrustify.cfg
verifygitlog.py