Erase binary apdu – MagTek IntelliStripe65 99875161 User Manual
Page 112

IntelliStripe 65 Command Reference
106
Response APDU:
SW1
SW2
Possible SW1/SW2 combinations:
SW1/SW2
Meaning
9000
Normal completion, no errors
6300
No bits to write, couldn’t erase
6700
Lc gives incorrect length
6B00
P2 is incorrect
Erase Binary APDU
The Erase Binary command is used to erase specific bytes in the card. For this type of card
erased means that each bit = 1.
If the bytes specified by Adr and Cnt is in the range specified by the Counter Lowest Address
and the Counter Highest Address properties, the command will not be processed. Warning: the
GAM375 address can “wrap” around. If you specify Adr = 0x28 and Cnt = 0x28 you will
wrap around to the start of the card and end up erasing the counter bytes! There are many
possible combinations of Adr and Cnt that could result in a wrap around erasing the counter
bytes, so be careful.
This command erases each byte starting at the specified address for as many bytes as specified
by Cnt.
Command APDU:
CLA
INS
P1
P2
Lc
Data
D0
0E
Cnt
Adr
00
CLA is always D0
INS is always 0A
P1 gives Cnt, which is the count of bytes to be erased
P2 gives Adr, which is the address where the erase will occur
Lc must be 00
Data is empty
Response APDU:
SW1
SW2
Possible SW1/SW2 combinations:
SW1/SW2
Meaning
9000
Normal completion, no errors
6300
No bits to write, couldn’t erase (P1/Cnt was zero)
6700
Lc gives incorrect length
6B00
P1 or P2 is incorrect