Read binary apdu, Write binary apdu – MagTek IntelliStripe 320 99875168 User Manual
Page 118

IntelliStripe 320 Command Reference
112
Read Binary APDU
Command APDU:
CLA INS P1 P2 Le
00 B0 xx Adr
Len
CLA is always 00
INS is always B0
P1 is ignored
P2 is the address where the read will start
Le is the number of bytes to read, 0 will read 256 bytes
The entire card can be read with one command. Bits that are “unreadable” will be
returned with the electrical value the card imposes on the I/O line at the time of read
sampling.
Response APDU:
Data Field (from card)
SW1
SW2
Possible SW1/SW2 combinations:
SW1/SW2 Meaning
9000
Normal completion, no errors
Write Binary APDU
The Write Binary command performs a logical AND of the bits already present in the card with
the bits given in the command APDU. For each bit that is 0 in the command APDU, if the
corresponding bit on the card is 1, it will be written to 0. Bits in the command APDU that are set
to 1 will be ignored, the state of the corresponding bit on the card will not be checked. Even
though each specified bit will be written, the result of the operation is NOT verified and no errors
are reported. The user may desire to Read the data to assure all intended bits have been written.
If there is a need to set a bit on the card to the value of 1, it must be done using the Erase Counter
command. These commands may cause erasure of more than one bit on the card, so be careful!
Command APDU:
CLA INS P1 P2 Lc Data
Field
00
D0
xx
Adr
Len
Data to be written
CLA is always 00
INS is always D0
P1 is ignored