-
Notifications
You must be signed in to change notification settings - Fork 112
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
Identify USB Devices Beyond Vendor/Product IDs #73
Comments
@sl33nyc I think this should be possible, at least in the realm of I wonder if it's possible to match on something more descriptive, other than bus/address/port. I always wanted to just allow saying |
I generally agree that overloading the field's value isn't great but I don't think that it'd be too terrible if the value of I also agree that it'd be cool if the device matching was abstracted away into something that ultimately could be represented by a |
I did a bit of experimentation with this, and unfortunately, even during connect time, the descriptive strings are not available (through |
Before I endeavor on potentially coding this myself (because I kind of want an excuse to learn Rust), I want to sanity check the following enhancement request.
In the non-Windows source, I noticed that the USB device matching ultimately uses
rusb::DeviceDescriptor
insteadof
rusb::Device. Thus, fields like
Device.bus_numberand
Device.addresscannot be matched upon. The callback receives
rusb::Device, so I wonder if
display_switchmatching criteria could be expanded to also match upon
rusb::Devicelike bus/address/port. This would enable the
display_switch` instance on my Ubuntu host to detect a constant set of USB peripherals hooked into a single USB switch relocating from the "Ubuntu host" USB port to another, the "Windows 10 VM host" port.I haven't deeply checked whether or not the Windows-specific
display_switch
implementation can support additional matching criteria. (A quick read of the Windows code tells me that the code compares a set of vendor/product strings before and after aWM_DEVICECHANGE
event, so I'm guessing my enhancement might have to belibusb
specific.) Such functionality would still be awesome forlibusb
-supported hosts.The text was updated successfully, but these errors were encountered: