There has been recent coverage of the difficulty small projects have in getting a PID/VID for their USB devices. Even if they are implementing devices that only use class interfaces (and don't need a driver), the device still needs a VID/PID to enumerate with. One solution is to try and get USB-IF to sell smaller blocks of numbers, but they are hesitant to do that because the VID/PID isn't a 32-bit address space they can apportion how they want (this is a political, not technical distinction).
Another solution is to get one VID/PID that all these simple projects can use, and specify a minimal protocol that they need to implement to be compatible with a generic driver. I'll take the first stab at this, hopefully it gets some traction.
I previously had some stuff written up here, but it was brought to my attention that DFU and CDC-ACM are sufficiently lightweight and tools already exist for them. So here is the drastically simplified proposal. Two VID/PID pairs are used to cover both a communication class device with a serial port, and a device in firmware update mode. I've picked generic names for these devices, 'OSHW serial device' and 'OSHW firmware mode', respectively. There is also information for devices that want to provide a firmware update method, but do not need a serial port.
OSHW serial device
The VID/PID pair of 0x????/0x???? is available to support these devices. The device is expected to provide a CDC-ACM interface to emulate a serial port. The device MUST comply with the following to use this VID/PID pair:
- The device MUST implement CDC-ACM. There are no requirements on the capabilities provided by the interface (i.e. bmCapabilities may be any value allowed by the spec).
- The device descriptor MUST set bDeviceClass, bDeviceSubClass, bDeviceProtocol, and bcdDevice to be 0x02, 0x00, 0x00, and 0x0010, respectively.
- Device descriptor MUST specify manufacturer and product descriptions. The product description MUST be available at least in language 0x0409 (English/US).
- The product description MUST include a URL to a project page for the device. The project page MUST provide documentation of the protocol implemented on the serial port.
- The device MAY provide a DFU interface that complies with the DFU specification.
OSHW firmware mode
The VID/PID pair of 0x????/0x???? is available to support these devices. The device MUST comply with the following to use this VID/PID pair:
- The device MUST implement the DFU specification.
- The device descriptor MUST set bDeviceClass, bDeviceSubClass, bDeviceProtocol, and bcdDevice to be 0x00, 0x00, 0x00, and 0x0010, respectively.
- Device descriptor MUST specify manufacturer and product descriptions. The product description MUST be available at least in language 0x0409 (English/US).
- The product description MUST include a URL to a project page for the device. The project page MUST provide documentation of the format used for the firmware file.
- The DFU interface descriptor MUST provide a string descriptor. This descriptor MUST be available at least in language 0x0409 (English/US).
- The device MAY provide alternate settings for the DFU interface. If alternative settings are used, all interface string descriptors MUST be unique.
Devices supporting DFU without CDC-ACM
The same VID/PID pair used for 'OSHW firmware mode' may be used for these devices. The device should look identical to an 'OSHW firmware mode' device except the interface descriptor should reflect the run-time mode. When in run mode, the device MUST comply with the following to use this VID/PID pair:
- The device MUST implement the DFU specification for run-mode with the exception that the device descriptor and configuration descriptor MUST be implemented from the DFU mode specification.
- The device descriptor MUST set bDeviceClass, bDeviceSubClass, bDeviceProtocol, and bcdDevice to be 0x00, 0x00, 0x00, and 0x0010, respectively.
Definitions
DFU: USB Device Firmware Upgrade Specification.
CDC: USD Communications Device Class (see CDC120.pdf).
ACM: Abstract Control Model (see PSTN120.pdf).