serial icon indicating copy to clipboard operation
serial copied to clipboard

Add more verbose port information

Open lachlanm-git opened this issue 2 years ago • 3 comments

Proposal: Add the ability to retrieve information such as VID, PID, serial number.

It is possible to retrieve more information without additional dependencies such as libusb and there seems there is interest in this? Example use-case: filter a comport based on the VID:PID and serial number.

Multi-OS example implementations: (linking to Windows below)...

  • qtserialport: https://github.com/qt/qtserialport/blob/dev/src/serialport/qserialportinfo_win.cpp
  • pyserial: https://github.com/pyserial/pyserial/blob/master/serial/tools/list_ports_windows.py

lachlanm-git avatar Oct 09 '23 07:10 lachlanm-git

I've taken a pass at something for Windows: https://github.com/lachlanm-git/zig-serial-poc.

Would be happy to try and put together a PR if this is desired. Would the idea be to just add to the existing serial.zig or break this out?

lachlanm-git avatar Oct 09 '23 07:10 lachlanm-git

Imho we can add it to this library for sure, it's definitly a useful thing to have. Feel free to create a PR, i'll take a closer look then and try it out!

ikskuh avatar Oct 13 '23 11:10 ikskuh