-
Notifications
You must be signed in to change notification settings - Fork 125
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
Fix enumeration of USB devices without a short serial on Raspberry Pi 4 #160
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your PR @andber1! It looks like the right thing to do here. We should not have detecting USB devices depending on optional properties.
I finally managed to set up a Raspberry Pi 4 to give this PR a check. I have no Prolific device at hand but a FTDI R2232 (without an external EEPROM and thereor) without a serial number. This device gets enumerated by the
I checked this with 18f5c2a. What do |
@sirhcel Unfortunately I do not have a Raspberry 4 to hand now. I put the Prolific controller in a Raspberry 3 and it got listed, because it is a USB device and not a PCI device as on the Raspberry 4. Here are the requested outputs. Perhaps it will still help.
|
Thank you very much for for looking up the device information @andber1! The device descriptor does not look special, udev reports in as a USB device and therefor I finally got a Prolific PL2303 device into my hands today and - well - it enumerate just fine in my setup:
Now I see what I missed in #160 (comment) and what happens here as well: The device is actually reported as an USB device. 🤦 I also found device information seen on a Raspberry Pi 4 back in 2023 in #110 (comment). Looks like libudev changed how these devices are reported in my setup. Nevertheless, your proposed changes are the right thing to do for older/different setups with a Raspberry Pi 4. |
This will fix the issue with USB devices that do not have a short serial and are not listed when using
serialport::available_ports()
.serial_number
is an optional field in theUsbPortInfo
struct and is not required to be available.In my specifc case I have the USB device "USB-Serial_Controller" from "Prolific_Technology_Inc." (vid: 0x067b, pid: 0x2303). When connected to a Raspberry 4 it is not shown. This pull request fixes this.
Related to #113