Appendix a. example host application – MagTek IntelliStripe65 99875161 User Manual

Page 87

Advertising
background image

81

APPENDIX A. EXAMPLE HOST APPLICATION


The following is an example of a very simple host application that uses the IntelliStripe 65
command set to read a magnetic stripe and communicate to a smart card. This example would
not be used as a real application because it has no error handling. It is only intended to be used
as a demonstration of how the command set can be used to build an application.

Perform the following steps:

1.

Initialize the device by setting MSR Direction transport property to Withdrawal and
setting MSR Arm State transport property to Armed to Read Multiple Times.


2.

Wait for a card to be inserted completely into the reader. Check Card Seated indicator
inside a loop until it is set. The Card Seated indicator is obtained by issuing the Get
Indicators transport property.


3.

Issue the Card Latch transport command to latch the card.


4.

Perform any required smart card communications.


5.

Issue the Card Unlatch transport command to unlatch the card.


6.

Wait for the card to be completely removed from the reader. Check Present indicator
inside a loop until it is clear. The Card Present indicator is obtained by issuing the Get
Indicators transport property.


7.

Issue the Get Track 123 Decode Data magnetic stripe command to get the magnetic stripe
data.


8.

Go to step 2 to read another card.

Advertising