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

RFID Reader Development Guide-C_C++_linux

The document is a development guide for RFID reader programming using C/C++ on a Linux platform, detailing connection methods, event descriptions, and message configurations. It includes examples of how to establish connections via RS232, RS485, TCP, and USB-HID, as well as handling various RFID tag events. The guide also emphasizes copyright statements and provides a structured approach for reader configuration and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

RFID Reader Development Guide-C_C++_linux

The document is a development guide for RFID reader programming using C/C++ on a Linux platform, detailing connection methods, event descriptions, and message configurations. It includes examples of how to establish connections via RS232, RS485, TCP, and USB-HID, as well as handling various RFID tag events. The guide also emphasizes copyright statements and provides a structured approach for reader configuration and management.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

RFID Reader Development

Guide For C/C++ (linux)

V0.1.4.0
Contents
1. Preface .........................................................................................................................................4
1.1. Overview .........................................................................................................................4
1.2. Applicable Devices ..........................................................................................................4
1.3. Copyright Statements .....................................................................................................4
1.4. Basic Flow of Reader and Write ......................................................................................5
2. Quick Start ...................................................................................................................................5
3. Connection Description ..............................................................................................................8
3.1. RS232 Connection ...........................................................................................................8
3.2. RS485 Connection ...........................................................................................................9
3.3. TCP Client Connection.....................................................................................................9
3.4. TCP Server Listening ........................................................................................................9
3.5. Close TCP Server Listening ..............................................................................................9
3.6. USB-HID Connection .....................................................................................................10
3.7. Close Connection ..........................................................................................................10
4. Events Description.....................................................................................................................10
4.1. ISO18000-6C Tag Reports Event ...................................................................................10
4.2. ISO18000-6C Tag Reports Over Event ...........................................................................11
4.3. ISO18000-6B Tag Report Event .....................................................................................11
4.4. ISO18000-6B Tag Reports Over Event...........................................................................12
4.5. GPI Triggers Start Event.................................................................................................13
4.6. GPI Trigger End Event....................................................................................................13
4.7. TCP Listening Connection Event ...................................................................................14
4.8. TCP Connection Disconnect Event ................................................................................14
5. Messages Configuration and Query Description ......................................................................15
5.1. Send Synchronized Messages .......................................................................................15
6. Messages Description ...............................................................................................................16
6.1. Reader Configuration and Management ......................................................................16
6.1.1. Reboot Reader ..................................................................................................16
6.1.2. Configure and Query COM Parameter .............................................................16
6.1.3. Configure GPO State Parameter .......................................................................17
6.1.4. Query GPI State Parameter...............................................................................17
6.1.5. Configure and Query GPI Trigger Parameter ....................................................17
6.1.6. Query Version for Software Baseband .............................................................18
6.1.7. Query the information of the Reader Capabilities ...........................................19
6.1.8. Query the Information of the Reader...............................................................19
6.1.9. Buzzer control ...................................................................................................20
6.2. RFID Configuration and Operation ...............................................................................20
6.2.1. Stop Command .................................................................................................20
6.2.2. Configure and Query Power of the Reader ......................................................21
6.2.3. Configure and Query the working frequency band of the reader ...................22
6.2.4. Configure and Query EPC Baseband Parameter...............................................22
6.2.5. Configure and Query Tag for Uploading Paramater .........................................23
6.2.6. Inventory ISO18000-6C Tag ..............................................................................23
6.2.7. Write ISO18000-6C Tag .....................................................................................24
6.2.8. Lock ISO18000-6C Tag.......................................................................................25
6.2.9. Kill ISO18000-6C Tag .........................................................................................25
6.2.10. Inventory ISO18000-6B Tag ..............................................................................26
6.2.11. Write ISO18000-6B Tag .....................................................................................26
6.2.12. Lock ISO18000-6B Tag....................................................................................... 27
6.2.13. Locking Query ISO18000-6B Tag....................................................................... 27
7. Parameter Description ..............................................................................................................28
7.1.1. ISO18000-6C Tag Select Tag Parameter ............................................................28
7.1.2. ISO18000-6C Tag Read TID Parameter..............................................................28
7.1.3. ISO18000-6C Tag Read User Data Area Parameter...........................................29
7.1.4. ISO18000-6B Tag Read User Data Area Parameter...........................................29
8. Appendix 1 ................................................................................................................................29
1. Preface

1.1. Overview

We provide the function that can run on linux platform for the convenience of add-on development. This
library is written by C++ language and zipped up to be a standard DII library.

1.2. Applicable Devices

Function Module Applicable Devices Type

Reader Configuration and Management R8004、R8008

RFID Configuration and Operation All UHF Device

1.3. Copyright Statements

All contents of this document, including text and pictures, are original and we reserve the right to pursue the
legal liability for any unauthorized commercial use. The user should not add, modify or delete any content of this
document and transmit the content via internet or CDs, etc. Anyone who violate will take the consequence at his
or her own expensive.
1.4. Basic Flow of Reader and Write

2. Quick Start

#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "delegate.h"
#include "message.h"
#include "GClient.h"
GClient *client;

void TagEpcLog(char *readerName, LogBaseEpcInfo msg) {


if (msg.Result == 0) {
printf("EPC: %s\n", msg.Epc);
printf("TID: %s\n", msg.Tid);
}
}

void TagEpcOver(char *readerName, LogBaseEpcOver msg) {


printf("TagEpcOver \n");
}

void TcpDisconnected(char* readerName) {


printf("[%s : %d] %s \n", __FUNCTION__, __LINE__, readerName);
printf("Disconnected \n");
Close(client);
}

int main() {

printf("please select the way of connection: 1.rs232 2.rs485 3.tcp \n");


int way = 0;

if (scanf("%d", &way) != EOF) {

switch (way) {
case 1: {
client = OpenRS232("/dev/ttyUSB0:115200", 3);
}
break;
case 2: {
client = OpenRS485("/dev/ttyUSB0:115200:1", 3);
}
break;

case 3: {
client = OpenTcpClient("192.168.1.168:8160", 3);
}
break;

}
}
if (client == nullptr) {
printf("failed to connection \n");
return 0;
} else {
printf("success to connection \n");
}

//Debug log
client->isPrint = true;

RegCallBack(client, ETagEpcLog, (void *) TagEpcLog);


RegCallBack(client, ETagEpcOver, (void *) TagEpcOver);
RegCallBack(client, ETcpDisconnected, (void*)TcpDisconnected);

//STOP COMMAND
MsgBaseStop stop;
memset(&stop, 0, sizeof(stop));
SendSynMsg(client, EMESS_BaseStop, &stop);
if (stop.rst.RtCode != 0) {
printf("Failed to MsgBaseStop: %s. \n", stop.rst.RtMsg);
} else {
printf("Success to MsgBaseStop. \n");
}

//Inventory EPC COMMAND


MsgBaseInventoryEpc msg;
memset(&msg, 0, sizeof(msg));
//single antenna
msg.AntennaEnable = AntennaNo_1;
//multi antenna
//msg.AntennaEnable = AntennaNo_1 | AntennaNo_2;
msg.InventoryMode = 1;

//msg.Filter.Area = 2; // TID
//msg.Filter.Start = 0;
//memcpy(msg.Filter.HexData, "E2801130200020190FFD019B", 25);
//msg.Filter.BitLen = strlen(msg.Filter.HexData) * 4;

msg.ReadTid.Mode = 0;
msg.ReadTid.Len = 6;

//msg.ReadUserdata.Start = 0;
//msg.ReadUserdata.len = 4;
SendSynMsg(client, EMESS_BaseInventoryEpc, &msg);
if (msg.rst.RtCode != 0) {
printf("Failed to MsgBaseInventoryEpc: %s. \n", msg.rst.RtMsg);
} else {
printf("Success to MsgBaseInventoryEpc. \n");
}

sleep(5);

//STOP COMMAND
SendSynMsg(client, EMESS_BaseStop, &stop);
if (stop.rst.RtCode != 0) {
printf("Failed to MsgBaseStop: %s. \n", stop.rst.RtMsg);
} else {
printf("Success to MsgBaseStop. \n");
}

usleep(500);

//CLOSE
if (client->isOpened) {
Close(client);
}

return 0;
}

3. Connection Description

3.1. RS232 Connection

Method GClient * OpenRS232(const char* readerName, int timeout)

readerName: connection string, such as”/dev/ttyUSB0:115200”


Description
timeout: connection time is confirmed exceeded limits (ms), like “5”
3.2. RS485 Connection

Method GClient * OpenRS485(const char* readerName, int timeout)

readerName: connection string, such as”/dev/ttyUSB0:115200”


Description
timeout: connection time is confirmed exceeded limits (ms), like “5”

3.3. TCP Client Connection

Method GClient * OpenTcpClient(const char* readerName, int timeout)

readerName: connection string,such as ”192.168.1.168:8160”, default port 8160


Description
timeout: connection time is confirmed exceeded limits (ms), like “5”

3.4. TCP Server Listening

Method bool OpenTcpServer(short port, GServer* gserver)

port: Listen on local port,such as 8160


Description
gserver: Server-side structure, obtain the connected GClient in the GClientConnected callback

3.5. Close TCP Server Listening

Method bool CloseTcpServer(GServer* gserver)

Description Closed TCP monitoring.


3.6. USB-HID Connection

Method GClient * OpenUSBHID(int timeout)

Description timeout: connection time is confirmed exceeded limits (ms), like “5”

3.7. Close Connection

Method void Close(GClient* client)

Close and release the linked resources.


Description
Noted: For expired link objects, it need to actively call this method to release resources.

4. Events Description

4.1. ISO18000-6C Tag Reports Event

Event delegateTagEpcLog call_TagEpcLog

void TagEpcLog(char* readerName, LogBaseEpcInfo msg)


{
if (msg.Result == 0) {}
}
Description
RegCallBack(client, ETagEpcLog, (void*)TagEpcLog);
6C tag report events forwardly:When the reader is reading, the tag will report via this event。
Examples are detailed in Quick Start
LogBaseEpcInfo:detailed in Reporting Object

Reporting Object

Object LogBaseEpcInfo
Epc: Hexadecimal EPC character string
Pc:PC Value
AntId:Antenna No.
Rssi:Signal strength
Attribute
Result:Tag reading result, 0 means success and non-zero value means failure
Tid:Hexadecimal TID character string
Userdata: Hexadecimal Userdata character string
Reserved: Hexadecimal reserved area character string

Description 6C tag report parameter forwardly

4.2. ISO18000-6C Tag Reports Over Event

Object delegateTagEpcOver call_TagEpcOver

void TagEpcOver(char* readerName, LogBaseEpcOver msg)


{
printf("TagEpcOver \n");
Description }
RegCallBack(s, ETagEpcOver, (void*)TagEpcOver);
6C tag reports the end parameter forwardly to ensure the asynchronous messages are
synchronized.

4.3. ISO18000-6B Tag Report Event

Event delegateTag6bLog call_Tag6bLog


void Tag6bLog(char* readerName, LogBase6bInfo msg)
{
if (msg.Result == 0) {}
}
Description
RegCallBack(s, ETag6bLog, (void*)Tag6bLog);
6B tag report events forwardly:When the reader is reading, the tag will report via this event.
Examples are detailed in “Quick Start”.
LogBaseEpcInfo:detailed in”Reporting Object”

Reporting Object

Object LogBase6bInfo

Tid:Hexadecimal TID Character string


AntId:Antenna No.
Attribute Rssi:Singal strength
Result:Tag reading result, 0 means success and non-zero value means failure
Userdata: Hexadecimal Userdata character string

Description 6b tag reports the end parameter forwardly.

4.4. ISO18000-6B Tag Reports Over Event

Event delegateTag6bOver call_Tag6bOver

void Tag6bOver(char* readerName, LogBase6bOver msg)


{
printf("Tag6BOver \n");
Description }
RegCallBack(s, ETag6bOver, (void*)Tag6bOver);
6B tag reports the end parameter forwardly to ensure the asynchronous messages are
synchronized.
4.5. GPI Triggers Start Event

Event delegateGpiStart call_GpiStart

void GpiStart(char* readerName, LogAppGpiStart msg)


{
printf("Gpi Start \n");
Description }
RegCallBack(s, EGpiStart, (void*)GpiStart);
When the trigger start condition is met, the reader will actively upload a notification message
to notify the upper computer that the trigger operation has started.

Reporting Object

Object LogAppGpiStart

GpiPort:GPI port No.(The index starts from)


Level:GPI Port Level (electrical level state,0 means low electrical level,1 means high electrical
Attribute
level)
TriggerTime:Current System Trigger time

Description GPI triggers start and report events.

4.6. GPI Trigger End Event

Event delegateGpiOver call_GpiOver

void GpiOver(char* readerName, LogAppGpiOver msg)


{
printf("Gpi Over \n");
Description }
RegCallBack(s, EGpiOver, (void*)GpiOver);
When the trigger stop condition is met, the reader will actively upload a notification message
to notify the upper computer that the trigger operation has started.

Reporting Object
Object LogAppGpiOver

GpiPort:GPI port No.(The index starts from)


Level:GPI Port Level (electrical level state,0 means low electrical level,1 means high electrical
Attribute
level)
TriggerTime:Current Trigger time

Description GPI trigger end and report the parameter forwardly

4.7. TCP Listening Connection Event

Event typedef void(*delegateGClientConnected)(char* readerName, GClient* client);

void GClientConnected(char* readerName, GClient* client)


{

}
Description RegGServerCallBack(gserver, GClientConnected);
Description:
➢ TCP listens successfully, this event is reported when the remote connection is successful.
➢ After the event is reported, the upper computer (caller) needs to receive and store the
GClient to communicate with the module.

4.8. TCP Connection Disconnect Event

Event typedef void(* delegateTcpDisconnected)(char* readerName);


void TcpDisconnected(char* readerName)
{
printf("Disconnected \n");
}
RegCallBack(s, ETcpDisconnected, (void*)TcpDisconnected);
Description:
Description
➢ The connection is under TCP. When the remote connection is actively disconnected or the
physical layer is abnormal, the event will be reported.
➢ After the reporting of the events, the upper computer(the caller) need to release
connection object, or the event reporting will loops until the connection object is released.
➢ It is decided by the upper computer(the caller) itself that whether the remote device
should be re-connected or not in order to meet different requests.

5. Messages Configuration and Query Description

5.1. Send Synchronized Messages

Method void SendSynMsg(GClient * s, MESSAGE type, void* msg)

s:Connected Object
Parameter type:Message Type
Msg: Message

msg.rst.RtCode:message return code,0 means sucess, and non-zero value means failure.
Msg.rst.RtMsg: The reason of the failed operation
Instruction Send synchronized messages, detailed in Code Example
Tips: “Reader configuration and management”, “RFID configuration and operation” and other
message are sent with this method

Code Example
// stop command,idle state
MsgBaseStop stop;
memset(&stop, 0, sizeof(stop));
SendSynMsg(s, EMESS_BaseStop, &stop);
if (stop.rst.RtCode != 0) {
printf("failed to MsgBaseStop: %s \n", stop.rst.RtMsg);
}
else
{
printf("Success to MsgBaseStop. \n");
}
6. Messages Description

6.1. Reader Configuration and Management

6.1.1. Reboot Reader

Category EMESS_AppReboot

Message MsgAppReboot

Normally the restart message of the device will be executed after the modification of the
Description
configuration that need to come in to effect after restart.

6.1.2. Configure and Query COM Parameter

Message category EMESS_AppSetSerialParam

Configuration
MsgAppSetSerialParam
messages

Message category EMESS_AppGetSerialParam

Configuration
MsgAppGetSerialParam
messages

BaudrateIndex: Baud rate index(0,9600 bps; 1,19200 bps; 2,115200 bps; 3,230400
Attribute
bps; 4,460800bps)

(Persistent configuration, which means the information will be saved when it is powered off)
Description
configure the COM parameter of the device.
6.1.3. Configure GPO State Parameter

Namespace EMESS_AppSetGpo

Configuration Class MsgAppSetGpo

Gpo1: 0 (low,relay disconnected) 1 (high,relay closed)


Gpo2: 0 (low,relay disconnected) 1 (high,relay closed)
Attribute Gpo3: 0 (low,relay disconnected) 1 (high,relay closed)
Gpo4: 0 (low,relay disconnected) 1 (high,relay closed)
……

(Persistent configuration, which means the information will be saved when it’s powered off)
Configure the device GPO parameter。
Description
Note: For GPO that do not require state control, no assignment is needed.

6.1.4. Query GPI State Parameter

Namespace EMESS_AppGetGpiState

Query Class MsgAppGetGpiState

Gpi1: 0 Low,1 High


Gpi2: 0 Low,1 High
Attribute
Gpi3: 0 Low,1 High
Gpi4: 0 Low,1 High

Query the GPI status of the device.


Description
Notes: The index number starts from 1.

6.1.5. Configure and Query GPI Trigger Parameter

Namespace EMESS_AppSetGpiTrigger
Configuration Class MsgAppSetGpiTrigger

Message EMESS_AppGetGpiTrigger

Query Class MsgAppGetGpiTrigger

GpiPort: GPI port No, the index starts from 0


TriggerStart: Trigger start(0 trigger close,1 low electrical trigger,2 high electrical trigger,
3 rising edge trigger,4 falling edge trigger,5 random edge trigger)
TriggerCommand: trigger binding command(Hex, can be null)
Attribute TriggerOver: trigger stop(0 non-stop,1 low electrical trigger,2 high electrical trigger,3 rising
edge trigger,4 falling edge trigger,5random edge trigger,6 delayed stop)
OverDelayTime: delayed stop time(take effect only if the stop condition is “delayed stop”)
LevelUploadSwitch: uploading switch of the IO electrical level changes when triggering
non-stop(0 do not upload,1 upload)

(Presistent configuration, which means the information will be saved when it is powered off
configure the device GPI trigger parameter)
Description
Notes:This configuration needs to be modified when the device is idle(that is, the
configuration can be changed under loop reading)

6.1.6. Query Version for Software Baseband

Namespace EMESS_AppGetBaseVersion

Query Class MsgAppGetBaseVersion

Attribute BaseVersion: Baseband software version

Description Used to obtain the version number of the baseband software.


6.1.7. Query the information of the Reader Capabilities

Namespace EMESS_BaseGetCapabilities

Query Class MsgBaseGetCapabilities

MaxPower: Maximum Supported Power


MinPower:Minimum Supported Power
AntennaCount:Antenna Quantity
FrequencyArray:Support Frequency
0, National Standard 920~925MHz
1, National Standard 840~845MHz
2, National Standard 840~845MHz and 920~925MHz
3, FCC,902~928MHz
4, ETSI,866~868MHz
Attribute
5, JP, 916.8~920.4 MHz
6, TW, 922.25~927.75 MHz
7, ID, 923.125~925.125 MHz
8, RUS, 866.6~867.4 MHz
9, TEST,802.75~998.75MHz
ProtocolArray:List of supported protocols
0, ISO18000-6C/EPC C1G2
1, ISO18000-6B
2, National Standard GB/T 29768-2013

Description N/A

6.1.8. Query the Information of the Reader

Namespace EMESS_AppGetReaderInfo

Query Class MsgAppGetReaderInfo


SerialNum: Reader Serial No.
PowerOnTime: Power-on time
BaseBuildDate: baseband compiling time
Attribute
AppVersion: application software version(such as:“0.1.0.0”)
AppBuildDate: application compiling time
SystemVersion: version of the operation system

Description N/A

6.1.9. Buzzer control

Namespace EMESS_AppSetBuzzerCtrl

Query Class MsgAppSetBuzzerCtrl

Status: 0,stop;1,ring
Attribute
Mode: 0,ring once;1,always ring

Description N/A

6.2. RFID Configuration and Operation

6.2.1. Stop Command

Namespace EMESS_BaseStop

Category MsgBaseStop

Attribute N/A
Stop all RFID operations of the reader and make the reader idle
Description Tips: When the reader is reading, all configuration messages will not be able to send, a stop
command must be sent.

6.2.2. Configure and Query Power of the Reader

Namespace EMESS_BaseSetPower

Configuration Class MsgBaseSetPower

Category EMESS_BaseGetPower

Query Class MsgBaseGetPower

DicPower: the corresponding antenna power of the reader


typedef struct {
unsigned char AntennaNo;//Antenna No.
unsigned char Power;// Power
}Dictionary;
DicCount:Number of valid values for DicPower
setReadOrWriteFalg:Optional parameter identifier (true: optional parameters are valid; false:
optional parameters are invalid)
Attribute ReadOrWrite:(Optional)
Configuration class: 0, configure both read and write power (default); 1, configure only read
power; 2, configure only write power;
Query Class: 0, query the read power; 1, query the write power; the default is to query the
read and write power;
setPowerDownSaveFlag:Optional parameter identifier (true: optional parameters are valid;
false: optional parameters are invalid)
PowerDownSave:Parameter persistence (0, not saved when power off; 1, saved when power
off). If this parameter is not included, it will be saved when power off by default.(Optional)

Description Used to configure the current power of the reader.


6.2.3. Configure and Query the working frequency band of the reader

Namespace EMESS_BaseSetFreqRange

Configuration Class MsgBaseSetFreqRange

Category EMESS_BaseGetFreqRange

Query Class MsgBaseGetFreqRange

FreqRangeIndex: frequency band index, the specific corresponding relationship is detailed in


Attribute
appendix 1.

(Permanent configuration, saved when power off) Used to configure the current working
Description
frequency band of the reader.

6.2.4. Configure and Query EPC Baseband Parameter

Namespace EMESS_BaseSetBaseband

Configuration Class MsgBaseSetBaseband

Category EMESS_BaseGetBaseband

Query Class MsgBaseGetBaseband

setBaseSpeedFlag:Optional parameter identifier (true: optional parameters are valid; false:


optional parameters are invalid)
BaseSpeed: EPC baseband speed(Optional)
setQValueFlag:Optional parameter identifier (true: optional parameters are valid; false:
optional parameters are invalid)
QValue: Defaule Q Value(Optional)(0~15)
Attribute setSessionFlag:Optional parameter identifier (true: optional parameters are valid; false:
optional parameters are invalid)
Session:(Optional)(0,Session0; 1,Session1; 2,Session2; 3,Session3)
setInventoryFlag:Optional parameter identifier (true: optional parameters are valid; false:
optional parameters are invalid)
InventoryFlag: Inventory flag parameter (optional) (0, only use Flag A for inventory; 1, only
use Flag B for inventory; 2, use Flag A and Flag B in turn).
(Persistent configuration, saved when power off) Used to configure the baseband parameters
Description
used by the reader/writer.

6.2.5. Configure and Query Tag for Uploading Paramater

Namespace EMESS_BaseSetTagLog

Configuration Class MsgBaseSetTagLog

Category EMESS_BaseGetTagLog

Query Class MsgBaseGetTagLog

setRepeatedTimeFlag:Optional parameter identifier (true: optional parameters are valid;


false: optional parameters are invalid)
RepeatedTime: Repeat tag filtering time (optional) (indicates that within a card reading
instruction execution cycle, the same tag content will only be uploaded once within the
Attribute specified repeated filtering time, 0~65535, time unit: 10ms)。
setRssiTVFlag:Optional parameter identifier (true: optional parameters are valid; false:
optional parameters are invalid)
RssiTV: RSSI threshold(Optional)(When the tag RSSI value is lower than the threshold, the
tag data will not be uploaded and discarded.)

(Persistent configuration, saved when power off) Used to configure reader upload
Description
parameters.

6.2.6. Inventory ISO18000-6C Tag

Category EMESS_BaseInventoryEpc

Information MsgBaseInventoryEpc
AntennaEnable: Antenna Port(using antenna enumeration is detailed in Quick Start)
InventoryMode: Continuous/Single Read (0: single read,the reader read one time on each
enacling antenna then stop reading and automatically enter idle state; 1: continuous read,
the reader keeps reading and stop reading after receiving a stop command..)
Attribute Filter: select reading parameter(optional)(detailed in parameter description)
ReadTid: TID read parameter(optional)(detailed in parameter description)
ReadUserdata: user data area read parameter(optional) (detailed in parameter description)
ReadReserved: reserved area read parameter(optional)(detailed in parameter description)
StrHexPassword: access password(optional)

Using for configuring the reader parameter for tag reading and start reading. Any reading
Description operation for the tag data require the EPC code of the tag, so a EPC code can be acquired
through any reading operation.

6.2.7. Write ISO18000-6C Tag

Namespace EMESS_BaseWriteEpc

Category MsgBaseWriteEpc

AntennaEnable: Antenna Port


Area:tag data area to be written(0,reserved area;1,EPC area;2,TID area;3,user data
area)
Attribute Start:word initial address of the tag data area to be writted
StrHexWriteData:data content to be written(optional)(hex)
Filter: select reading parameter(optional)(detailed in parameter description)
StrHexPassword: Access Password(optional)

➢ Reader writes ISO18000-6C Tags, the writing that this command refined should be single
operation.
➢ ISO18000-6C The protocol specifies that the minimum data unit for R/W operations is a
word.
Description ➢ EPC are include CRC-16(the zeroth word) + PC(the first word) + EPC:
CRC16: the zeroth word, not writable.
PC:the first word,the fisrt 5 bit is the word length of EPC,which means the
computingmethod of PC to move the word length of EPC 11 bit to the left.
0, Write Success
1, Antenna port parameter error
2, Choice parameter error
3, Write parameter error
4, CRC checksum error
5, Insufficient power
Write results
6, Data area overflow
7, Data area is locked
8, Wrong access password
9, Other Tag errors
10,Loss the Tag
11,Reader sends command error

6.2.8. Lock ISO18000-6C Tag

Namespace EMESS_BaseLockEpc

Category MsgBaseLockEpc

AntennaEnable: Antenna Port


Area:tag data area to be written(0,reserved area;1,EPC area;2,TID area;3,user data
area)
Attribute
Mode:Lock operation type (0, unlock; 1, lock; 2, permanently unlock; 3, permanently locked)
Filter: select reading parameter(optional)(detailed in parameter description)
StrHexPassword: Access Password(optional)

Lock or unlock the ISO18000-6C tag. The operation defined by this command is a single
Description
operation.

6.2.9. Kill ISO18000-6C Tag

Namespace EMESS_BaseDestroyEpc

Category MsgBaseDestoryEpc
AntennaEnable: antenna Port
Attribute StrHexPassword: destroy passwords
Filter: Select read parameters(optional)(detailed in parameter description)

Kill the ISO18000-6C tag. The tag inactivated will be in permanent failure and this operation is
Description
irreversible. The operation this command defined is single.

6.2.10. Inventory ISO18000-6B Tag

Namespace EMESS_BaseInventory6b

Category MsgBaseInventory6b

AntennaEnable: antenna Port


InventoryMode: Continuous/single reading (0: Single reading mode, the reader only performs
one card reading operation on each enabled antenna, then ends the card reading operation
and automatically enters the idle state; 1: Continuous reading mode, The reader continues to
Attribute read the card until the reader receives the stop command and ends reading the card)
Area: Read content (0, read only 6B TID; 1, read 6B TID + user data; 2, read only user data)
ReadUserdata: User data area reading parameters (optional) (see parameter description for
details)
StrHexMatchTid:TID code of the 6B tag to be matched (optional) (hex)

Description Used for the data reading for ISO18000-6B tags

6.2.11. Write ISO18000-6B Tag

Namespace EMESS_BaseWrite6b

Category MsgBaseWrite6b
AntennaEnable: Antenna Port
StrHexMatchTid:TID code of the 6B tag to be matched (hex)
Attribute
Start:word initial address of the tag data area to be written
StrHexWriteData:Data content to be written (hex)

Description Write ISO18000-6B tag, The writing operation this command defined is single.

6.2.12. Lock ISO18000-6B Tag

Namespace EMESS_BaseLock6b

Category MsgBaseLock6b

AntennaEnable: Antenna Port


Attribute StrHexMatchTid:The TID code of the 6B tag to be matched (hex)
Address:The byte address of the data to be locked

Lock 6B tag. The operation is irrevocable and reversible. The locking operation this command
Description
defined is single.

6.2.13. Locking Query ISO18000-6B Tag

Namespace EMESS_BaseLockGet6b

Category MsgBaseLockGet6B

AntennaEnable: Antenna Port


Attribute StrHexMatchTid:The TID code of the 6B tag to be matched (hex)
Address:The byte address of the data to be locked
Query the locking state for the ISO18000-6B tag. The query operation this command defined
Description
is single.

7. Parameter Description

7.1.1. ISO18000-6C Tag Select Tag Parameter

Category ParamFilter

Area: data area to be matched (1,EPC area;2,TID area;3,user data area)


BitStart: starting bit address of the matching data
Attribute
BitLen: the data bit length to be matched
HexData: the data content to be matched(hex)

Description Optional parameter (The start bit address when matching EPCs is usually 32)

7.1.2. ISO18000-6C Tag Read TID Parameter

Category ParamEpcReadTid

Mode:TID reading mode configuration,(0,TID reading length is self-adapted,but the max


length should not be longer than the length defined by byte 1;1,read TID according to the
Attribute length defined by byte 1)
Len:The reader need to read the length of the word(word,16bits,similarly hereinafter )of
TID data.

Description Optional parameter


7.1.3. ISO18000-6C Tag Read User Data Area Parameter

Category ParamEpcReadUserdata

Start:starting word address


Attribute
Len:The word length of user data that need to be read.

Description Optional parameter

7.1.4. ISO18000-6B Tag Read User Data Area Parameter

Category Param6bReadUserdata

Start:Starting byte address for user data


Attribute
Len: The byte length of user data

Description optional parameter

8. Appendix 1
List of the frequency band the Readers Supported
Index Description
0 National standard 920~925MHz
1 National standard 840~845MHz
2 National standard 840~845MHz and 920~925MHz
3 FCC,902~928MHz
4 ETSI,866~868MHz
5 JP, 916.8~920.4 MHz
6 TW, 922.25~927.75 MHz
7 ID, 923.125~925.125 MHz
8 RUS, 866.6~867.4 MHz
9 TEST 802.75~998.75MHz

You might also like