Erase counter apdu – MagTek IntelliStripe 320 99875168 User Manual

Page 119

Advertising
background image

Appendix B. Memory Card Support

113

P2 is the address where the write will start

Lc is the number of bytes to write.

Data Field contains the bytes to write.


Response APDU:


SW1 SW2

Possible SW1/SW2 combinations:


SW1/SW2 Meaning
9000

Normal completion, no errors

Erase Counter APDU

The Erase Counter command is used to erase counter bytes of the card. For this type of card
erased means that each bit = 1.

If the specified address is not in the range specified by the Counter Lowest Address and the
Counter Highest Address properties, the command will not be processed.

This command writes one bit of the addressed byte from 1 to 0 (if there are any 1 bits available)
under control of the Erasure Mask. If a bit was actually written to 0 in the first step, the byte at
the next address on the card is erased.

The Erasure Mask is formulated to indicate one or more bits that can be written to zero to initiate
the erasure. Erasure will only be initiated if at least one zero bit in the Erasure Mask corresponds
to a one bit on the card. The first correspondence will initiate erasure and subsequent
correspondences will be written to zero until the entire Erasure Mask is processed.

The GAM326-BitOrder property dictates the order of bit processing.

If there is a need to erase multiple bytes of the Counter, multiple Erase Counter commands must
be sent in the proper order. Determining the order is the user’s responsibility.

Command APDU:


CLA INS P1 P2

Lc Data

D0 0A xx Adr

01

Erasure

Mask

CLA is always D0

INS is always 0A

P1 is ignored
P2 is the address where the erase will occur

Lc must be 01
Data contains one byte giving the Erasure Mask.

Advertising