USB iSerialNumber is used to uniquely identify a device within a VID/PID combination. It's an optional field, that should be left unset if not available. https://lnkd.in/eF8SGuV7 This is one of the reasons USB is complicated in an OS. One of the "unique" serial numbers of a device I have on hand? 0x03 iSerialNumber "no serial number" Instead of leaving that iSerialNumber index set to 0 (not set), they put in a placeholder string. :/ Yes. It makes an OS think it has a unique serial number, but it doesn't, because every device with that VID/PID also has that hard-coded "no serial number" iSerialNumber. If you have more than one of those devices, it has to get a special case, that defeats the purpose. And, just as if it had no serial number, If you have more than one of them but only ever plug in one at a time, the system will think it's just one device, not two, and any metadata will be shared between them. :/ If you are creating a MIDI device, please add a unique iSerialNumber. It doesn't need to match what's on the box, it can even be a denuded GUID or random number generated on first power-up and then stored in NVM.
> if it had no serial number, If you have more than one of them but only ever plug in one at a time, the system will think it's just one device, not two, and any metadata will be shared between them. I actually like this behavior. Means a broken device can be easily replaced and retain its configuration. The operating system can just identify the devices without or with non-unique serial numbers by the controller and port they are plugged into. USB devices should not have unique serial numbers. That allows device fingerprinting.
Is this available to associate with MIDI devices for the older MIDI API stack as well as for audio devices? One of my gripes with Windows is that there are no unique device ID’s which makes it hard to persist device settings for MIDI and audio.