@jeremy-herbert
I see what you mean.
First of all, we are not going to completely match the output of what pyserial
gives you. They enumerate and extract all the information by traversing the Linux filesystem and parsing file names and file contents; in IO Ninja we talk to systemd
directly via libudev
which is more efficient and IMHO a better approach overall.
But we can definitely add extra pieces of information to the description. Here's what we get for free from libudev
:
getSysPath: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/ttyUSB0/tty/ttyUSB0
getSysName: ttyUSB0
getSysNum: 0
getDevPath: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/ttyUSB0/tty/ttyUSB0
getDevNode: /dev/ttyUSB0
getDevType:
getSubsystem: tty
getDriver: ch341-uart
getAction:
property[CURRENT_TAGS] = ':systemd:'
property[DEVLINKS] = '/dev/serial/by-id/usb-1a86_USB2.0-Ser_-if00-port0 /dev/serial/by-path/pci-0000:00:14.0-usb-0:3.1:1.0-port0'
property[DEVNAME] = '/dev/ttyUSB0'
property[DEVPATH] = '/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/ttyUSB0/tty/ttyUSB0'
property[ID_AUTOSUSPEND] = '1'
property[ID_BUS] = 'usb'
property[ID_MODEL] = 'USB2.0-Ser_'
property[ID_MODEL_ENC] = 'USB2.0-Ser\x21'
property[ID_MODEL_FROM_DATABASE] = 'CH340 serial converter'
property[ID_MODEL_ID] = '7523'
property[ID_PATH] = 'pci-0000:00:14.0-usb-0:3.1:1.0'
property[ID_PATH_TAG] = 'pci-0000_00_14_0-usb-0_3_1_1_0'
property[ID_PCI_CLASS_FROM_DATABASE] = 'Serial bus controller'
property[ID_PCI_INTERFACE_FROM_DATABASE] = 'XHCI'
property[ID_PCI_SUBCLASS_FROM_DATABASE] = 'USB controller'
property[ID_REVISION] = '0254'
property[ID_SERIAL] = '1a86_USB2.0-Ser_'
property[ID_TYPE] = 'generic'
property[ID_USB_CLASS_FROM_DATABASE] = 'Vendor Specific Class'
property[ID_USB_DRIVER] = 'ch341'
property[ID_USB_INTERFACES] = ':ff0102:'
property[ID_USB_INTERFACE_NUM] = '00'
property[ID_VENDOR] = '1a86'
property[ID_VENDOR_ENC] = '1a86'
property[ID_VENDOR_FROM_DATABASE] = 'QinHeng Electronics'
property[ID_VENDOR_ID] = '1a86'
property[MAJOR] = '188'
property[MINOR] = '0'
property[SUBSYSTEM] = 'tty'
property[TAGS] = ':systemd:'
property[USEC_INITIALIZED] = '10677556659'
tag: systemd
sysattr[dev] = '188:0'
sysattr[device] = '(null)'
sysattr[power/autosuspend_delay_ms] = '(null)'
sysattr[power/control] = 'auto'
sysattr[power/runtime_active_time] = '0'
sysattr[power/runtime_status] = 'unsupported'
sysattr[power/runtime_suspended_time] = '0'
sysattr[subsystem] = 'tty'
sysattr[uevent] = 'MAJOR=188
MINOR=0
DEVNAME=ttyUSB0'
We can start by adding ID_VENDOR_FROM_DATABASE
and ID_PATH
; we can also additionally show ID_VENDOR
and ID_MODEL
if they are different from database ones (I think those are fetched by querying USB descriptors).
However, this (already) results in a quite long description string. We will experiment and see how to represent it better -- maybe, via a tooltip, or a multiline combobox item, or some other way.
Bottom line: I heard you; we will add extra information about serial devices on Linux in future IO Ninja releases.