CAEN UHF RFID READERS COMMUNICATION PROTOCOL Technical Information Manual Revision n.
Scope of Manual The goal of this manual is to provide the basic information to work with the CAEN UHF RFID READERS Communication Protocol. Change Document Record Date 18 Apr 2011 Revision 14 05 Oct 2012 15 15 Oct 2013 07 Jul 2014 16 Jun 2015 2 16 17 18 Changes Added AVP_PC parameter in the Tab. 2.1: Attribute types Modified Tab. 2.3: Commands with Optional Parameters Table Added Tab. 2.
Reference Document [RD1] Reader Protocol 1.0 – Working Draft Version of 25 August 2004 – Document revision 33 - EPCGlobal [RD2] EPC Radio Frequency Identity Protocols Class-1 Generation-2 UHF RFID Protocol for Communications at 860MHz – 960MHz – Version 1.0.
© CAEN RFID srl – 2013 Disclaimer No part of this manual may be reproduced in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of CAEN RFID. The information contained herein has been carefully checked and is believed to be accurate; however, no responsibility is assumed for inaccuracies. CAEN RFID reserves the right to modify its products specifications without giving any notice; for up to date information please visit www.caenrfid.com.
Index… Scope of Manual........................................................................................................................................................ 2 Change Document Record.........................................................................................................................................2 Reference Document................................................................................................................................................. 3 Index…..
1 Introduction 6 CAEN UHF RFID Readers Communication Protocol – Technical Information Manual
General Information This document describes the message format of the communication protocol used by the host and the reader in order to issuing commands and reply with responses. The protocol is based on the Attribute Value Pair (AVP) schema and foresees a message header in order to identify the message scope. The command set and the firmware architecture draw inspiration from the Reader Protocol 1.
2 Protocol Specification 8 CAEN UHF RFID Readers Communication Protocol – Technical Information Manual
CAEN UHF RFID Reader protocol uses two logical communication channels: one for synchronous commands and one for asynchronous notifications. Command channel is mandatory and, at now, it is implemented on top of a TCP/IP socket (port 1000) and on RS232 while notification channels are implemented only with sockets. All the messages (commands, responses and notifications) are composed by a header and a body. In all cases the body of the message is a list of attribute-value pairs.
Attribute types Code 0x01 0x02 0x0E 0x0F 0x10 0x11 0x12 0x1E 0x1F 0x20 0x21 0x22 0x4D 0x4E 0x4F 0x50 2 Description CommandName: the command to be executed. All the commands are specified in the relevant table. Attribute value is 2 bytes long. ResultCode: a code representing an indication on the result of the command. All the commands are specified in the relevant table. Attribute value is 2 bytes long.
Code 0x51 0x52 0x53 0x54 0x56 0x57 0x58 0x59 0x5A 0x5B 0x5C 0x5D 0x5E Description BitRate: a value representing the RF BitRate.
Code 0x5F 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x68 0x69 0x6A 0x6B 0x6C 0x6D 0x6E 12 Description RFOnOff: used to start the generation of a continuous wave for test purposes. Attribute value is 2 bytes long and can assume the following vaules: 0x00 = Stop the wave generation. Not 0x00 = Start the wave generation. BaudRate: a value representing the baudrate setting of serial port. Attribute value is 4 bytes long. DataBits: a value representing the databits setting of serial port.
Code 0x6F 0x70 0x71 0x72 0x73 0x74 0x75 0x76 0x77 0x78 0x7A 0x7B 0x7C 0x7D 0x96 0xFB Description UpgradeType: a value representing the type of upgrade to perform. Attribute value is 2 bytes long and can assume the following values: 0x01 = TFTP firmware upgrade. UpgradeArgument: a value representing the argument for the requested upgrade. Attribute value has a maximum length of 255 bytes. For TFTP upgrade (code 0x01) the string7 has the form: ‘ : ’.
Command codes Note: Some commands have been renamed to align the nomenclature in this manual and in the CAEN RFID API Reference Manual. See § Tab. 2.4: Renamed Commands Table pag. 35 to know the equivalence between old and new name of the renamed commands. Note: Some commands have optional parameters. See § Tab. 2.3: Commands with Optional Parameters Table pag. 34 to know the CAEN RFID readers that support them.
Code 0x13 Description InventoryTag: permits to get all the tag’s Ids that are under the RF field of the selected source. Parameters: SourceNameIn: [in] the name of the source to use (optional) Bank: [in] the number of the bank to use (optional). Length: [in] Filter Mask Length (optional). TagID: [in] the Filter Mask Value (optional). TagAddress: [in] Filter Mask Start Address (optional) Bitmask: [in] Inventory Flags. When set to 1 for each tag detected the RSSI value is returned. Default value 0.
Code 0x40 0x41 0x42 0x49 0x4A 0x53 0x54 0x5D 0x5E 0x5F 16 Description AddNotifyTrigger: permits to add a trigger to a notification channel. [obsolete] Parameters: ChannelName: [in] the name of the channel. TriggerName: [in] the name of the trigger. ResultCode: [out] the result code. RemoveReadTrigger: permits to remove a trigger from a source. [obsolete] Parameters: SourceName: [in] the name of the source. TriggerName: [in] the name of the trigger. ResultCode: [out] the result code.
Code 0x60 Description RemoveReadPointFromSource: permits to remove a readpoint from a source. Parameters: SourceName: [in] the name of the source. ReadPointName: [in] the name of the readpoint. ResultCode: [out] the result code. SetPower: permits to set the RF power level. Parameters: PowerSet: [in] the power level to set. ResultCode: [out] the result code. 0x64 Comp.
Code Description SetBitRate: permits to set the BitRate to use. Parameters: BitRate: [in] the BitRate to set. ResultCode: [out] the result code. 0x72 GetPower: permits to get the current RF power level. Parameters: PowerGet: [out] the current power level. ResultCode: [out] the result code. 0x73 SetProtocol: permits to set the protocol to use. Parameters: Protocol: [in] the protocol to use. ResultCode: [out] the result code. 0x74 0x75 18 Comp.
Code Description CheckReadPointStatus: permits to check the quality of the antenna connection. Parameters: ReadPointName: [in] the name of the readpoint. ReadPointStatus: [out] the quality of the connection. ResultCode: [out] the result code. 0x76 Comp. A928EU A948EU A949EU A941EU A941US A828EU A828AEU A828BT A829EU A528 A528J A939 A528B R1240I R1170I R1270 R1250I CheckSourceInChannel: permits to verify if a source is assigned to a notify channel.
Code Description GetProtocol: permits to get the protocol in use. Parameters: Protocol: [out] the protocol in use. ResultCode: [out] the result code. 0x79 Comp. A828EU A828AEU A828BT A829EU A928EU A948EU A941EU A941US A949EU A528 A528J A939 R1230CB R1260I R1260U R1260E R4300P A528B R1240I R1170I R1270 R1250I SetNetwork: permits to set up the network configuration. 0x7A 0x7B Parameters: IPAddress: [in] the IP address to set. IPNetMask: [in] the IP netmask to set. IPGateway: [in] the IP gateway to set.
Code 0x7D Description Comp. GetDESB: permits to get the current setting of the “Data Exchange Status Bit” handling. A928EU [obsolete] A948EU A828EU Parameters: A828AEU DESBStatus: [in] enabled/disabled value. A829EU ResultCode: [out] the result code. A949EU ProgramID: permits to program the ID in the EPC Class 1 Gen 1 tags. 0x7E 0x7F Parameters: SourceName: [in] the name of the source. TagIDLen: [in] the ID length of the tag. TagID: [in] the ID of the tag. EPCPWD: [in] the EPC password to set.
Code 0x82 0x83 Description BlockWriteTag: permits to write data to the tag memory. This function uses the ISO18000-6b Write4Byte command to speed up the writing of large amount of data at one time. Parameters: SourceName: [in] the name of the source to use. TagIDLen: [in] the ID length of the tag. TagID: [in] the ID of the tag. TagAddress: [in] the address where to write the data. Length: [in] the number of bytes to write. TagValue: [in] the data to write to the tag memory.
Code Description GetIO: permits to read the current status of the I/O lines. Parameters: IORegister: [out] the status of the I/O lines. ResultCode: [out] the result code. 0x86 SetIO: permits to set the level of the output lines. Parameters: IORegister: [in] the value to set to the output lines. ResultCode: [out] the result code. 0x87 CAEN UHF RFID Readers Communication Protocol - Technical Information Manual Comp.
Code Description SetIODirection: permits to define the direction of the I/O lines. (0 = input; 1 = output) Parameters: IORegister: [in] the direction to set to the I/O lines. ResultCode: [out] the result code. 0x88 GetIODirection: permits to read the current status of the I/O lines. (0 = input; 1 = output) Parameters: IORegister: [out] the direction of the I/O lines. ResultCode: [out] the result code. 0x89 24 Comp.
Code Description SetSourceConfig: permits to set a configure parameter for a logical source. Parameters: SourceName: [in] the name of the source to configure. ConfigParameter: [in] the code of the parameter. ConfigValue: [in] the value for the parameter. ResultCode: [out] the result code. 0x8A GetSourceConfig: permits to read a configure parameter for a logical source. Parameters: SourceName: [in] the name of the source to configure. ConfigParameter: [in] the code of the parameter.
Code 0x8E 0x8F 0x90 Description CheckSourceInTrigger: permits to verify if the specified logical source is associated to the specified trigger. [obsolete] Parameters: SourceName: [in] the name of the source. TriggerName: [in] the name of the trigger. Boolean: [out] 0 if they are associated, ≠0 if not. ResultCode: [out] the result code. CheckTriggerInChannel: permits to verify if the specified trigger is associated to the specified channel.
Code 0x96 Description ReadTagData_EPC_C1G2: permits to read data from anyone of the Gen2 tag memory banks. Parameters: SourceName: [in, optional] the name of the source to use. Bank: [in] the number of the bank to use (optional). TagAddress: [in] Filter Mask Start Address (optional) TagIDLen: [in] the ID length of the tag. TagID: [in] the ID of the tag. MemoryBank: [in] the memory bank. TagAddress: [in] the address where to read the data. Length: [in] the number of bytes to read (must be an even number).
Code 0x98 0x99 28 Description Comp. LockTag_EPC_C1G2: permits to execute the tag lock command defined by the EPC Class A828EU 1 Gen 2 protocol. A828AEU A828BT Parameters: A829EU SourceName: [in, optional] the name of the source to use. A928EU BankMask: [in] filter mask for the bank (optional). A948EU PositionMask: [in] filter mask start address (optional).
Code 0x9A 0x9B Description Comp. Query_EPC_C1G2: permits to execute the tag query command defined by the EPC Class A828EU 1 Gen 2 protocol. If a tag is in the field result code is ERROR_SUCCESS (0x00) else result A828AEU code is ERROR_TAGNOTPRESENT (0xCA). A828BT A829EU Parameters: A928EU SourceName: [in] the name of the source to use. A948EU ResultCode: [out] the result code.
Code Description GetQ_EPC_C1G2: permits to read the initial value of the Q parameter used in the Gen2 anticollision algorithm. Parameters: QParameter: [out] the value of the Q parameter. ResultCode: [out] the result code. 0x9C QueryAck_EPC_C1G2: permits to execute the tag query and ack command defined by the EPC Class 1 Gen 2 protocol. If a tag is in the field result code is ERROR_SUCCESS (0x00) and the command returns the EPC code stored in the tag else the result code is ERROR_TAGNOTPRESENT (0xCA).
Code Description SetLBTMode: permits to enable or disable the Listen Before Talk capability on ETSI EN 302 208 compatible readers. Parameters: Boolean: [in] 0 to disable LBT and ≠0 to enable LBT. ResultCode: [out] the result code. 0x9F GetLBTMode: permits to read the current setting for the Listen Before Talk capability on ETSI EN 302 208 compatible readers. Parameters: Boolean: [out] 0 if LBT is disabled, ≠0 if LBT is enabled. ResultCode: [out] the result code.
Code Description SetRFChannel: permits to set the RF channel where the reader emits the RF field. Parameters: RFChannel: [in] the RF channel. ResultCode: [out] the result code. 0xA3 GetRFChannel: permits to read the RF channel currently in use. Parameters: RFChannel: [out] the RF channel. ResultCode: [out] the result code. 0xA4 0xA7 0xB0 GetChannelData: [Obsolete] GetBufferedData: permits to read all the tags stored in reader's memory using all the ReadPoints belonging to the source.
Commands with Optional Parameters The following table shows a list of EPC C1G2 commands with optional parameters and the CAEN RFID readers that support them (for information about the obsolete readers, please refer to the previous revisions of the manual that can be downloaded in the Manuals and Documents area of the CAEN RFID web site).
Reader A941EU A528B R1230CB R1260I R1260U R1260E R4300P R1240I R1270 R1170I R1250I x √ x x x x x √ x x x √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ √ Command WriteTagData _EPC_C1G2 + Bank + TagAddress + G2Password parameters+optional ProgramID_EPC_C1 G2 ProgramID_EP C_C1G2 + G2Password Tab. 2.
Renamed Commands Table Some commands have been renamed to align the nomenclature in this manual and in the CAEN RFID API Reference manual (you can download this manual from the CAEN RFID Web Site). The following table shows the equivalence between old and new name of the renamed commands.
3 ASYNCHRONOUS NOTIFICATION: PROTOCOL SPECIFICATION 36 CAEN UHF RFID Readers Communication Protocol – Technical Information Manual
The notification channels are implemented only with sockets. All the messages notifications are composed by a header and a body. In all cases the body of the message is a list of attribute-value pairs. The first AVP of the body is fixed and called NotifyMessage. All the packets for notification channel share the same header format of other packet as described at § 3. The first AVP (NotifyMessage) is followed by a list of AVPs, the number of which depends on how many tags should be notified.
4 DEFAULT CONFIGURATION 38 CAEN UHF RFID Readers Communication Protocol – Technical Information Manual
CAEN A928EUEU and A948EUEU UHF RFID Reader protocol has various configuration parameters; in the following table are summarized the default values. Parameter IP Address IP Netmask IP Gateway Sources Readpoints Baud Rate Data Bits Stop Bits Parity Flow Control Default value 192.168.0.125 255.255.255.0 192.168.0.1 “Source_0”, “Source_1”, “Source_2”, “Source_3” “Ant0”, “Ant1”, “Ant2”, “Ant3” 115200 8 1 None None Tab. 4.4.
5 EXAMPLES
Set Protocol Command Action: Set Reader Protocol to EPC C1G2 Result: Reader selects EPC C1G2 protocol.
InventoryTag Command Action: Execute an inventory cycle on the logical source Source0 Result: Two EPCC1G2 tags are returned as being inventory by the reader on Ant0.
0x536F757263655F3000 (AVP Value) 0x0000 0x000B 0x0022 0x416E743000 (Reserved) (AVP Length) (AVP Type = ReadPointName) (AVP Value = “Ant0”) 0x0000 0x000E 0x0010 0x00000578 0x00000000 (Reserved) (AVP Length) (AVP Type = TimeStamp) (AVP Value = Thu Jan 1 01:23:20 1970) (AVP Value) 0x0000 0x0008 0x0012 0x0003 (Reserved) (AVP Length) (AVP Type = TagType) (AVP Value = EPCC1G2) 0x0000 0x0008 0x000F 0x000C (Reserved) (AVP Length) (AVP Type = TagIDLen) (AVP Value = 96 bit) 0x0000 (Reserved) 0x0012 (AVP Len
WriteTagData_EPC_C1G2 Command Command sent: 0x8001 0x001A 0x00005358 0x005d (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Message Length) 0x0000 0x0008 0x0001 0x0097 (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value = WriteTagData_EPC_C1G2) 0x0000 0x000F 0x00FB 0x536F757263655F3000 (Reserved) (AVP Length) (AVP Type = SourceName) (AVP Value) 0x0000 0x0008 0x000F 0x000C (Reserved) (AVP Length) (AVP Type = TagIDLen) (AVP Value = 96 bit) 0x0000 (Reserved) 0x0012 (AVP Length) 0x0011 (AVP Type =
ReadTagData_EPC_C1G2 Command Command sent: 0x8001 0x000E 0x00005358 0x0053 (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Message Length) 0x0000 0x0008 0x0001 0x0096 (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value = ReadTagData_EPC_C1G2) 0x0000 0x000F 0x00FB 0x536F757263655F3000 (Reserved) (AVP Length) (AVP Type = SourceName) (AVP Value) 0x0000 0x0008 0x000F 0x000C (Reserved) (AVP Length) (AVP Type = TagIDLen) (AVP Value = 96 bit) 0x0000 (Reserved) 0x0012 (AVP Length) 0x0011 (AVP Type = Ta
Set Power Command Command sent: 0x8001 0x0000 0x00005358 0x001C (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Message Length) 0x0000 0x0008 0x0001 0x0064 (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value = Set Power) 0x0000 0x000A 0x0096 0x000003E8 (Reserved) (AVP Length) (AVP Type = Power Set) (AVP Value = 1000 mW) Response received: 46 0x0001 0x0000 0x00005358 0x001A (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Overall Message Length) 0x0000 0x0008 0x0001 0x0064 (Reserved) (AVP Length)
LockTag Command Command sent: 0x8001 0x0009 0x00005358 0x004F (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Message Length) 0x0000 0x0008 0x0001 0x0098 (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value = LockTag_EPC_C1G2) 0x0000 0x000F 0x00FB 0x536F757263655F3000 (Reserved) (AVP Length) (AVP Type = SourceName) (AVP Value) 0x0000 0x0008 0x000F 0x000C (Reserved) (AVP Length) (AVP Type = TagIDLen) (AVP Value = 96 bit) 0x0000 (Reserved) 0x0012 (AVP Length) 0x0011 (AVP Type = TagID) 0x300833B2DD
Continuous Inventory Command Command sent (set read cycle to 0): 0x8001 0x0003 0x00005358 0x0035 (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Message Length) 0x0000 0x0008 0x0001 0x008A (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value = Set Source Config) 0x0000 0x000F 0x00FB 0x536F757263655F3000 (Reserved) (AVP Length) (AVP Type = SourceName) (AVP Value) 0x0000 0x000A 0x006A 0x00000000 (Reserved) (AVP Length) (AVP Type = Config Parameter) (read cycle) 0x0000 0x000A 0x006B 0x00000000 (Re
0x0000 0x0007 0x0011 0x00 (Reserved) (AVP Length) (AVP Type = TagID) 0x0000 0x0008 0x004e 0x0000 (Reserved) (AVP Length) (AVP Type = Tag Address) (AVP Value = Address) 0x0000 0x0008 0x0067 0x0006 (Reserved) (AVP Length) (AVP Type = Bit Mask) (AVP Value = Flags: FRAMED and CONTINUOS) Response received: 0x0001 0x0002 0x00005358 0x0000 (Fixed) (Message ID) (Vendor ID = CAEN SpA) (Overall Message Length not defined) 0x0000 0x0008 0x0001 0x0013 (Reserved) (AVP Length) (AVP Type = CommandName) (AVP Value