C H A P T E R  50

Internal I2C Smart Card Reader Test (sc2test)

sc2test Description

The sc2test verifies the proper functioning and integrity of the internal I2C smart card reader by testing the scmi2c(7d) driver.

sc2test Subtests

The sc2test consists of the following subtests:

The Register read subtest performs read access to selected scmi2c reader registers by means of ioctl().

The Walking 1s subtest performs walking 1s to selected scmi2c reader registers; registers under test are saved and restored.

The sc2test initializes the card reader. The test power manages and resets the card. After reset, the test makes multiple attempts to read the ATRs from the inserted card to verify against a list of recognized ATRs. The cards supported are the Cyberflex and Payflex cards are supported.

Based on the result of the ATR, the Application Protocol Data Unit (APDU) Unique-ID subtest exchanges selected ISO 7816 APDUs between the card and the reader to retreive the card's unique ID.

caution icon

Caution - The sc2testcannot run when the ocfservsmart card server application is running, because the ocfservhas exclusive open on /dev/scmi2c0. The sc2testdetects the ocfservprocess running and prompts you to kill ocfserv. Also, the sc2testcannot run if any other third-party smart card host application has exclusive open on /dev/scmi2c0device.

caution icon

Caution - The file /opt/SUNWvts/bin/sc2test.atrconsists of an ATR list for the supported Cyberflex or Payflex cards. You can use an editing program to update the file to include the new ATR.

sc2test Options

To reach the following dialog box, 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 50-1 sc2test Test Parameter Options Dialog Box

Screenshot of the sc2test Test Parameter Options dialog box

TABLE 50-1 sc2test Options



Register Test

Enables or disables the Register subtests. The default is Enable.

AnswerToReset Test

Enables or disables the AnswerToReset subtest. The default is Disable.


Enables or disables the APDU subtest. The default is Disable.

sc2test Test Modes

TABLE 50-2 sc2test Supported Test Modes

Test Mode



Performs the Register read and Walking 1s subtests.


Performs the Register subtests, the AnswerToReset subtest, and the APDU unique-ID subtest.

sc2test Command-Line Syntax

/opt/SUNWvts/bin/sc2test standard-arguments -o [
[ dev=device-name ]
[ regs=
Enable|disable ]
[ atr=
Enable|disable ]
[ apdu=
Enable|disable ] ]

TABLE 50-3 sc2test Command-Line Syntax




device-name is the logical device name to be tested, for example, dev=scmi2c0.


Enables or disables the Register tests. The default is Enable.


Enables or disables the ATR test. The default is Disable.


Enables or disables the APDU unique-id test. The default is Disable.