![EHUOYAN YHY521X User Manual Download Page 21](http://html1.mh-extra.com/html/ehuoyan/yhy521x/yhy521x_user-manual_2368776021.webp)
EHUOYAN
YHY521X
Manual
Page 21 of 36
Table 62. Example
Send
AA BB 0A 21
00 08
FF FF FF FF FF FF
23
Description
AA BB
0A
21
00
08
FF FF FF FF FF FF
23
Head
Length
COMMAND
Authenticate with Key A
Read Block 08(Sector 02,1
st
block )
Keys
BCC
Receive(Success)
AA BB 12 21
00 11 22 33 44 55 66 77 88 99 AA
00
BB CC DD EE
FF
23 (*)
Description
AA BB
12
21
00 .. FF
23
Head
Length
Status
16 Bytes Data of Block 08
BCC
Receive(Failure)
AA BB 02 DE DC
Description
AA BB
02
DE
DC
Head
Length
Error
BCC
*If receive one block data include ‘AA’,then the ‘00’ will be added behind ‘AA’, but the length does
not add 1.
14.2.19
Block_Write
This command writes 16 bytes data to the appointed card’s block.
Table 63. Command--:Host
Æ
YHY521X
Send
Header
Length
Command
Data
XOR Checksum
0xAA
0xBB
0x1A
0x22
Block Info:
24 bytes
BCC
Block Info: Key type +Block Key + BData
Key type: 1 byte, 0x00—Key A, 0x01—Key B.
Block number: 1 byte, 0x01..0xff (1..255)
Key: 6 bytes, default “FFFFFFFFFFFF” (*)
BData: 16 bytes data to be write into card
(*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes.
Table 64. Response--: YHY521X
Æ
Host
Receive
Head
Length
Status
Data
XOR Checksum
Success 0xAA
0xBB 0x02 0x22
0x20
Failure 0xAA
0xBB 0x02
0xDD
0xDF
Table 65. Example
Send
AA BB 1A 22
00 08
FF FF FF FF FF FF
00 11 22 33 44 55 66 77
88 99 AA
00
BB CC DD EE FF
30
(*)
Description
AA BB
Head