13.56MHz MIFARE Reader Module

Increment

Command    
CMD DATA  
‘+’ Block (1 byte) Value (4 bytes) 00…3F 32 Bit value

Binary Frame: Increment Block 04h, value 01010102 02 01 06 2B 04 01 01 01 02 2B 03

Answer  
ANS DATA
None new Value (4 bytes)
‘X’: unable to read after increment none
‘N’: no TAG none
‘I’: no value block none
‘F’: increment failure none

increments a value block by adding a value to the value stored. A read after write is performed automatically. Call fails, if source block is not in value format.

Incrementing values Requires a select and login before.

No value block ‘I’ specified block does not match the value format

Value block is corrupted, you may use a backup block for recovery (controlled by the application).

Unable to read after increment ‘X’ TAG was removed from field immediately after the increment instruction.

Data was incremented but the TAG did not response to the read after increment instruction (which is done automatically by the reader module).

No tag error ‘N’

This means that the tag does not respond, because there is either no tag present or none of the tags in the field is not authenticated (‘l’ instruction).

Examples:

+0400000001 adds 1 to value block 4
+0500000100 adds 256 to value block 5

 Decrement

Command    
CMD DATA  
‘-’ Block (1 byte) 00…3F
  Value (4 bytes) 32 Bit value

Binary Frame Decrement Block 04h, value 01010102 02 01 06 2D 04 01 01 01 02 2D 03

Answer  
ANS DATA
none new Value (4 bytes)
‘X’: unable to read after decrement none
‘N’: no TAG none
‘I’: no value block none
‘F’: decrement failure none
‘E’: decrement failure, empty none

⇒ decrements a value block by subtracting a value to the value stored. A read after write is performed automatically. Call fails, if source block is not in value format.

Decrementing values: Requires a select and login before.

No tag error ‘N’, no value block ‘I’: Same as Increment.

Unable to read after decrement ‘X’: TAG was removed from field immediately after the decrement instruction.

Data was decremented but the TAG did not response to the read after decrement instruction (which is done automatically by the reader module).

Decrement failure ‘E’: The error return ‘E’ denotes, that the value block does not contain sufficient value to decrement. Some cardtypes will return ‘F’ instead. On a 2s complement representation the smallest value is 80000000h, not 00000000h!.

Examples:
-040000044B subtract 1099 (=0000044Bh) from value block 4
-0500000100 subtract 256 from value block 5

 

Copy

Command  
CMD DATA
‘=’ source block (1 byte) target block (1 byte)

Binary Frame: Copy value Block 4 to block 5 02 01 03 3D 04 05 3E 03

Answer  
ANS DATA
none new Value of target block (4 bytes)
‘X’: unable to read after copy none
‘N’: no TAG none
‘I’: no value block none
‘F’: copy failure none

⇒ copies a value block to another block of the same sector. A read after write is performed

automatically. Used for backup and error recovery.

Copy blocks Requires a select and login before.

Target block

The target block need not to be a valid value block. Call fails, if source block is not in value format.

Access conditions This command requires the same access conditions than the decrement instruction.

Unable to read after copy ‘X’, no tag error ‘N’ Same as Increment decrement.

No tag error ‘N’no value block ‘I’

Same as increment/decrement, but only source block has to be a value block, target block is overwritten.

Examples:

=0405 copy value block 4 to block 5
=0506 copy value block 5 to block 6