Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manufacturer/product strings from device VS from operating system during enumeration #17

Open
jessebraham opened this issue Feb 7, 2022 · 3 comments
Labels
migrated This issue was migrated from GitLab

Comments

@jessebraham
Copy link
Member

This issue was migrated from GitLab. The original issue can be found here:
https://gitlab.com/susurrus/serialport-rs/-/issues/98

This is a follow-up to #97, which turned out to involve an operating system -level regression.

When enumerating serial ports on Linux and libudev, serialport 3.0 used to return manufacturer/product strings from the device, but serialport 4.0 returns strings originating from a local operating system hardware database (udev/systemd hwdb). This is usually fine, but can be problematic when you absolutely need the information from the device to distinguish/filter devices. One example is if the device in question uses Objective Development free USB IDs, where different devices can share VID/PID and must be distinguished based on the string descriptors on the device.

I propose that either a) the UsbPortInfo struct is extended to include strings from both the device and the operating system, or b) the enumeration function could be configured whether it should fetch the device strings or OS strings. Or maybe there's more options to solve this...?

@762SPR
Copy link

762SPR commented Sep 12, 2023

Hello,

I'd just like to bump this issue because I am having the same problem. I am using a STM32 with USB OTG and only the serial number is correct. VID, PID, Manufacturer, and Product are all wrong. For now I can match off of the serial number, but that seems like a hacky way to do it and would rather use the manufacturer and product info.

lsusb shows the correct info.

My development computer is PopOS, I haven't tested it on a windows machine.

@sirhcel
Copy link
Contributor

sirhcel commented Jan 12, 2024

My development computer is PopOS, I haven't tested it on a windows machine.

Hello @762SPR, we've merged #137 and released it with 4.3.0 right before Christmas. This does not fix the behavior for Windows but for Linux. Could you please update and give 4.3.0 a spin?

VID, PID, Manufacturer, and Product are all wrong.

I caught this after my initial comment. Are you sure VID and PID are actually affected? Previously manufacturer and product info got looked up from a database. But I would have expected the IDs to just get passed along. Could you give an example of what lsusb and serialport-rs give you?

@sirhcel
Copy link
Contributor

sirhcel commented Jan 12, 2024

On which other supported platforms are we returning manufacturer and product information? I would expect them to be on par with Linux. At least Windows is currently behind (#146).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migrated This issue was migrated from GitLab
Projects
None yet
Development

No branches or pull requests

3 participants