Mif.ChangeValue

This command uses the value block specified by the Block parameter and performs an operation given by the Mode parameter. The result is stored in the card's Transfer Buffer.

Mode = 1 increments the value, Mode = 0 decrements the value, Mode = 0x02 simply transfers the value to the Transfer Buffer - the Value parameter is ignored.

In order to persistently store the calculated value on the card, a transfer operation, using the Mif.TransferBlock command, has to be performed directly after the completion of this command.

This command can be used for MIFARE Classic cards and only works on value sectors.

Properties

Parameters (request frame)

Name Type/Size Description
Mode Integer (8 bits) Access mode. Possible values, 0x00: decrement, 0x01: increment, 0x02: restore/load.
Block Integer (8 bits) Sector to load data from (only value sectors are supported).
Value Integer (32 bits) Value to add/subtract. This parameter is ignored when Mode = 0x02.

Returned values (response frame)

None