Datasheet

There are different ways to manipulate data in the sector trailer by using these modes:
Set key and Access Bits (SKA)
Set Keys Only (SKO)
Direct over write-data command (only advanced user! Included for upward
compatibility to new MiFare Standards, e.g. MiFare+)
5.3.1. Set key and Access bits (SKA)
Use this mode to set both the access keys and the access bits of a specific sector. To change
this information, both the access bits and keys have to be writable and the sector
authenticated with the correct key. The access bits will be automatically written to the
correct bits of the trailer of the given block no.
The meaning of the access bits given by the parameters C1, C2 and C3 depend on the
given block no. parameter.:
o If the block no. is a sector trailer block the access bits C1, C2, C3 are
interpreted as bits for access mode.
o If the block no. is not the sector trailer but a data block the access bits C1,
C2, C3 are interpreted as bits for block mode.
After using this command a re-authentication will be necessary
Instruction:
STM<SPACE>SKA<SPACE>[Block No]<SPACE>[C1]<SPACE>[C2]<SPACE>
[C3]<SPACE>[KeyA]<SPACE>[KeyB]<CR>
Parameter Description
Block No. The data block to modify, in decimal notation
C1, C2, C3 BCD-Coded Mode, 0 or 1
KeyA MiFare authentication key A; 6 Bytes hexadecimal coded ASCII-string (16
chars)
KeyB MiFare authentication key B; 6 Bytes hexadecimal coded ASCII-string (16
chars)
Table 9: SKA mode parameter description
Response, if successful:
OK!<CR>
metraTec MiFare Protocol Guide Page 25 of 38