pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: comms/py-serial in NetBSD vs Linux differences





El 12/1/25 a las 1:01, snow flurry escribió:
On Saturday, 11 January 2025 08:51:06 PST Ramiro Aceves wrote:
LINUX:

device /dev/ttyACM0
name ttyACM0
description ChibiOS/RT Virtual COM Port
hwid USB VID:PID=0483:5740 SER=400 LOCATION=1-1.2:1.0
vid 1155
pid 22336
serial_number 400
location 1-1.2:1.0
manufacturer STMicroelectronics
product ChibiOS/RT Virtual COM Port
interface None


NETBSD outputs 121 devices but I print below the device of interest
There is no information about the description, hwid, vendor, product and
serial number:

device /dev/dtyU0
name dtyU0
description n/a
hwid n/a
vid None
pid None
serial_number None
location None
manufacturer None
prpy313-libusb1oduct None
interface None

Have you noticed this behaviour in py-serial under NetBSD or am I
missing something?

py-serial looks through /sys/class/tty/* on Linux, which provides the HW IDs,
serial number, etc for USB serial devices. Since other Unix-like systems don't
have sysfs, py-serial falls back to looking at /dev for files fitting a
certain pattern (in NetBSD's case, /dev/dty*). This isn't a particularly
useful way of finding a device, as you've found.

Oh thanks Snow, I understand now. I have filled a suggestion at the github nanovnasaver page to ask for adding manual serial port configuration settings for the BSDs besides the automagical port selection.

https://github.com/NanoVNA-Saver/nanovna-saver/issues/753


A possible patch to py-serial might involve using something like drvctl(4) to
get information on a given console device, although I'm unsure if that'd give
equivalent information on the device. Though, an easier route would be to get
NanoVNA-Saver to let you choose a serial device without detecting it through
list_ports.

Yes, of course, it is easier a manual serial port data entry.
Many thanks for your help.

Regards.
Ramiro.



Thanks.

Ramiro.





Home | Main Index | Thread Index | Old Index