Chapter 16
character and are not null terminated. A string descriptor can contain up to 126
U.S. English characters.
As Chapter 3 explained, serial numbers are recommended for USB virtual
COM-port devices to enable a device to retain its COM-port number when
moved to a different port.
1
*
Every USB virtual COM-port device must have an INF file that contains
device-specific information to enable Windows to identify drivers to load for
the device. The INF file is required even if the device uses only the drivers pro-
vided with Windows (rather than vendor-specific drivers).
Listing 16-1 shows an example INF file for a virtual COM-port device that uses
the Windows CDC drivers. To adapt the example INF file for your device,
make the following changes:
- In the Version section, replace LAKEVIEW with a string that describes your
company. - In the Manufacturer section, replace Lakeview with a string that describes
your company. - Rename the Lakeview section to the string used in #2 above.
- In the (renamed) Lakeview section, replace 0925 with your device’s USB
Vendor ID and replace 9010 with your device’s USB Product ID with both val-
ues expressed in hexadecimal. These values must match the values in idVendor
and idProduct in the device descriptor returned by the device. - In the Strings section, replace both instances of “Lakeview Research LLC”
with your company’s name or other provider and manufacturer information as
appropriate.
For more about creating INF files, see Microsoft’s documentation or USB
Complete.
$ 8
A USB composite device is a device that performs multiple, independent func-
tions. For example, a single device can function as both a virtual COM port
and as a mass-storage device. The host computer loads a driver for each func-
tion, and each function operates independently.
For most USB classes, creating composite devices is straightforward. Each func-
tion has an interface descriptor with bInterfaceClass equal to a class code. In the
device descriptor, bDeviceClass = 00h to tell the host computer to look for class