Value block operation (inc, dec, store) – ACS ACR1283L User Manual

Page 26

Advertising
background image

ACR1283L – Reference Manual

[email protected]

Version 1.00

www.acs.com.hk

Page 26 of 55

Maximum 48 bytes for Mifare 1K (Multiple Blocks Mode; 3 consecutive blocks)

Maximum 240 bytes for Mifare 4K (Multiple Blocks Mode; 15 consecutive blocks)

Example 1: 0x10h (16 bytes). The starting block only. (Single Block Mode)
Example 2: 0x30h (48 bytes). From the starting block to starting block+2. (Multiple Blocks Mode)

Note: For safety reason, the Multiple Block Mode is used for accessing Data Blocks only. The

Trailer Block is not supposed to be accessed in Multiple Blocks Mode. Please use Single Block

Mode to access the Trailer Block.

Block Data (Multiply of 16 + 2 Bytes, or 6 bytes):

The data to be written into the binary

block/blocks.


Update Binary Block Response Codes (2 Bytes)

Results

SW1 SW2

Meaning

Success

90 00h

The operation is completed successfully.

Error

63 00h

The operation is failed.


Examples:
// Update the binary block

0x04h

of Mifare 1K/4K with Data {00 01 .. 0Fh}

APDU = {FF D6 00

04

10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0Fh}


// Update the binary block

0x04h

of Mifare Ultralight with Data {00 01 02 03h}

APDU = {FF D6 00

04

04 00 01 02 03h}

5.3.2.2.5. Value Block Operation (INC, DEC, STORE)

This command is used for manipulating value-based transactions (e.g., increment a value of the value

block etc.).

Value Block Operation APDU Format (10 Bytes)

Command

Class

INS

P1

P2

Lc

Data In

Value Block

Operation

FFh

D7h

00h

Block

Number

05h VB_OP

VB_Value (4 Bytes)

{MSB .. LSB}

Where:

Block Number (1 Byte): The value block to be manipulated.
VB_OP (1 Byte):

0x00h = Stores the VB_Value into the block. The block will then be

converted to a value block.
0x01h = Increments the value of the value block by the VB_Value.

This command is only valid for value block.
0x02h = Decrements the value of the value block by the VB_Value.

This command is only valid for value block.

VB_Value (4 Bytes):

The value used for value manipulation. The value is a signed long

Advertising