SCAM Documentation

Tim TimeWaster <tim@cuba.xs4all.nl>

SCAM Commands

Every command has to be sent on a single line, except for the send command, which may contain newlines.

For some of the arguments or parameters values you can use quoted strings such as "/dev/cua1", but not always. This is specified in the appropriate command description. The following commands are always available, independent of the reader that is selected. For the reader specific commands, see the page for that specific reader or try the help command.

The general commands are, in alphabetical order:

dump

Usage:

dump

This command will output any data sent by the smart card that is still left in the buffer.

flush

Usage:

flush

This command will get rid of any data sent by the smart card that is still left in the buffer.

help

Usage:

help [ topic ]

where topic is a help topic. To see the available help topics, omit topic.

reader

Usage:

reader type
reader type ( )
reader type ( name=val { , name=val } )

This command sets the current reader to a type kind of reader. It is possible to specify reader parameters in a comma-separated list between the parentheses, name is the parameter name and val is the parameter value, which can be a quoted string.

Available readers are:

Physical Readers

These readers can be used for the so-called "software readers". Software readers are implementations of a protocol or application that can be used with different "real" readers. Here is a list of readers that can be used with the reader option of software readers:
dumbmouse
This is the driver for a Dumb Mouse.

Other readers

These readers are software readers, or readers that cannot be used in general for every software reader (e.g. because they already implement an ISO 7816-3 protocol).
none
Use this to specify no reader. This is the initial reader.
t1
This is the reader for the software implementation of the T=1 protocol. This implementation can be used with any smart card reader not implementing an ISO 7816-3 protocol, as far as a driver for that reader is implemented.

reset

Usage:

reset

This command will reset the smart card and display the card's ATR.

send

Usage:

send data .

This command sends data to the smart card. If the reader that is selected (with the reader command) already implements a certain protocol, either in hardware or in software, then data should only contain the data that will be wrapped into the protocol.

data normally consists of hexadecimal numbers separated by spaces or newlines. If a quote (") is encountered, all text following the quote will be taken as an ASCII representation of the bytes, until the next quote is encountered. This last quote has to be on the same line as the first quote. It is possible to use the backslash (\) to escape a quote character or another backslash or to denote a metacharacter such as \n, \t, \a or \0, which have the same meaning as in the C programming language. The metacharacters are \0, \a, \b, \f, \n, \r, \t and \v.

settings

Usage:

settings

This command returns the reader parameter settings for the currently selected reader. The first line will contain a description of the parameters and its readers, e.g. "T=1 settings" and the next lines will contain one parameter setting per line, in the form name = value.