; ---------------------------------------------------------------
; Demo script for MIFARE 1K card
; (c) 2014, Advanced Card Systems Ltd.
;
; Supported Reader/s:
;	ACR122U (PID: 2200)
;	ACR1251U-A1 (PID: 221A)
;	ACR1251U-A2 (PID: 2229) 
;	ACR1251U-C (SAM) (PID: 2218)
;	ACR1251U-C (PID: 221B)
;	ACR1251UK (PID: 2232)
;	ACR1251U-C3 (PID: 2242)
;	ACR1252U-A1 (PID: 223B)
;	ACR1252U-A2 (PID: 223E)
; ---------------------------------------------------------------

; [1] Load (Mifare Default) key in reader (key location 0)
FF 82 00 00 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 00
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 00
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
