C H A P T E R  21

USB Device Test (usbtest)


usbtest Description

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 tests the USB ports using various USB devices such as the USB key board, the USB printer, or the USB audio devices.



For keyboards, the test verifies whether the keyboard(s) attached to the USB bus are USB-compliant. The test flashes the LEDs of a compliant keyboard. The usbtest for printers 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

The following table lists the usbtest subtests for both the USB audio and printer devices.


TABLE 21-1 usbtest Subtests

Subtest

Description

USB Audio Devices

Tone

Supported in Connection test mode only. This subtest generates two seconds of sound output to the speakers. You must decide, by listening, if the test passed or failed.

Record/Play

Records and plays one second of random data at 8kHz sampling. This subtest reads random data from the USB microphone port and plays the music back to the USB speakers.

Audio

Plays a 30 second music file that is output to the speakers. You must decide, by listening, if the test passed or failed. Things to listen for are distortion or lack of music.

USB Printer Devices

getdevid

Retrieves the IEEE 1284 ID string of the printer.

Printer

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 following 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 might not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.


FIGURE 21-1 usbtest Test Parameter Options Dialog Box

Screenshot of the usbtest Test Parameter Options dialog box


 


TABLE 21-2 usbtest Opions

Option

Description

USB Audio Devices

Volume

Specifies the volume of 0 to 255. The default is 80.

Audiotest

Enables or disables the audio music test. The default is Enable.

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 21-3 usbtest Supported Test Modes

Test Mode

Description

Connection

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

For a 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. You can enable Audio Music test.

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

For a 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/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 21-4 usbtest Command-Line Syntax

Argument

Description

dev=dev-name

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

USB Printer Devices

getdevid=Enable|Disable

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

printer=Enable|Disable

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

data=ascii

Selects whether to send ASCII text or PostScript data to the printer.

delay=0-86400

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

USB Audio Devices

M=Enable|Disable

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

O=speaker|headphone|line-out

Selects the output device that usbtest requires.

V=0-255

Music output volume. The default is 80.

MF=musicfilename

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