0% found this document useful (0 votes)
10 views

Special and Net Param Manual

Uploaded by

Nhân Đặng
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Special and Net Param Manual

Uploaded by

Nhân Đặng
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

UHF RFID Reader User's Manual V1.

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

3
UHF RFID Reader User's Manual V1.4

Read device special param


typedef struct
{
unsigned char bInitialFlag;
unsigned char bPassword;
unsigned char arrPass[4];
unsigned char bMask;
unsigned char bMaskStartAddr;
unsigned char arrMask[12];
unsigned char bMaskLength;
unsigned char bDelay;
unsigned char bDelayTime;
unsigned char bCardCache;
unsigned char bProtocol;
unsigned char bProtocolSel;
unsigned char bCondition;
}Struct_Special_DevParam;

CMD_READ_DEVIC
12 0x2E
E_SPECIAL_PARAM

Eg:
Send:53 57 00 03 FF 2E 26
Recv: 43 54 00 85 00 2E 01 C3 55 00 00...
C3:DevType
55:Default param switch. None 55 default param.
00 00...:Special params

4
UHF RFID Reader User's Manual V1.4

Set device special param


typedef struct
{
unsigned char bInitialFlag;
unsigned char bPassword;
unsigned char arrPass[4];
unsigned char bMask;
unsigned char bMaskStartAddr;
unsigned char arrMask[12];
unsigned char bMaskLength;
unsigned char bDelay;
unsigned char bDelayTime;
unsigned char bCardCache;
unsigned char bProtocol;
unsigned char bProtocolSel;
unsigned char bCondition;
}Struct_Special_DevParam;

CMD_SET_DEVICE_
13 0x2F
SPECIAL_PARAM

Eg:
Send:53 57 00 12 FF 2F C3 55 00 00 ......
C3:DevType.If DevType is not same, device return false.
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

If you use SDK function, the function is :

5
UHF RFID Reader User's Manual V1.4

/******** Func: Get Device Special Param**********/


// Param: bDevAdr: 0xFF
// pucDeviceType: Return DeviceType
// pucDeviceParam:Return Param
// ucParamLength: need read Param Length , if you set 2, return 2 bytes params
// Return:Success return 1, failed return 0
/*********************************************************/
extern "C" BOOL CFNet_ReadDeviceSpecialParam(unsigned char bDevAdr,unsigned
char *ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);
extern "C" BOOL CFCom_ReadDeviceSpecialParam(unsigned char bDevAdr,unsigned
char *ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);
extern "C" BOOL CFHid_ReadDeviceSpecialParam(unsigned char bDevAdr,unsigned
char *ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);

/******** Func: Set Device Special Param**********/


// Param: bDevAdr: 0xFF
// ucDeviceType: DeviceType
// pucDeviceParam:Device Param
// ucParamLength: Param Length
// Return:Success return 1, failed return 0
/*********************************************************/
extern "C" BOOL CFNet_SetDeviceSpecialParam(unsigned char bDevAdr,unsigned char
ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);
extern "C" BOOL CFCom_SetDeviceSpecialParam(unsigned char bDevAdr,unsigned
char ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);
extern "C" BOOL CFHid_SetDeviceSpecialParam(unsigned char bDevAdr,unsigned char
ucDeviceType, unsigned char *pucDeviceParam, unsigned char ucParamLength);

You might also like