5 ms·
USB IDs are idiotic and should 100% be just squatted on. There is no reason such a stupid design should be enforced by any open source organisation. If you wan
by emilfihlman 8y ago
USB IDs are idiotic and should 100% be just squatted on.
There is no reason such a stupid design should be enforced by any open source organisation.
If you want to have an identification for a device, standardise capabilities tags and provide some free form fields for perhaps at least manufacturer and description.
- Faaak 8y agoDo you even know what USB IDs are ? You can not identify an USB device without them.
- IshKebab 8y agoYes you can. On Mac you can use userspace USB drivers by default so you can use any other method to identify your device. On Windows you can use WCID to get it to automatically install WinUSB (Windows' userspace USB driver) irrespective of the product / vendor ID. On Linux I believe you just have to set up some udev rule and then you can use libusb. Once you have userspace access there's basically no downside to squatting. The only minor one is if you happen to squat on an ID that also happens to have a kernel driver. But just pick a long defunct vendor and that's pretty damn unlikely.
- cesarb 8y agoAs Raymond Chen would say, what if two devices did this? Suppose you have Widget A, which is squatting on ID 1234:5678, and Widget B, which is also squatting on ID 1234:5678. You plug both on the same computer. How would the driver, no matter whether kernel or userspace, know a newly plugged device with that ID is Widget A and not Widget B?
- Kliment 8y agoThat's an argument for coordination between squatters, not against squatting.
- otterlicious 8y agoMaybe they should start some sort of USB Implementers Forum to coordinate or something...
- simias 8y agoWhat's stupid is that USB IDs should have a large enough range that allocation wouldn't have to be centralized and monetized. Something like a UUID. I doubt the overhead would be significant enough to justify saving a few bytes. This is artificial scarcity.
- trasz 8y agoSure you can - you can look at the manufacturer / product strings. And for standard device classes (eg mass storage or CDC ACM, aka USB serial) you can just use interface descriptors to identify them. Would be nice if more systems used the strings embedded in the device, like eg FreeBSD does, instead of looking up PID/VID in a static table.
- vetinari 8y ago> Sure you can - you can look at the manufacturer / product strings. Sure, you can. Does not mean that the vendors will. If I had a dollar for each board identifying itself as "To be filled by O.E.M."...
- opk 8y agoThe trouble with free-form text fields is that they end up getting filled with lies for compatibility reasons like web browser User-Agents.
- progval 8y agoWho doesn't want "IBM/5.0 (Windows; U; en-US) GoogleUsbKit/42 (KUSB, like Geeko)" ?
- ksk 8y agoWhy should they just be squatted on? How does squatting fix the problem?