-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Pyserial doesn't show the correct manufacturer and description string on Mac OSX and Linux, but show wrong string on Windows.
In the example below, a FT232R chip is programmed with the strings manufacturer=Acme and description=Pro 2000 but on windows they are shown as FTDI and USB Serial Port (COM8) respectively, making it difficult to identify the device.
Test script
# Usage:
# pip install pyserial
# python comports-test.py
from serial.tools.list_ports import comports
ports = comports()
for port in ports:
if port.device and port.vid and port.pid:
print(
f"ID=[{port.vid:04X}:{port.pid:04X}] " +
f"Port=[{port.device}] " +
f"Manuf=[{port.manufacturer}] " +
f"Desc=[{port.description}] " +
f"S/N=[{port.serial_number}]")Result
Mac OSX
ID=[0403:6001] Port=[/dev/cu.usbserial-A600dOYP] Manuf=[Acme] Desc=[Pro 2000] S/N=[A600dOYP]
Linux
ID=[0403:6001] Port=[/dev/ttyUSB0] Manuf=[Acme] Desc=[Pro 2000 - Pro 2000] S/N=[A600dOYP]
Windows
ID=[0403:6001] Port=[COM8] Manuf=[FTDI] Desc=[USB Serial Port (COM8)] S/N=[A600DOYPA]
Metadata
Metadata
Assignees
Labels
No labels