Theo <
theom...@chiark.greenend.org.uk> wrote:
> VanguardLH <V...@nguard.lh> wrote:
>
>> Okay, my supposition got shot down. The VID can be looked up without
>> even having the product. The PID is part of the presentation data
>> the client gives the host which get saved as that device's
>> enumeration data in the registry (HKLM\SYSTEM\CurrentControlSet\Enum,
>> 3 USB subkeys). VID you can get without having the product. PID
>> requires the USB handshaking, so you must have the product and
>> connect it. Have you seen online lists of VIDs that also catalog
>> the PIDs?
>
> Yes:
>
https://the-sz.com/products/usbid/
If I enter a VID, I get several products listed by the vendor. How can
searching on, say, "USB hub" give me the vendor, or even a specific
product?
VIDs are registered. PIDs are not, and can be whatever the mfr want to
code into the [EEP]ROM for their product. The onus on keeping PIDs
unique under a VID is an onus upon the mfr, not the USB IF.
>
http://www.linux-usb.org/usb-ids.html
I went instead to
http://www.linux-usb.org/usb.ids to see the list.
Those product descriptors are not registered with the VID. Those are
comments added by the author of the list.
https://www.usb.org/sites/default/files/vid_only_form_070119.pdf
No entry to specify the product descriptor, just a request for VID only.
The VID is assigned to the mfr. The mfr makes up their own PID. For
example, from the list, the 0810 PID is reused by 9 *different* vendors.
Within a VID, a PID assigned by the mfr often does identify a product,
or it might identify a family of products. Some VIDs don't even have a
PID listed.
It's nice there are online lists of VID+PID, but only the VID is
registered. The PID, if any, is assigned by the mfr, and the mfr
decides how to assign PIDs. Comments added to a VID list to note PIDs
are by observation, not by official registration for lookup. The
comments on PIDs are to provide human readable description instead of
just seeing cryptic digits.
The PID, like the VID, is a just a 16-bit number, not a string. The mfr
decided on the PID value. Users added comments on what a PID might mean
by observation, and reported their discovery to the list makers.
Go to
https://usb-ids.gowdy.us/read/UD/. Select a VID, like 0810. That
list says the VID belongs to Personal Communication Systems. Click on
that entry. The next page shows PIDs reported by users: both PID value,
and what the user described. Notice the "Add item" link where users can
report a new PID and add some notes to it. If you then click on a PID
entry, you'll see even more user notes. There you'll even see a Discuss
link (but I don't have an account to see if you're directed to web-based
forums, a mailing list, or what).
VIDs are registered with USB IF. The PIDs are crowdsourced data. The
PID info could be handy, but it's not part of the VID registration.
VID: registered.
PID: Mfr assigned.
VID+PID: Product numbers created by mfr to identify their products. No
descriptive strings.
> However, in practice you can't know the VID of a device in advance,
> because there isn't a strong mapping from manufacturer's corporate
> identity to the device hardware. For many devices the brand on the
> outside does not match the chip that's inside, and it's the chip that
> provides the VID:PID. Sometimes there's a flash memory which can be
> reprogrammed to present as the vendor, but sometimes it just appears
> with the chip manufacturer's ID.
About the only time I've dealt with the VID (other than my own
troubleshooting) is when someone asks for help on figuring out just what
is a device enumerated in the registry by VID+PID. So lists, like
above, can be helpful in determing whose and which product (or product
family) might be the device. While the chip reports the VID (assigned
to the vendor) and PID (assigned by the vendor), there are strings along
with the enumerated registry data. For example, in the registry, I go
to HKLM\SYSTEM\CurrentControlSet\Enum\USB, pick a VID&PID entry.
Subentries show strings that seem to have come from the device probably
as presentation data during USB handshaking. While the chip doles out
the VID&PID identifier, seems it also doles out description info, too.
That's probably where the crowdsourced PID descriptors come from.
>> PIDs are not registered, a 16-bit descriptor (product number) of
>> whatever the mfr chooses to burn for the enumeration data in the
>> [EEP]ROM. Mfrs don't have to (and cannot) register the PID descriptors.
>> What I've seen in the VID lists for major mfs, like Samsung, HP, NEC,
>> Kodak, Logitech, and so on is they have several VIDs.
>
> There's no 'registration' beyond paying for the VID. The lists above
> are just users collecting data from devices they have.
Ah, thanks for verifying my interpretation of those VID lists. The PIDs
looked to be from users reporting what they discovered.
>> Once a mfr purchases a VID registration, they could use it with physical
>> PIDs (burned into the device, not registered) for all their products (up
>> to 65536 products). Some might do it that way: 1 VID + many PIDs.
>> Others don't, and register multiple VIDs. I'm not a USB product maker,
>> so I don't know why a mfr would register multiple VIDs with each
>> incurring the registration process and cost money. I could guess they
>> want to differentiate between different types of product (say, printer
>> versus camera), or between product family lines, but that's just a guess
>> from cursory observation of VID definitions.
>
> Last time I checked (a while back) the fee was $1500.
Hmm, I thought it was $6000 USD.
> It is quite likely that big vendors like Samsung may exhaust the PID
> space of a single VID (think about all the variations of products
> there are).
VID: 16-digit number (2^16 = 65536)
PID: 16-digit number (2^16 = 65536)
What happens when there are more folks trying to register VIDs than the
64K range available? Reminds me how IPv4 (32-bit) ran out of addresses,
so we had to migrate to IPv6 (128-bit).
For each VID, there could be 65K product numbers (PIDs). I suppose,
especially over decades, that a mfr would run out of PIDs under a
particular VID, so they'd have to get another VID to give them another
65K count in product numbers.
Something I hadn't considered in this discussion is when a PID is
needed. VIN+PID is needed to specify a driver for the device. However,
if the device is generic (keyboard, mouse, other HID device, camera,
speaker, mass storage), a PID isn't needed. During USB handshaking, the
presentation data specifies the type of device, so it could specify a
generic one if a device-specific driver is not needed. A generic driver
gets used with a generic device, but I think the device type must be
identified by the device to the host.
The problem with the expense of needing a VID is its price. For big
companies, no problem. Just part of the expense of doing business.
However, open source projects might need a VID, too, and free stuff
generates no revenue to offset the cost of getting a VID. There are VID
owners that will share their VID(s), and dole out PIDs for free to
open-source authors, like:
http://wiki.openmoko.org/wiki/USB_Product_IDs
https://pid.codes/howto/
(a search shows several more)