Page
42
of
70
Copyright © Access-IS 2016
7.6.3 Example
This command successfully creates a value field in block number 4 and initialises the value to
0x00000001. This command uses the loaded key and authenticates against Key A in the media.
Command:
[0x00][0x4A][0x04][0x00][0x00][0x00][0x01]
Response:
[0x00][0x4B][0x04][0x90][0x00]
7.7 MIFARE increment value block (key A or key B)
Use this command to authenticate the given MIFARE block against the MIFARE
media’s internal
Key A or B and then increase the value stored in the value block.
You must load the MIFARE key using
(on page 37) before sending this command.
The specified block number must also be a value block or the command will fail. To create a value
block, use the
MIFARE create value block (key A or key B)
command (on page 41).
Note:
This command is NOT applicable to MIFARE Ultralight cards and fails if executed on
Ultralight cards. Ultralight cards do not support value blocks.
7.7.1 MIFARE command bytes
MIFARE command bytes
Command header
Command code
Block number
Initial value
[0x00]
[0x0C]
Increment value block (Key A)
Block number
32-bit increment
value (MSB first)
[0x1C]
Increment value block (Key B)
[0x4C]
Authenticate and increment value block (Key A)
[0x5C]
Authenticate and increment value block (Key B)
[0x8C]
or
[0xCC]
RF select, authenticate and increment value
block (Key A)
[0x9C]
or
[0xDC]
RF select, authenticate and increment value
block (Key B)
7.7.2
MIFARE response bytes
MIFARE response bytes
Response header
Response code
Block number
Status bytes
[0x00]
Any one of the following values
(Command code + 1)
[0x0D]
or
[0x1D]
[0x4D]
or
[0x5D]
[0x8D]
or
[0xCD]
[0x9D]
or
[0xDD]
Block number
[0x90][0x00]
Success
Failure
Refer to page 48 for information on MIFARE failure status codes.