USB Device Framework (CV) Test

Note  This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.

Type: Automated Test

Overview

The device framework test runs a number of individual tests that verify various attributes and operations used by the function-specific portions of the test device. The tests also verify communications from the device through the bus interface to the host. The device framework test is based on the USBCV compliance test tool provided by the USB Implementers Forum, Inc. (USB-IF).

Details

This test verifies that the test device supports the commands set forth in Chapter 9, "USB Device Framework" of the Universal Serial Bus (USB) Specification Revision 2.0. It verifies that the test device responds correctly to device, configuration, and interface descriptor requests.

Setup

This test requires the test device to be connected through an intermediate USB 2.0 hub to the host system. If the test machine has two USB controllers, disable the controller that is not under test (or else the test fails).

Note   For embedded USB devices (for example, laptop devices) where it is impossible to meet the external hub connectivity requirement, you must follow the following steps:

  1. Select the job USB Device Framework (CV) (Manual) from Available jobs pane in the Device Console.

  2. Click the Add Selected button on the Device Console. The selected job shows up in the bottom pane.

  3. Select this job from the bottom pane. Right-click it and select Edit Parameters

  4. You will see the Parameter Edit window open, with parameters listed on the left and their values on the right.

  5. Change this value of IsEmbeddedUSBDevice parameter from FALSE to TRUE.

  6. Click the Schedule Jobs button on the Device Console to run this job.

Device States

For these tests, three different device states are used: the default state, the address state, and the configured state. Many of the tests run with the test device in more than one state. This section describes the three states and the procedures used to put the device into each of the states. The device state information might help with debugging in cases in which the test device does not reach the required starting state for the test. The individual test descriptions mention which device states they are run on, but they do not repeat the setup procedure. A description of each device states follows:

Default State: In the default state, the test device is attached to the USB and is receiving power.

The device has been reset, but it has not been assigned a unique address. The device responds at the default address.

To put the device in the configured state, the test does the following:

  1. Issues a valid set configuration request to the device with configuration value of zero.

  2. Issues a valid get configuration request and verifies that the device responds with zero.

  3. Issues a valid set address request to the device with address zero.

Address State: In the address state, the device is attached to the USB and is receiving power. The device has been reset and has a unique device address. The device is not configured.

To put the device in the configured state, the test does the following:

  1. Issues a valid set configuration request to the device with configuration value of zero.

  2. Issues a valid get configuration request to the device and verifies that the device responds with zero.

Configured State: In the configured state, the device is attached to the USB and is receiving power.

The device has been reset and has a unique device address. The device is configured. The host can now use the function provided by the device.

Device enumeration routine

The test enumerates the devices on the bus using the following procedure.

  1. Get the device descriptor using a maximum packet size of 64 bytes. This causes a short packet for devices with a bMaxPacketSize0 field < 64.

  2. Issue a set address request with the next available USB address.

  3. Get the device descriptor again with the right maximum packet size.

  4. Get the configuration descriptor, asking for a number of bytes equal to the configuration descriptor size only.

  5. Issue a set configuration request for the first configuration supported by the device.

  6. Get the configuration descriptor again, asking for a number of bytes equal to the configuration descriptor size.

  7. Get the configuration descriptor using the total length of the entire descriptor.

If the descriptors indicate that the device is a hub, the test continues with the steps below:

  1. Get the hub class descriptor.

  2. Issue a SetPortFeature request with the hub class feature selector PORT_POWER for each port on the hub.

  3. Sleep for 1 second.

  4. Issue get port status requests for each port.

  5. If the connect bit is set in the port status, issue a port reset, and proceed to step 13. Otherwise, stop at this step.

  6. Sleep for 50 milliseconds.

  7. Check the port status to ensure that the enable bit has been set and then proceed to the enumerate device routine.

Test Cases

The USB Device Framework (CV) test runs the following test cases:

  • TD-9.25.1.1 Device Descriptor Test

  • TD-9.25.1.2 Device Qualifier Test

  • TD-9.25.1.3 Configuration Descriptor Test

  • TD-9.25.1.4 Interface Descriptor Test

  • TD-9.25.1.5 Endpoint Descriptor Test

  • TD-9.25.1.6 Halt Endpoint Test

  • TD-9.25.1.10 Remote Wakeup Test

  • TD-9.25.1.11 Set Configuration Test

TD-9.25.1.1 Device Descriptor Test

This test verifies that the test device responds to valid get descriptor requests and returns a descriptor in compliance with the specification.

Device States for Test

This test runs with the device in the default, address, and configured states.

Overview

The test performs the following steps:

  1. Places the device in the starting state (default, address, or configured).

  2. Issues a valid GET_DESCRIPTOR request for the device with a requested length of 18 bytes.

  3. Performs the following checks on the returned device descriptor value:

    bLength == 18

    bDescriptorType == DEVICE descriptor type

    bcdUSB.hibyte == (01 or 02)

    if (Device Speed == High) then bcdUSB.hibyte == 02

    if(bcdUSB.hibyte == 01) then bcdUSB.lowbyte == (01 or 10 or 00)

    if (bDeviceClass == 0) then bDeviceSubClass == 0

    if (Device Speed == Low) then bMaxPacketSize0 == 8

    If (Device Speed == Full) then bMaxPacketSize0 == (8 or 16 or 32 or 64)

    If (Device Speed == High) then bMaxPacketSize0 == 64

    Check that idVendor is in the list of valid entries maintained by the USB-IF

    bNumConfigurations != 0

    Check that the bDeviceClass == 0 or ==FFH or is on a list of assigned class codes maintained by the USB-IF

  4. Repeats steps 1, 2, and 3 with device in the other states (default, address, or configured).

Note  

  • If the device supports multiple configurations, the test is repeated for each possible configuration.

  • If the device is a high-speed capable device, the test is run with the device in both high-speed and full-speed operation.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor, set address, set configuration, or get configuration requests fail for any reason.

  • Any of the device descriptor content checks fail.

TD-9.25.1.2 Device Qualifier Test

This test verifies that the test device responds to valid get descriptor request for a device qualifier and returns a descriptor in compliance with the USB specification.

Device States for Test

This test runs with the device in the default, address, and configured states.

Overview

The test performs the following steps.

  • Places the device in the starting state (default, address, or configured).

  • Issues a valid get descriptor request for a device qualifier with a requested length of 9 bytes.

  • Confirms the following on the device qualifier descriptor value:

    bcdUSB.hibyte == 02

    bLength == 10

    bDescriptorType == DEVICE_QUALIFER descriptor type

    If (bDeviceClass == 0) then bDeviceSubClass == 0

    If (Device Speed == High) then bMaxPacketSize0 == (8 or 16 or 32 or 64)

    If (Device Speed == Full) then bMaxPacketSize0 == 64

    BNumConfiguration != 0

    bReserved != 0

  • Repeats steps 1, 2, and 3 with device in the other two states (default, address, or configured).

Note  

  • If the device supports multiple configurations, the test is repeated for the configured state for each possible configuration.

  • If the device is a high-speed capable device, the complete test must be run with the device in both full-speed and high-speed operation.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor, set address, set configuration, or get configuration requests fail for any reason.

  • Any of the device descriptor content checks fail.

TD-9.25.1.3 Configuration Descriptor Test

This test verifies that the test device responds to valid get configuration descriptor request and returns a descriptor in compliance with the USB specification.

Device States for Test

This test runs with the device in the default, address, and configured states.

Overview

The test performs the following steps.

  1. Places the device in the starting state (default, address, or configured).

  2. Issues a valid get descriptor request for a configuration descriptor with a length of 9 bytes.

  3. Confirms the configuration descriptor value:

    BLength == 9

    bDescriptorType == CONFIGURATION descriptor type (or OTHER_SPEED_CONFIGURATION type)

  4. Issues a valid get configuration descriptor request with a requested length of wTotalLength from the configuration descriptor.

  5. Parses the data returned and performs the following checks:

    Confirms that the first descriptor is a configuration descriptor as confirmed in step 3.

    Confirms that all other descriptors are endpoint, interface, or class descriptors.

    Counts the number of endpoint descriptors

    Counts the number of interface descriptors (alternate setting == 0)

    Sums the bNumEndPoint values from all interface descriptors.

  6. Confirms that the number of interface descriptors found equals the bNumInterfaces value in the configuration descriptor.

  7. Confirms that the total number of endpoint descriptors found match the sum of the bNumEndPoint values from each of the interface descriptors.

  8. Issues a valid get configuration descriptor request with a requested length of 9 bytes.

  9. Completes each of the following checks on the configuration descriptor value:

    bLength == 9

    bDescriptorType == Configuration descriptor type

    bNumInterface != 0

    bmAttributes bits D0 to D4 == 0

    bmAttributes bit D7 == 1

    if (bMaxPower == 0) bmAttributes D6 == 1

  10. If this is not an other_speed configuration test, the test issues a get status request for the device.

    If the status request indicates that the device is operating bus-powered, bMaxPower must be less than 500 mA

    If the status request indicates the device is operating self-powered, bMaxPower must be less than 100 mA

  11. If the test supports multiple configurations, the test repeats for each configuration descriptor.

Note   If the device is a high-speed capable device, the test is run with the device in both high-speed and full-speed operation and is also run for the other_speed_configuration descriptor.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Any of the device descriptor content checks fail.

TD-9.25.1.4 Interface Descriptor Test

This test verifies that the test device reports interface descriptors in compliance with the specification.

Device States for Test

This test runs with the device in the default, address, and configured states.

Overview

The test performs the following steps:

  1. Places the device in the starting state (default, address, or configured).

  2. Sends a valid get configuration descriptor request with a requested bLength of 9 bytes.

  3. Completes the following checks on the configuration descriptor value:

    bLength == 9

    bDescriptorType == CONFIGURATION descriptor type (or OTHER_SPEED_CONFIGURATION type)

  4. Issues a valid get configuration descriptor request with a requested length of wTotalLength from the configuration descriptor.

  5. If this is not an other_speed_configuration test, the test sends a set configuration request to set the configuration of the device to the one being tested. The test then issues a get configuration request to make sure the correct configuration is indicated.

  6. Completes the following bandwidth check for all interface and endpoint descriptors returned by the device:

    If a default interface (alternate setting zero) contains an isochronous endpoint with a maximum packet size greater than zero, the test fails.

    If a default interface (alternate setting zero) contains an interrupt endpoint with a maximum packet size greater than 64, the test fails.

  7. Confirms that there is at least one interface descriptor in the data returned.

  8. Confirms that the first interface descriptor returned has bInterfaceNumber and bAlternateSetting values of zero.

  9. Completes the following checks for each interface descriptor returned:

    If this is not the first interface descriptor (see step 8)

    If (current interface number == previous interface number)

    Then current alternate setting must be one greater

    Else

    Current interface number must be 1 greater than previous

    Current alternate setting must be zero

    Current interface number must be < total number interfaces

    bLength > 8

    bDescriptorType == INTERFACE descriptor type

    if (bInterfaceClass == 0) then check that bInterfaceSubClass == 0

    bNumEndpoints matches the number of endpoint descriptors

  10. If this is not an other_speed interface, the test completes the following additional checks:

    Call set interface for the current bInterfaceNumber and bAlternateSetting values.

    If the current interface has no alternate settings, the device may STALL the request. Otherwise the request must succeed.

    Call get interface for the current bInterfaceNumber and verify that the correct alternate setting value is returned.

  11. If the test supports multiple configurations, repeat the test for each configuration descriptor.

Note   If the device is a high-speed capable device, the test is run with the device in both high-speed and full-speed operation and is also run for the other_speed_configuration descriptor.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Valid set interface requests fail for any reason.

  • Valid get interface requests fail for any reason.

  • Any of the interface descriptor content checks fail.

TD-9.25.1.5 Endpoint Descriptor Test

This test verifies that the device under test reports endpoint descriptors in compliance with the specification.

Device States for Test

This test is run with the device in the default, address, and configured states.

Overview

The test performs the following steps:

  1. Places the device in the starting state (default, address, or configured).

  2. Issues a valid get descriptor request for the device configuration with a requested length of 9 bytes.

  3. Completes the following checks on the configuration descriptor value:

    bLength == 9

    bDescriptorType == CONFIGURATION descriptor type (or OTHER_SPEED_CONFIGURATION type)

  4. Issues a valid get configuration descriptor request with a requested length of wTotalLength from the configuration descriptor.

  5. If this is not an other speed configuration test, the test issues a set configuration request to set the configuration of the device to the one being tested. The test then issues a get configuration request to make sure the correct configuration is indicated.

  6. Issues a valid get device descriptor command to store the bcdUSB value.

  7. Completes the following checks for each endpoint descriptor found in the data returned from the get configuration descriptor request:

    bLength > 6

    bDescriptorType == ENDPOINT descriptor type

    bEndPointAddress != (0x00 or 0x80)

    bmAttributes D6-D7 must be zero.

    BmAttributes D2-D5 must be zero unless the endpoint is isochronous and

    bcdUSB is 0200 or greater.

    Note   There is an exception made if bcdUSB is 0x0101 or 0x0110 and the endpoint is part of an audio interface.

    wMaxPacketSize bit D13 to D15 must be zero.

  8. The endpoint being tested is categorized according to the following logic:

    Current Device Speed Other Speed Descriptor Category

    LOW

    NA

    CV_LOW

    FULL

    YES

    CV_HIGH

    FULL

    NO

    CV_FULL_2X (bcdUSB)

    CV_FULL_1X

    HIGH

    NO

    CV_HIGH

    HIGH

    YES

    CV_FULL_2X

     

  9. Completes the following endpoint type and speed dependent checks for each endpoint descriptor:

    If wMaxPacketSize bits D11 to D12 are non-zero, the endpoint must be typeCV_HIGH with transfer type INTERRUPT or ISOCHRONOUS.

  10. Completes the following checks for control endpoints:

    CV_LOW wMaxPacketSize == 8

    CV_FULL (1x or 2x)wMaxPacketSize == (8 or 16 or 32 or 64)

    CV_HIGHwMaxPacketSize == 64

  11. Completes the following checks for bulk endpoints:

    CV_LOW FAIL - ILLEGAL

    CV_FULL (1x or 2x)wMaxPacketSize == (8 or 16 or 32 or 64)

    CV_HIGHwMaxPacketSize == 512

  12. Completes the following checks for interrupt endpoints.

    CV_LOWbInterval > 9

    wMaxPacketSize < 9

    CV_FULL_1XbInterval != 0

    wMaxPacketSize < 65

    CV_FULL_2XbInterval != 0

    wMaxPacketSize < 65

    CV_HIGHbInterval > 0 and bInterval < 16

    MULT 0wMaxPacketSize < 1025

    MULT 1wMaxPacketSize > 512 and wMaxSize < 1025

    MULT 2wMaxPacketSize > 682 and wMaxSize < 1025

  13. Completes the following checks for isochronous endpoints:

    CV_LOWFAIL - ILLEGAL

    CV_FULL_1XbInterval == 1

    wMaxPacketSize < 1024

    CV_FULL_2XbInterval > 0 and bInterval < 17

    wMaxPacketSize < 1024

    CV_HIGHbInterval > 0 and bInterval < 17

    MULT 0wMaxPacketSize < 1025

    MULT 1wMaxPacketSize > 512 and wMaxSize < 1025

    MULT 2wMaxPacketSize > 682 and wMaxSize < 1025

  14. Repeats the test for each configuration descriptor if the test supports multiple configurations.

Note   If the device is a high-speed capable device, the test must be run with the device in both high-speed and full-speed operation and is also run for the other_speed_configuration descriptor.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Any of the device descriptor content checks fail.

TD-9.25.1.6 Halt Endpoint Test

This test is similar to the interface descriptor test except that it also confirms that all bulk and interrupt endpoints can be programmatically halted.

Device States for Test

This test is run with the device in the configured state.

Overview

The test performs the following steps:

  1. Places the device in the configured state.

  2. Issues a valid get configuration descriptor request with a requested bLength of 9 bytes.

  3. Completes the following checks on the configuration descriptor value:

    bLength == 9

    bDescriptorType == CONFIGURATION descriptor type (or

    OTHER_SPEED_CONFIGURATION type)

  4. Issues a valid get configuration descriptor command with a requested length of wTotalLength from the configuration descriptor.

  5. If this is not another speed configuration test, the test issues a set configuration command to set the configuration of the device to the device being tested. The test then issues a get configuration command to make sure the correct configuration is indicated.

  6. Completes the following bandwidth check for all interface and endpoint descriptors returned by the device:

    If a default interface (alternate setting zero) contains an isochronous endpoint with a maximum packet size greater than zero, the test fails.

    If a default interface (alternate setting zero) contains an interrupt endpoint with a maximum packet size greater than 64, the test fails.

  7. Confirms that there is at least one interface descriptor in the data returned.

  8. Confirms that the first interface descriptor returned has bInterfaceNumber and bAlternateSetting values of zero.

  9. For each interface descriptor returned, completes the following checks:

    If this is not the first interface descriptor (see step 8)

    If (current interface number == previous interface number)

    Then current alternate setting must be one greater

    Else

    Current interface number must be 1 greater than previous

    Current alternate setting must be zero

    Current interface number must be < total number interfaces

    bLength > 8

    bDescriptorType == INTERFACE descriptor type

    if (bInterfaceClass == 0) then check that bInterfaceSubClass == 0

  10. If this is not an other_speed interface, the test makes the following additional checks:

    Call set interface for the current bInterfaceNumber and bAlternateSetting values.

    If the current interface has no alternate settings, the device may STALL the request. Otherwise it must succeed.

    Call get interface for the current bInterfaceNumber and verify that the correct alternate setting value is returned.

  11. For each endpoint associated with interface descriptor in step 10, the test completes the following checks if the endpoint is bulk or interrupt:

    Issues a valid Get Status request for the endpoint.

    If the endpoint is halted, issues a valid clear feature request with feature selector NDPOINT_HALT. Then the test issues a valid Get Status request for the endpoint and verifies that the endpoint no longer reports halt.

    Issues a valid set feature request with feature selector ENDPOINT_HALT.

    Issues a valid Get Status request for the endpoint.

    Verifies that ENDPOINT_HALT is reported in the status.

    Issues a valid clear feature request with feature selector ENDPOINT_HALT.

    Issues a valid Get Status request for the endpoint.

    Verifies that ENDPOINT_HALT is not reported in the status.

  12. If the test supports multiple configurations, the test is repeated for each configuration descriptor.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Valid set interface requests fail for any reason.

  • Valid get interface requests fail for any reason.

  • Valid get status requests fail for any reason.

  • Valid set feature (ENDPOINT_HALT) requests fail for any reason.

  • Valid clear feature (ENDPOINT_HALT) requests fail for any reason.

  • Any of the device descriptor content checks fail.

TD-9.25.1.10 Remote Wakeup Test

This test checks each device configuration that supports remote wakeup to ensure that the device properly supports the set and clear feature requests with feature selector DEVICE_REMOTE_WAKEUP.

Device States for Test

This test is run with the device in the configured state. For each remote wakeup-capable configuration, the test is run with remote wakeup enabled (must work) and disabled (must not work).

Overview

The test performs the following steps:

  1. Issues a valid get configuration descriptor request with a requested bLength of 9 bytes.

  2. Completes the following checks on the configuration descriptor value:

    bLength == 9

    bDescriptorType == CONFIGURATION descriptor type

    bmAttributes bit D5 == 1 (Remote Wakeup)

  3. Repeats steps 2 and 3 for each configuration.

  4. If bit D5 is never set, there is nothing to test.

  5. If bit D5 is set for some configurations, the test issues a valid get configuration for the configuration that was set in step 1. If bit D5 is set, proceed with the Remote Wakeup Test; otherwise, there is nothing to test for this configuration.

Remote Wakeup Test

The test performs the following steps:

  1. Issues a valid set configuration command to set the device into the remote wakeup-capable configuration being tested (enabled or disabled).

  2. Issues a valid get configuration command and verifies that the device reports the configuration that was set in step 1.

  3. Issues a valid set feature command with feature selector DEVICE_REMOTE_WAKEUP.

  4. Issues a valid get status command and verifies that remote wakeup is reported.

  5. If this is a remote wakeup disabled test, the test issues a valid clear feature command with feature selector DEVICE_REMOTE_WAKEUP. The test then issues a valid get status command and verifies that remote wakeup is not reported.

  6. Suspends the parent port of the device under test.

  7. Sleeps for 1 second.

  8. Confirms that the parent port status has suspended.

  9. Prompts you to generate a remote wakeup event on the test device.

  10. Polls the parent port for up to 15 seconds, sending valid get port status requests, and checks to see when (if) the PORT_SUSPEND bit is cleared.

Note   If the test supports multiple configurations, the test is repeated for each configuration descriptor. If the device is high-speed capable, the test repeats with the device operating at high-speed and full-speed.

Results Interpretation

The test writes the pass/fail results to a log file.

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Valid get status requests fail for any reason.

  • Valid set feature (DEVICE_REMOTE_WAKEUP) requests fail for any reason.

  • Valid clear feature (DEVICE_REMOTE_WAKEUP) requests fail for any reason.

  • Device status does not properly indicate whether remote wakeup is enabled.

  • The device produces a remote wakeup event when remote wakeup is disabled.

  • The device does not produce a remote wakeup event when remote wakeup is enabled.

  • The device prevents its parent port from entering the suspend state.

TD-9.25.1.11 Set Configuration Test

This test checks each device configuration that can be set using the set configuration request and makes sure that the device properly reports its current configuration in response to the get configuration request.

Device States for Test

This test is run with the device starting in the address state.

Overview

The test performs the following steps:

  1. Places the device in the address state.

  2. Issues a valid get configuration descriptor command with a requested length of 9 bytes for configuration index zero.

  3. Issues a valid set configuration request using the bConfigurationValue obtained in step 2.

  4. Issues a valid get configuration request and verifies that the configuration set in step 3 is reported.

  5. Issues a valid get configuration descriptor command with a requested length of 9 bytes for the configuration to be tested.

  6. Issues a valid set configuration request using the bConfigurationValue obtained in step 5.

  7. Issues a valid get configuration request and verifies that the configuration set in step 6 is reported.

  8. Issues a valid set configuration request using configuration value zero.

  9. Issues a valid get configuration command and verifies that the device reports the configuration that was set in step 7.

  10. Issues a valid set configuration request using the bConfigurationValue obtained in step 5.

  11. Issues a valid get configuration request and verifies that the configuration set in step 10 is reported.

Note   If the test supports multiple configurations, the test is repeated for each configuration descriptor. If the device is high-speed capable, the test repeats operating at high speed and full speed.

Results Interpretation

The test writes the pass/fail results to a log file (Usbcv_chap9.log).

The test fails if:

  • Device enumeration fails when following the method described in this specification.

  • Valid get descriptor requests fail for any reason.

  • Valid set address requests fail for any reason.

  • Valid set configuration requests fail for any reason.

  • Valid get configuration requests fail for any reason.

  • Valid get status requests fail for any reason.

  • Valid set feature (DEVICE_REMOTE_WAKEUP) requests fail for any reason.

  • Valid clear feature (DEVICE_REMOTE_WAKEUP) requests fail for any reason.

  • Device status does not properly indicate whether remote wakeup is enabled.

  • The device produces a remote wakeup event when remote wakeup is disabled.

  • The device does not produce a remote wakeup event when remote wakeup is enabled.

  • The device prevents its parent port from entering the suspend state.

Run Time: 5 minutes

Log File:

System Restart Required: No

Test Category:

Supported operating systems for Logo or Signature testing:

  • Windows 7

  • Windows Server 2008 R2

  • Windows Vista

  • Windows Server 2008

  • Windows Server 2003

  • Windows XP

Program:

Requirements

Software Requirements

The test tool requires the following software:

  • Supported operating system (see list above).
  • Software components included with the device that is being tested.

Hardware Requirements

  • Device to be tested
  • One USB 2.0 controller PCI adapter, if system does not contain a USB 2.0 controller
  • One USB IF certified USB 2.0 hub to connect the system and the test USB device

Processor

  • x86
  • x64
  • Itanium

Troubleshooting

The following list describes the USB Device Framework (CV) Test Assertions:

  • General Chapter 9 Command Assertions
    • 1.1.1 Devices must have a corresponding configuration value for a valid configuration index.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.2

    • 1.1.2 Devices must support being set to Addressed/Configured state.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.1.1

    • 1.1.3 Devices must support a valid GetDescriptor(Device) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.3

    • 1.1.4 Devices must support a valid GetDescriptor(String) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.3, 9.6.7

    • 1.1.5 Devices must support a valid GetDescriptor(Configuration) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.3

    • 1.1.6 High Speed Capable devices must support a valid GetDescriptor(OtherSpeedConfiguration) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.3

    • 1.1.7 Devices must support a valid SetConfiguration request

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.7

    • 1.1.8 Device must support a valid GetDescriptor(DeviceQualifier) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.7

  • HID Command Assertions
    • 1.1.9 HID devices must support a GetDescriptor(HIDDescriptor) request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 6.2, 7.1.1

    • 1.1.10 HID devices must support a valid SetProtocol(Report) request.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 7.2.6

    • 1.1.11 HID devices must support a valid GetProtocol request.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 7.2.5

    • 1.1.12 HID devices must support a valid SetProtocol(Boot) request.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 7.2.6

    • 1.1.13 HID devices must support a valid GetDescriptor(Report) request.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 6.2, 7.1.1

    • 1.1.14 HID devices that do not support a SetIdle request must respond with a request error.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 7.2, 7.2.3

    • 1.1.15 HID devices that do not support a GetIdle request must respond with a request error.

      Reference document: Universal Serial Bus Specification, Revision 1.1, Section 7.2, 7.2.3

  • General Device Assertions
    • 1.1.20 Devices must respond with a Request Error to GetDescriptor requests that specify an invalid descriptor type.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.2.7 and 9.4.3.

    • 1.1.21 Devices must respond with a Request Error to SetFeature requests that specify an invalid feature selector.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.2.7 and 9.4.9.

    • 1.1.22 Devices must respond with a Request Error to ClearFeature requests that specify an invalid feature selector.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.2.7 and 9.4.1.

    • 1.1.22 Devices must respond with a Request Error to ClearFeature requests that specify an invalid feature selector.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.2.7 and 9.4.1.

    • 1.1.30 A suspended device must resume normal operation when resume signaling is seen on its upstream port.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 7.1.7.7.

    • 1.1.100 Devices must support a GetStatus Standard Request.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 11.24.2.7.

    • 1.1.101 Device Descriptors must use only class codes defined in the USB specification, or allocated and published by the USBIF.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • Device Descriptor Assertions

      1.2.1 The descriptor returned in response to a GetDescriptor(Device) request must have a length of 0x12 (or appropriate length if less bytes are requested).

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.2 The descriptor returned in response to a GetDescriptor(Device) request must the have value of 0x01 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.3 The descriptor returned in response to a GetDescriptor(Device) request must have the value of 0x01/0x02 in the high byte of the bcdUSB field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.4 The descriptor returned in response to a GetDescriptor(Device) request must have the value of 0x00/0x01/0x10 in the low byte of the bcdUSB field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.5 The descriptor returned in response to a GetDescriptor(Device) request must have a value of 0x00 in the device subclass field when the device.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.6 The MaxPacketSize of a control endpoint must be 0x40 for a USB device operating at High speed.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.7 The MaxPacketSize of a control endpoint must be 0x08 for a usb device operating at Low speed.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.8 The MaxPacketSize of a control endpoint must be one of 0x08/0x10/0x20/0x40 for a USB device operating at full speed.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.9 A device must have at least one configuration.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.10 The descriptor returned in response to a GetDescriptor(Device) request must have the value 0x02 in the high byte of the bcdUSB field for a high-speed device.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.1.

    • 1.2.20 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request cannot contain multiple descriptors of type configuration.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.21 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request cannot contain a descriptor of type device.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.22 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request cannot contain a descriptor of type device qualifier.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.23 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request cannot contain a descriptor of type other speed configuration.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.24 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request must contain the number of interfaces descriptors reported in the configuration descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.25 The descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request must contain the number of endpoint descriptors reported in the contained interface descriptors.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.26 The configuration descriptor returned in response to a GetDescriptor([OtherSpeed]Configuration) request must have a length of 0x09.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Sections 9.6.3, 9.6.4.

    • 1.2.27 The descriptor returned in response to a GetDescriptor(Configuration) request must the value of 0x02 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.28 The descriptor returned in response to a GetDescriptor(OtherSpeedConfiguration) request must the value of 0x07 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.4.

    • 1.2.29 The number of interfaces cannot be a zero in a [OtherSpeed]Configuration descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Sections 9.6.4, 9.6.5

    • 1.2.30 Bits 0 through 4 must be set to zero in the bmAttributes field.of a [OtherSpeed]Configuration descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Sections 9.6.4, 9.6.4

    • 1.2.31 Bit 7 must be set to one in the bmAttributes field of a [OtherSpeed]Configuration descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Sections 9.6.3, 9.6.4

    • 1.2.32 A BUS-POWERED device cannot draw zero power.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.3.

    • 1.2.33 A SELF-POWERED device cannot draw more than 100ma from the USB bus.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 7.2.1.5.

    • 1.2.34 A BUS-POWERED device cannot draw more than 500ma.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 7.2.1.4.

    • Interface Descriptor

      1.2.40 An Isochronous endpoint present in alternate interface 0x00 must have a MaxPacketSize of 0x00

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.6.3.

    • 1.2.41 The first interface must have an interface number of 0x0 and an alternate setting of 0x0.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.42 The interface number cannot be greater than the number of interfaces reported in the configuration descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.43 An Interface must have at least one setting with an Alternate Setting set to zero.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.44 A device must support the SetInterface request if it has alternate settings for that interface.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.10.

    • 1.2.45 Alternate settings for a given interface must be in sequential order.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.46 Interface numbers must be in sequential order.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.47 An interface descriptor must have a length of 0x09.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.48 An interface descriptor must have a value of 0x04 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.49 An interface descriptor must have a value of 0x00 in the interface subclass field when the interface class is 0x00.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.50 A device must support the GetInterface request if it has alternate settings for that interface.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.4.

    • 1.2.51 A successful GetInterface request must return the alternate setting set by a prior call to SetInterface.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.4.

    • 1.2.52 A high-speed interrupt endpoint present in alternate interface 0x00 must have a MaxPacketSize <= 0x40.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.53 An interface descriptor must have exactly the number of endpoint descriptors it specifies in the bNumEndpoints field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

  • Endpoint Descriptor
    • 1.2.60 An endpoint descriptor must have a length of 0x07.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.61 An endpoint descriptor must have a value of 0x05 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.62 Only the default control endpoint can have an address of 0x00.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.63 Bits 6 and 7 must be set to zero in the bmAttributes field.of an Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.3.1.1.

    • 1.2.64 Bits 4 and 5 cannot BOTH be set in the bmAttributes field.of an Isochronous Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.65 Bits 2 through 5 must be set to zero in the bmAttributes field.of a non Isochronous Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.66 Bits 13 through 15 must be set to zero in the wMaxPacketSize field.of an Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.67 Legal mult values are 0x00/0x01/0x02 for a High speed Isochronous/Interrupt Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.68 Bits 11 and 12 must be set to zero in the wMaxPacketSize field.of a Control/Bulk Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.69 Bits 11 and 12 must be set to zero in the wMaxPacketSize field.of a non high-speed Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.70 USB 1.x compliant devices must have a value of 0x01 in the bInterval field of an Isochronous Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.71 USB 2.x compliant devices must have a value between 0x01 and 0x10 in the bInterval field of an Isochronous Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.72 USB 2.x compliant devices must have a value between 0x01 and 0x10 in the bInterval field of a High speed Interrupt Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.73 A device cannot have a value of 0x00 in the bInterval field of a Full/Low speed Interrupt Endpoint descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.74 A device operating at Low speed cannot have Isochronous endpoints.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.6.4.

    • 1.2.75 A Full speed Isochronous endpoint must have a MaxPacketSize between 0 and 1023.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.6.3.

    • 1.2.76 A High speed Interrupt/Isochronous endpoint must have a MaxPacketSize between 0 and 1024 when the mult value is zero.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.6.3.

    • 1.2.77 A High speed Interrupt/Isochronous endpoint must have a MaxPacketSize between 513 and 1024 and bInterval value of 1 when the Mult value is one.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.1.2.78 A High speed Interrupt/Isochronous endpoint must have a MaxPacketSize between 683 and 1024 and bInterval value of 1 when the mult value is two.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.6.

    • 1.2.79 A device operating at Low speed cannot have Bulk endpoints.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.8.3.

    • 1.2.80 A Full speed Bulk endpoint must have a MaxPacketSize of 0x08/0x10/0x20/0x40.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.8.3.

    • 1.2.81 A High speed Bulk endpoint must have a MaxPacketSize of 0x200.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.8.3.

    • 1.2.82 A Low speed Interrupt endpoint must have a MaxPacketSize less than or equal to 0x08.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.7.3.

    • 1.2.83 A Full speed Interrupt endpoint must have a MaxPacketSize less than or equal to 0x40.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.84 A Low speed Interrupt endpoint must have a value greater than 10 in the bInterval field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 5.7.4.

    • 1.2.90 The number of endpoint descriptors in an interface must match the number reported in the interface descriptor.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.5.

    • 1.2.91 A device that has Bulk/Interrupt endpoints must support the Halt Endpoint request on those endpoints.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.

  • Interface Descriptor
    • 1.2.100 A device that supports remote wakeup in a specific configuration must not fail a valid SetFeature(DEVICE_REMOTE_WAKEUP) command.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.9.

    • 1.2.101 A device that supports remote wakeup in a specific configuration must not fail a valid ClearFeature(DEVICE_REMOTE_WAKEUP) command.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.1.

    • 1.2.102 After a successful ClearFeature(DEVICE_REMOTE_WAKEUP) Bit 1 of status word returned in response to a GetStatus request must be set to a zero.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.5.

    • 1.2.103 After a successful SetFeature(DEVICE_REMOTE_WAKEUP) Bit 1 of status word returned in response to a GetStatus request must be set to a one.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.5.

    • 1.2.104 After a successful SetFeature(SUSPEND), a hub/host port's status must show 'suspended'.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 11.24.2.13.

    • 1.2.105 A device with remote wakeup disabled must not initiate a remote wakeup.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.1.

    • 1.2.106 A device with remote wakeup enabled must be able to initiate a remote wakeup on its suspended parent port.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.4.9.

  • Device Qualifier Assertions
    • 1.2.120 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request cannot have a value of 0x00/0x01 in the high byte of the bcdUSB field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

    • 1.2.121 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request must have a length of 0x0a.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

    • 1.2.122 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request must the value of 0x06 in the Type field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

    • 1.2.123 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request must have a value of 0x00 in the device subclass field when the device class is 0x00.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

    • 1.2.123 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request must have a value of 0x00 in the device subclass field when the device class is 0x00.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

    • 1.2.124 The descriptor returned in response to a GetDescriptor(DeviceQualifier) request must have a value of 0x00 in the reserved field.

      Reference document: Universal Serial Bus Specification, Revision 2.0, Section 9.6.2.

 

 

Build date: 9/14/2012