C H A P T E R  53

USB Device Test (usbtest)

The usbtest verifies the proper functioning of the hardware of the USB subsystem. The test supports audio, keyboard and printer devices. The usbtest for audio verifies the proper functioning of the hardware and software components of the USB audio subsystem. Specifically, the test tests the USB audio devices: USB microphones and speakers.



Note - usbtest is a newly consolidated test which is used to test the USB ports using various USB devices such as the USB key board, the USB printer or the USB audio devices. usbtest supports the same set of options for both SPARC and x86.



For keyboard, the test verifies whether the keyboard(s) attached to the USB bus are USB compliant. The test will flash the LEDs of a compliant keyboard. The usbtest for printer verifies the proper functioning and integrity of the USB parallel port devices. The test data, either ASCII or a postscript file, is sent to the printer through the USB bulk transfer. The test saves and restores the printer settings.

The usbtest options and subtest available depends on the peripheral device attached to the USB port.

usbtest Subtests

Subtests for the USB audio device:

The Tone subtest is only performed in the Connectivity test mode. This subtest is user-interactive in that the user must listen when the test is performed. This subtest generates two seconds of sound which is output to the speakers.

This subtest performs a simple check that records and plays one second of random data at 8kHz sampling. It simply reads random data from the USB microphone port and plays back to the USB speakers.

This subtest plays a 30 second music file which is output to the speakers. This is a partially user-interactive test. If there are no system call errors, the user must decide, by listening, if the test passed or failed. Things to listen for are distortion or lack of music.

Subtests for the USB printer device:

The getdevid subtest retrieves the IEEE 1284 ID string of the printer.

The Printer subtest prints strings of ASCII characters (from 0x32 to 0x7e), and can also print the postscript file usbpppdata.ps to the printer.

usbtest Options

To reach the dialog box below, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system may not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.

 

 

 FIGURE 53-1 usbtest Test Parameter Options Dialog Box
TABLE 53-1 usbtest Opions

Option

Description

Options available for USB audio devices:

Volume

Specifies the volume of 0 to 255; the default is 80

Audiotest

Can be set to "enable" or "disable" to perform the audio music test; the default is "enable"

Option available for USB printer devices

DeviceID

Specifies the path to the printer

Printer

Enables or Disables the Printer subtest; this test requires a printer to be attached to the USB port

Printer_data_type

Specifies the test data: ascii, postscript, or both

Printer_delay_seconds

Specifies in seconds, the delay after the Printer subtest is performed


 

usbtest Test Modes

This test supports Connection and Functional test modes.


TABLE 53-2 usbtest Supported Test Modes

Test Mode

Description

Connection

For a USB audio device, the test outputs two seconds of sound to the speakers

For USB keyboard device, the test runs the full test.

For USB printer device, the test runs only the getdevid subtest.

Functional

For a USB audio device, the test performs Records and Plays subtest by default. The user can enable Audio Music test

For USB keyboard device, the test runs the full test

For USB printer device, the getdevid subtest is enabled by default and the Printer subtest is disabled by default


 

usbtest Command Line Syntax

/opt/SUNWvts/bin/sparcv9/usbtest -cvf -o dev=dev-name, getdevid=Enable|Disable, printer=Enable|Disable, data=ascii, postscript, delay=0-86400, M=Enable|Disable, O=speaker|headphone|line-out, V=0-255, MF=musicfilename


TABLE 53-3 usbtest Command Line Syntax

Argument

Description

dev=dev-name

The target device name. The test runs on the specified device name. The default device name is /dev/kbd.

Options for the USB printer

getdevid=Enable|Disable

The option is available only for USB printer device. Enables or disables getdevid subtest. The subtest is enabled by default.

printer=Enable|Disable

Enables or disables the printer test. The subtest is disabled by default. The subtest requires a printer to be attached to the USB port.

data=ascii

Choose whether ASCII text or Postscript data is sent to the printer.

delay=0-86400

Allows you to choose a delay between passes of the printer test.

Options for the USB audio device

M=Enable|Disable

Enables or disables the music play test. The default is enable.

O=speaker|headphone|line-out

Selects the output device the test needs to

use.

V=0-255

Music output volume; the default is 80.

MF=musicfilename

Selects the music file; the default is music.au.