SPRINGCARD SAS PRNHSP01 用户手册
PMD2271-BA
page 37 of 118
S
PRING
C
ARD
PC/SC C
OUPLERS
- H663
GROUP
- Developer's reference manual
3.3.3.
MIFARE CLASSIC VALUE instruction
The MIFARE CLASSIC VALUE instruction makes it possible to invoke the DECREMENT, INCREMENT,
and RESTORE functions of a Mifare Classic PICC (e.g. Mifare 1K or Mifare 4K, or Mifare Plus in level
1), followed by a TRANSFER function.
1), followed by a TRANSFER function.
The DECREMENT, INCREMENT, RESTORE (and TRANSFER) functions could be performed only on the
blocks that have been formatted as VALUE block in the sector trailer (access condition bits). Do not
invoke this function on DATA blocks, and do not invoke this function if the currently activated PICC
invoke this function on DATA blocks, and do not invoke this function if the currently activated PICC
is not a Mifare Classic!
MIFARE CLASSIC VALUE opcode, operand, and transfer address
The P1 parameter in the MIFARE CLASSIC VALUE command APDU in the PICCs' operation code
The P1 parameter in the MIFARE CLASSIC VALUE command APDU in the PICCs' operation code
(opcode), as defined in Mifare Classic specification. Allowed values are:
h
C1 for INCREMENT
h
C0 for DECREMENT
h
C2 for RESTORE
All three operations requires an operand. The operand is a 4-byte signed integer.
INCREMENT operation: the operand must be > 0 (between
h
00000001 and
h
7FFFFFFF). The
operand is added to the current value of the source block, and the result is kept by the
PICC in a register,
PICC in a register,
DECREMENT operation: the operand must be > 0 (between
h
00000001 and
h
7FFFFFFF). The
operand is subtracted from the current value of the source block, and the result is kept by
the PICC in a register,
RESTORE operation: the operand must be 0 (
h
00000000). The PICC copies the current value
of the source block into a register.
After the INCREMENT, DECREMENT or RESTORE operation has been performed by the PICC, the
H663 invokes the TRANSFER operation: the value of the register is written into a target block.
If the destination block number is not the same as the source block number, the original
value remains unchanged in the source block (this is a sort of “backup” feature),
If the destination block number is the same as the source block number, or not destination
block number is defined, then the source block is overwritten with the new value.
a.
MIFARE CLASSIC VALUE using coupler’s keys
In this mode, the application doesn't specify anything. The H663 tries every keys he knows (both
permanent keys in E2PROM and temporary keys previously loaded in volatile memory) until one
permanent keys in E2PROM and temporary keys previously loaded in volatile memory) until one
succeeds.
SPRINGCARD, the SPRINGCARD logo, PRO ACTIVE and the PRO ACTIVE logo are registered trademarks of PRO ACTIVE SAS.
All other brand names, product names, or trademarks belong to their respective holders.
Information in this document is subject to change without notice. Reproduction without written permission of PRO ACTIVE is forbidden.