Erase binary apdu – MagTek IntelliStripe 320 99875168 User Manual

Page 111

Advertising
background image

Appendix B. Memory Card Support

105

The bit address is added to the byte address to form the address of the first bit to
be affected by the command. For every count over zero, the card internal address
in incremented one. This allows effective addressing of a specific bit and may be
useful for blowing fuses in some cards.


P2 is the address where the write will start

Lc is the number of bytes to write.

Data Field contains the bytes to write. If a bit to be written cannot be changed, a status

6581 will be returned.

Response APDU:


SW1 SW2

Possible SW1/SW2 combinations:


SW1/SW2 Meaning
9000

Normal completion, no errors

6581

Memory Failure, some bits were not written

Erase Binary APDU

The Erase Binary command is used to erase parts of the card. For this type of card erased means
that each bit = 1. Cards of this type are organized as 16 bit “frames”. Typically, if an erase
operation is performed on any bit in the frame, all bits in the frame are erased. In order to erase
successfully, security conditions may have to be met.

This command provides one of two methods for erasing data on the card. The other method is
with the Verify command. When it is used to “verify” the erase password of one of the
application zones, it causes that application zone to be erased (if security requirements have been
satisfied).

Command APDU:


CLA INS P1 P2

Lc

D0/D1 0E

RST Adr 0

CLA is always D0 or D1 (the lowest bit specifies the state of C4)

INS is always 0E

P1 specifies RST, all other bits are ignored

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

RST

x x x x x x x

P2 is the address where the erase will occur

Lc should be zero, but is ignored (0 is used) if it is not.

Advertising