Read binary apdu, Write binary apdu – MagTek IntelliStripe65 99875161 User Manual

Page 98

Advertising
background image

IntelliStripe 65 Command Reference


92


Read Binary APDU

Command APDU:

CLA

INS

P1

P2

Le

D0/D1

B0

Xx

Adr

Len

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

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


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. If there is
a need to set a bit on the card to the value of 1, it must be done using the Erase Binary command
or the Verify command. These commands will cause erasure of more than one bit on the card, so
be careful!

Command APDU:

CLA

INS

P1

P2

Lc

Data Field

D0/D1

D0

See
below

Adr

Len

Data to be written

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

INS is always D0

P1 specifies RST and allows bit addressing within the specified starting byte. The bits
shown with x are ignored.

Bit 7

Bit 6

Bit 5

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

RST

x

x

x

x

Bit address

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

Advertising