Section 4. properties and commands, Sending commands, Xon/xoff – MagTek SWIPE READERS WITH RS-232 User Manual

Page 15

Advertising
background image

9

SECTION 4. PROPERTIES AND COMMANDS


A full set of properties and commands have been incorporated into the RS-232 IntelliHead Port
Powered Swipe Reader starting with Rev B firmware. This section describes the function and
operation of each of these properties, and shows how to implement the commands.

SENDING COMMANDS

The Reader will operate from 2400 to 115,200 bps but each command sent to the Reader must
match the communication parameters of the Reader. The default communication parameters are
9600 bps with 8 bits, no parity and 1 stop bit (8N1). If the Reader fails to respond after a
command has been transmitted, the application should modify the transmission parameters until
a response is received.

Commands, as described below, must be preceded by an Escape (<ESC> – 0x1B) character and
be terminated by a Carriage Return (<CR> – 0x0D). All commands are case sensitive—that is,
they must all use upper case characters.

After a valid command has been received, the Reader will respond with an Acknowledge
(<ACK> – 0x06) within one character time. If a message is started but not completed within 2
seconds, a No-acknowledge (<NAK> – 0x15) will be transmitted; also, if the baud rate or other
communication settings are incorrect, the Reader will transmit a NAK using its current
communication parameters. An unrecognized command will also return a NAK.

XON/XOFF

The Reader can be placed into a “silent” mode so that it will not transmit or receive anything
until requested to do so. This may be useful with interrupt-driven applications where the Reader
should be disabled. The default for the Reader after a reset is XON. In the XON state, the Reader
will transmit card data immediately after a card swipe.

Once XOFF has been received, after completing any transmission that may be in progress, the
Reader will respond with an ACK and will capture the next card swipe into its buffer, any
subsequent swipes will now be ignored.

When XON is received, the Reader will transmit any captured data from its buffer. Note that it is
possible that the captured data may have one or more card data tracks containing errors. When in
XOFF state, any command will be ignored except for XON.

Advertising