Update binary apdu, Verify apdu (programmable security code) – MagTek IntelliStripe65 99875161 User Manual
Page 91

Appendix B. Memory Card Support
85
Update Binary APDU
Command APDU:
CLA
INS
P1
P2
Lc
Data Field
00
D6
Adr1
Adr0
Len
Data to be written
CLA is always 00
INS is always D6
P1 is upper byte of address as follows:
80 updates Main Memory (Short File ID 0)
81 updates Security Memory (Short File ID 1) (SLE 4442 only)
84 updates Protection Memory (Short File ID 4)
P2 is lower byte of address, address within the requested Memory
Lc is the number of bytes to write, 0-256, 0 indicates 256 bytes
Data Field contains the bytes to write. If the Memory being written is the Protection
Memory, only bytes that are different from the values currently on the card are written,
then protected. If a byte to be written is already protected, 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 bytes were not written
6A82
File Not Found (P1 is invalid)
6B00
Offset outside of the Memory (Combination of P2 and Lc is invalid)
Verify APDU (Programmable Security Code)
Command APDU:
CLA
INS
P1
P2
Lc
Data Field
00
20
00
00
Len
Data to be verified
CLA is always 00
INS is always 20
P1 is 00
P2 is 00
Lc is the number of bytes for verification:
If the value is 00, the status 63Cx will be returned where x indicates the number of
further retries allowed. This mode does not
If the value is the one less than the value of Property A1, the PSC contained in the Data
Field will be presented for verification.
use up an attempt!
Response APDU:
SW1
SW2