EHUOYAN YHY522R User manual

YHY522R
RFID
module
RFID/NFC Reader/Writer Module
User manual
Version 1.0
Dec, 2018
RFID
SMARTRFIDMODULE

EHUOYAN YHY522R
RFID module
Page 2 of 36
CONTENT
1.Introduction......................................................................................................................................4
2.Gengral description..........................................................................................................................4
3.Features.............................................................................................................................................4
4.Application information ..................................................................................................................5
5.Quick reference data........................................................................................................................5
6.Ordering information ......................................................................................................................6
7.Block diagram...................................................................................................................................6
8.Pinning information.........................................................................................................................7
8.1.Pining...........................................................................................................................…….7
8.2.Pin description............................................................................................................…….7
9.Functional description.....................................................................................................................7
10.Digital interface..............................................................................................................................8
10.2.RS232 interface.........................................................................................................…….8
10.3.Selection of the transfer speeds...............................................................................…….8
10.4.Transfer protocol .....................................................................................................…….9
10.4.1.Host to YHY522R transfer protocol.........................................................…….9
10.4.2. YHY522R to Host transfer protocol......................................................…….10
12.Power reduction mode.................................................................................................................10
12.1.Hard power-down ..................................................................................................…….11
12.2.Transmitter soft power-down ...............................................................................…….11
13.Reset...............................................................................................................................................11
14.YHY522R Command set ..........................................................................................................12
14.1.Commands overview..............................................................................................…….12
14.2.Commands and response.......................................................................................…….12
14.2.1.Detect_Clone................................................................................................…….13
14.2.2.MSleep..........................................................................................................…….13
14.2.3.MConfigure..................................................................................................…….14
14.2.4.Download_Keys...........................................................................................…….17
14.2.7.Antenna_Control.........................................................................................…….17
14.2.8.Sense_mode..................................................................................................…….18
14.2.13.Change_Card_Keys ..................................................................................…….19
14.2.15.Card_Sleep.................................................................................................…….20
14.2.16.Card_Type .................................................................................................…….21
14.2.17.Card_ID......................................................................................................…….21
14.2.18.Block_Read................................................................................................…….22
14.2.19.Block_Write...............................................................................................…….23
14.2.20.Value_Init...................................................................................................…….24
14.2.21.Value_Read................................................................................................…….25
14.2.22. Value_Inc..................................................................................................…….26
14.2.23. Value_Dec .................................................................................................…….26
14.2.24. Value_Backup...........................................................................................…….28
14.2.25.Sector_Read...............................................................................................…….29
14.2.26.Sector_Write..............................................................................................…….30
15.Electrial Characteristics..............................................................................................................34
15.1.Operating condition...............................................................................................…….34
15.2.Current consumption.............................................................................................…….34

EHUOYAN YHY522R
RFID module
Page 3 of 36
16.Package outline.............................................................................................................................35
17.Contact information.....................................................................................................................36

EHUOYAN YHY522R
RFID module
Page 4 of 36
1.Introduction
This document describes the functionality of the contactless reader/writer
YHY522R . It includes the functional and electrical specifications.
2. General description
The YHY522R is a highly integrated reader/writer for contactless
communication at 13.56MHz.The YHY522R reader supports ISO14443A/
MIFARE®mode.
The YHY522R has built-in transceiver antenna to communicate with
ISO/IEC 14443A/ MIFARE®cards without additional circuitry. The module
provides a robust and efficient implementation of a demodulation and
decoding circuitry for signals from ISO/IEC 14443A/ MIFARE®compatible
cards and transponders. The digital part handles the complete ISO/IEC
14443A framing and error detection(Parity & CRC).
In the master mode, YHY522R will seek the card or data itself and output to
host automatically.
In the slave mode, the module just needs only one command to finish one
action, such as read or write data from card’s block. The user does not need
input three steps : request, anticollision and selection. The module will do this
function for you automatically. What you need is just sending one command
to the module. Then it will send back what you want. Anything is just so
simple and so easy. Also, if there is any card goes into the rf field, the red led
on the module will light and the IRQ pin will change from “1” to “0” to indicate
the event.
Host interface : Serial RS232
3.Features
▲ Can detect UID clone card
▲ Small size and built-in antenna on board
▲Auto scan for presence of tags and upload data
▲NFC NDEF text commands
▲Encrypted EEPROM to store up to 40 groups of keys
▲Contactless operating frequency 13.56 MHz
▲ Supports ISO14443A ,Mifare®Classic1K,Mifare®UltraLight, NTAG213
▲ RS232 Interface, baud rate up to 230400bps,default 19200bps
▲ Typical Operating Distance: 0 ~5cm
▲ Operating Voltage :DC 5.0V
▲ 1 LED indicator,

EHUOYAN YHY522R
RFID module
Page 5 of 36
▲ Size: 58mm ×35mm ×7mm
▲Weight:12g
4.Applicationinformation
YHY522R can be use on vending machine, secure access, parking, payment,
ticketing, leisure, member ship, time & attendance, biometrics, IT-access, Identify,
loyalty, Counter, data storage and fast data collection systems.
Figure 1. YHY522R Applications
5. Quick reference data _____________________________
Table 1: Quick reference data
Symbol Parameter Conditions Min Typ Max Unit
VCC Supply voltage GND=0V 2.7 5.0 7.0 V
IHPD Hard Power-down Current - - 100 uA
IASD Antenna Soft-down VCC =5.0V 15 20 mA
IVCC Supply Current VCC =5.0V 53 75 mA
DRW Read/Write card Distance VCC =5.0V 0 60 mm
Tamb Operating ambient temperature -25 +85 ℃
6.OrderingInformation
Table 2: Ordering Information

EHUOYAN YHY522R
RFID module
Page 6 of 36
Type Number Package
Name Description
YHY522R YPHDR9-5
7. Block diagram _ _____________________________
Figure 2. Simplified YHY522R Block diagram
The Analog circuitry and MFRC522 handle the modulation and demodulation
RFID signal.
The MCU handles the protocol requirements for the communication schemes
including the RF base protocols as well as the protocols for host
communication.
8. Pinning information _____________________________
8.1 Pining

EHUOYAN YHY522R
RFID module
Page 7 of 36
Figure 3 – Pinning configuration
8.2 Pin description
Table 3: J1 Pin description
Pin Symbol Type Description
J1-1
J1-2
J1-3
J1-4
J1-5 RST I Reset, active-low, floating for power-on reset by default
J1-6 TXD O RS232 Transmitter
J1-7 RXD I RS232 Receiver
J1-8 VCC PWR Power supply
J1-9 GND PWR Power supply Ground
9. Functional description _____________________________
YHY522R supports the Reader/Writer mode for ISO/IEC 14443A/MIFARE card.

EHUOYAN YHY522R
RFID module
Page 8 of 36
Figure 4 – YHY522R Reader/Writer mode
10. Digital interface ________ _____________________
10.1 RS232 Interface
Figure 5 – YHY522R RS232 interface to host
10.3 Slection of the transfer speeds
The default transfer speed is 19.2 kbit/s.
To change the transfer speed, the host controller has to write a value for the
new transfer speed by the CONFIG command, after reset the module, the
new speed will active.
Table 5: Selectable transfer speeds
Transfer Speed [kbit/s] Configure Code
2.4 1
4.8 2
9.6 3
14.4 4
19.2 5
38.4 6
57.6 7
115.2 8
230.4 9
10.4 Transfer Protocol
YHY522
J1
RXD
TXD
HOST
TXD
RXD

EHUOYAN YHY522R
RFID module
Page 9 of 36
The original setting for the host and YHY522R communicates at 19200bps, N, 8, 1.
In the slave mode, the host first sends the command and the module executes the
operation and replies with a response to the command. The host can analyze the reply
to check if the operation was successful or if any error occurred during the operation.
10.4.1 Host to YHY522R Transfer Protocol
Table 5. UART frame send by host
1.
1. Header: This header has 2 bytes that indicates the beginning of a frame. These 2
bytes should be always 0xAA 0xBB.
2. Length: This byte is used to indicate the length of the payload data. This includes
the Length, Command and the Data bytes.
3. Command: This byte is used to instruct the module on what operation to perform.
4. Data: These are parameters for the module to execute the command. For example,
for a Read command, the data will be the block number to be read and the
authenticated key. For a Write command, this will be the block number and
the authenticated key and 16 bytes data to write into the block. For other
command, it maybe empty.
5. CSUM: This is the checksum byte. This byte is used on the host as well as the
module to check the validity of the packet and to trap any data
corruption. This is calculated by XOR all the bytes in the packet except
the Header and the CSUM byte.
CSUM=Length⊕Command⊕Data[0]⊕Data[1]…⊕Data[n-1]
Note: If there is one byte “0xAA” in the packet data from Length to CSUM,please
insert one byte “0x00” after “0xAA”,but the Length need not change.
Code example:
//--------------------------------------------------
if (cSendBuffer[i] == 0xAA)
{
TI = 0;
SBUF = 0;
while (!TI);
}
//--------------------------------------------------
10.4.2 YHY522R to Host Transfer Protocol
Table 6. UART frame send by YHY522R
1
.
Header Length Command Data CSUM
2 Byte 1 Byte 1 Byte N Bytes 1 Byte
Header Length Status Data CSUM
2 Byte 1 Byte 1 Byte N Bytes 1 Byte

EHUOYAN YHY522R
RFID module
Page 10 of 36
1. Header: This header has 2 bytes that indicates the beginning of a frame. These 2
bytes should be always 0xAA 0xBB.
2. Length: This byte is used to indicate the length of the payload data. This includes
the Length, Command and the Data bytes
3. Status: This is the status for which the response is being sent back. If ok then the
module return the command which host has sent, if failure it return the
ones-complement code. For example, the command is 0x19, then the
ones-complement code is 0xe6.
4. Data: This contains the result data if an operation was successful. It may be empty.
5. CSUM: This is the checksum byte. This byte is used on the host as well as the
module to check the validity of the packet and to trap any data
corruption. This is calculated by XOR all the bytes in the packet except
the Header and CSUM byte.
CSUM=Length⊕Command⊕Response[0]⊕Response[1]⊕…⊕Response[n-1]
AA BB 06 20 3D 98 62 01 E0
0x20: Auto scan UID.
3D 98 62 01: UID
12. Power Reduction mode ___ _____________________
12.1 Hard Power-down
A Hard Power-down is enabled with sending command 0x03 to the
YHY522R . This turns off all internal current sinks as well as the oscillator. All
digital input buffers are separated from the input pads and clamped internally.
The output pins are frozen at a certain value.
12.2 Transmitter Soft Power-down
The Transmitter Soft Power-down mode is entered immediately after send
command 0x11 to the YHY522R . The module will switch off the antenna
power, but the mcu is still working.
13. Reset ___ ___________________ _
The YHY522R is reset when a low level is present on the RST pin for
longer than the minimum pulse length. During Reset, all I/O pins are set to
their initial states, and the program starts execution from the Reset Vector.
Table 7: Reset Characteristics

EHUOYAN YHY522R
RFID module
Page 11 of 36
Notes: The Power-on Reset will not work unless the supply voltage has been
below VPOT (falling).
Figure 7– Reset timing
14. YHY522R Command Set ___ ____________________
14.1 Commands overview
The commands for the YHY522R include system commands and RFID
commands.
The system commands are use for controling the module settings and save
parameters to the EEPROM.
The RFID commands are use to operating the RFID card, such as read or
write block data.
Table 8: Command list

EHUOYAN YHY522R
RFID module
Page 12 of 36
14.2 Commands and Response
After power on or reset YHY522R , the RED led will flash one time, It means
that YHY522R is ready.
If a Mifare®tag detected by the module, pin IRQ will change from “1” to “0”
and the red led on board will light till the tag moves out of rf field.
The RED led will flash during data stream exchanging between host and
YHY522R .
14.2.1 Detect_Clone
This command will detect the UID clone card, if it is a clone card, it will
Code Command Description
SYSTEM COMMANDS
0x03 MSleep Module Sleep(Hard Power Down)
0x04 MConfigure Configure parameters to the module
0x05 Download_Keys Download auth keys to the module
0x11 Antenna_Control Control Antenna on or off
0x13 Sense_Mode Set Auto Sense Mode
RFID COMMANDS
0x06 Change_Card_Keys Change the Card’s Key
0x12 Card_Sleep Card Sleep(Halt)
0x19 Card_Type Read Card Type
0x20 Card_ID Read Card UID
S50 commands
0x0c Detect_Clone Detect a clone card
0x21 Block_Read Read Data From Card Block, 16 bytes
0x22 Block_Write Write Data Into Card Block, 16 bytes
0x23 Value_Init Initialize block data to Value format, 4 bytes
0x24 Value_Read Read Value, 4 bytes
0x25 Value_Inc Increase Value, 4 bytes, Low Byte First
0x26 Value_Dec Decrease Value, 4 bytes, Low Byte First
0x27 Value_Backup Backup Value to Another Block
0x2a Sector_Read Read One Sector
0x2b Sector_Write Write One Sector
NTAG213 commands
0x28 Pages_Read_UL Read out 4 pages of the UL data,
0x29 Page_Write_UL Write in 4 bytes data into 1 page to the UL chip
0x40 Ntag_Read_Text Read NFC text from NTAG chip
0x41 Ntag_Write_Text Write NFC text into NTAG chip

EHUOYAN YHY522R
RFID module
Page 13 of 36
reply success, else reply failure.
Table 9. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x02 0x0c BCC
Table 10. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x0C 0x0E
Failure 0xAA 0xBB 0x02 0XF3 0Xf1
Table 11 Example
Send AA BB 02 0C
0
E
Description
AA BB
02
0C
0E
Head
Length
COMMAND
BCC=02
⊕
0C
Receive(Success) AA BB 02 0C 0E
Description
AA BB
02
0C
0E
Head
Length
Status
BCC
Receive(Failure) AA BB 02 F3 FE
Description
AA BB
02
F3
F1
Head
Length
Error
BCC
14.2.2 MSleep
After executing this Command the YHY522R will power down, waking up
the module it needs to give the RST pin a low-level pulse or Re-power on
the module.
Table 12. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x02 0x03 0x01
Table 13. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x03 0x01
Failure 0xAA 0xBB 0x02 0xFC 0xFE
Table 14. Example
Send AA BB 02 03
0
1
Description
AA BB
02
03
01
Head
Length
COMMAND
BCC=02
⊕
03

EHUOYAN YHY522R
RFID module
Page 14 of 36
Receive(Success) AA BB 02 03 01
Description
AA BB
02
03
01
Head
Length
Status
BCC
Receive(Failure) AA BB 02 FC FE
Description
AA BB
02
FC
FE
Head
Length
Error
BCC
14.2.3 MConfigure
This command will configure parameters to the YHY522R . After Reset
YHY522R the configuration will active.
Table 15. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x12 0x04
Configure data:
16 bytes BCC
Configure data: 16 bytes.
Table 16. Configure data
D[0] D[1] D[2..7] D[8] D[9] D[10] D[11] D[12] D[13] D[14] D[15]
Auto
code Key
Type Key
String Block
R RFU RFU Start
Sector End
Sector Auth
Mode RFU Baud
Code
D[0]:Auto code -----
0—Auto function off ,the YHY522R will not auto seek card and the IRQ pin is not active.
1—Auto seek card, if there are cards in the RF field, the RED led will light and IRQ pin will
output low level.
2—Same 1, and it will read the card id and upload to host, and then halt the card.
3—Same 1, and it will read the selected block and upload to host, and then halt the card.
7-- Same 1, and it will read the start and end sector and upload to host, and then halt the
card.
8-- Same 1, and it will read the NTAG213 NDEF text and upload to host, and then halt the
card.
D[1]:Key Type -----
0x00 ---Key A
0x01 ---Key B
D[2..7]:Key string -----
Key(6 Bytes) to authenticate the mifare card
D[8]:Block R -----
Define one block of the card to be read.

EHUOYAN YHY522R
RFID module
Page 15 of 36
D[9]: RFU-default 0x00
D[10]:RFU-default 0x00
D[11]:Start sector to be scan
D[12]:End sector to be scan
D[13]:Auth mode -----
Define the auth mode----
0—Auth directly from host, default mode
1—The YHY522R will use the downloaded keys for authentication card
D[14]:RFU -----
Reserved For future Used. Default 0x60.
D[15]:Baud code -----
See table 5 for the baud rate code.
Table 17. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x04 0x06
Failure 0xAA 0xBB 0x02 0xFB 0xF9
Table 18. Example 1 ---Auto read card id, Auto code=0x02
Send AA BB 12 04
0
2
0
0
F
F FF FF FF FF FF 00
0
0
00 00 00 00
00
08
1C
Description
AA BB
12
04
02
00..00
08
1C
Head
Length
COMMAND
Auto code—auto read id
Any data
Baud code---115200bps
BCC
Receive(Success) AA BB 02 04 06
Description
AA BB
02
04
06
Head
Length
Status
BCC
Receive(Failure) AA BB 02 FB F9
Description
AA BB
02
FC
FE
Head
Length
Error
BCC
If success then reset the YHY522R to active this function. The reader will read the card id
itself when there is a card into the RF field and then output the id to host, at the same time
the buzzer would beep one time if it is connecting to a buzzer.
Example 2 ---Auto read card block, Auto code=0x03

EHUOYAN YHY522R
RFID module
Page 16 of 36
Configure command--: Host
Æ
YHY522R
AA BB 12 04 03 00 FF FF FF FF FF FF 00 05 06 03 04 01 60 08 78
Description:
03:Auto code
00 FF FF FF FF FF FF: Auth key A and key string
00: Read block 0
01: Auth mode 1
08: Baud code,115200bps
If success then reset the YHY522R to active this function. The reader will read the card
block itself when there is a card into the RF field and then output the block data to host, at
the same time the buzzer would beep one time if it is connecting to a buzzer. Below is the
output string example.
YHY522R
Æ
Host----
AA BB 12 51 5E C0 E0 7A 04 88 04 00 47 51 35 56 61 10 28 08 EB
Description:
51:Status code
5E C0 E0 7A 04 88 04 00 47 51 35 56 61 10 28 08: Data in the block 0
Example 3 ---Auto Read NTAG213 NFC NDEF text dada, Auto code=0x08
Configure command--: Host
Æ
YHY522R
AA BB 12 04 08 00 FF FF FF FF FF FF 00 00 00 00 00 00 00 05 1B
Description:
08:Auto code
05: Baud code,19200bps
If success then reset the YHY522R to active this function. The reader will read the NFC
tag when there is a tag into the RF field and then output the status to host. Below is the
output string.
AA BB 1E 40 31 53 69 6E 67 6C 65 4C 69 6E 65 31 32 33 34 35 36 37 38 39 FE 04 A7 B3
02 09 40 80 6F
Description:
40:Status code
31 53 69 6E 67 6C 65 4C 69 6E 65 31 32 33 34 35 36 37 38 39
:
Ascii code of the
“1SingleLine123456789”
FE: End of this text
04 A7 B3 02 09 40 80
:
UID of this tag
Auto scan commands:
AA BB 12 04 01 00 FF FF FF FF FF FF 00 00 00 00 00 00 00 05 12// Auto mode 1,baud 19200
AA BB 12 04 02 00 FF FF FF FF FF FF 00 00 00 00 00 00 00 05 11// Auto mode 2, scan UID

EHUOYAN YHY522R
RFID module
Page 17 of 36
AA BB 12 04 02 00 FF FF FF FF FF FF 00 00 00 00 00 00 00 03 17 // Scan UID, baud 9600
AA BB 12 04 03 00 FF FF FF FF FF FF 00 00 00 00 00 00 00 05 10//Auto mode 3, scan block
AA BB 12 04 07 00 FF FF FF FF FF FF 00 00 00 01 02 00 00 05 17// Auto mode 7, scan sector1-2
14.2.4 Download_Keys
This command can load up to 40 groups keys to the YHY522R ’s EEPROM, all
the data stored in the EEPROM is encrypted. When auth mode is 1, the reader
will use the EEPROM’s key to auth the card. After reset this keys will active.
Table 19. Command--: Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x09 0x05
7 bytes
Sector: 1 byte
Keys: 6 bytes BCC
Sector: 0—0x27 (mifare 4 k card has 40 sectors)
Keys: KeyA or KeyB, default FF FF FF FF FF FF.
Table 20. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x05 0x07
Failure 0xAA 0xBB 0x02 0xFA 0xF8
Table 21. Example
Send AA BB 09 05 01 FF FF FF FF FF FF 0D
Description
AA BB
09
05
01
FF FF FF FF FF FF
0D
Head
Length
COMMAND
Sector 01
Key
BCC
Receive(Success) AA BB 02 03 01
Description
AA BB
02
05
07
Head
Length
Status
BCC
Receive(Failure) AA BB 02 FC FE
Description
AA BB
02
FA
F8
Head
Length
Error
BCC
14.2.7 Antenna_Control
This command set the antenna power on or off .
Table 28. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum

EHUOYAN YHY522R
RFID module
Page 18 of 36
0xAA 0xBB 0x03 0x11 Switch:1Byte BCC
Switch----
0x00: antenna soft power-down
0x03: antenna soft power-on
Table 29. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x11 0x13
Failure 0xAA 0xBB 0x02 0xEE 0xEC
Table 30. Example
Send AA BB 03 11 00 12
Description
AA BB
03
11
00
12
Head
Length
COMMAND
antenna soft power-down
BCC
Receive(Success) AA BB 02 11 13
Description
AA BB
02
11
13
Head
Length
Status
BCC
Receive(Failure) AA BB 02 EE EC
Description
AA BB
02
EE
EC
Head
Length
Error
BCC
14.2.8 Sense_Mode
This command can change the auto sense mode any time during the YHY522R
working, it needs no reset operation.
Table 31. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x03 0x13 Auto code:1Byte BCC
Auto code -----
0—Auto function off ,the YHY522R will not auto seek card and the IRQ pin is not active.
1—Auto seek card, if there are cards the RED led will light and IRQ pin output low level.
2—Same 1, and it will read the card id and upload to host, and then halt the card.
3—Same 1, and it will read the selected block and upload to host, and then halt the card.
Table 32. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x13 0x11
Failure 0xAA 0xBB 0x02 0xEC 0xEE
Table 33. Example

EHUOYAN YHY522R
RFID module
Page 19 of 36
Send AA BB 03 13 00
10
Description
AA BB
03
13
00
10
Head
Length
COMMAND
Auto off
BCC
Receive(Success) AA BB 02 13 11
Description
AA BB
02
13
11
Head
Length
Status
BCC
Receive(Failure) AA BB 02 EC EE
Description
AA BB
02
EC
EE
Head
Length
Error
BCC
14.2.13 Change_Card_Keys
This command will change the card’s authentication keys. The card
needs to be put on the field when performing this action.
Table 45. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x1A 0x06
Key Info:
24 bytes BCC
Key Info: Key type +Sector number + Old Key + New Key + Key A+ Access bits + Key B
Key type: 1 byte, 0x00—Key A, 0x01—Key B.
Sector number: 1 byte, 0x00..0x27 (0..39)
Old Key: 6 bytes, default “FFFFFFFFFFFF” (*)
Key A: 6 bytes new key
Access bits: 4 bytes---‘ FF 07 80 69’
Key B: 6 bytes ----default ‘FF FF FF FF FF FF’
(*)Note: If auth mode is “1”, then this key is not active, it can be any 6 data bytes.
Table 46. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x06 0x04
Failure 0xAA 0xBB 0x02 0xF9 0xFB
Table 47. Example
Send AA BB 1A 06 00 08
F
F FF FF FF FF FF
0
0 11 22 33 44 55
F
F 07
80 69 FF FF FF FF FF FF 14 (*)
Description
AA BB
1A
06
00
Head
Length
COMMAND
Key type A

EHUOYAN YHY522R
RFID module
Page 20 of 36
08
FF FF FF FF FF FF
00 ..55
FF 07 80 69
FF FF FF FF FF FF
30
Sector 08
Old Key
New key
Access bytes
Key B
BCC
Receive(Success) AA BB 02 06
0
4
Description
AA BB
02
06
04
Head
Length
Status
BCC
Receive(Failure) AA BB 02 F9 FB
Description
AA BB
02
F9
FB
Head
Length
Error
BCC
14.2.15 Card_Sleep
This command sets the Card into sleeping. After successfully operation
the card will be halt. Reactivate the card need to remove the card from
antenna area and put the card into antenna area again. Or reset the
YHY522R to repower the card.
Table 51. Command--:Host
Æ
YHY522R
Send Header Length Command Data XOR Checksum
0xAA 0xBB 0x02 0x12 0x10
Table 52. Response--: YHY522R
Æ
Host
Receive Head Length Status Data XOR Checksum
Success 0xAA 0xBB 0x02 0x12 0x10
Failure 0xAA 0xBB 0x02 0x ED 0xEF
Table 53. Example
Send AA BB 02 12
10
Description
AA BB
02
12
10
Head
Length
COMMAND
BCC
Receive(Success) AA BB 02 12
10
Description
AA BB
02
12
10
Head
Length
Status
BCC
Receive(Failure) AA BB 02 ED EF
Description
AA BB
02
ED
EF
Head
Length
Error
BCC
Table of contents
Other EHUOYAN RFID System manuals