UHF RFID Reader User's Manual v2.0

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 14

UHF RFID Reader

User’s Manual V1.9


Content
1. COMMUNICATION INTERFACE SPECIFICATION.........................................................................................1
2. PROTOCOL DESCRIPTION................................................................................................................................1
3. DATA BLOCK FORMAT......................................................................................................................................2
3.1 COMMAND DATA BLOCK.......................................................................................................................2
3.2 RESPONSE DATA BLOCK........................................................................................................................2
4. OPERATION COMMAND (CMD) SUMMARY.................................................................................................3

I
UHF RFID Reader User's Manual V1.4

1. COMMUNICATION INTERFACE SPECIFICATION

The reader communicates with host (MCU, MPU, Controller) using serial communication interface RS232/
RS485 or USB or TCPIP and complete corresponding operation according to the host command. The default serial
communication parameter is 115200bps 1 start bit, 8 data bits, 1 stop bit without parity check bit. In the process of
communication, the least significant bit of one byte is transmitted first and the least significant byte of command
data sequence is transmitted first.

2. PROTOCOL DESCRIPTION

A communication procedure is sponsored by the host sending commands and data to the reader and the
reader returns the result status and data to host after command execution.
Reader executes a command after receiving it. Only after command execution completed, the reader would
be able to receive another command. During the implementation of one command, the reader ignores all other
command data received.

The following table shows the process of the host computer sending command:
HOST DIRECTION READER
Command Data Block →
The reader completes command execution after receiving host command and returns the results. During the
period, it doesn’t process any host data. The feedback of command execution results is as follows:
READER DIRECTION HOST
Response Data Block →

1
UHF RFID Reader User's Manual V1.4

3. DATA BLOCK FORMAT

3.1 COMMAND DATA BLOCK

Head Length Addr Cmd Data[] Check


Remark:
LENGTH(Byte) COMMENT
Head 2 0x53, 0x57
Length 2 Command data block length 1 byte (not including itself). Value
range is 3~1024. The number of Len equals the length of Data
[] plus 3.
Adr 1 Reader address, 1 byte. Value range is 0~254. Only will the
reader conforming to the address response the command data
block. Value 255 is broadcasting address. All the readers will
response to the command data block with a broadcasting
address. The default value is 0.
Cmd 1 Operation command symbol, 1 byte.
Data[] Variable Operation command parameters.
Check 1 Checksum is checksum domain , regulates the checking scope is
from the package type domain to parameters domain until the last
byte the checksum of all the bytes.

3.2 RESPONSE DATA BLOCK

Head Length Addr Cmd Status Data[] Check


COMMENT:
LENGTH(Byte) COMMENT
Head 1 0x43,0x54
Length 2 Command data block length 1 byte (not including itself). Value
range is 3~1024. The number of Len equals the length of Data
[] plus 3.
Adr 1 Reader address, 1 byte. Value rang is 0~254.
Cmd 1 Received command symbol, 1 byte.
Status 1 Status is state domain. 0x01 means success, 0x00 means failed
Data[] Variable Response data.
Check 1 Checksum is checksum domain , regulates the checking scope is
from the package type domain to parameters domain until the last
byte the checksum of all the bytes.

2
UHF RFID Reader User's Manual V1.4

The default value of the reader address is 0x00. The host may change it by using reader-defined command
“Write Adr”.
CheckSum computation includes all data from Len. A CheckSum computation program is presented as
follow:
C-Example:
unsigned char CheckSum(unsigned char *uBuff, unsigned short iBuffLen)
{
unsigned char uSum=0;
unsigned short i = 0;
for(i=0;i< iBuffLen;i++)
{
uSum = uSum + uBuff[i];
}
uSum = (~uSum) + 1;
return uSum;
}

4. OPERATION COMMAND (CMD) SUMMARY

NUM COMMAND CODE COMMENT


Read system param.
Eg:
Send:53 57 00 03 FF 10 44
CMD_READ_SYSTE
1 0x10 Recv:43 54 00 0D 00 10 01 14 11 C3 DD 93 8E 17 01 23 2A
M_PARAM
14: SoftVersion 1.4
11:HarVersion 1.1
C3 DD 93 8E 17 01 23:DevSN
Read device param
Eg:
Send:53 57 00 03 FF 20 34
CMD_READ_DEVIC
2 0x20 Recv:43 54 00 21 00 20 01 C3 55 01 00 00 00 0A....
E_PARAM
C3:DevType (C3 Means 5300)
55:Default param switch. None 55 default param.
01 00.....:Params,See CMD_SET_DEVICE_PARAM Command
3 CMD_SET_DEVICE_ 0x21 Set device param
PARAM Eg:
Send:53 57 00 25 FF 21 C3 55 01 ......
C3:DevType.If DevType is not same, device return false.
55: Default param switch. None 55 default param.
01 ..... :Params
Define: (For 5300 Device)

3
UHF RFID Reader User's Manual V1.4

typedef struct
{
unsigned char bTransport; //0:USB 1:RS232(Default)
2:RJ45 3:WIFI
4:Weigand
unsigned char bWorkMode; //0:Answer 1:Active(Default)
2:Trigger
unsigned char bDeviceAddr; //0x00-0xFE
unsigned char bFilterTime; //0-255 0:Close
unsigned char bRFPower; //0 - 26db
unsigned char bBeepEnable; //0 Close 1 Open
unsigned char bUartBaudRate; //0:9600 1:19200 2:38400
3:57600 4:115200
unsigned char bFreqH; //FreqH
unsigned char bFreqL; //FreqL
FreqH FreqH FreqL FreqL FreqBand
(Bit7) (Bit6) (Bit7) (Bit6)
0 0 1 0 US band
0 1 0 0 EU band
FreqH Bit5-Bit0: Max Freq
FreqL Bit5-Bit0: Min Freq
US band: Fs = 902.75 + N * 0.5 (MHz) 其中N∈[0,49]。
EU band: Fs = 865.1 + N*0.2(MHz) 其中N∈[0, 14]。
unsigned char bScanArea; //0:EPC 1:TID 2:User 3:EPC+TID
unsigned char bStartPos; //StartAddress
unsigned char bScanLength; //ByteLength
unsigned char bTriggerTime; //TreggerEffectiveTime
unsigned char bWgProtocal; //WiegandMode 0:WG26 1:WG34
unsigned char bWgOutPutMode;//0:MSB first 1:LSB first
unsigned char bWgOutTime; //Wg OutInterval
unsigned char bWgPulseWidth; //Wg PulseWidth
unsigned char bWgPulseInterTime; //Wg PulseIntervalTime
unsigned char bAntH;
unsigned char bAntL; //Ant Set, Bit0:0 Ant0Close 1 Ant0
Open(Bit15 – Bit0 Only for multi-
Ant reader)
unsigned char bQValue; //Q: 0-6
unsigned char bSession; //0: S0 1:S1: 2:S2 3:S3
}Struct_Device_Parameters;

Recv:43 54 00 04 00 21 01 43
01:Success 00:Failed

4
UHF RFID Reader User's Manual V1.4

Default device param


CMD_DEFAULT_DE Eg:
4 0x22
VICE_PARAM Send:53 57 00 03 FF 22 32
Recv: 43 54 00 04 00 22 01 42
Read one param
Param address:
01: Transport Value:0-4 0:USB 1:RS232(Default)
2:RJ45 3:WIFI 4:Weigand
02: WorkMode Value:0-2 0:Answer 1:Active(Default)
2:Trigger
03: DeviceAddr Value:00-FE
04: FilterTime Value: 00-FF (00 Close)
CMD_READ_DEVIC 05: RFPower Value: 00-1A(5300) 00-11(5100) 00-1E (5500)
5 0x23
E_ONEPARAM 06: BeepEnable Value: 0 Close 1 Open
07: UartBaudRate Value: 0:9600 1:19200 2:38400 3:57600
4:115200
Eg:
Read RF Power
Send:53 57 00 04 FF 23 05 2B
05:RF Power (Param address)
Recv: 43 54 00 06 00 23 01 05 1E 1C
05 1E: RF Power is 0x1E(30 dbm)

5
UHF RFID Reader User's Manual V1.4

Set one param


Param address Value (One Byte)
01: Transport Value:0-4 0:USB 1:RS232(Default)
2:RJ45 3:WIFI 4:Weigand
02: WorkMode Value:0-2 0:Answer 1:Active(Default)
2:Trigger
03: DeviceAddr Value:00-FE
04: FilterTime Value: 00-FF (00 Close)
05: RFPower Value: 00-1A(5300) 00-11(5100) 00-1E (5500)
06: BeepEnable Value: 0 Close 1 Open
07: UartBaudRate Value: 0:9600 1:19200 2:38400 3:57600
CMD_SET_DEVICE_
6 0x24 4:115200
ONEPARAM
Eg:
Set RF Power
Send:53 57 00 05 FF 24 05 1A 0F
05 1A: Set RF Power 1A(26 dbm)
Recv: 43 54 00 04 00 24 01 40
01: Success 00:Failed
Set WorkMode
Send:53 57 00 05 FF 24 02 00 2C
02 00: Set Answer WorkMode
Recv: 43 54 00 04 00 24 01 40
01: Success 00:Failed
Read device net param
Eg:
Send:53 57 00 03 FF 26 2E
CMD_READ_DEVIC
7 0x26 Recv: 43 54 00 85 00 26 01 C3 55 00 68...
ENET_PARAM
C3:DevType
55:Default param switch. None 55 default param.
00 68......: Net Params
Set device net param
Eg:
Send:53 57 00 A6 FF 27 C3 55 00 68 ......
CMD_SET_DEVICE C3:DevType.If DevType is not same, device return false.
8 0x27
NET_PARAM 55: Default param switch. None 55 default param.
00 68...:Net params
Recv:43 54 00 04 00 27 01 3D
01:Success 00:Failed
Default device param
CMD_DEFAULT_DE Eg:
9 0x28
VICENET_PARAM Send:53 57 00 03 FF 28 2C
Recv: 43 54 00 04 00 28 01 3C

6
UHF RFID Reader User's Manual V1.4

Read device time


Eg:
CMD_READ_DEVIC Send:53 57 00 03 FF 2B 29
10 0x2B
E_TIME Recv: 43 54 00 0A 00 2B 01 11 01 02 03 04 05 13
11 01 02 03 04 05:Time 11:year 2017
01 month 02 day 03 hour 04 minute 05 second
Set device time
Eg:
CMD_SET_DEVICE_ Send:53 57 00 09 FF 2C 11 01 02 03 04 05 02
11 0x2C
TIME 11 01 02 03 04 05:Time 11:year 2017
01 month 02 day 03 hour 04 minute 05 second
Recv: 43 54 00 04 00 2C 01 38
Read device special param
Eg:
Send:53 57 00 03 FF 2E 26
CMD_READ_DEVIC
12 0x2E Recv: 43 54 00 85 00 2E 01 C3 55 00 00...
E_SPECIAL_PARAM
C3:DevType
55:Default param switch. None 55 default param.
00 00...:Special params
Set device special param
Eg:
Send:53 57 00 12 FF 2F C3 55 00 00 ......
CMD_SET_DEVICE_ C3:DevType.If DevType is not same, device return false.
13 0x2F
SPECIAL_PARAM 55: Default param switch. None 55 default param.
00 00.....:Special params
Recv:43 54 00 04 00 2F 01 35
01:Success 00:Failed

7
UHF RFID Reader User's Manual V1.4

Read device frequency


Eg:
Send:53 57 00 03 FF 3E 16
Recv: 43 54 00 06 00 3E 01 29 9D 5E
01:Success 00:Failed
29 9D : 2 bytes Freq Value
N1 N2
0x31 0x80 //US Freq
0x4E 0x00 //Europe
0x2C 0xA3 //China
0x29 0x9D //Korea
0x2E 0x9F //Australia
14 CMD_READ_FREQ 0x3E 0x4E 0x00 //New Zealand
0x4E 0x00 //India
0x2C 0x81 //Singapore
0x2C 0xA3 //Hongkong
0x31 0xA7 //Taiwan
0x31 0x80 //Canada
0x31 0x80 //Mexico
0x31 0x99 //Brazil
0x1C 0x99 //Israel
0x24 0x9D //South Africa
0x2C 0xA3 //Thailand
0x28 0xA1 //Malaysia
0x29 0x9D //Japan

8
UHF RFID Reader User's Manual V1.4

Set device frequency


Eg:
Send:53 57 00 05 FF 3F N1 N2 CC
N1 N2
0x31 0x80 //US Freq
0x4E 0x00 //Europe
0x2C 0xA3 //China
0x29 0x9D //Korea
0x2E 0x9F //Australia
0x4E 0x00 //New Zealand
0x4E 0x00 //India
0x2C 0x81 //Singapore
0x2C 0xA3 //Hongkong
0x31 0xA7 //Taiwan
15 CMD_SET_FREQ 0x3F
0x31 0x80 //Canada
0x31 0x80 //Mexico
0x31 0x99 //Brazil
0x1C 0x99 //Israel
0x24 0x9D //South Africa
0x2C 0xA3 //Thailand
0x28 0xA1 //Malaysia
0x29 0x9D //Japan

CC: CheckSum
Eg:
53 57 00 05 FF 3F 31 80 62 //Set US Freq
Recv:43 54 00 04 00 3F 01 25
01:Success 00:Failed
Stop reading (For active mode)
Eg:
16 CMD_STOP_READ 0x40
Send: 53 57 00 03 FF 40 14
Recv: 43 54 00 04 00 40 01 24
Start reading (For active mode)
Eg:
17 CMD_START_READ 0x41
Send: 53 57 00 03 FF 41 13
Recv: 43 54 00 04 00 41 01 23

9
UHF RFID Reader User's Manual V1.4

Active mode device send data


Recv: 43 54 00 2C 00 45 01 C4 DD 93 8E 17 01 23 02 0F 01 02 E2
00 20 75 60 10 01 82 04 80 E0 64 33 0F 01 03 E3 00 20 75 60 10 01
82 04 80 E0 64 34 07
C4 DD 93 8E 17 01 23: DevSN
02:Tag Number, 02 mean 2 tagIDs
0F 01 02 E2 00 20 75 60 10 01 82 04 80 E0 64 33:
0F:First tag length(include type,ant,id,rssi)
01:tag type(UHF type, Reserved)
CMD_ACTIVE_DAT 02:ant2
18 0x45
A E2 00 20 75 60 10 01 82 04 80 E0 64:tag id
33:Rssi
0F 01 03 E3 00 20 75 60 10 01 82 04 80 E0 64 34:
0F:Second tag length(include type,ant,id,rssi)
01: tag type(UHF type, Reserved)
03:ant3
E3 00 20 75 60 10 01 82 04 80 E0 64:tag id
34:Rssi
Send: 53 57 00 03 FF 45 0F (Comfirm reveice this pack, not
necessary)
Check UHFModule status
Eg:
CMD_CHECK_MOD
19 0xE0 Send: 53 57 00 03 FF E0 74
ULE
Recv: 43 54 00 05 01 E0 01 82 ModuleOK
Recv: 43 54 00 05 01 E0 00 83 ModuleError
Check antana status ( For multi-channel ant reader)
Eg:
Send: 53 57 00 03 FF E1 73
Recv: 43 54 00 06 00 E1 01 FF F2 90
20 CMD_CHECK_ANT 0xE1
FF F2: Ant status
1111 1111 1111 0010 (2 binary)
Ant16 ---------------Ant1
Ant4: None Ant3:None Ant2:Exist Ant1:None
Close relay
CMD_CLOSE_RELA Eg:
21 0x85
Y Send:53 57 00 03 FF 85 CF
Recv: 43 54 00 04 00 85 01 DF
Release relay
CMD_RELEASE_RE Eg:
22 0x86
LAY Send:53 57 00 03 FF 86 CE
Recv: 43 54 00 04 00 86 01 DE

10
UHF RFID Reader User's Manual V1.4

Heartbeat packet (For tcp client of reader in WIFI and RJ45)


Recv: 43 54 00 0B 01 FF 01 23 01 02 03 04 05 06 25
CMD_HEARTBEAT_
23 0xFF 01:Status
PACK
23 01 02 03 04 05 06: DevSN
Not need respond
Inventory tag (For command mode)
Eg:
Send: 53 57 00 03 FF 01 53
Recv: 43 54 00 04 00 01 00 64 (No Tag)
43 54 00 36 00 01 01 00 03 0F 01 02 E2 00 20 67 55 16 02 70 12
70 92 0F 49 0F 01 02 E2 00 20 75 60 10 01 86 25 10 16 A3 48 0F 01
02 E2 00 20 75 60 10 01 85 01 01 01 01 4D E4
00 03: Tag Number ( 3 Tags)
0F 01 02 E2 00 20 67 55 16 02 70 12 70 92 0F 49: First tag
0F:First tag length(include type,ant,id,rssi)
01:tag type(UHF type)
02:ant2
CMD_INVENTORY_ E2 00 20 67 55 16 02 70 12 70 92 0F:tag id
24 0x01
TAG 49:Rssi
0F 01 02 E2 00 20 75 60 10 01 86 25 10 16 A3 48:Second tag
0F:First tag length(include type,ant,id,rssi)
01:tag type(UHF type)
02:ant2
E2 00 20 75 60 10 01 86 25 10 16 A3:tag id
48:Rssi
0F 01 02 E2 00 20 75 60 10 01 85 01 01 01 01 4D:Third tag
0F:First tag length(include type,ant,id,rssi)
01:tag type(UHF type)
02:ant2
E2 00 20 75 60 10 01 85 01 01 01 01:tag id
4D:Rssi

11
UHF RFID Reader User's Manual V1.4

The function is used to read part or all of a Tag’s Password, EPC,


TID, or User memory.
Eg:
Send:53 57 00 0A FF 02 01 02 06 00 00 00 00 42
01:Region(0 reserved,1 EPC,2 TID,3 User)
02:StartAdd (Word)
COM_READ_TAG_D
25 0x02 06:Length (Word)
ATA
00 00 00 00: Password,4 bytes
Recv:43 54 00 04 00 02 00 63
00:Failed
43 54 00 10 00 02 01 E2 00 20 67 55 16 02 70 12 70 92 0F ED
01:Success
E2 00 20 67 55 16 02 70 12 70 92 0F:Tag Data
The function is used to write several words in a Tag’s Reserved, EPC,
TID, or User memory.
Eg:
Send:53 57 00 16 FF 03 01 02 06 00 00 00 00 00 11 22 33 44 55 66
77 88 99 AA BB D3
COM_WRITE_TAG_ 01:Region(0 reserved,1 EPC,2 TID,3 User)
26 0x03
DATA 02:StartAdd (Word)
06:Length (Word)
00 00 00 00: Password,4 bytes
00 11 22 33 44 55 66 77 88 99 AA BB:Write data
Recv:43 54 00 04 00 03 01 61
01: Success 00: Failed

CustomProtocol:
If the communication protocol is customed, the protocol format is:
0x02 + ASC ID + 0x0D + 0x0A + 0x03
Eg:
Rev: 02 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 41 41 42 42 0D 0A 03
The Tag ID is “00112233445566778899AABB”

12

You might also like