; ---------------------------------------------------------------
; Demo script for MIFARE 1K card
; (c) 2015, Advanced Card Systems Ltd.
;
; Supported Reader/s:
;	ACR123U (PID: 222E)
;	ACR123U (PID: 2237) 
; ---------------------------------------------------------------

; [1] Load (Mifare Default) key in reader (key location 00)
FF 82 00 20 06 FF FF FF FF FF FF
90 00

; [2] Authenticate sector 0, Block 0 with key at location 0
FF 86 00 00 05 01 00 00 60 20
90 00

; [3] Read the full 16 bytes from Sector 0, Block 1
FF B0 00 01 10
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 90 00

; [4] Update the 16 bytes in Sector 0, block 1
FF D6 00 01 10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
90 00

; [5] Read the full 16 bytes from Sector 0, Block 1 again
FF B0 00 01 10
xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx 90 00

; [6] Authenticate sector 1, Block 5 with key at location 0
FF 86 00 00 05 01 00 05 60 20
90 00

; [7] Store a value "1" into block 5
FF D7 00 05 05 00 00 00 00 01
90 00

; [8] Read the value block 5
FF B1 00 05 04
xx xx xx xx 90 00

; [9] Copy the value from value block 5 to value block 6 
FF D7 00 05 02 03 06
90 00

; [10] Read the value block 6
FF B1 00 06 04
xx xx xx xx 90 00

; [11] Increment the value block 5 by "5"
FF D7 00 05 05 01 00 00 00 05
90 00

; [12] Read the value block 5
FF B1 00 05 04
xx xx xx xx 90 00
