User Guide
MagTek Device Drivers for Windows   
 108
read 
Function 
Read data from the device. 
Syntax 
/read [[x] y] 
The optional argument x specifies the data source; if x is missing, a card will be 
read. Refer to the Read Argument table below for a description data sources. 
The optional argument y is used to specify a message to be displayed on the 
LCD screen, if supported, before carrying out the command. If y is omitted 
and the device supports a display, the text in the msg1 property is shown. In 
order to use y, the x argument must be present. See the 
display command 
for the description of the message format for y.
Errors 
/read -00045<LF>
If a command is already pending or the enc_key is not defined for read pin. 
/read -00082<LF>
If the command was canceled by the application (82) or by the user (83) (e.g., 
with CLEAR key). 
Remarks 
The response to this command has the following format: /read status data 
The status field is a 6-character string aligned to the right in the arg1 field. It is 
formatted as follows: TX
1
X
2
X
3
SS 
T defines the type of data that was read: 
C = a check was read 
M = a magnetic card was read 
P = a PIN was read 
K = a key press or string was read 
- = indeterminate: no data was received from the device. Returned on errors 
not specific to the data type, such as command canceled (SS=82). 
X
i
 define a media-specific status. For checks, this is the decimal representation of 
the check read status, as defined in the MICR specification. For magnetic cards, 
XXX indicates the read status for each of the three magnetic tracks (see 
card in 
the Read Arguments table below for a description of the status). For PIN data 
this status is always 000; for keypress and string data, XXX is the data length in 
characters. 
SS is a two-digit status code. 00 indicates a good read (but some tracks may be 
bad); any other status code indicates an error. These error codes indicate an error 
in the communication between the driver and the device or driver’s internal 
errors. Read errors are reported in the X
i
 fields and do not cause the SS field to 
be set to a non-zero value. See Appendix C. Status Codes. 
The data format is described in the 
write command below. 
Example 
To request an amount to be entered by the customer on the IntelliPIN: 
Command 
/set entry_len 6<LF>
/read key_string Enter the amount<LF>
 Response 
/read K00300 123<LF>
Example 
To read a card (from any device): 
 Command 
/read card<LF>
 Response 
/read M10900 ;12345?<LF>
track 1 error, track 2 good, track 3 blank 










