Datasheet
Block 13 (sector 3) is authenticated and all blocks of this sector should be returned
GAB<SPACE>ALL<CR>
Response:
0 1 0<CR> (Block 12 in Block Mode 2)
0 0 1<CR> (Block 13 in Block Mode 4)
0 1 1<CR> (Block 14 in Block Mode 5)
1 1 0<CR> (Block 15 in Access-Mode 3)
Block 145 (sector 33) is authenticated and all blocks of this sector should be read
GAB<SPACE>ALL<CR>
Response:
0 1 0<CR> (Block 144-148 in Block Mode 2)
0 0 1<CR> (Block 149-153 in Block Mode 4)
0 1 1<CR> (Block 154-159 in Block Mode 5)
1 1 0<CR> (Block 160 in Access-Mode 3)
Possible error codes:
UPA<CR> Unknown parameter
NMA<CR> No MiFare 1k or 4k chip authenticated
BAE<CR> An unauthenticated block is chosen
BNA<CR> Block not authenticated, Block No. is not in authenticated sector
TNR<CR> Tag not responding (Tag is no longer in read range)
EDX<CR> A decimal parameter cannot be interpreted as a decimal value
5.3. Sector Trailer Manipulation (STM)
This function simplifies the usage of the MiFare classic access conditions and key writing.
With this command you can change the access bits and don't have to write to the trailer
blocks directly which should reduce errors resulting in destroyed transponders. As described
in the Appendix, the sector trailer contains information about keys, block-mode and
Access-Modes. Use this command to set these access bits and/or keys.
metraTec MiFare Protocol Guide Page 24 of 38