Sie sind auf Seite 1von 176

RFID SYSTEMS

SIMATIC Sensors RFID Systems SIMATIC RF660R XML Interface

SIMATIC RF660R XML Interface

Function Manual · 12/2009

SIMATIC Sensors
Answers for industry.
Introduction 1

Quick Reference 2

Description 3
SIMATIC Sensors
Messaging Overview 4
RFID Systems Connection Set Up
SIMATIC RF660R XML Interface Procedure and Messages 5
Service Provisioning
Messages 6
Function Manual
Standard Configuration
Messages 7

Smart Reader Configuration 8

Control Messages 9
Smart Reader Tag Inventory
Management 10
Smart Reader Data
Exchange Messages 11

General Reader Information 12

Development Testing 13

Firmware Update 14

Appendix A

Appendix B

12/2009
J31069-D0173-U001-A6-7618
Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.

DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The product/system described in this documentation may be operated only by personnel qualified for the specific
task in accordance with the relevant documentation for the specific task, in particular its warning notices and
safety instructions. Qualified personnel are those who, based on their training and experience, are capable of
identifying risks and avoiding potential hazards when working with these products/systems.
Proper use of Siemens products
Note the following:

WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.

Trademarks
All names identified by ® are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG J31069-D0173-U001-A6-7618 Copyright © Siemens AG 2006,


Industry Sector Ⓟ 12/2009 2009.
Postfach 48 48 Technical data subject to change
90026 NÜRNBERG
GERMANY
Table of contents

1 Introduction................................................................................................................................................ 9
1.1 Introduction ....................................................................................................................................9
1.2 Typographical Convention ...........................................................................................................10
2 Quick Reference ...................................................................................................................................... 11
3 Description............................................................................................................................................... 17
3.1 General Operation .......................................................................................................................17
3.2 Note on the Ethernet Usage ........................................................................................................18
4 Messaging Overview ............................................................................................................................... 19
4.1 Message Format ..........................................................................................................................20
4.2 General Format of Host Initiated Messages ................................................................................21
4.2.1 Messages with no Parameters.....................................................................................................21
4.2.2 Messages with Multiple Parameters ............................................................................................22
4.2.3 Messages with a Single Parameter .............................................................................................23
4.2.4 Retrieving a Single Parameter from the Reader..........................................................................23
4.2.5 Retrieving a Set of Parameters from the Reader.........................................................................24
4.3 General Format of Reader Responses........................................................................................25
4.3.1 Normal Responses ......................................................................................................................25
4.3.1.1 Responses without any Return Parameters ................................................................................25
4.3.1.2 Responses with a Single Return Parameter................................................................................26
4.3.1.3 Responses with Multiple Return Parameters...............................................................................26
4.3.2 Error Responses ..........................................................................................................................27
4.3.3 Notifications..................................................................................................................................27
4.4 Backward Compatibility Issues ....................................................................................................28
4.4.1 Overview of XML Changes with Firmware Version V1.3.............................................................29
4.4.1.1 HostGreetings Message (Host -> Reader) ..................................................................................29
4.4.1.2 Notification Channel.....................................................................................................................29
4.4.1.3 ETSI Frequency Switching Settings ............................................................................................29
4.4.1.4 Error Code Changes for Firmware Version V1.3 .........................................................................29
4.4.2 Overview of XML Changes with Firmware Version V1.2.............................................................30
4.4.2.1 tagIdType .....................................................................................................................................30
4.4.2.2 tagID.............................................................................................................................................30
4.4.2.3 tagProgramID...............................................................................................................................30
4.4.2.4 tagDataWrite ................................................................................................................................30
4.4.2.5 Ter................................................................................................................................................30
4.4.2.6 hostGreetings...............................................................................................................................31
4.4.2.7 channelConfig - CHINA Frequency Settings ...............................................................................31
4.4.2.8 SetReaderProfile CHINA Settings ...............................................................................................32
4.4.2.9 GetReaderProfile CHINA Settings ...............................................................................................32
4.4.2.10 Get ETSI ChannelConfig .............................................................................................................32
4.4.2.11 setNotifyChannel..........................................................................................................................32
4.4.2.12 EPC GEN 2 tagSelectionRange ..................................................................................................33
4.4.2.13 resetConfig...................................................................................................................................33
4.4.2.14 Error Code Changes for firmware version V1.2...........................................................................33

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 5
Table of contents

5 Connection Set Up Procedure and Messages ......................................................................................... 35


5.2 Connection Initiation from the Host............................................................................................. 37
5.3 Heart Beat Mechanism................................................................................................................ 40
5.4 Real Time Clock.......................................................................................................................... 42
5.4.1 Setting the Real Time Clock........................................................................................................ 42
5.4.2 Retrieve Current Clock Time....................................................................................................... 44
5.5 Goodbye Message from the Host ............................................................................................... 45
5.6 Notes on the Control Channel Connection ................................................................................. 45
6 Service Provisioning Messages ............................................................................................................... 47
6.1 Serial Port Configuration ............................................................................................................. 47
6.2 Ethernet Configuration ................................................................................................................ 48
6.2.1 Retrieve Current Ethernet Connection........................................................................................ 49
6.3 DHCP Based Ethernet Setup...................................................................................................... 50
6.3.1 Setup Ethernet DHCP ................................................................................................................. 50
6.4 Notification Channel .................................................................................................................... 52
6.4.1 Setting the Notification Channel.................................................................................................. 52
6.4.2 Retrieve Notification Channel Details ......................................................................................... 54
7 Standard Configuration Messages........................................................................................................... 55
7.1 Reader Profile ............................................................................................................................. 56
7.1.1 Set Reader Profile....................................................................................................................... 56
7.1.2 Get Reader Profile ...................................................................................................................... 57
7.2 Reader Antenna Settings ............................................................................................................ 58
7.2.1 Reader Mode Switching .............................................................................................................. 58
7.3 Reader Frequency Setting .......................................................................................................... 61
7.3.1 ETSI Frequency Switching Settings............................................................................................ 61
7.3.2 FCC Channel ID Settings............................................................................................................ 62
7.3.3 China Frequency Switching Settings .......................................................................................... 64
7.4 Protocol Configuration................................................................................................................. 66
7.4.1 Set the Protocol Configuration .................................................................................................... 66
7.4.2 Get Protocol Configuration.......................................................................................................... 69
7.5 Saving Configuration Changes ................................................................................................... 70
7.5.1 Saving Configuration................................................................................................................... 70
7.5.2 Get Current Configuration Version.............................................................................................. 71
7.5.3 Resetting Configuration to Factory Settings ............................................................................... 72
8 Smart Reader Configuration .................................................................................................................... 73
8.1 Read Trigger Options.................................................................................................................. 73
8.1.1 Set the Read Trigger................................................................................................................... 73
8.1.2 Get the Current Read Trigger ..................................................................................................... 75
8.2 Digital Input Configuration........................................................................................................... 76
8.2.1 Set the Digital Input Configuration .............................................................................................. 76
8.2.2 Get the Current State of the Digital Input.................................................................................... 78
9 Control Messages.................................................................................................................................... 79
9.1 Standard Control Messages........................................................................................................ 80
9.1.1 Resetting the Reader Configuration to its Factory Default ......................................................... 80

SIMATIC RF660R XML Interface


6 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Table of contents

9.1.2 Resetting the Reader ...................................................................................................................81


9.1.3 Controlling Reader Mode .............................................................................................................82
9.2 Autonomous Mode.......................................................................................................................83
9.2.1 Autonomous Mode Behaviour......................................................................................................83
9.2.2 Application Requested Tag Reads ..............................................................................................85
9.3 Setting Digital Output ...................................................................................................................86
9.3.1 Setting Digital Output ...................................................................................................................86
10 Smart Reader Tag Inventory Management.............................................................................................. 89
10.1 Smart Reader Tag Selection........................................................................................................90
10.1.1 Tag Select Message ....................................................................................................................90
10.1.2 ISO-B Tag Selection ....................................................................................................................91
10.1.3 EPC Gen 1 Tag Selection............................................................................................................94
10.1.4 EPC Gen 2 Tag Selection............................................................................................................94
10.1.5 Retrieve Current Configuration ....................................................................................................97
10.1.6 A Review of Selecting all Tags in View........................................................................................97
10.2 Smart Reader Tag ID Programming ............................................................................................99
10.3 Tag Killing ..................................................................................................................................104
11 Smart Reader Data Exchange Messages.............................................................................................. 107
11.1 Smart Reader Tag Data Reading ..............................................................................................107
11.2 Smart Reader Tag Data Writing.................................................................................................112
11.3 Smart Reader Tag Locking ........................................................................................................116
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS ........................................................122
11.4.1 EPC1 Command ........................................................................................................................122
11.4.2 QUIET ........................................................................................................................................124
11.4.3 TALK ..........................................................................................................................................124
11.4.4 VERIFY ......................................................................................................................................125
11.4.5 ERASE .......................................................................................................................................125
11.5 EPC GLOBAL CLASS 1 GEN 2 SPECIFIC COMMANDS ........................................................127
12 General Reader Information .................................................................................................................. 129
12.1 Reading General Reader Information........................................................................................129
12.1.1 Retrieve General Information about the Reader........................................................................129
12.1.2 Set Reader Description..............................................................................................................130
13 Development Testing............................................................................................................................. 131
13.1 Alerts from the Reader...............................................................................................................131
14 Firmware Update ................................................................................................................................... 133
14.1 Firmware Update .......................................................................................................................133
14.1.1 Initiating the Firmware Update Process.....................................................................................135
14.1.2 Upload Firmware Message ........................................................................................................136
14.1.3 Saving the Image to FLASH ......................................................................................................137
14.1.4 Set the Reader to Boot from flashBank .....................................................................................137
14.1.5 Get Firmware Version Number ..................................................................................................138
14.2 Configuration Information over Firmware Updates ....................................................................139
14.3 Updating the Reader Boot Loader .............................................................................................139
14.3.1 Update the Reader Request Message ......................................................................................139
14.3.2 Flash Firmware Message...........................................................................................................140

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 7
Table of contents

A Appendix................................................................................................................................................ 141
A.1 FCC Sub Bands ........................................................................................................................ 141
A.2 ETSI Sub Bands........................................................................................................................ 142
A.3 ETSI Sub Bands for Dedicated Zones in France ...................................................................... 143
A.4 CHINA Sub Bands .................................................................................................................... 144
A.5 Reader To Tag Communications Schemes .............................................................................. 145
A.6 Reader Default Configuration.................................................................................................... 147
A.7 Discovering MAC / IP of Reader for DHCP............................................................................... 148
A.8 Error Codes From The Reader ................................................................................................. 155
A.9 Error Codes - Displayed by ERROR-LED................................................................................. 166
B Appendix................................................................................................................................................ 167
B.1 Certificates and Approvals ........................................................................................................ 167
B.2 Service and support .................................................................................................................. 169
B.3 Contact partner ......................................................................................................................... 170
B.4 Training ..................................................................................................................................... 170
Index...................................................................................................................................................... 171

SIMATIC RF660R XML Interface


8 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Introduction 1
1.1 Introduction

Purpose of this Documentation


This Manual is purposed for advanced users who may want to develop their own custom
applications using the XML based messaging interface of the Portal Reader.
The document describes the XML based messaging interface of RF660R Portal Reader. The
document also specifies the tag event notifications that the Portal Reader generates.

Scope of this documentation


This documentation is valid for the delivery version of SIMATIC RF660R firmware version
V1.3 and describes the delivery conditions from december 2009.
If you have a SIMATIC RF660R reader with a firmware version prior to V1.3, please refer to
an earlier edition of this manual (listed below).

History

Issue Comment
11/2005 First edition
03/2006 Second edition
Changes first edition -> second edition firmware version V1.1
 Setting The Real Time Clock -> new feature
 Alerts from The Reader -> more info
 Reader to Tag Communications Schemes -> more features
 Reader Default Configuration -> more detailed info
 Serial Port Auto Baud-Rate Detection -> new feature
 Discovering MAC / IP of Reader for DHCP -> new feature
 More Error Codes -> more info
11/2006 Third edition
Minor modifications
07/2008 Fourth edition / firmware version V1.2
12/2009 Fifth edition / firmware version V1.3

Conventions
Within this documentation following terms are used synonym:
● Reader, Portal Reader
● Tag, Transponder, Smartlabel

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 9
Introduction
1.2 Typographical Convention

Common Terms Used in this Document:


Config Application –(SIMATIC RF660R Configuration Software) Control and Configuration
Software. This is the software to configure the Portal Reader. This uses a configuration
wizard to configure a single Portal Reader at one time.
Control Channel– A logical channel to exchange control and configuration information
between the host and the reader
Host– The workstation connected to the Portal Reader and running the Configuration
Software or Manager.
Device & Data Management– A management station controlling multiple SIMATIC RF660R
Readers.
Notifications Channel– A logical channel to carry notification and trace/debug information
from the reader to the host.
Reader – Refers to the Portal Reader hardware and the embedded software as a single unit.

1.2 Typographical Convention


The typographical convention used in this specification follows the following rules:

Text/Letters Text/letters appearing in bold must be used literally when composing


messages. These normally represent the keywords when used as
element or attribute values.
italic Text Sample text is displayed as italic text and is used for illustration only.
<element attribute = " " > Element and attributes are also displayed as normal text. However,
these always appear within the ‘<’ and ‘>’ symbols. However, an
element name when used as a value will appear in bold.

Be careful if you are going to copy and paste messages from this document into your code
as, the application used to write this specification may have used smart quotes or other
special characters that may make the XML syntax invalid.
For easier copy-and-pasting messages into your code, the use of the plain-text file 'XML-
Protocol-commands-RF660R.txt' is recommended.
This text file contains all Set/Get configuration messages from host to reader/reader to host
which are covered by the Function Manual.
Besides, for many commands, various examples are given.

SIMATIC RF660R XML Interface


10 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Quick Reference 2
Connection Establishment and Status Messages

Message Direction Parameters/Group Purpose


hostGreetings host->reader hostGreetings Connection initiation from the host
hostGreetings (response) reader->host readerGreetings/ Response from the reader
error
heartbeat host->reader none Heartbeat exchange initiated from the host
heartbeat (response) reader->host none Heartbeat response from the reader
hostGoodbye host->reader none Goodbye message from the host
hostGoodbye (response) reader ->host none Response to the above
set host->reader clock Time To set the RTC on the reader
set (response) reader->host *clock Time Responce from the reader
get host->reader *clock Time Get real time of the reader
Get (response) reader->host clock Time Response from the reader

Service Provisioning Messages

Message Direction Parameters/Group Purpose


set host->reader ethernetConfig Static ethernet configuration of the reader
set (response) reader->host *ethernetConfig Response to the above
get host->reader *ethernetConfig To retrieve current Ethernet configuration
get (response) reader->host ethernetConfig Result of the above.
setupEthernetDHCP host->reader none Request to set up Ethernet using the DHCP
procedure.
setupEthernetDHCP reader->host none Ack to the above request.
(response)
set host->reader notifyChannel configuration of the notification channel for tag
events
set (response) reader->host *notifyChannel Successful response
get host->reader *notifyChannel Get configuration of the notification channel
get (response) reader->host notifyChannel/ error Successful response

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 11
Quick Reference

Configuration Messages

Message Direction Parameters/ Group Purpose


set host->reader readerProfile Set the Radio Profile of the reader
set (response) reader->host *readerProfile Response
get host->reader *readerProfile get the Radio Profile of the reader
get(response) reader->host readerProfile Response with the reader profile value
set host->reader channelConfig Set the channel configuration
set (response) reader->host *channelConfig Response to the set request
get host->reader *channelConfig get the current channel configuration
get (response) reader->host channelConfig Response with the current channel config.
set host->reader antennaConfig Set the Antenna configuration
set (response) reader->host * antennaConfig Response to the set request
get host->reader * antennaConfig get the current antenna configuration
get (response) reader->host antennaConfig Response with the current antenna config.
set host->reader protocolConfig Set the protocol configuration
set (response) reader->host *protocolConfig Response to the set request
get host->reader *protocolConfig get the current protocol config
get (response) reader->host protocolConfig Response with the current protocol config

Saving Configuration Changes

Message Direction Parameters/Group Purpose


saveConfig host->reader none Save the current configuration and apply the
given label to it.
saveConfig (response) reader->host none Response to the above
get host->reader *configVersion Get the current config label
get (response) reader->host configVersion Result of the get operation

Read Trigger Options

Message Direction Parameters/Group Purpose


set host->reader readTriggerConfig Set the read trigger
set (response) reader->host *readTriggerConfig Response to the above
get host->reader *readTriggerConfig Get the current read trigger
get (response) reader->host readTriggerConfig Result of the get operation

SIMATIC RF660R XML Interface


12 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Quick Reference

Digital Input Configuration

Message Direction Parameters/Group Purpose


set host->reader digitalInputConfig Set the digital input config
set (response) reader->host *digitalInputConfig Response to the above
get host->reader *digitalInputConfig Get the current settings of the digital input mask
get (response) reader->host digitalInputConfig Result of the get operation
get host->reader *digitalInputState Get the current state of the digital input
get (response) reader->host digitalInputState Result of the get operation
digitalInputEvent reader->host digitalInputInfo Notification of digital input change for masked lines.

Control Messages

Message Direction Parameters/Group Purpose


resetReader host->reader none To reset the reader
resetReader (response) reader->host none Response to the reset request
set host->reader readerMode Set reader mode
set (response) reader->host *readerMode Response to the set request
readTags host->reader none Initiates an APP_REQUEST
readTags (response) reader->host notifyCount Response to the set request
set host->reader ditigatOuputState Set the digital output
set (response) reader->host *digitalOutputState Response to the above

Tag Reading Modes Of Operation

Reader Mode Trigger Tag Reading


AUTONOMOUS CONTINUOUS Reader will send tagEventReports automatically to the host.
AUTONOMOUS DIGITAL_INPUT Reader will send tagEventReport automatically to the host when the
digital input enters the required state.
AUTONOMOUS APP_REQUEST The host will send an explicit command to indicate the occurrence of a
trigger.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 13
Quick Reference

Smart Reader Tag Inventory Management

Message Direction Parameters/Group Purpose


tagEventReport reader->host tagEventReport Reader reporting of Tag Ids.
(notification)
tagSelect host->reader tagSelectionRange A data range at a given starting address and/or
memory bank to narrow the tags responding to the
selection commands.
tagSelect (response) reader->host none/error Response to the above
tagProgramId host->reader tagIdSpec Request to program id on a single tag
tagProgramId (response) reader->host none/error Response to the above
tagKill host->reader tagKillSpec Request to kill a tag
tagKill (response) reader->host none/error Response to the above request

Smart Reader Data Exchange Commands

Message Direction Parameters/Group Purpose


tagDataRead host->reader tagReadSpec Request Tag Data for a given tag specification.
tagDataRead (response) reader->host tagData/error Response to the above request
tagDataWrite host->reader tagWriteSpec To write data for a given tag specification
tagDataWrite (response) reader->host none/error Response to the above request
tagLock host->reader tagLockSpec Request to lock certain tag fields
tagLock (response) reader->host none/error Response to above command

EPC Global Generation 1 Specific Commands

Message Direction Parameters/Group Purpose


EPC1Command host->reader EPC1mdSpec Send EPC1 specific command
EPC1Command reader ->host *EPC1CmdSpec Response
(response)

EPC Global Generation 2 Specific Commands

Message Direction Parameters/Group Purpose


tagBlockErase host->reader tagBlockEraseSpec Send the EPC Gen 2 block erase command
tagBlockErase reader->host *tagBlockEraseSpec Response
(response)

SIMATIC RF660R XML Interface


14 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Quick Reference

General Enquiries

Message Direction Parameters/Group Purpose


get host->reader readerInfo Retrieve general information about the reader
get host->reader readerInfo Retrieve general information about the reader
set reader->host readerDesc Set reader Description
set (response) reader->host *readerDesc Response to the set request

Firmware Update

Message Direction Parameters/ Group Purpose


updateFirmwareReq host->reader none Host request to initiate a firmware update
process
updateFirmwareReq reader->host none Response from the reader
(response)
updateFirmware host->reader none The actual transfer of data. See the details
below.
updateFirmware (response) reader->host none/error Response to the above.
flashFirmware host->reader flashBank Saving the image to FLASH
flashFirmware (response) reader->host *flashBank/error Response after saving the image to FLASH
setFirmware host->reader flashBank Set the reader to boot from flashBank
setFirmware (response) reader->host *flashBank/error Response after changing the boot vector
get host->reader *firmwareInfo Retrieve firmware info
get (response) reader->host firmwareInfo Response to the above

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 15
Quick Reference

SIMATIC RF660R XML Interface


16 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Description 3
3.1 General Operation
The reader can be configured using standard configuration commands. These commands
set up things such as power level, radio frequency profile, antenna switching characteristics,
air interface modulation and encoding schemes. These are required by both the regulatory
standards and by the tag air interface standards.
A Smart Reader design is one where no host is required in order to operate the reader; this
is the AUTONOMOUS mode. All Generation 2 Readers need some form of smartness as the
timings on the air interface are such that an external host cannot respond in time.
A Smart Reader operates with triggers and outputs events. The Smart Reader configuration
commands listed herein allow for triggering by a digital input change (or level) or by a
triggering command from a host application. Only two events are defined at present, the
changing of a digital input level, and the detection of a tag.
In the AUTONOMOUS mode the Reader will handle collision arbitration automatically based
on its configured tag selection parameters.

NOTICE
Reader reboot may be necessary
When there are many tags inside the antenna field and the tag reading mode of operation
is such that the reader mode is AUTONOMOUS and the trigger is set to CONTINUOUS
then the air interface of the reader will be under heavy load. In these cases it is prohibited
that re-configurations or other commands are sent from the host to the reader.
Reader configurations and other commands shall only be sent from the host to the reader
when either no tags are in the field or the reader does not operate in the continuous reader
mode.
It is required, that the tag event buffer (tag event report list) of the reader will be cleared
prior to any further communication from the host to the reader (no further tag events will be
displayed).

Note
Strictly synchronous operation of the reader
The host shall only send a command to a reader after the response of the previous
command has been received.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 17
Description
3.2 Note on the Ethernet Usage

3.2 Note on the Ethernet Usage


The Reader permits only one Ethernet TCP connection at one time. This puts some
restrictions on the over all system architecture as described below:
● When only Ethernet is to be used as both Control and Notifications channels, the same
TCP connection must be used (notify ChannelId = NONE).. This means the same
application must handle both the control and configuration tasks and the notifications
from the Reader.
● If it is desired to use a dedicated Event Management Server, the control and
configuration tasks will have to be performed over RS232.
When using XML commands, the user is advised to avoid overload of the reader. In order to
avoid malfunction, new xml commands shall be sent to the reader after the response of the
command before is received.

SIMATIC RF660R XML Interface


18 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview 4
The Control Application running on the Configuration PC and the reader will implement a
synchronous message/response method of communications. The Application will send a
message and wait for the reader to respond. If the reader is not able to comply with the
instruction in the message, it will send an error response. The error response must contain
the reason for failure.
If a reader does not respond to a command within 5 seconds, this may be seen as a timeout
condition. If such condition occurs, the Config Application may take appropriate action such
as warn the user of a potential mal-function in the Reader.
Some commands like firmware update and Ethernet configuration may take more than 5
seconds to complete.
In addition to the normal command/response type messages, this specification defines
asynchronous notifications. These will always be sent by the reader and will not require any
acknowledgments from the host.
Certain aspects of the reader configuration are quite independent of each other. However we
recommend the following order should be used when preparing a reader for the first time
operation.

Reader profile is a legal requirement to use the correct profile for the country of
operation
Antenna configuration includes the Power settings for each antenna
Channel configuration this has a dependency on the Power settings which determine the
range of the channel IDs for this configuration item
Protocol configuration configures the reader to handle tags from the three supported
protocols. This configuration aspect is dependent on the choice of
the profile when it comes to the allowed reader to tag
communications schemes. This is also a reasonable stage to set
any filter options
Trigger configuration defines the trigger to start the tag reading process.
Reader mode Having performed the above steps, the reader can be activated to
start the tag reading process (which depends on the choice of
trigger configuration)

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 19
Messaging Overview
4.1 Message Format

4.1 Message Format


The Tag Reader Protocol is based on a XML format.
The messages can be divided into the following categories:
● Set/Get configuration messages.
These are to set/get the various configurable parameters on the Reader. The
specification supports the concept of a parameter group to keep logically related
parameters together resulting in safe transactions. This eliminates the possibility of partial
configuration changes for operations that require setting up of multiple parameters.
● Operational messages.
These are instructions from the Host to the Reader to perform a certain function. These
will have descriptive names and may take one or more parameters depending on the
context.
● Notifications from the reader.
One way messages from the Reader to the Host containing tag events information.
● Alerts from the reader.
These messages indicate some warning or error condition in the Reader. Like
notifications, these are one way messages.
As mentioned earlier, the Configuration and Operational messages from the Host will be
acknowledged by the Reader. The notifications and alerts are not acknowledged by the
Host.
If writing your own interface to the RF660R, you should always allow for the possibility of
corruption on the XML messages being sent by the reader.

SIMATIC RF660R XML Interface


20 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.2 General Format of Host Initiated Messages

4.2 General Format of Host Initiated Messages

4.2.1 Messages with no Parameters


A typical message with no parameters will follow the following general format:

Format
<message>
<name type="c|r|n">message name</name>
</message>
Here the type indicates whether the message is a command, response or notification. This
attribute has not been added to the message element itself to keep the parsing of such
documents simple.

Example
<message>
<name type="c">resetReader</name>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 21
Messaging Overview
4.2 General Format of Host Initiated Messages

4.2.2 Messages with Multiple Parameters


A typical message with multiple parameters will use a paramGroup element to group such
logically related parameters.

Format
<message>
<name type="c">message name</name>
<paramGroup name="paramGroupName">
<param-1> parameter 1 value </param-1>

<param-n> parameter n value </param-n>


</paramGroup>
</message>

Example
<message>
<name type="c">hostGreetings</name>
<paramGroup name="readerGreetings">
<messagingVersion> messagingVersion </messagingVersion>
<appVersion> appVersion </appVersion>
</paramGroup>
</message>

ParamGroup With Additional Attributes


In some cases a 'paramGroup' may use an additional attribute to further clarify its context.
For example the protocol configuration messages use the same 'paramGroup' name but use
a ‘type’ attribute to indicate the tag protocol type. For example:
<message>
<name type="c">set</name>
<paramGroup name="protocolConfig" type= "ISO_18000_6_B">
<numReadCycles> numReadCycles </numReadCycles>

</paramGroup>
</message>

SIMATIC RF660R XML Interface


22 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.2 General Format of Host Initiated Messages

4.2.3 Messages with a Single Parameter


A typical message with a single parameter will follow the following format:

Format
<message>
<name type="c">message name</name>
<param> parameter value </param>
</message>

Example
<message>
<name type="c">set</name>
<rm> 0 </rm>
</message>

4.2.4 Retrieving a Single Parameter from the Reader


When retrieving a parameter from the Reader, the Host can specify just the parameter
name. This is achieved by using an empty tag with the parameter or parameter group name
as an attribute.
A typical message to get the value of a single param will be:

Format
<message>
<name type="c">get</name>
<param name="parameter name"/>
</message>

Example
<message>
<name type="c">get</name>
<param name="rm"/>
</message>

The 'param.name' attribute value must match the name of a valid element as defined in this
specification.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 23
Messaging Overview
4.2 General Format of Host Initiated Messages

4.2.5 Retrieving a Set of Parameters from the Reader


To retrieve a set of parameters, the message containing a ‘get’ command may use the
following form:

Format
<message>
<name type="c">get</name>
<paramGroup name="parameter group name" />
</message>

Example
The 'paramGroup' name value must be a valid name that the reader recognises, for
example:
<message>
<name type="c">get</name>
<paramGroup name="ethernetConfig"/>
</message>

Or (when extra context is required):


<message>
<name type="c">get</name>
<paramGroup name="protocolConfig" type="EPC_GEN_1"/>
</message>

SIMATIC RF660R XML Interface


24 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.3 General Format of Reader Responses

4.3 General Format of Reader Responses


The reader replies will be of different kinds:
- normal responses or acknowledgements
- failure responses
- asynchronous notifications
- asynchronous alerts

4.3.1 Normal Responses


Since the XML messaging specified in this specification is synchronous, the Host and
Reader will always complete a single message/response exchange before starting the next.
This makes it possible to keep the responses from the reader quite simple in that they don’t
have to duplicate various details of the original request. For most cases it would be sufficient
for the Reader to indicate just the request name and include an empty element to indicate
the input parameter or parameter group.

4.3.1.1 Responses without any Return Parameters

Format
<message>
<name type="r" status="ack" >request message name</name>
< param name="parameter name"- />
</message>

Example
<message>
<name type="r" status="ack" >set</name>
<param name="rm"/>
</message>

Another example of a response to a ‘set’ message with a parameter group would be:
<message>
<name type="r" status="ack" >set</name>
<paramGroup name="ethernetConfig"/>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 25
Messaging Overview
4.3 General Format of Reader Responses

4.3.1.2 Responses with a Single Return Parameter

Format
<message>
<name type=”r” status=”ack” >request message name</name>
<parameter name> parameter value </parameter name>
</message>

Example
<message>
<name type=”r” status=”ack” >get</name>
<readerProfile> FCC </readerProfile>
</message>

4.3.1.3 Responses with Multiple Return Parameters

Format
<message>
<name type=”r” status=”ack” >request message name</name>
<paramGroup>
<param-1 name> parameter 1 value </param-1 name>

<param-n name> parameter n value </param-n name>
</paramGroup>
</message>

Example
A 'paramGroup' element will be included in responses to ‘get’ requests from the host that
had asked for a named 'paramGroup'. For example when the host asks for the current
Ethernet configuration, the normal response from the reader will be:
<message>
<name type=”r” status=”ack”>get</name>
<paramGroup name=”ethernetConfig”>
<ipAddress>192.168.0.254</ipAddress>
<portNumber>10001</portNumber>
<gatewayAddress>10.10.10.1</gatewayAddress>
<subnetMask>255.255.255.0</subnetMask>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


26 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.3 General Format of Reader Responses

4.3.2 Error Responses


When the reader is unable to perform the operation requested by the host, it will send an
error response. The general format of this is:

Format
<message>
<name type="r" status="fail" >request message name</name>
<reason> error code </reason>
</message>

Example
The reason must indicate why the reader failed to comply with the request.
<message>
<name type="r" status="fail" >set</name>
<reason> invalid power level value </reason>
</message>

4.3.3 Notifications
The reader will use a regular message format to send notifications to the host. For example
tag event reports may use the following format:

<message>
<name type="n"> ter </name>
<ter> w,x,y,z,AABBCCDDEEFF,nnnn </ter>
</message>
Here the type attribute is set to 'n' to indicate a notification; 'ter' stands for tag event report.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 27
Messaging Overview
4.4 Backward Compatibility Issues

4.4 Backward Compatibility Issues


In order to allow for trouble free operation between customer written applications for previous
RF660R firmware versions and the current firmware version, special care has to be taken
with respect to performance changes and required modifications to XML commands. In order
to allow old applications to run with the new firmware version backward compatibility has to
be met.
The following section summarizes all changes which have been introduced since firmware
version V1.1 whilst maintaining the backward compatibility of the new firmware to customer
applications which have been written for the previous version.

Combinations of messaging versions/firmware versions


The following table gives an overview of possible combinations of messaging version from
host to reader and firmware versions of RF660R reader. No entries indicate a combination of
messaging version from a host which implies an error response from the Reader to the host.
Please refer to Chapter Connection Initiation from the Host (Page 37) .

XML Messaging Version


Reader firmware GR_XML_2.0 GR_XML_2.1 GR_XML_3.0
version
V1.1 X - -
V1.2 Limited functionality X -
V1.3 x1) x1) X
1) If you have a special customer application, this application may access firmware version V1.3, as
long as you don't use any commands, which are no longer allowed in firmware version V1.3. If, for
example, the customer application is sending the specific channel 105, this command will be
rejected with an error message, because only channels of the Four-Channel Plan are still allowed
with firmware version V1.3.

SIMATIC RF660R XML Interface


28 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.4 Backward Compatibility Issues

4.4.1 Overview of XML Changes with Firmware Version V1.3


This section captures changes to the XML communication with the RF660R Reader as a
result of firmware revision upgrades. These changes are described throughout the sections
of this document, but are gathered together here to give an overview of the main feature
changes of this firmware revision from version V1.2 to version V1.3.

4.4.1.1 HostGreetings Message (Host -> Reader)


To connect to the RF660R firmware version V1.3, GR_XML_3.0 should be the default
messaging version. The Reader will repsond with firmware Version V1.3
(01.03.00.00_01.xx).

Note
Exception
If you have a special customer application (using GR_XML_2.0 or GR_XML_2.1), this
application may access firmware version V1.3, as long as you don't use any commands,
which are not allowed in firmware version V1.3.

4.4.1.2 Notification Channel


When setting the notification channel with Firmware Version 1.3, messaging version
GR_XML_3.0 should be the default messaging version.

Note
Exception
If you have a special customer application (using GR_XML_2.0 or GR_XML_2.1), this
application may access firmware version V1.3, as long as you don't use any commands,
which are not allowed in firmware version V1.3.

4.4.1.3 ETSI Frequency Switching Settings


When setting "channelConfig" of type "ETSI" with Firmware Version V1.3 only the following
parameters will be allowed:
● channelList: Only one and up to four channels of channel IDs 103, 106, 109, 112 may be
selected
● lbtState: Listen before talking must be OFF
● readerProfile: No ETSI_SRD may be selected

4.4.1.4 Error Code Changes for Firmware Version V1.3


Since RF660R Firmware Version V1.3 no new error codes have been added.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 29
Messaging Overview
4.4 Backward Compatibility Issues

4.4.2 Overview of XML Changes with Firmware Version V1.2


This section captures changes to the XML communication with the RF660R reader as a
result of firmware revision upgrades. These changes are described throughout the sections
of this document, but are gathered together here to give an overview of the main feature
enhancements of this firmware revision from version V1.1 to V1.2.
As a result of the backward compatibility work, if the Host in the hostGreeting message
sends the firmware version V1.1 messagingVersion (GR_XML_2.0) then a V1.2 reader will
respond in a manner compatible with the V1.1 XML format.
Specifically, where the changes in behavior indicated below entail a response not compatible
with firmware version V1.1, this functionality is inhibited when communicating with a V1.1
Host. Where the notification channel is separate from the configuration channel, the format
may be optionally controlled by a parameter in the set notifyChannel command (as described
in Section Setting the Notification Channel (Page 52)).

4.4.2.1 tagIdType
For EPC Global Gen 2, the "tagIdType" field is now ignored, and inferred from the number of
characters in the "tagId" field (which must be a multiple of 4).

4.4.2.2 tagID
The "tagId" field may be omitted, indicating that the reader should perform the operation on
the first tag which responds.

4.4.2.3 tagProgramID
For "tagProgramId", if "currTagId" is omitted the reader also checks to ensure that the tag
operated on is the only one in the field.

4.4.2.4 tagDataWrite
The "tagDataWrite" command can (optionally) take a field <mask>xxxxxxxx</mask>. This
must be of the same length as the data field and is used for specifying which bits to set/clear.
The write command does not act on the fields "EPC2Mode" (WRITE/BLOCK_WRITE) and
"verifyOn". Whilst it is intended ultimately to take account of these fields, currently it verifies
all writes (using the "assured_write" function) and uses write rather than blockwrite.

4.4.2.5 Ter
The "ter" (tag event report) messages from the reader now report tags of all lengths. Tags of
96 or 64 bits will be reported with "tagIdTypes" as before, but tags of other lengths will be
reported with "tagIdType" 6. No alerts are sent in the event of encountering a blank tag (as it
will be reported ordinarily.)

SIMATIC RF660R XML Interface


30 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.4 Backward Compatibility Issues

4.4.2.6 hostGreetings
If "hostGreetings" fails because the supplied "messagingVersion" is invalid, the returned
error now includes a field indicating which messaging version(s) would have been accepted.
At firmware version V1.2 the valid "messagingVersions" are GR_XML_2.0 and GR_XML_2.1.
This version (v1.22) of the Config Application passes this information on to the user.
Obviously this functionality is not available with earlier versions of the Config Application, as
the presence of this new field in the returned error is simply ignored.

4.4.2.7 channelConfig - CHINA Frequency Settings

Format
<message>
<name type="c">set</name>
<paramGroup name="channelConfig" type="CHINA">
<fhState>ON | OFF</fhState >
<channelList> channelList </channelList>
<switchingInterval> switchingInterval </switchingInterval>
</paramGroup>
</message>
When the "channelConfig" is set to the CHINA profile
● "channelList" must be in the range 150 to 169. The list may only include the channels
depending on the power level settings in the previous step (See 'antennaConfig').
● "switchingInterval" must be in the range 100 to 2000. This is the minimum time interval in
milliseconds before switching to the next frequency.
For China, the recommended values are frequency switching on (fhState=ON), using the 16
centre channels (channelList=152,153,154,155, to 167), with a switching interval of 1 second
(switchingInterval=1000). The minimum China switching interval is 100 ms and the maximum
2000 ms. This message uses the type attribute in the "paramGroup" to indicate the
frequency protocol, i.e. CHINA.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 31
Messaging Overview
4.4 Backward Compatibility Issues

4.4.2.8 SetReaderProfile CHINA Settings


The reader may be set to the CHINA profile with the set message:

Message
<message>
<name type="c">set</name>
<readerProfile>ETSI | ETSI_SRD | FCC | CHINA </readerProfile>
</message>

Note
With firmware version V1.3 ETSI_SRD radio profile is not longer available.

4.4.2.9 GetReaderProfile CHINA Settings


If the CHINA profile is active when a "get" message is issued, the reader will reply with the
following message:

Message
<message >
<name type="r" status="ack">get</name>
<readerProfile>ETSI | ETSI_SRD | FCC | CHINA </readerProfile>
</message>

Note
With firmware version V1.3 ETSI_SRD radio profile is not longer available.

4.4.2.10 Get ETSI ChannelConfig


The ETSI "ChannelConfig" now includes an "lbtState" parameter, indicating whether
LBT(Listen Before Talk) is to be used.

4.4.2.11 setNotifyChannel
The "notifyChannel" config now optionally includes a "messagingVersion" parameter, which
may be used to override the default behavior, which is to set the notification channel format
to be the same as the format used by the Host when configuring the notify channel. See
section Setting the Notification Channel (Page 52) .

SIMATIC RF660R XML Interface


32 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Messaging Overview
4.4 Backward Compatibility Issues

4.4.2.12 EPC GEN 2 tagSelectionRange


Since firmware version V1.2, the usage of the SL target has been disallowed, as part of a
bug fix. The valid targets are S0, S1, S2 and S3.

4.4.2.13 resetConfig
The reader now supports a "resetConfig" command, which will reset the reader settings to
their factory defaults. See section Resetting Configuration to Factory Settings (Page 72) for
details on this.
Also, the reader now automatically detects any invalid configuration when the config is
loaded from flash at boot time. If any bad or corrupted config is found, the reader config is
reset to the factory settings. When a Host subsequently connects, the alert message 10005
is sent to inform the user of this.

4.4.2.14 Error Code Changes for firmware version V1.2


Since RF660R firmware version V1.2 a number of error codes have been added. In Section
Error Codes From The Reader (Page 155) a comprehensive list has been added to the
previous error codes.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 33
Messaging Overview
4.4 Backward Compatibility Issues

SIMATIC RF660R XML Interface


34 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages 5
These messages will be used to set up a reliable connection between the host and the
reader.
The following table lists the messages used in this procedure. Empty elements that are
passed in ‘get’ requests or ‘set’ responses are prefixed with a ‘*’.

Table 5- 1 Connection Establishment and status messages

Message Direction Parameters/Group Purpose


hostGreetings Host->Reader hostGreetings Connection initiation from the Host
hostGreetings Reader->Host readerGreetings/ Response from the Reader
(response) error
heartbeat Host->Reader none Heartbeat exchange initiated from
the host
heartbeat (response) Reader->Host none Heartbeat response from the reader
hostGoodbye Host->Reader none Goodbye message from the host
hostGoodbye Reader ->Host none Response to the above
(response)
set Host->Reader clockTime To set the RTC on the reader
set (response) Reader->Host *clockTime Response from the reader
get Host->Reader *clockTime Get real time of the reader
get (response) Reader->Host clockTime Response from the reader

The format of these messages and the expected responses is described here.

Note
This procedure expects a physical connection (either Serial Port or Ethernet) between the
Host and Reader to exist.

Note
Clearing the reader buffer
When the reader has been running in the continuous tag reading mode the buffer may be
filled up with tag events.
Establishing or re-establishing the connection between host and reader initiates the reader to
send its tag events to its host. This process of the reader to empty its buffer will take,
depending on the data rate and the number of accumulated tag events, up to a couple of
minutes.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 35
Connection Set Up Procedure and Messages

Connection Establishment Procedure


A sequence diagram illustrates a successful Connection Establishment procedure is given
below:

Step Description
1 Host sends hostGreetings message to the
Reader
+RVW 5HDGHU
2 The Reader will respond with a normal response
and send some information about itself
 KRVW*UHHWLQJV 3 After the connection has been established, the
Host initiates the heartbeat at regular intervals
4 The Reader will respond to the message by

sending the heartbeat message back
KRVW*UHHWLQJV 5VS


KHDUWEHDW


KHDUWEHDW 5VS

Sequence diagram

SIMATIC RF660R XML Interface


36 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages
5.1 Connection Initiation from the Host

5.1 Connection Initiation from the Host


The Host sends the following message to the Reader to initiate a Communication session:

HostGreetings Message (Host -> Reader)


<message>
<name type="c">hostGreetings</name>
<paramGroup name="readerGreetings">
<messagingVersion> GR_XML_2.0 | GR_XML_2.1 | GR_XML_3.0 </messagingVersion>
<appVersion> Name of your application</appVersion>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


messagingVersion String GR_XML_2.0, Firmware Version V 1.2 or earlier versions:
GR_XML_2.1 The message contains the version of the interface messages
which shall be set to "GR_XML_2.0" for applications which have
been written for firmware version V 1.1 and which shall be set to
"GR_XML_2.1" for applications which already include additional
features as introduced with firmware version V1.2. If the Reader
firmware is expecting a different version which is not compatible
with this version then the Reader may respond with an error
response, which may include a list of "messagingVersion" strings
which the reader would have accepted.
This is to avoid issues that may arise due to messaging versions
mismatch between the Host and the Reader.
Firmware Version V 1.3:
Exception: If you have a special customer application (using
GR_XML_V2.0 or GR_XML_2.1), this application may access
firmware version V1.3, as long as you don't use any commands,
which are no longer allowed in firmware version V1.3.
GR_XML_3.0 Firmware Version V 1.3:
When connecting to the RF660R Reader with Firmware Version V
1.3 it is recommended to use GR_XML_3.0, to use the full
functionality of the new firmware.
This is to avoid issues that may arise due to radio standard
changes for ETSI since EN 302208 V1.2.1 has become mandatory
from 01.01.2010 onwards.
appVersion String e.g. This element is to identify the Host application connected to the
"MyApplication" Reader.
The format of the messages in the notification channel, if separate, is determined by the
"messagingVersion" parameter in the set "notifyChannel" message sent when the
notification channel is configured (which if not specified defaults to the "messagingVersion"
declared by the Host).
The messagingVersion field is very important. The RF660R Configuration Software will only
operate with RF660R Reader Software of the same messagingVersion. If a new
messagingVersion is issued, it will be issued with new versions of the RF660R Configuration
Software and of the RF600R Reader Software.
In order to check the compatibility of messaging version and firmware version, please refer
to chapter Backward Compatibility Issues (Page 28) .

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 37
Connection Set Up Procedure and Messages
5.2 Connection Initiation from the Host

Response from the Reader


The reader will respond with the following normal response and send some useful
information about itself:
<message >
<name type="r" status="ack">hostGreetings</name>
<paramGroup name="readerGreetings">
<readerName> SIMATIC RF660R Portal Reader </readerName>
<firmwareVersion> firmwareVersion </-firmwareVersion>
<fpgaVersion> fpgaVersion <fpgaVersion>
<configVersion> USER | DEFAULT </configVersion>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


readerName String - Fixed parameter value.
firmwareVersion String e.g. V1.3(01.03.00.00_04.14) Shows the reader firmware version which is active on
the current reader.
fpgaVersion String e.g. V0.44.2 FPGA version of the reader.
configVersion String Literals USER Any reader setting has been changed by the user
compared with the default factory settings.
DEFAULT Default factory settings from within reader firmware are
used.

Note
During the Reader Connect or Reader Disconnect procedure the reader may send
malformed messages. Users are therefore advised to allow the reader to be connected
'stable' prior to sending commands.

SIMATIC RF660R XML Interface


38 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages
5.2 Connection Initiation from the Host

Error Responses
If for some reason the reader is unable to offer its service, it will send an error response:
< message >
<name type="r" status="fail">hostGreetings</name>
<reason> error code </reason>
</ message>
The reason could be one of the following:
● Already connected to another Host application (e.g. when controlled by SIMATIC)
● Authentication failure (for future use)
● Hardware/software issues (e.g. firmware load issues)
● Host messaging version not supported

Note
From V1.2 firmware revision onwards, if hostGreetings fails because the messaging
version is invalid, the returned error includes a field indicating which messaging
version(s) would have been accepted. From revision V1.2 (and later revisions) of the
RF660R Configuration Software onwards the application passes this information on to the
user. Obviously this functionality is not available with earlier versions of the RF660R
Configuration Software, as the presence of this new field in the returned error is simply
ignored.

Note
For the unlikely event of users addressing the reader via SIMATIC RF660R Configuration
Software and via XML interface during the same configuration session, users are
informed that the parameters displayed by the Configuration Software are those which
were present at the time of connecting the reader to the host. If in the meantime
parameters have been changed using XML interface, the new values (changed
parameters) are NOT displayed by the Configuration Software screens.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 39
Connection Set Up Procedure and Messages
5.3 Heart Beat Mechanism

5.3 Heart Beat Mechanism


The Heart beat Mechanism is optional and a client application should implement it in order to
keep an eye on the status of the connection. For client applications that want to implement it,
it is recommended to send one such message at least once a minute. This way the reader
can also stay aware of the presence of the client application.
After the connection has been established, the Host may initiate the heartbeats at regular
intervals. The Config Application will be responsible for choosing a suitable interval. Note, a
successful message/response exchange with the Reader may be seen as an implicit
heartbeat and the Config Application may adjust the timing of the heartbeats during frequent
message exchanges.

Instruction
The format of the message will be:
<message>
<name type="c">heartbeat</name>
</message>

Normal Response
The reader will respond to the message by sending the heartbeat message back.
<message >
<name type="r" status="ack">heartbeat</name>
</message>

SIMATIC RF660R XML Interface


40 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages
5.3 Heart Beat Mechanism

Example
The following diagram provides an overview of how two separate processes within an
application could be managed including the heartbeat mechanism.

&RQQHFWLRQWRWKH5HDGHUKDVEHHQHVWDEOLVKHG

3URFHVV$ 3URFHVV%

&KHFNWLPHVWDPS 6WRUDJHRIWLPHVWDPSRIWKH
RIWKHPRVWFXUUHQW PRVWFXUUHQWWHOHJUDPUHFHLYHG
WHOHJUDPIURPWKH IURPWKHUHDGHU
UHDGHU

7UDQVPLW
7LPHVWDPS KHDUWEHDW
ROGHUWKDQ <HV
FRPPDQGWRWKH
VHFRQGV" UHDGHU

1R

+DVWKHKHDUWEHDW
DFNQRZOHGJH
:DLWIRU
PHQWEHHQ
VHFRQGV
UHFHLYHG"

<HV

1R

,QFUHPHQWRIWKH
KHDUWEHDWUHWU\
FRXQWHUE\RQH

+HDUWEHDWUHWU\FRXQWHU
! 1R :DLWIRUVHFRQGV
QXPEHURIDOORZHG
UHWULHV"

<HV

(UURUPHVVDJHWKDW
KHDUWEHDW
FRPPDQGKDVEHHQ
XQVXFFHVVIXO

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 41
Connection Set Up Procedure and Messages
5.4 Real Time Clock

5.4 Real Time Clock

5.4.1 Setting the Real Time Clock


To set the real time clock on the Reader, the Host may send the following message:
<message>
<name type="c"> set </name>
<clockTime> clockTime </clockTime>
</message>

Parameter Type Value or Value Range Dependencies / Notes


clockTime ASCII Timestamp e.g. The Timestamp format is:
2005-07-16T19:20:30.456+00:00 YYYY-MM-DDThh:mm:ss.s+00:00

There are different standard ways to format timestamps. According to ISO 8601, a
timestamp value should be formatted as:
YYYY -MM-DDThh:mm:ss.sTZD
where:

Parameter Description
YYYY four-digit year
MM two-digit month (01=January, etc.)
DD two-digit day of month (01 through 31)
hh two digits of hour (00 through 23) (am/pm NOT allowed)
mm two digits of minute (00 through 59)
ss two digits of second (00 through 59)
s one or more digits representing a decimal fraction of a second
TZD time zone designator (Z or +hh:mm or -hh:mm)

Example:
2006-04-01T12:23:05.81+01:00

Note
The reader will follow the ISO 8601 format but will not use the TZD field. After a Powercycle
the clock will start from 2000-01-01T00:00:00.000+00:00. Remember also that the real time
clock is yet not used for timestamping any messages sent by the reader.

SIMATIC RF660R XML Interface


42 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages
5.4 Real Time Clock

Example
<message>
<name type="c"> set </name>
<clockTime> 2006-08-09T15:23:05.81+00:00 </clockTime>
</message>
The components shown here must be present with exactly this punctuation. Note that the "T"
appears literally in the string, to indicate the beginning of the time element.

The Reader will respond with a normal response:

Normal Response
<message>
<name type="r" status="ack"> set </name>
<param name="clockTime"/>
</message>

Error Response
An error response is not defined for this operation.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 43
Connection Set Up Procedure and Messages
5.4 Real Time Clock

5.4.2 Retrieve Current Clock Time


To retrieve the current "clockTime", the Host will use the following message:

Message
<message>
<name type="c"> get </name>
<param name="clockTime"/>
</message>

The reader will use the following response:

Normal Response
<message>
<name type="r" status="ack"> get </name>
<clockTime>2006-03-03T15:06:11.000+00:00</clockTime>
</message>

Parameter Type Value or Value Range Dependencies / Notes


clockTime ASCII e.g. The Timestamp format is:
Timestamp 2005-07-16T19:20:30.456+00:00 YYYY-MM-DDThh:mm:ss.s+00:00

Error Response
An error response is not defined for this operation.

SIMATIC RF660R XML Interface


44 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Connection Set Up Procedure and Messages
5.5 Goodbye Message from the Host

5.5 Goodbye Message from the Host


To indicate the end of a Communication session, the Config Application should send the
following message as a log out indication.

Message
<message>
<name type="c">hostGoodbye</name>
</message>

Normal Response
The reader will response with a normal response using the general format.

Error Response
An error response is not defined.

5.6 Notes on the Control Channel Connection

A Single Config Application to control the Reader


The Reader permits only a single Config Application to connect over the Control Channel at
one time. If a second application attempts to connect, the Reader will reject that connection
request.

For Serial Port based connections, this restriction is likely to be forced by the operating
system on the Host itself which may report the serial port being busy when a second Config
Application tries to connect to the Reader. For Ethernet, the Reader may refuse the
connection attempt at the TCP/IP socket connection level or send an explicit connection
rejection response.

The use of a single connection raises the question of dealing with the cases where the host
application may have crashed without releasing the connection (or sending the hostGoodbye
message). To prevent the Reader from getting ‘stuck’ with a stale connection, the Reader
will make a decision about the state of the connection based on the absence of control
commands (and heartbeats). If the Reader doesn’t see any control commands or heartbeats
for more than 2 minutes, it will go into a state where it will accept a new connection request
and (only then) close the old connection.

Physical link failures


In the event of a broken communications link, the Host may attempt to re-establish the
connection by sending the hostGreetings message at regular intervals. The time between
these attempts should be greater than 2 minutes which is the amount of time that the Reader
waits for before dissolving an existing connection and allowing a new connection.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 45
Connection Set Up Procedure and Messages
5.6 Notes on the Control Channel Connection

SIMATIC RF660R XML Interface


46 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Service Provisioning Messages 6
The table lists initial service provisioning messages. Empty elements that are passed in ‘get’
requests or ‘set’ responses are prefixed with a ‘*’.

Table 6- 1 Service Provisioning Messages

Message Direction Parameters/Group Purpose


set Host->Reader ethernetConfig Static ethernet configuration of the Reader
set (response) Reader->Host *ethernetConfig Response to the above
get Host->Reader *ethernetConfig To retrieve current Ethernet configuration
get (response) Reader->Host ethernetConfig Result of the above.
setupEthernetDHCP Host->Reader none Request to set up Ethernet using the DHCP procedure.
setupEthernetDHCP Reader->Host none Ack to the above request.
(response)
set Host->Reader notifyChannel configuration of the notification channel for tag events
set (response) Reader->Host *notifyChannel Successful response
get Host->Reader *notifyChannel Get configuration of the notification channel
get (response) Reader->Host notifyChannel/ error Successful response

6.1 Serial Port Configuration


Host and Reader should use the following serial port parameters
Baud Rate: 115200 bps
Data bits: 8
Stop bits: 1
Parity: None
Flow Control: Xon/Xoff

Xon/Xoff
Xon/Xoff is a protocol for controlling the flow of data between computers and other devices
on an asynchronous serial connection.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 47
Service Provisioning Messages
6.2 Ethernet Configuration

6.2 Ethernet Configuration


To set up the Ethernet configuration on the reader, the host application will send the
following message to the reader:

Setting
<message>
<name type="c">set</name>
<paramGroup name="ethernetConfig">
<ipAddress> ipAddress </ipAddress>
<portNumber> portNumber </portNumber>
<gatewayAddress> gatewayAddress </gatewayAddress>
<subnetMask> subnetMask </subnetMask>
</paramGroup>
</message>

Parameter Type Value or Value Range


ipAddress Dotted String e.g. 192.168.0.254
portNumber Integer 10000 - 65535
gatewayAddress Dotted String e.g. 192.118.194.1
subnetMask Dotted String e.g. 255.255.255.0

This procedure may take up to 30 seconds to complete. This should be kept in mind when
using a timeout value when waiting for the response. The 'ethernetConfig' needs not to be
saved with 'saveConfig' to FLASH.

Note
When utilizing the Ethernet configuration for more than one Reader and/or using the
Ethernet notification channel for a reader, a separate "portNumber" has to be chosen for
each connection configuration, i.e., when a "portNumber" is no longer in use it may be re-
used.

The reader will respond with the following normal response:

Normal Response
<message>
<name type="r" status="ack"> set </name>
<paramGroup name="ethernetConfig"/>
</message>

SIMATIC RF660R XML Interface


48 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Service Provisioning Messages
6.2 Ethernet Configuration

6.2.1 Retrieve Current Ethernet Connection


To retrieve the current Ethernet configuration, the Host will use the following message:

Instruction
<message>
<name type="c">get</name>
<paramGroup name="ethernetConfig"/>
</message>

Normal Response
The reader will use the following response:
<message >
<name type="r" status="ack"> get </name>
<paramGroup name="ethernetConfig">
<ipAddress> ipAddress </ipAddress>
<portNumber> portNumber </portNumber>
<gatewayAddress> gatewayAddress </gatewayAddress>
<subnetMask> subnetMask </subnetMask>
<macAddress> macAddress </macAddress>
</paramGroup>
</message>
The reader will use the following response:

Parameter Type Value or Value Range


ipAddress Dotted String e.g. 192.168.0.254
portNumber Integer 10000 - 65535
gatewayAddress Dotted String e.g. 192.118.194.1
subnetMask Dotted String e.g. 255.255.255.0
macAddress Hyphenated Hex String e.g. 00-20-4A-86-75-57

Error Response
An error response is not defined for the ‘get’ operation in this case as the Reader is expected
to have a default set of these parameters.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 49
Service Provisioning Messages
6.3 DHCP Based Ethernet Setup

6.3 DHCP Based Ethernet Setup

6.3.1 Setup Ethernet DHCP


The RF660R will work best in a DHCP environment where a list of Static IP addresses are
assigned by a DHCP server. Users should create a list of static IP addresses and relate
these to the MAC address of the readers to be installed and used.

Instruction
Since DHCP based Ethernet set up is a special procedure, the workstation will send an
explicit command to the reader:
<message>
<name type="c">setupEthernetDHCP</name>
</message>

Normal Response
<message >
<name type="r" status="ack">setupEthernetDHCP</name>
</message>

Note
The DHCP mode of operation is intended for making the Ethernet configuration process
automated. The Ethernet device on the Reader will try to contact a DHCP server to get an
address. If it cannot find one, it will use the BOOTP protocol and if that doesn't work, it will
use AUTO-IP to assign itself an IP-address. Due to the automated nature of this procedure,
the Ethernet device doesn't reveal the assigned IP-address, gateway address and subnet
mask values to the Reader. Performing a 'get' on Ethernet configuration after a DHCP set up
will result in the following response from the reader:

When the Host and Reader are connected over the Configuration Interface RS232, the
Reader will send the response after completing the DHCP procedure.
When the Host and Reader are connected over the System Interface (Ethernet), the Reader
will send the response before starting the DHCP procedure because the Reader will have to
drop the existing Ethernet connection once it has been assigned a new IP-address. The Host
will need to need to perform a network scan to discover the new address details of the
Reader.

Retrieve Current Setup


After a DHCP based set up, retrieving address details by performing a ‘get’ message will
produce a response in the following format:

SIMATIC RF660R XML Interface


50 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Service Provisioning Messages
6.3 DHCP Based Ethernet Setup

Setting
<message >
<name type="r" status="ack">get</name>
<paramGroup name="ethernetConfig">
<ipAddress>DHCP</ipAddress>
<portNumber> portNumber </portNumber>
<gatewayAddress>DHCP</gatewayAddress>
<subnetMask>DHCP</subnetMask>
<macAddress> macAddress </macAddress>
</paramGroup>
</message>

Parameter Type Value or Value Range


ipAddress String DHCP
portNumber Integer 10000 - 65535
gatewayAddress String DHCP
subnetMask String DHCP
macAddress Hyphenated Hex String e.g. 00-20-4A-86-75-57

The Host may make use of the macAddress value following a port scan procedure to
discover the actual IP-address of the Reader.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 51
Service Provisioning Messages
6.4 Notification Channel

6.4 Notification Channel


The host will send this message to the reader to set the address details of the channel that
the reader will use to send tag events and other notifications.

6.4.1 Setting the Notification Channel

Setting
<message>
<name type="c">set</name>
<paramGroup name="notifyChannel">
<notifyChannel> NONE | RS232 | ETHERNET </notifyChannel>
<ipAddress> ipAddress </ipAddress>
<portNumber> portNumber </portNumber>
<messagingVersion> GR_XML_2.0 | GR_XML_2.1 | GR_XML_3.0 </messagingVersion>
</paramGroup>
</message>

Note
Optional use of messagingVersion parameter
The "messagingVersion" parameter is optional, and new in Release 3. It indicates the
messaging version with which the messages in the notification channel (when distinct from
the configuration channel) should be compatible. As the value for this parameter when not
specified defaults to the "messagingVersion" declared by the Host in the hostGreetings
message, this parameter is only needed if different "messagingVersions" are to be used on
the configuration and notification channels.

SIMATIC RF660R XML Interface


52 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Service Provisioning Messages
6.4 Notification Channel

Parameter Type Value or Value Dependencies / Notes


Range
notifyChannelId String Literals NONE (default) When the notification channel is set to NONE, the Reader will
send the notifications e.g. tag report events on the existing
Control Channel itself (whether RS232 or Ethernet).
Therefore, the Config Application should expect to handle
these notifications as asynchronous events.
RS232 Setting the notification channel to RS232 will cause the reader
to send all notifications e.g. tag event reports over the serial
port. The configuration and control messages must be send
over Ethernet to the reader.
ETHERNET When connected over Ethernet the Notification Channel
should not be set to ETHERNET as this violates the single
Ethernet connection limitation described in chapter Fehler!
Verweisquelle konnte nicht gefunden werden..
To output notifications on Ethernet either connect via RS232
and set notifications up as Ethernet, or connect over Ethernet
and set the Notification Channel to NONE.
ipAddress Dotted String e.g. 192.168.0.10 only applicable if
notifyChannelId = ETHERNET
This IP address assigns the Host to which the reader will send
the notifications. This is NOT the address of the reader.
portNumber Integer 10000 - 65535 only applicable if
notifyChannelId = ETHERNET
This parameter assigns the port of the Host to which the
reader will send the notifications.
messagingVersion String Literals GR_XML_2.0 | The "messagingVersion" field within the "notiyChannel"
GR_XML_2.1 | command is optional: if it is omitted, the parameter will default
GR_XML_3.0 to the "messagingVersion" declared by the Host in the
hostGreetings message. This feature is new since Release 3
(FW V 1.2).

Note
When utilizing the Ethernet configuration for more than one Reader and/or using the
Ethernet notification channel for a reader a separate "portNumber" has to be chosen for
each connection configuration, i.e., when a "portNumber" is no longer in use it may be re-
used.

The response for this message may take up to 30 seconds if the notify channel is configured
to use Ethernet. For other cases it should be within the normal 5 sec duration. By default the
'notifyChannelId' will be NONE, which is also the recommended setting.
The reader will send the following response:

Normal Response
<message>
<name type="r" status="ack"> set </name>
<paramGroup name="notifyChannel"/>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 53
Service Provisioning Messages
6.4 Notification Channel

6.4.2 Retrieve Notification Channel Details


To retrieve the notification channel details, the host may send this message:

Request
<message>
<name type="c">get</name>
<paramGroup name="notifyChannel"/>
</message>

Normal Response
The normal response from the reader will be:
<message>
<name type="r" status="ack"> get</name>
<paramGroup name="notifyChannel">
notifyChannelId> NONE | RS232 | ETHERNET </notifyChannelId>
<ipAddress> ipAddress </ipAddress>
<portNumber> portNumber </portNumber>
<messagingVersion> GR_XML_2.0 | GR_XML_2.1 | GR_XML_3.0 </messagingVersion>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


notifyChannelId String NONE When the notification channel is set to NONE, the Reader
Literals will send the notifications e.g. tag report events on the
existing Control Channel itself (whether RS232 or
Ethernet). Therefore, the Config Application should expect
to handle these notifications as asynchronous events.
RS232 The configuration and control messages must be sent over
Ethernet to the reader.
ETHERNET The configuration and control messages must be sent over
RS232 to the reader.
ipAddress Dotted e.g. 192.168.0.10 only applicable if
String notifyChannelId = ETHERNET
This IP address assigns the Host to which the reader will
send the notifications.
portNumber Integer 10000 - 65535 only applicable if
notifyChannelId = ETHERNET
This parameter assigns the port of the Host to which the
reader will send the notifications.
messagingVersion String GR_XML_2.0 | The "messagingVersion" field within the "notiyChannel"
Literals GR_XML_2.1 | response indicates with which "messagingVersion" the
GR_XML_3.0 notification channel has been set. This feature is new since
Release 3 (FW V 1.2).

SIMATIC RF660R XML Interface


54 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages 7
This section describes the messages in a logical order needed to configure the reader for a
particular mode of operation. Empty elements that are passed in ‘get’ requests or ‘set’
responses are prefixed with a ‘*’. ‘Get’ messages read the current settings held in RAM; if
the configuration is not saved to flash with "saveConfig", they may be different from the
values on reset by Powercycle or command "resetReader".

Table 7- 1 Configuration Messages

Message Direction Parameters/ Group Purpose


set Host->Reader readerProfile Set the Radio Profile of the reader
set (response) Reader->Host *readerProfile Response
get Host->Reader *readerProfile Get the Radio Profile of the reader
get(response) Reader->Host readerProfile Response with the reader profile value
set Host->Reader channelConfig Set the channel configuration
set (response) Reader->Host *channelConfig Response to the set request
get Host->Reader *channelConfig Get the current channel configuration
get (response) Reader->Host channelConfig Response with the current channel config.
set Host->Reader antennaConfig Set the Antenna configuration
set (response) Reader->Host * antennaConfig Response to the set request
get Host->Reader * antennaConfig Get the current antenna configuration
get (response) Reader->Host antennaConfig Response with the current antenna config.
set Host->Reader protocolConfig Set the protocol configuration
set (response) Reader->Host *protocolConfig Response to the set request
get Host->Reader *protocolConfig Get the current protocol config
get (response) Reader->Host protocolConfig Response with the current protocol config

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 55
Standard Configuration Messages
7.1 Reader Profile

7.1 Reader Profile

7.1.1 Set Reader Profile

Setting
The first step in configuring the reader is to set up the desired profile. The Host sends the
following message:
<message>
<name type="c">set</name>
<readerProfile>ETSI⃒ FCC|CHINA</readerProfile>
</message>

Parameter Type Value or Value Range Dependencies / Notes


readerProfile String Literal ETSI see list of countries (appendix)
FCC see list of countries (appendix)
CHINA see list of countries (appendix)

CAUTION
It is very important to select the correct country in which to operate the device. Otherwise
operation may be against the law. In those European countries where it is possible to
transmit using the new RFID regulations, the option country_RFID can be selected. If your
country is not available in the list then the reader is not approved for operation there. Some
countries permit either.

The Reader will reply with the following ack:

Normal Response
<message >
<name type="r" status="ack">set</name>
<param name="readerProfile"/>
</message>

SIMATIC RF660R XML Interface


56 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.1 Reader Profile

7.1.2 Get Reader Profile

Request
To retrieve the existing profile setting, the host may use a ‘get’ message:
<message>
<name type="c">get</name>
<param name="readerProfile"/>
</message>

Normal Response
The reader will reply with:
<message >
<name type="r" status="ack">get</name>
<readerProfile>ETSI | FCC| CHINA</readerProfile>
</message>

Parameter Type Value or Value Range Dependencies / Notes


readerProfile String Literal ETSI see list of countries (appendix)
FCC see list of countries (appendix)
CHINA see list of countries (appendix)

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 57
Standard Configuration Messages
7.2 Reader Antenna Settings

7.2 Reader Antenna Settings


The second step in configuring the reader is to set up the antennas.

7.2.1 Reader Mode Switching


The following message is used by the host:

Setting
<message>
<name type="c"> set </name>
<paramGroup name="antennaConfig">
<switchingState> ON | OFF </switchingState>
<switchingInterval> switchingInterval </switchingInterval>
<antenna number="1" power="power" gain="gain"
cableLoss="cableLoss">antenna</antenna>
<antenna number="2" power="power" gain="gain"
cableLoss="cableLoss">antenna</antenna>
<antenna number="3" power="power" gain="gain"
cableLoss="cableLoss">antenna</antenna>
<antenna number="4" power="power" gain="gain"
cableLoss="cableLoss">antenna</antenna>
</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
switchingState String Literal ON TX antenna changes according to Switching Interval
OFF 1 assigned TX antenna, 1-3 assigned RX antennas
switchingInterval Integer 1 - 5000 Only applicable if
(antennaConfig) switchingState = ON
Minimum time interval in milliseconds of a TXRX antenna for
transmitting power
antenna String Literal OFF Antenna is not in use
RX Antenna is used for receiving only
TX Must be used at least for one antenna
if switchingState = OFF
Antenna is used for transmitting power only
TXRX Must be used at least for two antennas
if switchingState = ON
Antenna is used for transmitting power and receiving
antenna attribute – Integer 1-4 Specify antenna
number

SIMATIC RF660R XML Interface


58 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.2 Reader Antenna Settings

Parameter Type Value or Value Dependencies / Notes


Range
antenna attribute – Integer 100 - 2000 readerProfile = ETSI
power In steps of 100 Depending on the power level only certain channels may be
used at 'channelConfiguration' (see ETSI Subbands for
detailed information about the restrictions )
Adjusting the transmitted power (mW) of the specified antenna
in 100mW steps.
100 - 1000 readerProfile = FCC
Adjusting the transmitted power (mW) of the specified antenna
in 100mW steps
100 - 2000 readerProfile = CHINA
Depending on the power level only certain channels may be
used at "channelConfiguration" (see CHINA Subbands for
detailed information about the restrictions )
Adjusting the transmitted power (mW) of the specified antenna
in 100 mW steps.
0 antenna = OFF
antenna attribute - Float 4.0 – 12.0 This attribute indicates the value (in dBi) of the antenna gain.
gain A suitable default for an ETSI antenna is 7.0 and for an FCC
antenna a default value of 6.0 should be used.
0.0 antenna = OFF
antenna attribute - Float 1.0 – 9.0 This attribute indicates the cable loss for this antenna. The
cableLoss units are dB. A suitable default value is 4.0 dB.
0.0 antenna = OFF

Please note the difference in the power level specifications for the above profiles. FCC
specifies a peak power at the end of cable whereas for ETSI, this is Effective Radiated
Power (ERP). The reader will automatically work out which specification to use and work out
the appropriate value from the message parameters.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 59
Standard Configuration Messages
7.2 Reader Antenna Settings

Normal Response, Error Response


The reader will use the general format for the normal and error responses for the above and
the "get" messages.

Example
An example for an 'antennaConfig' response with 'readerProfile' is ETSI:
<message>
<name type="r" status="ack"> get </name>
<paramGroup name="antennaConfig">
<switchingState>ON</switchingState>
<switchingInterval>1000</switchingInterval>
<antenna number="1" power="1900" gain="7.000000"
cableLoss="4.000000">TXRX</antenna>
<antenna number="2" power="1500" gain="7.000000"
cableLoss="4.000000">TXRX</antenna>
<antenna number="3" power="0" gain="0.000000" cableLoss="0.000000">OFF</antenna>
<antenna number="4" power="0" gain="0.000000" cableLoss="0.000000">OFF</antenna>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


60 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.3 Reader Frequency Setting

7.3 Reader Frequency Setting


The next step in Reader configuration is to define the frequency settings. The channel ids
represent the frequencies. A mapping of the channel ids to the frequency values is given in
appendix.

7.3.1 ETSI Frequency Switching Settings

Setting
If the profile is ETSI, the host sends the following message to set the ETSI frequency
hopping:
<message>
<name type="c">set</name>
<paramGroup name="channelConfig" type="ETSI">
<fhState>ON | OFF</fhState >
<channelList> channelList </channelList>
<switchingInterval> switchingInterval </switchingInterval>
</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
fhState String Literals ON Frequency hoping on
OFF Frequency hopping off; fixed channel used
switchingInterval Integer 1000 - 4000 readerProfile = ETSI
(channelConfig) only meaningful when
fhState = ON
Minimum time interval in milliseconds before switching to the
next frequency
channelList See for more details on channel restrictions based on the power level.
Comma separated 103, 106, 109, fhState = ON
Integer list 112 readerProfile = ETSI
The list may only include the channels depending on the
power level settings in the previous step (See
'antennaConfig').
Integer 103, 106, 109, fhState = OFF
112 When frequency switching is OFF (as indicated by fhState),
the list will contain a single channel which is a number
between 100 and 114.
For ETSI, the recommended values are frequency switching on (fhState=ON), using the four
channels (channelList=103, 106, 109, 112 ), with a switching interval of 1 seconds
(switchingInterval=1000). The minimum ETSI switching interval is 1000ms and the maximum
4000ms.
This message uses the type attribute in the paramGroup to indicate the frequency protocol
like ETSI.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 61
Standard Configuration Messages
7.3 Reader Frequency Setting

Normal Response, Error Response


The reader will reply with a normal or error response using the general format.

7.3.2 FCC Channel ID Settings

Note
When the XML interface is used to send and receive commands, it is the customer’s
responsibility to ensure that no incorrect or illegal settings are made.
This affects particularly Frequency Hopping mode, which is compulsory for those countries
where the FCC regulations apply.
Frequency Hopping (fhState) = ON must always be chosen for FCC.

Settings
When using the FCC profile, the host may use the following message to set the channel id:
<message>
<name type="c">set</name>
<paramGroup name="channelConfig" type="FCC">
<fhState> fhState </fhState>
<channelList> channelList </channelList>
<switchingInterval> switchingInterval </switchingInterval>
<lbtState> ON | OFF </lbtState >
</paramGroup>
</message>

SIMATIC RF660R XML Interface


62 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.3 Reader Frequency Setting

Parameter Type Value or Value Dependencies / Notes


Range
fhState String Literals ON Frequency hoping on
OFF Due to FCC band specifications it is not allowed to use
FCC without frequency hopping
switchingInterval Integer 300 - 400 readerProfile = FCC
(channelConfig) only meaningful when
fhState = ON
Minimum time interval in milliseconds before switching to
the next frequency
channelList Comma separated 0 – 49 fhState = ON
Integer list readerProfile = FCC
The channelList must include all 50 channel Ids
Integer 0 – 49 fhState = OFF
The channelList will include only a single Id
lbtState String Literals ON Listen Before Talking on, Reader checks whether channel
is already in use.
OFF Listen Before Talking off
The recommended values are frequency hopping on (fhState=ON), using all 50 channels
(channelList=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,
29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49), with a switching interval
of 0.4 seconds (switchingInterval=400).

Normal Response, Error Response


The normal or error responses from the Reader will follow the general format used in this
document.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 63
Standard Configuration Messages
7.3 Reader Frequency Setting

7.3.3 China Frequency Switching Settings

Settings
When using the CHINA profile, the host may use the following message to set the channel
id:
<message>
<name type="c">set</name>
<paramGroup name="channelConfig" type="CHINA">
<fhState>ON | OFF</fhState >
<channelList> channelList </channelList>
<switchingInterval> switchingInterval </switchingInterval>
<lbtState> OFF </lbtState >
</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
fhState String Literals ON Regulations for the operation of RFID equipment in China
OFF state, that the maximum residence time for each channel is
2000 msec. Therefore the "fhState" has to be ON.-
switchingInterval Integer 1000 - 2000 readerProfile = CHINA
(channelConfig) only meaningful when
fhState = ON
Minimum time interval in milliseconds before switching to
the next frequency.
The default value is 1000.
channelList see for more details on channel restrictions based on the power level.
- Comma seperated 150 - 169 fhState = ON
Integer list readerProfile = CHINA
The list may only include the channels depending on the
power level settings in the previous step.
- Integer 150 - 169 fhState = OFF
When frequency switching is OFF (as indicated by fhState),
the list will contain a single channel which is a number
between 150 and 169.
lbtState String Literals OFF Optional: Listen Before Talking off. The parameter "lbtState"
may also be specified, but if so it must have the value OFF
(if not specified it default is set to OFF).

Note
The "lbtState" parameter indicates whether listen before talking should be performed when
switching between frequencies. This parameter is new in Release 3 (FW V 1.2), and is
optional – it defaults to OFF for CHINA. In CHINA profile, the only valid option is OFF.

SIMATIC RF660R XML Interface


64 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.3 Reader Frequency Setting

Note
The current standard for CHINA requires the use of at least two channels, as a channel
(frequency) has to be changed after 2000 ms at a maximum.

For China, the recommended values are frequency switching on (fhState=ON), using the 16
centre channels (channelList=152,153,154,155, to 167), with a switching interval of 1
seconds (switchingInterval=1000). The minimum China switching interval is 1000 ms and the
maximum 2000 ms. This message uses the type attribute in the paramGroup to indicate the
frequency protocol i.e. CHINA.

Normal Response, Error Response


The normal or error responses from the Reader will follow the general format used in this
document.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 65
Standard Configuration Messages
7.4 Protocol Configuration

7.4 Protocol Configuration


This is the next step in reader configuration and involves the following parameters:

7.4.1 Set the Protocol Configuration

ISO 18000-6 B Setting


The host will send this message to configure the supported protocol types. The types of
parameters will depend on the protocol type.
For ISO 18000-6 B, the following message will be used:
<message>
<name type="c">set</name>
<paramGroup name="protocolConfig" type= "ISO_18000_6_B">
<numReadCycles> numReadCycles </numReadCycles>
<rtCommsScheme> rtCommsScheme </rtCommsScheme >
<readMode> readMode </readMode>
</paramGroup>
</message>

EPC Class 1 Gen 1 Setting


For EPC Class 1 Generation 1 the following message will be used:
<message>
<name type="c">set</name>
<paramGroup name="protocolConfig" type = "EPC_ GEN_1">
<numReadCycles> numReadCycles </numReadCycles>
</paramGroup>
</message>

EPC Class 1 Gen 2 Setting


For EPC Class 1 Generation 2, the following message will be used:
<message>
<name type="c">set</name>
<paramGroup name="protocolConfig" type = "EPC_ GEN_2">
<numReadCycles> numReadCycles </numReadCycles>
<rtCommsScheme> rtCommsScheme </rtCommsScheme>
<initialQ> initialQ </initialQ>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


66 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.4 Protocol Configuration

Parameter Type Value or Value Range Dependencies / Notes


type String ISO_18000_6_B depending on tag type
(protocolConfig) Literals EPC_GEN_1 depending on tag type
EPC_GEN_2 depending on tag type
numReadCycles Integer 0 Disable the tag protocol type
1 - 1000 -
rtCommsScheme Integer Index into the 'Reader To Tag' communications scheme supported by the reader.
The rtCommsScheme element represents the method of communication between the
Reader and the Tag. Considering the number of parameters and the complex
relationships among them, a table of legal combinations will be maintained by the
Reader. It will be sufficient for the Host to use an index value for a row in that table to
configure a particular tag protocol.
readMode String The choice of readMode will make a positive impact on performance when applied
Literals correctly.
SINGLE_TAG If a single tag is expected to be in the field, then specifying
SINGLE_TAG will give optimum results in terms of read rate.
BULK_READ When dealing with multiple tags, use BULK_READ instead.
Choosing the incorrect readMode value may result in inferior
performance.
initialQ The initialQ parameter is used when searching for EPC Generation 2 tags during a read cycle.
During a read cycle the probability of two or more tags responding at the same time (a collision, the
reader can only read responses if one tag responds at a time) is determined by a Q value, the higher
the Q value the less likely a collision is to occur – but the time taken to search for tags takes longer.
The reader automatically determines the optimum Q value for a set of tags during a read cycle, but
this process can take time. If the likely tag population size is known then the time taken to perform a
read cycle can be reduced by setting the starting Q value (initialQ) the reader uses to correspond to
the tag population size. Note that setting initialQ with an unsuitable value will not affect the ability of
the reader to detect tags; it will only result in it taking longer to perform read cycles.
The suggested values for initialQ are as below.
Integer 0 1 'GEN2' tag
1 2 'GEN2' tags
2 up to 4 'GEN2' tags
3 up to 8 'GEN2' tags
4 up to 16 'GEN2' tags
5 up to 32 'GEN2' tags
6 up to 64 'GEN2' tags
7 up to 128 'GEN2' tags
8 up to 256 'GEN2' tags
9 up to 512 'GEN2' tags
10 up to 1024 'GEN2' tags
11 - 15 It is possible to set initialQ up to 15 but using a value beyond 10 is unlikely
to be needed in practice. This parameter is optional and if omitted from the
message, the last stored value will be used.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 67
Standard Configuration Messages
7.4 Protocol Configuration

NOTICE
Error message signals not allowed combination
Certain reader to tag communication schemes are not allowed in combination with certain
reader profiles.
For any inconsistent combination of reader-to-tag communication scheme and reader
profile an error message will be generated. However, whilst the Configuration Application
prevents you from utilizing combinations of reader-to-tag communication schemes and
reader profiles which are not allowed, you have to take responsibility for ensuring that the
reader operates according to the standards of the local authorities.

Normal Response
The Reader will respond using the general format for a response message.

See also
Reader To Tag Communications Schemes (Page 145)

SIMATIC RF660R XML Interface


68 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.4 Protocol Configuration

7.4.2 Get Protocol Configuration

Request
The host will use the ‘type’ attribute for the ‘get’ operations for the messages in this section.
For example to get the current protocol config for EPC_GEN_2, use the following message:
<message>
<name type="c">get</name>
<paramGroup name="protocolConfig" type = "EPC_ GEN_2"/>
</message>

Normal Response
The reader will respond with:
<message>
<name type="r" status="ack">get</name>
<paramGroup name="protocolConfig" type = "EPC_ GEN_2">
<numReadCycles> numReadCycles </numReadCycles>
<rtCommsScheme>rtCommsScheme </rtCommsScheme>
<initialQ> initialQ </initialQ>
</paramGroup>
</message>

Error Response
In the case a protocol has not been explicitly configured, a ‘get’ message for that protocol will
retrieve the default values.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 69
Standard Configuration Messages
7.5 Saving Configuration Changes

7.5 Saving Configuration Changes


Empty elements that are passed in "get" requests or "set" responses are prefixed with a ‘*’.

Message Direction Parameters/Group Purpose


saveConfig Host->Reader none Save the current configuration and apply the given
label to it.
saveConfig (response) Reader->Host none Response to the above
resetConfig Reader->Host none Reset the current configuration to the factory settings
and apply the given label to it.
get Host->Reader *configVersion Get the current config label
get (response) Reader->Host configVersion Result of the get operation

7.5.1 Saving Configuration

Instruction
To prevent the Reader from saving each and every configuration change to its FLASH
(which is a relatively slow operation), the Reader will only save configuration changes (since
the last reader boot-up) when the Host asks for this explicitly. The message will be:
<message>
<name type=”c”>saveConfig</name>
</message>

Normal Response
The Reader will reply with the normal response using the general response message format.

SIMATIC RF660R XML Interface


70 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Standard Configuration Messages
7.5 Saving Configuration Changes

7.5.2 Get Current Configuration Version

Request
To retrieve the current config version the Host may send the following message:
<message>
<name type="c">get</name>
<param name="configVersion"/>
</message>

Normal Response
The Reader will respond with:
<message>
<name type="r" status="ack">get</name>
<configVersion> configVersion </configVersion>
</message>

Parameter Type Value or Value Range Dependencies / Notes


configVersion String Literal The 'configVersion' indicates whether the reader is using DEFAULT or USER
configuration setting. This is maintained internally by the Reader and not settable by the
host.
DEFAULT Factory settings
USER User configured setting has been saved to FLASH

The Configuration messages of a reader with config 'DEFAULT' are shown at Appendix.

Error Response
An error response is not defined for the ‘get’ operation.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 71
Standard Configuration Messages
7.5 Saving Configuration Changes

7.5.3 Resetting Configuration to Factory Settings

Instruction
The "resetConfig" command may be used to reset the entire reader configuration to its
factory defaults. To reset the configuration to factory defaults the Host may send the
message:
<message>
<name type="c">resetConfig</name>
</message>

Normal Response
The reader will reply with the normal response using the general response message format.

SIMATIC RF660R XML Interface


72 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Configuration 8
8.1 Read Trigger Options
Another important aspect of the reader configuration is to set the triggers that activate the
tag read operations. Empty elements that are passed in ‘get’ requests or ‘set’ responses are
prefixed with a ‘*’.

Table 8- 1 Read Trigger Options

Message Direction Parameters/Group Purpose


set Host->Reader readTriggerConfig Set the read trigger
set (response) Reader->Host *readTriggerConfig Response to the above
get Host->Reader *readTriggerConfig Get the current read trigger
get (response) Reader->Host readTriggerConfig Result of the get operation

8.1.1 Set the Read Trigger

Setting
The host will send the following command to set the read trigger on the reader:
<message>
<name type="c">set</name>
<paramGroup name="readTriggerConfig" >
<readTriggerType>readTriggerType </readTriggerType>
<digitalInputType> digitalInputType </digitalInputType>
<digitalInputNumber> digitalInputNumber </digitalInputNumber>
<triggerDuration>triggerDuration </triggerDuration>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 73
Smart Reader Configuration
8.1 Read Trigger Options

Parameter Type Value or Value Range Dependencies / Notes


readTriggerType String Literal CONTINUOUS This is the recommended trigger type for initial
operation.
APP_REQUEST Tag reading must be started with command "tagRead"
DIGITAL_INPUT_PORT Tag reading is triggered by a digital input
digitalInputNumber Integer 0 Digital Input Port 0
1 Digital Input Port 1
2 Digital Input Port 2
digitalInputType String Literal RISING_EDGE readTriggerType = DIGITAL_INPUT_PORT
FALLING_EDGE
LOW readTriggerType = DIGITAL_INPUT_PORT
HIGH For constant LOW and HIGH values the Reader will
perform its read operation for as long as the input value
stays at the specified level.
TriggerDuration Integer 0 - 60000 Not relevant when
readTriggerType = CONTINOUS
applicable when
readTriggerType = APP_REQUEST
or applicable when
readTriggerType = DIGITAL_INPUT_PORT
digitalInputType = FALLING_EDGE | RISING_EDGE
The trigger duration (in milliseconds) will be the minimum amount of time for which
the Reader will perform the read operation. If this duration is shorter than the time
required for a complete read cycle than at least one read cycle will be performed.

Normal Response
The reader will respond using the general format of a normal response.

SIMATIC RF660R XML Interface


74 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Configuration
8.1 Read Trigger Options

8.1.2 Get the Current Read Trigger

Request
To retrieve the current read trigger value, the host may send the following message:
<message>
<name type="c">get</name>
<paramGroup name="readTriggerConfig"/>
</message>

Normal Response
The normal response from the reader will be in the following form:
<message>
<name type="r" status="ack">get</name>
<paramGroup name="readTriggerConfig">
<readTriggerType> readTriggerType </readTriggerType>
<digitalInputNumber> digitalInputNumber </digitalInputNumber>
<digitalInputType> digitalInputType </digitalInputType>
<triggerDuration > triggerDuration </triggerDuration>
</paramGroup>
</message>

Error Response
An error response is not defined for the ‘get’ operation as the reader will simply return the
default trigger value if none has been explicitly set by the Host.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 75
Smart Reader Configuration
8.2 Digital Input Configuration

8.2 Digital Input Configuration


The following messages are relevant to the configuration of the digital inputs provided by the
reader.
Empty elements that are passed in ‘get’ requests or ‘set’ responses are prefixed with a ‘*’.

Table 8- 2 Digital I/O Messages

Message Direction Parameters/Group Purpose


set Host->Reader digitalInputConfig Set the digital input config
set (response) Reader->Host *digitalInputConfig Response to the above
get Host->Reader *digitalInputConfig Get the current settings of the digital
input mask
get (response) Reader->Host digitalInputConfig Result of the get operation
get Host->Reader *digitalInputState Get the current state of the digital input
get (response) Reader->Host digitalInputState Result of the get operation
digitalInputEvent Reader->Host digitalInputInfo Notification of digital input change for
masked lines.

8.2.1 Set the Digital Input Configuration


The Host may send the following message to enable the reporting of activity on digital inputs.

Setting
<message>
<name type="c">set</name>
<paramGroup name="digitalInputConfig">
<port number="0 | 1 | 2"> ENABLE | DISABLE </port>
...
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


Port (digitalInputConfig) String Literal ENABLE Eneble signal change reporting for specified digital
input port
DISABLE Disable signal change reporting for specified digital
input port
port attribute -number Integer 0 Digital Port No. 0
1 Digital Port No. 1
2 Digital Port No. 2

SIMATIC RF660R XML Interface


76 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Configuration
8.2 Digital Input Configuration

Example
For example the following message may be used to enable reporting on digital inputs 0 & 2
and disable it on 1.
<message>
<name type="c">set</name>
<paramGroup name="digitalInputConfig">
<port number="0"> ENABLE </port>
<port number="1"> DISABLE</port>
<port number="2"> ENABLE </port>
</paramGroup>
</message>

Normal Response
The Reader will use the general format for normal and ‘get’ responses for retrieving the
digital input config.

Notification
When the digital input trigger takes place, depending on the mask settings, the Reader will
automatically send a notification in the following format:
<message>
<name type="n">digitalInputEvent</name>
<port number="0 | 1 | 2"> HIGH | LOW </port>
</message>

Note
During the Reader Connect or Reader Disconnect procedure the reader may send
malformed messages. Users are therefore advised to allow the reader to be connected
'stable' prior to sending commands.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 77
Smart Reader Configuration
8.2 Digital Input Configuration

8.2.2 Get the Current State of the Digital Input


To get the current state of the digitial input directly, the following message may be used:

Request
<message>
<name type="c">get</name>
<paramGroup name="digitalInputState">
</message>

Normal Response
The response to the above ‘get’ will be:
<message>
<name type="r" status="ack">get</name>
<paramGroup name="digitalInputState">
<port number="0"> HIGH | LOW </port>
<port number="1"> HIGH | LOW </port>
<port number="2"> HIGH | LOW </port>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


Port (digitalInputConfig) String Literal LOW State of Digital Input Port
HIGH State of Digital Input Port
port attribute -number Integer 0 Digital Input Port 0
1 Digital Input Port 1
2 Digital Input Port 2

SIMATIC RF660R XML Interface


78 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Control Messages 9
Once the reader is appropriately configured, the other more routine tasks may be carried out
as described in this section. Empty elements that are passed in ‘get’ requests or ‘set’
responses are prefixed with a ‘*’.

Table 9- 1 Control Messages

Message Direction Parameters/Group Purpose


resetReader Host->Reader none To reset the reader
resetReader (response) Reader->Host none Response to the reset request
set Host->Reader readerMode Set reader mode
set (response) Reader->Host *readerMode Response to the set request
readTags Host->Reader none Initiates an APP_REQUEST
readTags (response) Reader->Host notifyCount Response to the set request
set Host->Reader digitalOuputState Set the digital output
set (response) Reader->Host *digitalOutputState Response to the above
get Host->Reader *ditigalOuputState Get the digital output state
get (response) Reader->Host digitalOutputState Response to the above

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 79
Control Messages
9.1 Standard Control Messages

9.1 Standard Control Messages

9.1.1 Resetting the Reader Configuration to its Factory Default


The host may send the following message to reset the entire reader configuration to its
factory defaults:

Instruction
<message>
<name type="c">resetConfig</name>
</message>

Normal Response
The reader will reply with:
<message >
<name type="r" status="ack">resetConfig</name>
</message>
Having sent the response, the reader will be set to its factory settings. This operation is
effectively a software controlled reconfiguration of the reader system parameters with its
default values.

Error Response
An error response is not defined for this request as the reader must comply with this
command.

SIMATIC RF660R XML Interface


80 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Control Messages
9.1 Standard Control Messages

9.1.2 Resetting the Reader


The Host may send the following message to reset the reader to its boot-up state:

Instruction
<message>
<name type="c">resetReader</name>
</message>

Normal Response
The reader will reply with:
<message >
<name type="r" status="ack">resetReader</name>
</message>
Having sent the response, the reader will reboot itself. This operation is effectively a software
controlled power cycle.

Error Response
An error response is not defined for this request as the reader must comply with this
command.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 81
Control Messages
9.1 Standard Control Messages

9.1.3 Controlling Reader Mode

Setting
The host can request the reader to enter a specific mode of operation:
<message>
<name type="c">set</name>
<rm> 0 | 1 | 2 </rm>
</message>
The supported mode values are:

Parameter Type Value or Value Range Dependencies / Notes


rm Integer 0 INACTIVE mode, reader will not read/write in this mode.
1 AUTONOMOUS mode, reader works autonomously.
2 CONTINUOUS_WAVE mode, for generating a continuous wave. This
will be used for testing only

Tag Reading Modes of Operation


Tag reading (described later on) will depend on the mode and the read trigger setting of the
reader. The following table lists the valid combinations where the tag reader may generate
tag event reports. the tag reader may generate tag event reports.

Table 9- 2 Tag Reading Modes of Operation

Reader Mode Trigger Tag Reading


AUTONOMOUS (1) CONTINUOUS Reader will send tagEventReports automatically to the host.
AUTONOMOUS (1) DIGITAL_INPUT_PORT Reader will send tagEventReport automatically to the host when the
digital input enters the required state.
AUTONOMOUS (1) APP_REQUEST The Host will send an explicit command to indicate the occurrence of a
trigger.

SIMATIC RF660R XML Interface


82 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Control Messages
9.2 Autonomous Mode

9.2 Autonomous Mode

9.2.1 Autonomous Mode Behaviour


In this mode the reader performs its pre-configured actions, for example if the current read
trigger is CONTINUOUS then the reader will read tags and generate tag event reports
autonomously.
Most of the config and operational messages will be applicable in this mode.
A tag event report is formatted in the following manner.

Tag Event Report


<message>
<name type="n">ter</name>
<ter>channelId,txAntenna,protocolId,tagTypeId,tagId,readCyclesNumber</ter>
</message>

Parameter Type Value or Value Range Dependencies / Notes


ter CSV TER (Tag Event Report)
channelId Integer 100 - 114 readerProfile = ETSI
0 - 49 readerProfile = FCC
150 - 169 readerProfile = CHINA
txAntenna Integer 1-4 Number of TX antenna (1, 2, 3 or 4) which
has been active during tag recognition
protocolId Integer 1 ISO-B
2 EPC GEN 1
3 EPC GEN 2
tagTypeId Integer 1 ISO 64
2 EPC 64
3 EPC 96
4 UCODE EPC1.19 64
5 UCODE EPC1.19 96
6 All other EPC GEN 2 tags
tagId HEX ASCII String e.g. The tag id may be either 64 or 96 bits in
EF040200016E611B length i.e. 8 or 12 hex characters
or respectively. A blank Gen 2 tag is indicated
310000459F88CDA2115739FE by an absence of hex characters in this
field.
readCyclesNumber Integer Number of read cycles (since reader went
into the Autonomous mode). This is to give
an indication of the success rate.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 83
Control Messages
9.2 Autonomous Mode

Note
The behavior of indicating blank Gen 2 tags (without EPC ID) by an absence of hex
characters in the "tagId"-field is new for firmware Version 1.2. With previous releases all tags
were 96 or 64 bits in length.
The "tagIDType" 6 is also new in Release 3, and is used in all cases where the tag ID length
is not 96 or 64.
For the sake of backward compatibility, tags of ID type 6 are not reported when the
"messagingVersion" of the notification channel is set to messaging version GR_XML_2.0,
indicating applications which are compatible to previous firmware and software releases
V1.1 or even earlier.

Note
When a power cycle has been applied to the reader it has to be ensured that the connection
has been properly established, i e. the "hostGreetings" message has been sent, in order to
ensure that the complete tag event report list will be displayed.

Note
Tags of the same ID but of different tag ID type will not be displayed as two different tags.

Note
Clearing the reader buffer
When the reader has been running in the continuous tag reading mode the buffer may be
filled up with tag events.
This process of the reader to empty its buffer will take, depending on the data rate and the
number of accumulated tag events, up to a couple of minutes.

SIMATIC RF660R XML Interface


84 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Control Messages
9.2 Autonomous Mode

9.2.2 Application Requested Tag Reads


These are only possible when the Reader is in the AUTONOMOUS mode and the read
trigger type is APP_REQUEST.

Instruction
The Host will send the following message to the Reader:
<message>
<name type="c">tagRead</name>
</message>

Normal Response
The Reader will interpret this command as the soft, application generated trigger and
perform the read operation based on the trigger duration.

Notification
The Reader will then send any tag notifications over the Notification channel. It will then send
a response back to the Host (over the Control channel) including the count of notifications.
<message>
<name type="r" status="ack">tagRead</name>
<notifyCount> notifyCount </notifyCount>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
notifyCount Integer 0- The command 'tagRead' is only available if
rm= 1 (AUTONOMOUS)
readTrigger = APP_REQUEST
The notifyCount may be zero which implies no tags in the Reader view.

Note
For the sake of backward compatibility, tags of ID type 6 are not reported when the
"messagingVersion" of the notification channel is set to messaging version GR_XML_2.0,
indicating applications which are compatible to previous firmware and sofware releases
V 1.1 or even earlier.
Tags which are not reported for backwards compatibility reasons (see above) will not
contribute to the "notifyCount", despite having been read by the reader and caused the
reader "tag detect" LED to illuminate.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 85
Control Messages
9.3 Setting Digital Output

9.3 Setting Digital Output

9.3.1 Setting Digital Output

Setting
The Host may use the following message to set the digital output to the desired value:
<message>
<name type="c"> set </name>
<paramGroup name="digitalOutputState">
<port number="0 | 1 | 2"> LOW | HIGH </port>

</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
port String HIGH State of Digital Output Port
(digitalOutputState) Literal LOW State of Digital Output Port
port attribute – number Integer 0–2 Digital Output Port 0-2

The message may include multiple port elements to set the values on multiple ports with a
single message. The reader will respond using the normal format of a response. An error
response is not defined for this operation.

Request
To retrieve the status of the output ports, the Host may use the following message.
<message>
<name type="c"> get </name>
<paramGroup name="digitalOutputState"/>
</message>

SIMATIC RF660R XML Interface


86 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Control Messages
9.3 Setting Digital Output

Response from the Reader


The Reader will respond and send a digitalOutputState paramGroup back to the Host with
the current status of all three digital ports.
<message>
<name type="r" status="ack"> get </name>
<paramGroup name="digitalOutputState">
<port number="0"> LOW | HIGH </port>
<port number="1"> LOW | HIGH </port>
<port number="2"> LOW | HIGH </port>
</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
port String HIGH State of Digital Output Port
(digitalOutputState) Literal LOW State of Digital Output Port
port attribute – number Integer 0–2 Digital Output Port 0-2

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 87
Control Messages
9.3 Setting Digital Output

SIMATIC RF660R XML Interface


88 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management 10
This section talks about messages relevant to the Tag Inventory Management operations.

Message Direction Parameters/Group Purpose


tagEventReport Reader->Host tagEventReport Reader reporting of Tag Ids.
(notification)
tagSelect Host->Reader tagSelectionRange A data range at a given starting address and/or
memory bank to narrow the tags responding to the
selection commands.
tagSelect (response) Reader->Host none/error Response to the above
tagProgramId Host->Reader tagIdSpec Request to program id on a single tag
tagProgramId (response) Reader->Host none/error Response to the above
tagKill Host->Reader tagKillSpec Request to kill a tag
tagKill (response) Reader->Host none/error Response to the above request

As described earlier the reader sends simple tag events using notifications using the
'tagEventReport' notification (see chapter Autonomous mode). Such notification will contain
the Tag ID related information only and will not include information about other data which
may be stored on the tag.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 89
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

10.1 Smart Reader Tag Selection


By default the Reader will interrogate all tags. For example, in the ISO air interface this is
done by sending a GROUP_SELECT_EQ command with a byte mask of zero and an
address of zero. To reduce responses from tags and so improve read rate and through put it
will be necessary to restrict the tags responding by using different filtering parameters.
These filtering parameters could be a fixed value stored at a certain address and memory
bank on the tag, or a range of values stored at this location.

10.1.1 Tag Select Message


The Tag Select is a form of configuration, but is left in the Tag Inventory management
section to allow for online configuration. Tag selection parameters will be stored in Flash
when configuration is saved.
The logic employed in tag selection is different for each type of tag. This is because the air
interface protocols are different and apply selection commands in different ways. Examples
are given to help understand how this logic works.

SIMATIC RF660R XML Interface


90 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

10.1.2 ISO-B Tag Selection

ISO-B Tag Selection


The message for ISO_18000_6_B will be:

Instruction
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="ISO_18000_6_B">
<filter action="action" type="type" address="address" mask="mask"> filter</filter>
….
</paramGroup>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
filter Hex ASCII e.g. The filter is a hexadecimal value for an 8 byte string. The filter
String EF04000000000000 elements in the above message are optional. A parameter group
can contain up to 5 filters using any combination of SELECT /
UNSELECT actions. If no filter elements are defined, then the
protocol will select all tags effectively resetting any previous
filters.
Also note that application of new filters removes old filters e.g. if
you had applied three filters at some time, applying two new
filters will not result in 5 filters, instead the number of filters will
be just two.
filter attribute – String Literal SELECT Select tags with specified conditions
action UNSELECT Unselect tags with specified conditions
filter attribute – String Literal EQUAL Complies with selection
type NOT_EQUAL Does not comply with selection
GREATER_THAN Greater than selection
LESS_ THAN Smaller than selection
filter attribute - Hex ASCII 00 - FF The address is a hexadecimal value representing a byte
address String
filter attribute - Hex ASCII 00 - FF The mask is a hexadecimal value representing a byte. Each bit
mask String of the byte selects (if 1) or unselects (if 0) which bytes of filter
are applied.
To select all we would use an empty paramGroup:

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 91
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

Instruction
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="ISO_18000_6_B">
</paramGroup>
</message>
The RF660R always applies SELECT actions first, in the order given, followed by
UNSELECT actions, again in the order given. If no SELECT commands are given, but an
UNSELECT is set, the RF660R will automatically SELECT all tags first.
ISO 18000-6B Tags power up in the READY state but only respond when they are in the ID
state. The RF660R will report all those tags in the ID state after applying all the filters
specified.
SELECT moves tags meeting the filter parameters into the ID state. Those already in the ID
state will remain there.
UNSELECT moves tags meeting the filter parameters from the ID state to the READY state.
Those remaining in the ID state will respond. Those Tags in the READY state will remain in
the READY state.
Here are some examples to select a subset of tags.

SIMATIC RF660R XML Interface


92 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

Examples
Separation of EPC 1.19 tags (U-Code) tags is achieved by data structure.
The tag's reported UID consists of 8 bytes, however, according to EPC Specification, only 6
bytes are part of the actual UID.
Example 1:
Reported UID: A5 01 01 EA 91 60 53 FD (= 8 Bytes)
Bytes relevant for UID: A5 EA 91 60 53 FD (= 6 Bytes)

Example 2:
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="ISO_18000_6_B">

<filter action="SELECT" type="EQUAL" address="0"


mask="C0">EF04000000000000</filter>
<filter action="SELECT" type="EQUAL" address="0"
mask="01">0000000000000007</filter>
<filter action="SELECT" type="EQUAL" address="0"
mask="01">0400000000000004</filter>
<filter action="UNSELECT" type="EQUAL"
address="2"mask="80">3300000000000000</filter>
<filter action="UNSELECT" type="EQUAL"
address="2"mask="80">4400000000000000</filter>
</paramGroup>
</message>
The first filter action puts all tags with EF04h at memory locations 00h to 01h into the ID
state.
The second filter action adds tags with 07h at memory location 07h into the ID state.
The third filter action adds tags with 04h at memory location 07h into the ID state.
This will mean UCODE EPC 1.19 tags, and any UCODE HSL tags whose UID ends with 07h
or 04h.
The fourth filter action removes from the set above any tags with 33h at memory location 02h
The fifth filter action removes from the set above any tags with 44h at memory location 02h
The UNSELECT statements removed UCODE EPC1.19 tags whose header byte is 33h or
44h.

Example 3:
Select all tags with an EPC header greater than 0x77.
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="ISO_18000_6_B">
<filter action="SELECT" type="GREATERTHAN" address="2"
mask="80">7700000000000000
</filter>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 93
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

10.1.3 EPC Gen 1 Tag Selection

EPC Gen1 Tag Selection

Note
EPC Gen1 Tag Selection is NOT yet implemented. Do NOT attempt to use TagSelect
command for Gen1 tags since this may cause reader instability!

10.1.4 EPC Gen 2 Tag Selection

EPC Gen 2 Tag Selection


For EPC Gen 2 the message will be:

Instruction
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="EPC_GEN_2">
<target> S0 | S1 | S2 | S3 </target>
<mask action="action" memBank="memBank" pointer="pointer" length="lenght"> mask
</mask>
<mask action="action" memBank="memBank" pointer="pointer" length="lenght"> mask
</mask>
<mask action="action" memBank="memBank" pointer="pointer" length="lenght"> mask
</mask>
<mask action="action" memBank="memBank" pointer="pointer" length="lenght"> mask
</mask>
<mask action="action" memBank="memBank" pointer="pointer" length="lenght"> mask
</mask>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


94 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

Explanation of <target> S0 | S1 | S2 | S3 </target> parameter:


The target element contains the session ID.
An inventory process comprising an Interrogator and an associated Tag population. An
Interrogator chooses one of four sessions and inventories tags within that session. The
Interrogator and associated Tag population operate in one and only one session for the
duration of an inventory round. For each session, tags maintain a corresponding inventoried
flag. Sessions allow tags to keep track of their inventoried status separately for each of four
possible time-interleaved inventory processes, using an independent inventoried flag for
each process.

Parameter Type Value or Value Range Dependencies / Notes


target String Literal S0 | S1 | S2 | S3 S0, S1, S2, S3: State A or B
mask Hex ASCII mask is a hexadecimal value for the binary string to apply as a
String filter. The "length" is counted from the LSB (rightmost) of the
mask.
mask attribute - Integer 0-7 The action is a decimal value from 0 to 7 corresponding to the
action action described in EPC Gen 2 spec which has been
duplicated below.
mask attribute - Integer 1 EPC
memBank 2 TID
3 USER
mask attribute – Hex ASCII 0 – FFFF pointer is the starting bit address to apply the mask. It can be
pointer any hexadecimal from 0 to FFFF. The actual value to be used
will be dependent upon the tags and the memory bank in use.
mask attribute – Integer Should indicate the length (in bits) of the mask. length is a
length decimal value of the number of bits in the mask attribute.

The mask elements are optional and a paramGroup can contain up to 5 of these. If there are
no elements in the paramGroup then a select all is performed. A target is always mandatory
and the reader will return all of those which remain set to State "A" after applying all the
subsets. The reader starts by selecting all tags and setting the target flag to State "A".
The subset selects/unselects are performed in the order given in the message. Sending a
new tag selection message removes the old specification.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 95
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

The action is a decimal value from 0 to 7 corresponding to the action described in Table 6.19
of the EPC Gen 2 spec which has been duplicated below:

Action If Matching Tag If non Matching Tag


0 Set selected Session flag to A Set Selected Session flag to B
1 Set selected Session flag to A Do nothing
2 Do nothing Set Selected Session flag to B
3 Set the selected session flag to its inverse (A->B Do nothing
or B-> A)
4 Set Selected Session flag to B Set selected Session flag to A
5 Set Selected Session flag to B Do nothing
6 Do nothing Set selected Session flag to A
7 Do nothing Set the selected session flag to its inverse (A->B or B-> A)
EPC Gen 2 Select Actions
To select all using target S2 we would use:

Instruction
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="EPC_GEN_2">
<target>S2</target>
</paramGroup>
</message>

Example
To select tags with a Id length of 96 bits (based upon PC bits 0x10 to 0x14 being equal
00110) and have a ISO/IEC 15963 allocation class identifier set to (11100010=0xE2) in TID
memory (address 0). Tags with their 12-bit tag mask-designer identifier (in TID memory at
0x08) set to 0x68C shall be unselected.
<message>
<name type="c">set</name>
<paramGroup name="tagSelectionRange" type="EPC_GEN_2">
<target>S3</target>
<mask action="0" memBank="1" pointer="10" length="5">06</mask>
<mask action="2" memBank="2" pointer="0" length="8">E2</mask>
<mask action="5" memBank="2" pointer="8" length="12">68C</mask>
</paramGroup>
</message>
Responses to the above commands will be:

SIMATIC RF660R XML Interface


96 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

Normal Responses
<message>
<name type="r" status="ack">set</name>
<paramGroup name ="tagSelectionRange" type= "ISO_18000_6_B | EPC_GEN_1
| EPC_GEN_2"/ >
</message>

10.1.5 Retrieve Current Configuration


Retrieving the config will be done through a get message:
<message>
<name type="c">get</name>
<paramGroup name ="tagSelectionRange" type= "ISO_18000_6_B | EPC_GEN_1
| EPC_GEN_2"/>
</message>

10.1.6 A Review of Selecting all Tags in View

A review of selecting all tags in view


This will effectively reset the filter criteria used previously. The message format is:

Instruction
<message>
<name type="c">set</name>
<paramGroup name ="tagSelectionRange" type= "type">
<force> TRUE | FALSE </force>
<target> S0 | S1 | S2 | S3 </target>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


type String Literal ISO_18000_6_B depending on tag type
EPC_GEN_2 depending on tag type
force String Literal TRUE Only applicable when type = EPC_GEN_2
FALSE Only applicable when type = EPC_GEN_2
target String Literal S0 | S1 | S2 | S3 only applicable when type = EPC_GEN_2
Used to specify the needed session flag

For the ISO_18000_6_B case only an empty 'paramGroup' with the desired protocol type is
required (i.e. the message with no selection criteria).
The get message response if no filter was applied will be:

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 97
Smart Reader Tag Inventory Management
10.1 Smart Reader Tag Selection

Normal Response
<message>
<name type="r" status="ack">get</name>
<paramGroup name ="tagSelectionRange" type= "type">
<force> TRUE | FALSE </force>
<target> S0 | S1 | S2 | S3 </target>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


type String Literal ISO_18000_6_B depending on tag type
EPC_GEN_2 depending on tag type
force String Literal TRUE Only present when
type = EPC_GEN_2
FALSE Only applicable when
type = EPC_GEN_2
target String Literal S0 | S1 | S2 | S3 only present when
type = EPC_GEN_2

The effect of the tagSelect messages would be:


● to modify the 'GROUP_SELECT' commands issued at the start of an ISO read cycle:
● to send a 'QUIET ALL' followed by a 'TALK' for Gen1 (when the force element is FALSE).
or to modify the SELECT command issued at the start of a Gen 2 read cycle

SIMATIC RF660R XML Interface


98 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.2 Smart Reader Tag ID Programming

10.2 Smart Reader Tag ID Programming


The host may use this set of messages to write an ID to a tag for the different protocols. The
ISO_18000_6_B, EPC_GEN_1, and EPC_GEN_2 protocols are supported. Programming for
the ISO_18000_6_B and EPC_GEN_1 protocols must have only the tag to be programmed in
the reader's field and no other tags. For EPC_GEN_2 it does not matter how many other tags
are in the field as long as the tag to be programmed (given in the message as the
currentTagId) is present.

Note
For firmware/software release V 1.2 onwards currentTagId as well as the tagId field may be
omitted:
If currentTagId is omitted then the reader will check that the tag operated on is the only tag in
the field and if not it will not program it.
Omitting the tagId field will cause the reader to perform the tagProgramId operation on the
first tag which responds, regardless of its EPC id.

For EPC_GEN_1 the kill password is written at the same time. For EPC_GEN_2 the Protocol
Control (PC) field is programmed at the same time, the numbering system identifier (NSI) is
part of the PC field and is given in the tagProgramId message.
For ISO_18000_6_B the permitted values for newTagIdType are 1 (ISO/IEC 64), 4 (UCODE
EPC 1.19 64), or 5 (UCODE EPC 1.19 96). For EPC_GEN_1 the permitted newTagIdType
values are 2 (EPC 64) and 3 (EPC 96). For EPC_GEN_2 currentTagIdType and
newTagIdType can only be set to 3 (EPC 96).

Note
The tagProgrammmId password is a single hexadecimal byte for EPC_GEN_1 (Password-
range: 0-FF) and four bytes for EPC_GEN_2 (Password range: 0-3FF)

Message format:

Message format for programming the ID of a ISO_18000_6_B tag is:


<message>
<name type="c"> tagProgramId </name>
<paramGroup name="tagIdSpec" type="ISO_18000_6_B">
<newTagIdType> newTagIdType </newTagIdType>
<newTagId> newTagId </newTagId>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 99
Smart Reader Tag Inventory Management
10.2 Smart Reader Tag ID Programming

Message format for programming the ID of a EPC_GEN_1 tag is


<message>
<name type="c"> tagProgramId </name>
<paramGroup name="tagIdSpec" type="EPC_GEN_1">
<newTagIdType> newTagIdType </newTagIdType>
<newTagId> newTagId </newTagId>
<password> password </password>
</paramGroup>
</message>

Message format for programming the ID of a EPC_GEN_2 tag is


<message>
<name type="c"> tagProgramId </name>
<paramGroup name ="tagIdSpec" type="EPC_GEN_2">
<currentTagIdType> currentTagIdType </currentTagIdType>
<currentTagId> currentTagId </currentTagId>
<newTagIdType> newTagIdType </newTagIdType>
<newTagId> newTagId </newTagId>
<nsi> nsi </nsi>
<password> password </password>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


type String Literal ISO_18000_6_B depending on tag type
EPC_GEN_1 depending on tag type
EPC_GEN_2 depending on tag type
currentTagIdType Integer only applicable when type = EPC_GEN_2
2 EPC 64
3 EPC 96
currentTagId HEX ASCII only applicable when type = EPC_GEN_2
String e.g. 08040200016E611B The tag id may be either 64 or 96 bits in length
or i.e. 8 or 12 hex characters respectively.
310000459F88CDA2115739FE
newTagIdType Integer 1 type = ISO_18000_6_B
ISO 64
2 type = EPC_GEN_1 or EPC_GEN_2
EPC 64
3 type = EPC_GEN_1 or EPC_GEN_2
EPC 96
4 type = ISO_18000_6_B
UCODE EPC1.19 64
5 type = ISO_18000_6_B
UCODE EPC1.19 96
6 type = EPC_Gen_2
All EPC Gen 2 tags of tag id length not equal to
64 or 96 bits in length

SIMATIC RF660R XML Interface


100 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.2 Smart Reader Tag ID Programming

Parameter Type Value or Value Range Dependencies / Notes


newTagId HEX ASCII e.g. 08040200016E611B The tag id may be either 64 or 96 bits in length
String or i.e. 8 or 12 hex characters respectively.
310000459F88CDA2115739FE
password HEX ASCII The password element serves different roles depending upon the protocol. For ISO
String the password is not used.
e.g. AA For EPC1 the password is a hex ASCII pair representing a
single byte and serves as the kill password to be programmed
into the tag.
e.g. A234EF11 For EPC2 the password is a hex ASCII string representing a
four byte value and will be used as the access password to put
the tag into its secured state if necessary. To write an access
password, the user must use the Write command.
nsi Hex ASCII Numbering system identifier. The length of this field is limited to
String indicate a nine bit value e.g. 1XX or 0XX where XX are the
remaining 8 bits.
NSI MSB indicates if the rest of the NSI is an EPCglobal header
(MSB=0) or AFI (Application Family Identifier) (MSB=1). The
default value is the whole of the NSI set to 0.

Normal Response
A successful response to the message would look like this:
<message>
<name type="r" status="ack">tagProgramId</name>
<paramGroup name ="tagIdSpec" type="ISO_18000_6_B | EPC_GEN_1 | EPC_GEN_2"/>
</message>

Error Response
If the programme failed, the response to the message would look like this:
<message>
<name type="r" status="fail">tagProgramId</name>
<paramGroup name ="tagIdSpec" type="ISO_18000_6_B | EPC_GEN_1 | EPC_GEN_2"/>
<reason> error code </reason>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 101
Smart Reader Tag Inventory Management
10.2 Smart Reader Tag ID Programming

Examples
Some examples of this command are given below.
Example 1: ISO UID
<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="ISO_18000_6_B">
<newTagIdType>1</newTagIdType>
<newTagId>310000000000AC27</newTagId>
</paramGroup>
</message>

Example 2: UCODE EPC 1.19 64 bit


<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="ISO_18000_6_B">
<newTagIdType>4</newTagIdType>
<newTagId >0802030405060708</newTagId>
</paramGroup>
</message>

Example 3: UCODE EPC 1.19 96 bit


<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="ISO_18000_6_B">
<newTagIdType>5</newTagIdType>
<newTagId>30abcdef0123456789abcdef</newTagId>
</paramGroup>
</message>

Example 4: EPC Gen 1


<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="EPC_GEN_1">
<newTagIdType>2</newTagIdType>
<newTagId>0000000000123456</newTagId>
<password>AA</password>
</paramGroup>
</message>
This will program an EPC1 tag with the value 0000000000123456 and set the kill password
to 0xAA. The lock byte will be 0x00.

SIMATIC RF660R XML Interface


102 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.2 Smart Reader Tag ID Programming

Example 5: EPC Gen 2


<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="EPC_GEN_2">
<currentTagIdType>3</currentTagIdType>
<currentTagId>00000000000000000000000A</currentTagId>
<newTagIdType>3</newTagIdType>
<newTagId>000000000000000000123456</newTagId>
<password>AA112233</password>
<nsi> 0 </nsi>
</paramGroup>
</message>

This will program an EPC2 with the existing id 000000000000000A to the new value
0000000000123456. The command assumes the tag will enter its open state after
singulation and will require an access password equal to 0xAA112233 before the
programming can take place.
If the access password on the tag is not equal to 0xAA112233 the command will fail, even if
no access password is programmed into the tag. For such a case exclude the password:
<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="EPC_GEN_2">
<currentTagIdType> 3</currentTagIdType>
<currentTagId>00000000000000000000000A</currentTagId>
<newTagIdType>3</newTagIdType>
<newTagId>000000000000000000123456</newTagId>
</paramGroup>
</message>

Note
As of firmware/software Release V1.2 all Gen2 tagIdType fields are ignored, the length of
the ID being calculated from the contents of the corresponding tagId fields.
Moreover, the currentTagId field is also optional – if omitted, the reader will program
whatever tag it finds, provided it is the only tag in the field.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 103
Smart Reader Tag Inventory Management
10.3 Tag Killing

Due to the current implementations the following XML-command leads to the same result as
the previous one:
<message>
<name type="c">tagProgramId</name>
<paramGroup name="tagIdSpec" type="EPC_GEN_2">
<newTagId>000000000000000000123456</newTagId>
</paramGroup>
</message>
In both cases the reader will automatically assume the access password is not required.

Note
Success and failure of all programming commands is also dependent upon the lock status of
the tags.

10.3 Tag Killing


The host may use this message to kill a tag

Note
Note ISO does not have a kill property.

Note
EPC Gen 1 Tag: tagKill command does not work with all tags as specified. In some cases
the tag is rather erased than killed, even though reader gets response 'killing successful'.
For EPC Gen 2 Tags: tagKill command works as specified.

The message format for EPC Gen 1 and EPC Gen 2 is:

Instruction
<message>
<name type="c">tagKill</name>
<paramGroup name ="tagKillSpec">
<protocolId> protocolId </protocolId>
<tagIdType> tagIdType </tagIdType>
<tagId> tagId </tagId>
<password> password </password>
</paramGroup>
<message>

SIMATIC RF660R XML Interface


104 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Tag Inventory Management
10.3 Tag Killing

Parameter Type Value or Value Range Dependencies / Notes


protocolId Integer 2 EPC GEN 1
3 EPC GEN 2
tagTypeId Integer 2 EPC 64
3 EPC 96
tagId HEX ASCII e.g. The tag id may be either 64 or 96 bits in length i.e. 8 or
String EF040200016E611B 12 hex characters respectively.
or Please refer to Note further below.
310000459F88CDA2115739FE
password HEX ASCII 00 - FF For EPC1 the password is a hex ASCII pair
String representing a single byte and is the Kill password of
the EPC1 tag
00000000 – FFFFFFFF For EPC2 the password is a hex ASCII string
representing a four byte value and is the Kill password
of the EPC2 tag

Note
From firmware Release V 1.2 onwards:
Omitting the tagId field will cause the reader to perform the tagKill operation on the first tag
which responds, regardless of its ID.

Normal Response
A successful response to the message would look like this:
<message>
<name type="r" status="ack">tagKill</name>
</message>

Error Response
If the operation failed, the response to the message would look like this:
<message>
<name type="r" status="fail">tagKill</name>
<reason> error code </reason>
</message>
For error response messages refer to Appendix

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 105
Smart Reader Tag Inventory Management
10.3 Tag Killing

SIMATIC RF660R XML Interface


106 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages 11
These messages are used to exchange data information on the Tag.

Table 11- 1 Smart Reader Data Exchange Commands

Message Direction Parameters/Group Purpose


tagDataRead host->reader tagReadSpec Request Tag Data for a given tag specification.
tagDataRead (response) reader->host tagData/error Response to the above request
tagDataWrite host->reader tagWriteSpec To write data for a given tag specification
tagDataWrite (response) reader->host None/error Response to the above request
tagLock host->reader TagLockSpec Request to lock certain tag fields
tagLock (response) reader->host None/error Response to the above

11.1 Smart Reader Tag Data Reading


To read the Data on the tag, the host may perform a direct Tag Data read by sending the
following message to the reader:

Instruction
<message>
<name type="c">tagDataRead</name>
<paramGroup name ="tagReadSpec">
<protocolId> protocolID</protocolId>
<tagIdType> tagIdtype </tagIdType>
<tagId> tagId </tagId>
<tagAddress> tagAddress </tagAddress>
<tagDataLength> tagDataLength </tagDataLength>
<memBank> memBank </memBank>
<password> password </password>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 107
Smart Reader Data Exchange Messages
11.1 Smart Reader Tag Data Reading

Parameter Type Value or Value Range Dependencies / Notes


protocolId Integer 1 ISO
2 EPC GEN 1
3 EPC GEN 2
tagIdType Integer The 'tagIdType' is given when reporting the reading of a tag Id in tag event reports.
Firmware Release V 1.2 and later revisions ignore the tagIdType field for EPC Global Gen 2
tags and infer it from the number of characters in the tagId field (which must be a multiple of
4).
1 ISO/IEC 64 - this is a 64 bit Id. It is only supported for
tags using the ISO 18000-6 B protocol. For reference
the Id format and location in tag memory is defined in
Appendix B of ISO/IEC 18000-6 Information
technology - Radio frequency identification for item
management - Part 6: Parameters for air interface
communications at 860MHz to 960MHz.
2 EPC 64 - this is a 64 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. For reference the format of the
Id is defined in the EPC Tag Data Standards 1.1. The
location in tag memory for EPC generation 1 tags is
defined in Auto-ID Center Technical Report 860MHz-
930MHz Class 1 Radio Frequency Identification Tag
Radio Frequency & Logical Communication Interface
Specification, for EPC generation 2 tags it is defined in
and EPC Radio-Frequency Identity Protocols Class-1
Generation-2 UHF RFID Protocol for Communications
at 860MHz-960MHz.
3 EPC 96 - this is a 96 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. The references are the same
as for EPC 64.
4 UCODE EPC 1.19 64 - this is a 64 bit EPC Id using
the UCODE 1.19 formatting on ISO tags. It is only
supported for tags using the ISO 18000-6 B
protocol. For reference the format of the Id is defined
in the EPC Tag Data Standards 1.1, the location in tag
memory and UCODE 1.19 formatting is defined in
Philips Semiconductors Implementation of EPC Tag
Data on UCODE EPC 1.19 Application Note.
5 UCODE EPC 1.19 96 - this is a 96 bit EPC Id using
the UCODE 1.19 formatting on ISO tags. It is only
supported for tags using the ISO 18000-6 B
protocol. The references are the same as for UCODE
EPC 1.19 64.
6 EPC Gen 2 any other Tag. This is a Class 1
Generation 2 tag with an ID length to be inferred from
the number of digits in the tagID field.
tagId HEX e.g. The tag id may be either 64 or 96 bits in length i.e. 8 or
ASCII EF040200016E611B 12 hex characters respectively.
String or In addition, the tagId field may be omitted. This will
310000459F88CDA2115739FE cause the reader to perform the tagDataRead
operation on the first tag which responds regardless of
its ID.

SIMATIC RF660R XML Interface


108 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.1 Smart Reader Tag Data Reading

Parameter Type Value or Value Range Dependencies / Notes


tagAddress Hex Depends on tag in bytes
ASCII protocolId = 3 (EPC GEN 2)
16 bit words
tagDataLength Integer Depends on tag Depends on length of data range to be read
memBank Integer only applicable when protocolId = 3 (EPC GEN 2)
0 password block
1 EPC
2 TID
3 USER
password HEX only applicable when protocolId = 3 (EPC GEN 2)
ASCII 00000000 – FFFFFFFF For EPC GEN 2 the password is a hex ASCII string
String representing a four byte value and is the Access
password of the EPC GEN 2 tag.

Normal Response
A successful response to the message would look like this:
<message>
<name type="r" status="ack">tagDataRead</name>
<tagData> tagData </tagData>
</message>

Parameter Type Value or Value Range Dependencies / Notes


tagData HEX ASCII String Depends on query of data hex data

Error Response
If the read failed, the response to the message would look like this:
<message>
<name type="r" status="fail">tagDataRead</name>
<reason> error code </reason>
</message>

Some examples of Tag Data Read are given below:

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 109
Smart Reader Data Exchange Messages
11.1 Smart Reader Tag Data Reading

Examples

Example 1: ISO Tag


<message>
<name type="c">tagDataRead</name>
<paramGroup name="tagReadSpec">
<protocolId>1</protocolId>
<tagIdType>1</tagIdType>
<tagId>ef04020000de77fc</tagId>
<tagAddress>0</tagAddress>
<tagDataLength>224</tagDataLength>
</paramGroup>
</message>

Example 2: UCOIDE EPC1.19 64 bit


<message>
<name type="c">tagDataRead</name>
<paramGroup name="tagReadSpec">
<protocolId>1</protocolId>
<tagIdType>4</tagIdType>
<tagId>0200000000de77fc</tagId>
<tagAddress>0</tagAddress>
<tagDataLength>224</tagDataLength>
</paramGroup>
</message>

Example 3: UCODE EPC1.19.96 bit


<message>
<name type="c">tagDataRead</name>
<paramGroup name="tagReadSpec">
<protocolId>1</protocolId>
<tagIdType>5</tagIdType>
<tagId>0200000003ffff0000de77fc</tagId>
<tagAddress>0</tagAddress>
<tagDataLength>224</tagDataLength>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


110 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.1 Smart Reader Tag Data Reading

Example 4: EPC Gen 2 (without Access Password)


<message>
<name type="c">tagDataRead</name>
<paramGroup name="tagReadSpec">
<protocolId>3</protocolId>
<tagIdType>3</tagIdType>
<tagId>3000214160C00400000A3CAC</tagId>
<tagAddress>0</tagAddress>
<tagDataLength>2</tagDataLength>
<memBank>0</memBank>
</paramGroup>
</message>

Note
From firmware Release V 1.2 onwards the TagIdType will be ignored.

Note
The Access Password may be required for EPC GEN 2 tags. If not supplied the RF660R will
assume a zero password and that the tag will enter the Secured state. The command will fail
if the EPC GEN 2 has a non-zero access password. The command may also fail depending
upon the lock status of the EPC GEN 2 tag.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 111
Smart Reader Data Exchange Messages
11.2 Smart Reader Tag Data Writing

11.2 Smart Reader Tag Data Writing

Instruction
<message>
<name type="c">tagDataWrite</name>
<paramGroup name ="tagWriteSpec">
<protocolId> protocolId </protocolId>
<tagIdType> tagIdType </tagIdType>
<tagId> tagId </tagId>
<verifyOn> ON | OFF </verifyOn>
<tagAddress> tagAddress </tagAddress>
<tagDataLength> tagDataLength </tagDataLength>
<tagData> tagData </tagData>
<mask> xxxxxxx </mask>
<memBank> memBank </memBank>
<password> password </password>
<EPC2Mode> WRITE | BLOCK_WRITE </EPC2Mode>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


protocolId Integer 1 ISO
2 EPC GEN 1
3 EPC GEN 2
tagIdType Integer The 'tagIdType' is given when reporting the reading of a tag Id in tag event reports.
1 ISO/IEC 64 - this is a 64 bit Id. It is only supported for tags using the
ISO 18000-6 B protocol. For reference the Id format and location in
tag memory is defined in Appendix B of ISO/IEC 18000-6
Information technology - Radio frequency identification for item
management - Part 6: Parameters for air interface communications
at 860MHz to 960MHz.
2 EPC 64 - this is a 64 bit EPC Id. It is only supported for tags using
the EPC generation 1 and EPC generation 2 protocols. For
reference the format of the Id is defined in the EPC Tag Data
Standards 1.1. The location in tag memory for EPC generation 1
tags is defined in Auto-ID Center Technical Report 860MHz-930MHz
Class 1 Radio Frequency Identification Tag Radio Frequency &
Logical Communication Interface Specification, for EPC generation 2
tags it is defined in and EPC Radio-Frequency Identity Protocols
Class-1 Generation-2 UHF RFID Protocol for Communications at
860MHz-960MHz.
3 EPC 96 - this is a 96 bit EPC Id. It is only supported for tags using
the EPC generation 1 and EPC generation 2 protocols. The
references are the same as for EPC 64.
4 UCODE EPC 1.19 64 - this is a 64 bit EPC Id using the UCODE
1.19 formatting on ISO tags. It is only supported for tags using the
ISO 18000-6 B protocol. For reference the format of the Id is
defined in the EPC Tag Data Standards 1.1, the location in tag
memory and UCODE 1.19 formatting is defined in Philips
Semiconductors Implementation of EPC Tag Data on UCODE EPC
1.19 Application Note.

SIMATIC RF660R XML Interface


112 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.2 Smart Reader Tag Data Writing

Parameter Type Value or Value Range Dependencies / Notes


5 UCODE EPC 1.19 96 - this is a 96 bit EPC Id using the UCODE
1.19 formatting on ISO tags. It is only supported for tags using the
ISO 18000-6 B protocol. The references are the same as for
UCODE EPC 1.19 64.
6 EPC Gen 2 any other Tag. This is a Class 1 Generation 2 tag with
an ID length to be inferred from the number of digits in the tagID
field.
tagId HEX e.g. The tag id may be either 64 or 96 bits in length i.e. 8 or 12 hex
ASCII EF040200016E611B characters respectively.
String or
310000459F88CDA2115
739FE
verifyOn String For EPC Gen 2 tags: Command writing over memory bound (= memory space used up) leads to
Literal a 'message not successful'-response even though the data before the bound have been written
correctly to the memory.
If users WRITE to the EPC memory of an EPC2 tag, 'verifyOn' must be set to OFF otherwise it
will fail. This is because the 'verifyOn' checks that the data has been written to the tagId given –
it follows the 'WRITE' by a 'READ'. Since a WRITE to the EPC memory bank changes the ID, the
verification will fail as the tag is no longer present. In general, if users want to WRITE to the EPC
memory bank they should use the 'tagProgramId' command.
ON Verify on
OFF Verify off
tagAddress Hex Depends on tag Starting address hexadecimal in bytes
ASCII protocolId = 3 (EPC GEN 2)
16 bit words
tagDataLen Integer Depends on tag Hex data
gth
tagData HEX hex data
ASCII protocolId = 3 (EPC GEN 2)
String
hex data in 2N bytes
mask HEX Optional field, with data as a string of bits (represented as
ASCII HEX format) which is of the same length as data field.
String A bit set to "1" in the mask causes the bit in the corresponding
position to be programmed, whereas a bit set to "0" in the mask will
not change the bit in the corresponding position to be programmed.
memBank Integer 0-3 protocolId = 3 (EPC GEN 2)
memBank 0 is the password block and is allowed in this case.
password HEX The Access Password may be required for EPC2 tags. If not supplied the RF660R will assume a
ASCII zero password and that the tag will enter the Secured state. The command will fail if the EPC2
String has a non-zero access password. The command may also fail depending upon the lock status of
the EPC2 tag.
00000000 – FFFFFFFF protocolId = 3 (EPC GEN 2)
For EPC2 the password is a hex ASCII string representing a four
byte value and is the Access password of the EPC2 tag.
EPC2Mode String The RF660R can write EPC2 tags using the WRITE or the Optional BLOCK_WRITE commands.
Literal In future, users can trade a faster write speed for less security on the writing by using the
BLOCK_WRITE option. At present, with the currently available EPC2 tags, BLOCK_WRITE is
not fully implemented, and users should only use the WRITE option.
WRITE Write 16 bits (i.e. one word) at a time

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 113
Smart Reader Data Exchange Messages
11.2 Smart Reader Tag Data Writing

Parameter Type Value or Value Range Dependencies / Notes


BLOCK_WRITE Write one or more 16-bit words at a time

Note
Firmware Release V 1.2 and later ones ignore the tagIdType field for EPC Global Gen 2 tags
and infer it from the number of characters in the tagId field (which must be a multiple of 4).
In addition, the tagId field may be omitted. This will cause the reader to perform the
tagDataWrite operation on the first tag which responds, regardless of its ID.
Also a mask field has been added to allow control of which tag data bits are programmed.
The mask must be of the same length as the tag data field.
Firmware Release V 1.2 and later ones do not act on the fields EPC2Mode
(WRITE/BLOCK_WRITE) and verifyOn within the write command. Whilst it is intended
ultimately to take account of these fields, the current version verifies all writes and uses write
rather than blockwrite.
That is blockwrite and unverified write are not supported by the current firmware Release

A successful response to the message would look like this:

Successful Response
<message>
<name type="r" status="ack"> tagDataWrite </name>
</message>

If the operation failed, the error response to the message would look like this:

Error Response
<message>
<name type="r" status="fail">tagDataWrite</name>
<reason> error code </reason>
</message>

For error response messages refer to Appendix.

Some examples are given below:

SIMATIC RF660R XML Interface


114 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.2 Smart Reader Tag Data Writing

ISO-B Tag Examples:

Example 1: ISO-B protocol with ISO/IEC 64 tag Id type writing 0x1A to memory address
0x18, the write is verified.
<message>
<name type="c">tagDataWrite</name>
<paramGroup name="tagWriteSpec">
<protocolId>1</protocolId>
<tagIdType>1</tagIdType>
<tagId>ef04020000de77fc</tagId>
<tagAddress>18</tagAddress>
<tagDataLength>1</tagDataLength>
<tagData>1A</tagData>
<verifyOn>ON</verifyOn>
</paramGroup>
</message>

Example 2: ISO-B protocol with UCODE EPC 1.19 64 tag Id type writing 0x0123456789 to
memory address 0x24, the write is not verified.
<message>
<name type="c">tagDataWrite</name>
<paramGroup name="tagWriteSpec">
<protocolId>1</protocolId>
<tagIdType>4</tagIdType>
<tagId>0200000000de77fc</tagId>
<tagAddress>24</tagAddress>
<tagDataLength>5</tagDataLength>
<tagData>0123456789</tagData>
<verifyOn>OFF</verifyOn>
</paramGroup>
</message>

Example 3: ISO-B protocol with UCODE EPC 1.19 96 tag Id type writing 0xABCDEF to
memory address 0x12, the write is verified.
<message>
<name type="c">tagDataWrite</name>
<paramGroup name="tagWriteSpec">
<protocolId>1</protocolId>
<tagIdType>5</tagIdType>
<tagId>0200000003ffff0000de77fc</tagId>
<tagAddress>12</tagAddress>
<tagDataLength>3</tagDataLength>
<tagData>ABCDEF </tagData>
<verifyOn>ON</verifyOn>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 115
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

Example EPC Gen 2 (without Access Password):


<message>
<name type="c"> tagDataWrite </name>
<paramGroup name ="tagWriteSpec">
<protocolId> 3 </protocolId>
<tagIdType> 3 </tagIdType>
<tagId> 3000214160C00400000A3CAC </tagId>
<verifyOn> ON </verifyOn>
<tagAddress> 2 </tagAddress>
<tagDataLength> 1 </tagDataLength>
<tagData> AABB </tagData>
<mask> 1CF3 </mask>
<memBank> 1 </memBank>
<EPC2Mode> WRITE </EPC2Mode>
</paramGroup>
</message>
The command TagDataWrite does NOT check the tagId value for EPC 1.19 Gen 2 tags.
TagDataWrite ignores the status of any selection and may write any tag in any state. This
means, the tag cannot be filtered first. This is a feature of the air protocol, not of the reader.
The mask has been chosen as "0001110011110011b" which is 1CF3h.

11.3 Smart Reader Tag Locking


The host may use this message to lock certain addresses. In ISO addresses can only be
locked if the lockable flag is set. For EPC Gen 1 a single tag must be in the field otherwise
an error is given.

Note
Smart Reader Tag Locking is not supported for ETSI 64-bit Gen 1 tags.

Instruction
For ISO 18000-6B Protocol:
<message>
<name type="c">tagLock</name>
<paramGroup name ="tagLockSpec">
<protocolId> protocolId </protocolId>
<tagIdType> tagIdType </tagIdType>
<tagId> tagId </tagId>
<tagAddress> tagAddress </tagAddress>
<tagDataLength> tagDataLength </tagDataLength>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


116 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

For EPC Gen 2 Protocol:


<message>
<name type="c">tagLock</name>
<paramGroup name ="tagLockSpec">
<protocolId> protocolId </protocolId>
<tagIdType> tagIdType </tagIdType>
<tagId> tagId </tagId>
<lockAction> lockAction </lockAction>
<lockMask> lockMask </lockMask>
<password> password </password>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


protocolId Integer 1 ISO
2 EPC GEN 1
3 EPC GEN 2
tagIdType Integer The 'tagIdType' is given when reporting the reading of a tag Id in tag event reports.
1 ISO/IEC 64 - this is a 64 bit Id. It is only supported for
tags using the ISO 18000-6 B protocol. For reference
the Id format and location in tag memory is defined in
Appendix B of ISO/IEC 18000-6 Information
technology - Radio frequency identification for item
management - Part 6: Parameters for air interface
communications at 860MHz to 960MHz.
2 EPC 64 - this is a 64 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. For reference the format of the
Id is defined in the EPC Tag Data Standards 1.1. The
location in tag memory for EPC generation 1 tags is
defined in Auto-ID Center Technical Report 860MHz-
930MHz Class 1 Radio Frequency Identification Tag
Radio Frequency & Logical Communication Interface
Specification, for EPC generation 2 tags it is defined in
and EPC Radio-Frequency Identity Protocols Class-1
Generation-2 UHF RFID Protocol for Communications
at 860MHz-960MHz.
3 EPC 96 - this is a 96 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. The references are the same
as for EPC 64.
4 UCODE EPC 1.19 64 - this is a 64 bit EPC Id using
the UCODE 1.19 formatting on ISO tags. It is only
supported for tags using the ISO 18000-6 B
protocol. For reference the format of the Id is defined
in the EPC Tag Data Standards 1.1, the location in tag
memory and UCODE 1.19 formatting is defined in
Philips Semiconductors Implementation of EPC Tag
Data on UCODE EPC 1.19 Application Note.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 117
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

Parameter Type Value or Value Range Dependencies / Notes


5 UCODE EPC 1.19 96 - this is a 96 bit EPC Id using
the UCODE 1.19 formatting on ISO tags. It is only
supported for tags using the ISO 18000-6 B
protocol. The references are the same as for UCODE
EPC 1.19 64.
6 EPC Gen 2 any other Tag. This is a Class 1
Generation 2 tag with an ID length to be inferred from
the number of digits in the tagID field.
tagId HEX e.g. The tag id may be either 64 or 96 bits in length i.e. 8 or
ASCII EF040200016E611B 12 hex characters respectively.
String or
310000459F88CDA2115739FE
tagAddress Hex Depends on tag protocolId = 1 (ISO)
ASCII Starting address hexadecimal in bytes
tagDataLength Integer Depends on tag protocolId = 1 (ISO)
lockAction Hex See tables below protocolId = 3 (EPC GEN 2)
ASCII
lockMask Hex See tables below protocolId = 3 (EPC GEN 2)
ASCII
password HEX The Access Password may be required for EPC2 tags. If not supplied the RF660R will
ASCII assume a zero password and that the tag will enter the Secured state. The command will
String fail if the EPC2 has a non-zero access password. The command may also fail depending
upon the lock status of the EPC2 tag.
00000000 – FFFFFFFF protocolId = 3 (EPC GEN 2)
For EPC2 the password is a hex ASCII string
representing a four byte value and is the Access
password of the EPC2 tag.

Note
For firmware Release V 1.2 the tagId field may be omitted. This will cause the reader to
perform the tagLock operation on the first tag which responds, regardless of its ID.

EPC Gen 2 does not allow the reading of the tag lock bits directly. The lock bit status can
only be inferred from failed or successful actions. A tag would enter the secured state
automatically if it has an access password of all zeros, i.e. 0x00000000. Otherwise a tag will
enter the open state. To move a tag from the open to secured state add the optional access
password field to the EPC_GEN_2 'tagProgramId', 'tagDataRead', 'tagDataWrite' and
'tagLock' commands. If the wrong access password is supplied, these commands will fail
even though they may already be in secured state.
'lockMask' is the hex value (Bit) from the table below, with Bit 0 the most significant and
transmitted first:

SIMATIC RF660R XML Interface


118 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

Table 11- 2 EPC Gen 2 Lock Mask Bit Fields

Bank Kill Access EPC TID User


Bit 0 1 2 3 4 5 6 7 8 9
Action Skip/ Skip/ Skip/ Skip/ Skip/ Skip/ Skip/ Skip/ Skip/ Skip/
write write write write write write write write write write
'lockAction' is the hex value (Bit) from the table below, with bit 10 the most significant and
transmitted first after the last Mask bit.:

Table 11- 3 EPC Gen 2 Lock Action Bit Fields

Bank Kill Access EPC TID User


Bit 10 11 12 13 14 15 16 17 18 19
Action Pwd read Perma Pwd read Perma Pwd Perma Pwd Perma Pwd Perma
/ write lock / write lock write lock write lock write lock
The meanings and actions depend upon whether the tag is on the open or secured states.

Table 11- 4 Lock Actions for EPC Gen 2, EPC, TID and User Memory Banks

Pwd-write Permalock Description


0 0 Writeable from either open or secured states
0 1 Permanently writeable from either open or secured states and may never be locked
otherwise
1 0 Writeable from the secured state but not from open state
1 1 Not writeable from any state.

Table 11- 5 Lock Actions for EPC Gen 2, Kill and Access Passwords

Pwd- Permalock Description


read.write
0 0 Password is readable and writeable from either open or secured states
0 1 Password is permanently readable and writeable from open or secured states and may
never be locked otherwise
1 0 Password is readable and writeable from the secured state but not the open state
1 1 Password is not readable or writeable from any state
A successful response to the message would look like this:

Successful Response
<message>
<name type="r" status="ack">tagLock</name>
</message>
If the program failed, the response to the message would look like this:

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 119
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

Error Response
<message>
<name type="r" status="fail">tagLock</name>
<reason> error code </reason>
</message>
An example of an EPC Gen 2 Tag Lock message is given:

Example

Table 11- 6 Example EPC Gen 2 Lock bits and their representation as a hexadecimal value

Bank Not Used Kill Access EPC TID User


Mask Bit 0 1 2 3 4 5 6 7 8 9
lockAction(bin.) 0 0 1 0 1 0 1 0 0 0 0 0
lockAction(hex) 2 A 0
Action Bit 10 11 12 13 14 15 16 17 18 19
lockMask (bin.) 0 0 1 1 1 1 1 1 0 0 0 0
lockMask(hex.) 3 F 0
<message>
<name type="c">tagLock</name>
<paramGroup name="tagLockSpec">
<protocolId>3</protocolId>
<tagIdType>3</tagIdType>
<tagId>3000214160C00400000A2C65</tagId>
<lockAction>2A0</lockAction>
<lockMask>3F0</lockMask>
<password>1ABCDEF9</password>
</paramGroup>
</message>
The command TagLock does NOT check the tagId value for EPC 1.19 Gen 2 tags.
TagLock ignores the status of any selection and may lock any tag in any state. This means,
the tag cannot be filtered first. This is a feature of the air protocol, not of the reader.
In the above case, the lockMask is 3F0, which means only write action bits into the Kill,
Access and EPC memory spaces. The lockAction fields are 2A0, which results in the
following:
Kill Password: is readable and writeable from the secured state but not the open state. You
must know the Access Password of the tag to read the kill password or change it.
Access Password: is readable and writeable from the secured state but not the open state.
You must know the Access Password of the tag to read the access password or change it.
EPC Memory Bank: Writeable from the secured state but not from open state. You must
know the Access Password in order to write a new ID onto the tag.
It the programme failed, the response to the message would look like this:

SIMATIC RF660R XML Interface


120 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.3 Smart Reader Tag Locking

Error Response
<message>
<name type="r" status="fail">tagLock</name>
<reason> error code <reason>
</message>
For error response messages refer to Appendix.

Note
For EPC Gen 2 tags the TagLock command principally works but may not be successful if
sent only once. In order to make sure that the tagLock is received and implemented by the
EPC Gen 2 tag correctly, re-send this command several times.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 121
Smart Reader Data Exchange Messages
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS

11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS


A number of features are found only with EPC Class 1 Gen 1 commands and these are
described here.

Note
Some specific commands (Talk, Quiet, Erase, Lock) do not work satisfactory with all EPC
Gen 1 tags on ETSI frequency band (thus leading to limited reading/writing range). This is a
tag-power issue, not reader-related.
Only RAFSEC tag (3000432) provides full range on ETSI band.
For FCC band no range limitations of Gen 1 tags were found.

The parameters prefixed with a '*' indicate empty elements.

11.4.1 EPC1 Command

Message Direction Parameters/Group Purpose


EPC1Command host->reader EPC1mdSpec Send EPC GEN 1 specific command
EPC1Command reader ->host *EPC1CmdSpec Response
(response)

The EPC Glass1 Generation 1 specific commands are


● Quiet
● Talk,
● Verify
● Erase

SIMATIC RF660R XML Interface


122 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS

Instruction
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd>TALK| QUIET | ERASE | VERIFY</epc1Cmd>
<value> value </value>
<length> length </length>
<pointer> pointer </pointer>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


epc1Cmd String Literal TALK TALK wakes EPC1 tags up from their sleep state.
The persistence of tags in the sleep state is
variable. A better method of filtering for wanted
tags only is to use the EPC1 tag select command.
QUIET QUIET sends EPC1 tags to a sleep state.
However the persistence of tags in the sleep state
is variable.
To make sure that the tag remains QUIET, by
repetitively sending the QUIET command this
behaviour may be overcome.
ERASE Specified data range in tag is erased
VERIFY Query of specified tag data
value Hex ASCII String 1 - 255 May represent a value of up to 255 bits.
length Integer 1- 255 identify the number of bits in value
pointer Integer 1 - 255 decimal value indicating the bit index 0 – 255

These commands (except ERASE and VERIFY) can be applied to all tags in the view or to a
subset. When applying these commands to all tags, only the ‘epc1Cmd’ element is needed.
When applying these to a subset, the value, length and pointer elements should also be
specified.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 123
Smart Reader Data Exchange Messages
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS

11.4.2 QUIET
To set all tags to QUIET:
Example 1: All Tags QUIET
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> QUIET </epc1Cmd>
</paramGroup>
</message>

To set a tag with an EPC header starting with A5 to QUIET:


Example 2: Certain Tags QUIET
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> QUIET </epc1Cmd>
<value> A5 </value>
<length> 8 </length>
<pointer> 16 </pointer>
</paramGroup>
</message>

11.4.3 TALK
To wake up all tags use the TALK command:
Example 1: All Tags TALK
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> TALK </epc1Cmd>
</paramGroup>
</message>

To set a tag with an EPC header starting with A5 to TALK:


Example 2: Certain Tags TALK
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> TALK </epc1Cmd>
<value> A5 </value>
<length> 8 </length>
<pointer> 16 </pointer>
</paramGroup>
</message>

SIMATIC RF660R XML Interface


124 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS

11.4.4 VERIFY
The VERIFY command can be applied to a single tag only. The Tag ID is not checked,
therefore the reader cannot address an individual specific tag in a EPC Gen 1 tag population
(field).
When a Verify command is sent, any one EPC Gen 1 tag may answer.
In addition to the epc1Cmd element the only other element needed is the value. The value
must contain the entire ID of the tag. Also note that a tag will only respond to VERIFY if it is
unlocked.
Example: VERIFY
<message>
<name type="c"> EPC1Command </name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> VERIFY </epc1Cmd>
<value> A50102030405060708090a0b </value>
</paramGroup>
</message>

Note
The VERIFY-command does NOT support 64-bit-EPC Gen1-tags.

11.4.5 ERASE
Erase is not addressable, it erases all tags in view:

Instruction
<message>
<name type="c">EPC1Command</name>
<paramGroup name="EPC1CmdSpec">
<epc1Cmd> ERASE </epc1Cmd>
</paramGroup>
</message>
A successful response to the message would look like this:

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 125
Smart Reader Data Exchange Messages
11.4 EPC GLOBAL CLASS 1 GEN 1 SPECIFIC COMMANDS

Successful Response
<message>
<name type="r" status="ack">EPC1Command</name>
<password> password </password>
</message>

Parameter Type Value or Value Range Dependencies / Notes


password Hex ASCII String will only be present when
epc1Cmd = VERIFY
kill password of EPC GEN1 tag

Note
The password element will only be present in the response if the EPC1Command was
VERIFY.

If the command failed, the response to the message would look like this:

Error Response
<message>
<name type="r" status="fail"> EPC1Command </name>
<reason> error code </reason>
</message>

SIMATIC RF660R XML Interface


126 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Smart Reader Data Exchange Messages
11.5 EPC GLOBAL CLASS 1 GEN 2 SPECIFIC COMMANDS

11.5 EPC GLOBAL CLASS 1 GEN 2 SPECIFIC COMMANDS


A number of features are found only with EPC Class 1 Gen 2 tags and these are described
here.

Table 11- 7 The parameters prefixed with a"*" indicate empty elements.

Message Direction Prameters/ Purpose


Groups
tagBlockErase host->reader tagBlockErase Spec Send the EPC Gen 1 block erase command
tagBlockErase reader->host *tagBlockEraseSpec Response
(response)
The 'tagblockErase' command is sent using the following message.

Instruction
<message>
<name type="c">tagBlockErase</name>
<paramGroup name="tagBlockEraseSpec">
<tagIdType> tagIdType </tagIdType>
<tagId> tagId </tagId>
<tagAddress> tagAddress </tagAddress>
<tagDataLength> tagDataLength </tagDataLength>
<memBank> memBank </memBank>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


tagIdType Integer The 'tagIdType' is given when reporting the reading of a tag Id in tag event reports.
For firmware Release V 1.2 onwards the tagIdType will be ignored, as the length of the tag
id will be inferred from the tagid field.
2 EPC 64 - this is a 64 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. For reference the format of the
Id is defined in the EPC Tag Data Standards 1.1. The
location in tag memory for EPC generation 1 tags is
defined in Auto-ID Center Technical Report 860MHz-
930MHz Class 1 Radio Frequency Identification Tag
Radio Frequency & Logical Communication Interface
Specification, for EPC generation 2 tags it is defined in
and EPC Radio-Frequency Identity Protocols Class-1
Generation-2 UHF RFID Protocol for Communications
at 860MHz-960MHz.
3 EPC 96 - this is a 96 bit EPC Id. It is only supported
for tags using the EPC generation 1 and EPC
generation 2 protocols. The references are the same
as for EPC 64.
tagId HEX e.g. The tag id may be either 64 or 96 bits in length i.e. 8 or
ASCII EF040200016E611B 12 hex characters respectively. Length depends on the
String or tagIdType.
310000459F88CDA2115739FE For firmware Release V 1.2 onwards the tagId lenght
will be inferred from the tagid field.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 127
Smart Reader Data Exchange Messages
11.5 EPC GLOBAL CLASS 1 GEN 2 SPECIFIC COMMANDS

Parameter Type Value or Value Range Dependencies / Notes


tagAddress Hex Depends on tag Starting address hexadecimal in bytes
ASCII
tagDataLength Integer Depends on tag length in words
memBank Integer 0 password block
1 EPC
2 TID
3 USER
An example is given below.

Example
<message>
<name type="c">tagBlockErase</name>
<paramGroup name=" tagBlockEraseSpec ">
<tagId> 3000214160C00400000A3596 </tagId>
<tagIdType> 3 </tagIdType>
<tagAddress> 0 </tagAddress>
<tagDataLength> 2 </tagDataLength>
<memBank> 3 </memBank>
</paramGroup>
</message>

Normal Response, Error Response


The responses will be sent in the general format.

SIMATIC RF660R XML Interface


128 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
General Reader Information 12
These messages may be used to retrieve general reader information.
Empty elements that are passed in 'get' requests or 'set' responses are prefixed with a '*'.

Table 12- 1 General Enquiries

Message Direction Parameters/Group Purpose


get host->reader readerInfo Retrieve general information about the reader
get host->reader readerInfo Retrieve general information about the reader
set reader->host readerDesc Set reader Description
set (response) reader->host *readerDesc Response to the set request

12.1 Reading General Reader Information

12.1.1 Retrieve General Information about the Reader

Request
<message>
<name type="c">get</name>
<paramGroup name="readerInfo" />
</message

Normal Response
The reader will send a normal response containing the desired information (the information
in bold is fixed for this range of products):
<message >
<name type="r" status="ack">get</name>
<paramGroup name="readerInfo">
<readerName> SIMATIC RF660R Portal Reader </readerName>
<mfrDesc> 6GT2811-0AA01</mfrDesc>
<readerDesc> readerDesc</readerDesc>
</paramGroup">
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 129
General Reader Information
12.1 Reading General Reader Information

Parameter Type Value or Value Range Dependencies / Notes


readerName String Fixed to -
SIMATIC RF660R Portal Reader
mfrDesc String Fixed to 6GT2811-0AA01 -
readerDesc String Not Set The readerDesc element contains information set by the
User set String user to indicate the purpose, location or the role of the
reader. If this has not been set by the user then the reader
may send an arbitrary text like "Not Set".

12.1.2 Set Reader Description


To set the 'readerDesc' information, use the following message:

Setting
<message>
<name type="c">set</name>
<readerDesc> readerDesc </readerDesc>
</message>

Parameter Type Value or Value Range Dependencies / Notes


readerDesc String max length of 74 characters

Normal Response
The reader will respond with a normal response message.

Error Response
Error responses are not defined for the messages in this section.

SIMATIC RF660R XML Interface


130 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Development Testing 13
13.1 Alerts from the Reader
The Reader may send an alert to indicate a problem or potential risk.
The alerts use a format similar to other notifications and don't require any acknowledgement
from the host.

Alert from the Reader


<message>
<name type="n">alert</name>
<a> a </a>
</message>

Parameter Type Value or Value Dependencies / Notes


Range
a integer 1000 - 10004 Alert code. This field is compulsory and uniquely identifies the alert.
Other parameters are optional and may follow this as a comma
separated list of values.

The alert codes are a subset of the error codes list and may indicate an error, warning or just
simple user information. In the case of serious software failures, the extra parameters may
include the source file name and the line number.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 131
Development Testing
13.1 Alerts from the Reader

SIMATIC RF660R XML Interface


132 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Firmware Update 14
14.1 Firmware Update

Requirement
When the reader has already been operated using firmware in one version and this should
be replaced with another version (e.g. V1.2 and V1.3), the following components must also
be available:
● SIMATIC RF660R reader firmware version V1.2
● SIMATIC RF660R bootloader for version V1.2
● SIMATIC RF660R reader firmware version V1.3

Note
Please note that the safest way for performing a firmware update is via the Configuration
Software.

NOTICE
Reader inoperable
The reader may become inoperable and can only be repaired by the Siemens Service
Center for MOBY products if the following requirement is NOT met:
 The operating steps of the update or downgrade process listed in the following
sections must be performed exactly as described in accordance with the specified
sequence.

Note
Performing updates to version V1.3 and downgrades from version V1.3
Updates to version V1.3 are only allowed from V1.2 and downgrades from version V1.3
are only allowed to version V1.2. If older Firmware versions are used the
update/downgrade procedure to and from V1.2 has to be implemented. See also
Configuration Manual "RF660R Configuration Software", Edition 07/2008.

Note
Performing updates and downgrades
As the user, you are responsible for performing updates and downgrades of the firmware
and software correctly. Siemens will not accept any liability whatsoever for correct
performance of the processes.
Contact your technical support team or where you purchased your device to find out
which RF660R reader versions are suitable for downgrades.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 133
Firmware Update
14.1 Firmware Update

CAUTION
Risk of damage!
Under no circumstances must you disconnect the RF660R unit from the power supply
during the firmware update procedure.

CAUTION
Risk of damage
During the firmware update procedure, no further communication, such as triggers, must
take place with the reader that should not be set at this time via the digital inputs of the
reader.

NOTICE
Inoperability
When updating the reader with firmware version V1.3 ensure that the identical firmware
version is always used for both banks, Bank A and Bank B, e.g. V1.3
(01.03.00.00_04.14).

Firmware update for Bank A and Bank B


Since firmware version V1.2, you must update both banks, Bank A and Bank B, on the
reader. The most convenient way to update from firmware version V1.3 is to update Bank B
and then Bank A.

Parameters
The parameters prefixed with a ‘*’ indicate empty elements.

Table 14- 1 Firmware Update

Message Direction Parameters/ Group Purpose


updateFirmwareReq host->reader none Host request to initiate a FW update process
updateFirmwareReq reader->host none Response from the reader
(response)
updateFirmware host->reader none The actual transfer of data. See the details
below.
updateFirmware (response) reader->host none/error Response to the above.
flashFirmware host->reader flashBank Saving the image to FLASH
flashFirmware (response) reader->host *flashBank/error Response after saving the image to FLASH
setFirmware host->reader flashBank Set the reader to boot from flashBank
setFirmware (response) reader->host *flashBank/error Response after changing the boot vector
get host->reader *firmwareInfo Retrieve firmware info
get (response) reader->host firmwareInfo Response to the above

SIMATIC RF660R XML Interface


134 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Firmware Update
14.1 Firmware Update

Note
Note for host applications:
The various images (firmware, bootloader, boardtest etc) are supplied in a certain format
(XML). This format includes the image type and version, along with the checksum and length
attributes. This information makes it possible for a host application to check the integrity of
the image. This also enables the host application to verify that the correct image type is
transferred to the correct flashbank on the reader.

A sample of a firmware image is given below. It shows that the data element which is in the
same format as used in the message 'updateFirmware'.
<data len="977132" csum="850ce814" type="firmware" version="V1.1 (01.01.00.00_01.08)">
80 0F 37 80 00 02 00 00 00 E0 02 00 2A C0 07 00 EA 1B 40 00 62 03 00 00
C2 08 00 00 A2 03 00 02 00 00 00 00 00 00 00 00 00 00 00 00 12 00 00 00
00 60 00 00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...
...
</data>

14.1.1 Initiating the Firmware Update Process

Instruction
The firmware update procedure is a multi-step process. The first step includes a firmware
update request message from the host:
<message>
<name type=”c”>updateFirmwareReq</name>
</message>

Normal Response
The reader will reply with an acknowledgment:
<message>
<name type=”r” status=”ack”> updateFirmwareReq </name>
</message>

Error Response
A failure response is not expected as the embedded software will ensure that the reader
enters an appropriate mode for this operation.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 135
Firmware Update
14.1 Firmware Update

14.1.2 Upload Firmware Message


Having received the acknowledgement to the request, the host will initiate the actual
firmware transfer by sending the following message:

Instruction
<message>
<name type="c"> uploadFirmware</name>
<data len="len" csum="csum" type="type" version="version">
…data data data data...
</data>
</message>

Parameter Type Value or Value Range Dependencies / Notes


data Hex ASCII 00 - FF The firmware image with each byte encoded as two
hex ASCII characters representing "len" bytes of the
binary image.
data attribute – len Integer e.g. 957792 Size of the image (in bytes)
data attribute – csum Hex ASCII e.g. fb249b31 CRC32 checksum of the image
data attribute – type String Literals firmware Can only be used for flashBank A or B
bootloader Can only be used for flashBank L
boardtest Can only be used for flashBank T
data attribute – String e.g. Firmware version number
version V1.1(01.01.00.00_01.08)
V1.2(01.02.00.00_01.17)
V1.3(01.03.00.00_04.14)

Normal Response
When the Reader receives the message "updateFirmware", it will read the firmware image
directly into RAM without saving it on to the FLASH. It will then send the following response
back.
<message >
<name type="r" status="ack">updateFirmware</name>
</message>

Error Response
In the event of a failure, the Reader will send an error response:
<message>
<name type="r" status="fail">updateFirmware</name>
<reason>error code </reason>
</message>

SIMATIC RF660R XML Interface


136 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Firmware Update
14.1 Firmware Update

14.1.3 Saving the Image to FLASH


The next step in the firmware update process is to actually save the new firmware image on
to the desired FLASH bank.

Instruction
<message>
<name type="c"> flashFirmware </name>
<flashBank> A | B | L | T </flashBank>
</message>

Parameter Type Value or Value Range Dependencies / Notes


flashBank Character A Main image (only for redundancy / fail-safe)
Users have to flash to this bank as a second step, as it will
serve as a backup of the factory installed software.
B Main image
The RF660R reader boots from this memory bank.
L Boot loader
T Boardtest software for factory use

Normal Response
The reader will send a normal response in the general format.

14.1.4 Set the Reader to Boot from flashBank


The next step in the firmware upload process is to instruct the reader to boot from the new
flash area. The following message is not applicable to the boot loader (which uses the letter
L).

Instruction
<message >
<name type=”c”> setFirmware </name>
<flashBank> A | B |T</flashBank>
</message>

Parameter Type Value or Value Range Dependencies / Notes


flashBank Character A Flash bank for redundancy / fail-safe
B Recommended flash bank to run reader firmware on
T Boardtest software for factory use only

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 137
Firmware Update
14.1 Firmware Update

Normal Response
The reader will send a normal response in the general format.
The final step would be to reset the Reader. See section Control Message for more details
on that procedure.
At the very end of each firmware update procedure a Powercycle must be done.

14.1.5 Get Firmware Version Number


To retrieve the firmware version number, the host may use a simple get command:

Request
<message>
<name type="c">get</name>
<paramGroup name="firmwareInfo"/>
</message>

Normal Response
The reader will send the following response:
<message >
<name type="r" status="ack">get</name>
<paramGroup name="firmwareInfo">
<flashBank number="A"> flashBank </ flashBank>
<flashBank number="B"> flashBank </ flashBank>
</paramGroup>
</message>

Parameter Type Value or Value Range Dependencies / Notes


flashBank String e.g. Version of firmware
V1.3(xxxxxxxxxxxxxxxx)
UNKOWN If a firmware image has been stored onto FLASH but
never activated, the get message would return its version
number as UNKOWN. This is because the Reader can
not determine the version number of the firmware until it
has been activated by using the command 'setFirmware'.
flashBank attribute – Character A FlashBank A (redundancy / fail-safe)
section B FlashBank B

Error Response
A failure response is not defined for the ‘get’ operation.

SIMATIC RF660R XML Interface


138 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Firmware Update
14.2 Configuration Information over Firmware Updates

14.2 Configuration Information over Firmware Updates


If the new firmware image contains a new format of the configuration information, the Reader
may not be able to use the old configuration values. In this case it will overwrite the old
configuration values with the default values from the new image. The host application should
check the configVersion element value in the Reader response to the hostGreetings
message after the Reader has been rebooted following a firmware update. If configVersion is
set to DEFAULT then the host application has to re-configure the Reader. If the
configVersion is set to USER then it implies that the config format in the new image has not
been changed and the old configuration is still usable.

14.3 Updating the Reader Boot Loader

14.3.1 Update the Reader Request Message


In the case the boot loader code on the Reader itself needs updating, the following sequence
of messages should be used:

Instruction
<message>
<name type="c">updateFirmwareReq</name>
</message>

Normal Response
The reader will reply with an acknowledgment:
<message>
<name type="r" status="ack"> updateFirmwareReq </name>
</message>

Error Response
A failure response is not expected as the embedded software will ensure that the reader
enters an appropriate mode for this operation.
<message>
<name type="c"> updateFirmware</name>
<data len="len" csum="csum" type="bootloader" version="version">
…data data data data...
</data>
</message>
In the event of a failure, the Reader will send an error response:
<message >
<name type="r" status="fail">updateFirmware</name>
<reason>error code</reason>
</message>

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 139
Firmware Update
14.3 Updating the Reader Boot Loader

Parameter Type Value or Value Range Dependencies / Notes


data Hex ASCII 00 - FF The bootloader image with each byte encoded as
two hex ASCII characters representing 'len' bytes
of the binary image.
data attribute – len Integer e.g. 56389 Size of the image (in bytes)
data attribute – csum Hex ASCII e.g. fb249b31 CRC32 checksum of the image
data attribute – type String Literal bootloader Can only be used for FLASH bank L
data attribute – version String e.g. Firmware version number
V1.2 (01.02.00.00_01.17)

14.3.2 Flash Firmware Message


The next step in the boot loader update process is to actually save the new firmware image
on FLASH bank L.

Instruction
<message >
<name type=”c”> flashFirmware</name>
<flashBank> A | B | L</flashBank>
</message>
<message >
<name type=”c”> flashFirmware</name>
<flashBank> L</flashBank>
</message>

Normal Response
The Reader will send a normal response in the general format.
Unlike the main firmware image update, the boot loader update doesn’t require setting the
flash bank (as there is only one flash bank for the boot loader).
To make the new boot loader effective, the Reader should be reset. See section ‘Control
Message’ for more details on that procedure. At the very end of each firmware update
procedure a Powercycle must be done.

SIMATIC RF660R XML Interface


140 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix A
A.1 FCC Sub Bands
The following table defines the permitted sub-bands for the FCC profile. The channel
spacing is 500KHz.

Channel Id Frequency Channel Id Frequency Channel Id Frequency Channel Id Frequency


(MHz) (MHz) (MHz) (MHz)
0 902.75 13 909.25 26 915.75 39 922.25
1 903.25 14 909.75 27 916.25 40 922.75
2 903.75 15 910.25 28 916.75 41 923.25
3 904.25 16 910.75 29 917.25 42 923.75
4 904.75 17 911.25 30 917.75 43 924.25
5 905.25 18 911.75 31 918.25 44 924.75
6 905.75 19 912.25 32 918.75 45 925.25
7 906.25 20 912.75 33 919.25 46 925.75
8 906.75 21 913.25 34 919.75 47 926.25
9 907.25 22 913.75 35 920.25 48 926.75
10 907.75 23 914.25 36 920.75 49 927.25
11 908.25 24 914.75 37 921.25
12 908.75 25 915.25 38 921.75

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 141
Appendix
A.2 ETSI Sub Bands

A.2 ETSI Sub Bands

ETSI EN 302208 V1.2.1


The following table defines the permitted sub-bands for the ETSI profile according to
EN 302208 V1.2.1: All four channels include the permitted sub-bands for transmitting in the
EPC Class 1 Generation 2 multi-channel dense interrogator environment (the EPC Class 1
Generation 2 single-channel regulatory environment can use all sub-bands).

Channel Id Frequency (MHz) Maximum Transmit Power (W)


103 865.7 2
106 866.3 2
109 866.9 2
112 867.5 2

Note
Validity of ETSI Sub Band according to EN 302208 V1.2.1
The Sub Bands according to the ETSI-standard EN 302208 V1.2.1 are mandatory for all
RF600-Readers which have been put into operation from 01.01.2010. Hence, from Firmware
Version V 1.3 (Release 4) onwards, only channels listed above can be selected.

SIMATIC RF660R XML Interface


142 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.3 ETSI Sub Bands for Dedicated Zones in France

A.3 ETSI Sub Bands for Dedicated Zones in France

ETSI EN 302208 V1.2.1


The following table defines the permitted sub-bands for the ETSI profile which may be
utilized for specific Zones in France according to EN 302208 V1.2.1: All four channels
include the permitted sub-bands for transmitting in the EPC Class 1 Generation 2 multi-
channel dense interrogator environment (the EPC Class 1 Generation 2 single-channel
regulatory environment can use all sub-bands).

Channel Id Frequency (MHz) Maximum Transmit Power (W)


103 865.7 0.5
106 866.3 0.5
109 866.9 0.5
112 867.5 0.5

Note
Validity of ETSI Sub Band according to EN302208 V1.2.1
The Sub Bands according to the ETSI-standard EN302208 V1.2.1 are mandatory for all
RF600-Readers which have been put into operation from 01.01.2010. Hence, from Firmware
Version V 1.3 (Release 4) onwards, only channels listed above can be selected.

Geographical regions
Due to a European Commission decision as of 16th May 2007 granting France a derogation
to further limit the emission powers for the use of the 865.6-867.6 MHz frequency band for
radio frequency identification devices (RFID) operating within certain zones on the territory of
France, the operation of the RF600 system is limited to operate within the power levels
indicated above, when it is inside the following areas:

Geographical coordinates Department Radius of zone with max.


power/field strength of
500 mW e.r.p.
AVON LES ROCHES 47° 12' 04" N-000° 28' 48" E 37 - Indre-et-Loire 20 km
(camp Le Ruchard)
BEIGNON 47° 56' 56" N-002° 09' 26" W 56 - Morbihan 15 km
(camp de COETQUIDAN)
BITCHE 49° 03' 09" N-007° 28' 43" E 57 - Moselle 20 km (only on French
territory)
CAYLUS 44° 16' 42" N-001° 44' 57" E 82 - Tarn-et-Garonne 20 km
LA CAVALERIE 44° 00' 40" N-003° 10' 16" E 12 - Aveyron 10 km
(camp du LARZAC)
LA COURTINE 45° 42' 40" N-002° 15' 18" E 23 - Creuse 20 km
MAILLY LE CAMP 48° 39' 55" N-004° 13' 04" E 10 - Aube 20 km
MONTFERRAT 43° 38' 47" N-006° 28' 05" E 83 - Var 10 km
(camp de CANJUERS)

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 143
Appendix
A.4 CHINA Sub Bands

Geographical coordinates Department Radius of zone with max.


power/field strength of
500 mW e.r.p.
MOURMELON 49° 07' 30" N-004° 21' 59" E 51 - Marne 15 km
SISSONNE 49° 34' 08" N-003° 54' 57" E 02 - Aisne 20 km
SUIPPES 49° 07' 37" N-004° 33' 05" E 51 - Marne 20 km
VALDAHON LYAUTEY 47° 09' 24" N-006° 19' 25" E 25 - Doubs 20 km

A.4 CHINA Sub Bands


The following table defines the permitted sub-bands for the CHINA profile: The italic entries
show an example of permitted sub-bands for transmitting in the EPC Class 1 Generation 2
multi-channel dense interrogator environment (the EPC Class 1 Generation 2 single-channel
regulatory environment can use all sub-bands).

Channel ID Frequency (MHz) Maximum Transmit Power (W)


150 920.125 0.1
151 920.375 0.1
152 920.625 2
153 920.875 2
154 921.125 2
155 921.375 2
156 921.625 2
157 921.875 2
158 922.125 2
159 922.375 2
160 922.625 2
161 922.875 2
162 923.125 2
163 923.375 2
164 923.625 2
165 923.875 2
166 924.125 2
167 924.375 2
168 924.625 0.1
169 924.875 0.1

SIMATIC RF660R XML Interface


144 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.5 Reader To Tag Communications Schemes

A.5 Reader To Tag Communications Schemes

Table A- 1 Reader to Tag Communication Schemes

Index Tag Protocol Tx Rate Tari x DR Rx Rate Link Freq Rx Decode Mod. Mod.
[kbps] [us] [kbps] [kHz] Type Index type
1 ISO Type B 40 N/A N/A N/A 40 40 FM0 100% DSB
2 ISO Type B 10 N/A N/A N/A 40 40 FM0 100% DSB
3 ISO Type B 40 N/A N/A N/A 160 160 FM0 100% DSB
10 EPC Gen 1 70.18 N/A N/A N/A 140.35 140.35 FM-EPC1 90% DSB
11 EPC Gen 1 15 N/A N/A N/A 30 30 FM-EPC1 50% DSB
20 EPC Gen 2 26.7 25 1 8 40 40 FM0 90% DSB
22 EPC Gen 2 53.3 12.5 1 8 160 160 FM0 90% DSB
23 EPC Gen 2 26.7 25 1 64/3 40 160 Miller 4 90% PR-ASK
25 EPC Gen 2 53.3 12.5 1 8 80 80 FM0 90% DSB
26 EPC Gen 2 32 25 0.5 64/3 80 160 FM0 90% DSB
27 EPC Gen 2 26.7 25 1 64/3 80 160 FM0 90% DSB
28 EPC Gen 2 64 12.5 0.5 8 160 160 FM0 90% DSB
29 EPC Gen 2 106.7 6.25 1 8 160 160 FM0 90% DSB
30 EPC Gen 2 128 6.25 0.5 8 160 160 FM0 90% DSB

Table A- 2 Reader to Tag Communication Schemes (Notes)

Index Tag Protocol Notes


1 ISO Type B ETSI/FCC/CHINA
2 ISO Type B ETSI/FCC/CHINA
3 ISO Type B ETSI/FCC/CHINA
10 EPC Gen 1 North American Profile
11 EPC Gen 1 European Profile
20 EPC Gen 2 ETSI/FCC/CHINA
22 EPC Gen 2 FCC only
23 EPC Gen 2 DIE (ETSI/FCC/CHINA)
25 EPC Gen 2 FCC only
26 EPC Gen 2 FCC/ETSI/CHINA
27 EPC Gen 2 FCC/ETSI/CHINA
28 EPC Gen 2 FCC only
29 EPC Gen 2 FCC only
30 EPC Gen 2 FCC only
The following table lists some suitable labels that an application may use to indicate the
purpose of a particular communications scheme.

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 145
Appendix
A.5 Reader To Tag Communications Schemes

Table A- 3 Labels for Reader to Tag Communication Schemes

Index Label
1 Standard 40-40
2 Low Rate 10-40
3 High Rate 40-160*
10 FCC Region EPC Gen 1 Class 1
11 ETSI Region EPC Gen 1 Class 1
20 Standard 25-1.0-40
22 Higher Rate 12.5-1.0-160
23 Dense Interrogator Environment 25-1.0-160 PR-ASK
25 Higher Rate 12.5-1.0-80
26 Higher Rate (25-0.5-160)
27 Higher Rate (25-1-160)
28 Higher Rate (12.5-0.5-160)
29 Higher Rate (6.25-1-160)
30 Higher Rate (6.25-0.5-160)
* For ISO 18000-6B tags when sending WRITE commands avoid using Higher Data Rate
(40-160), this may not work stable. Instead use standard data rate (40-40) for writing.
ISO Labels indicate reader to tag and tag to reader data rates.
EPC Gen 2 labels indicate the Tari, X value, return link frequency and if the reader to tag
signalling is phase reversal ASK.

SIMATIC RF660R XML Interface


146 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.6 Reader Default Configuration

A.6 Reader Default Configuration


A new reader will have the following set of default configuration parameters.

Note
This set is valid from firmware release version V1.3 (01.02.00.00_01.17).

readerProfile: ETSI
antennaConfig: not set, antennas need to be configured before it can be used.
channelConfig ETSI:
fhState: ON
channelList: 103, 106, 109, 112
switchingInterval: 1000 (msec)
channelConfig FCC:
fhState: ON
channelList: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,
25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49
switchingInterval: 300 (msec)
lbtState: OFF
channelConfig CHINA:
fhState: ON
channelList: 152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167
switchingInterval: 1000 (msec)
lbtState: OFF
protocolConfig ISO_18000_6_B:
numReadCycles: 1
rtCommsScheme: 1
readMode: BULK_READ
protocolConfig EPC_GEN_1:
numReadCycles: 0
protocolConfig EPC_GEN_2:
numReadCycles: 0
rtCommsScheme: 20
initialQ: 4
readTriggerConfig:
readTriggerType: CONTINUOUS
digitalInputConfig:
port numbers 0 to 2: DISABLE
readerMode: 0 (INACTIVE)
tagSelectionRange ISO_18000_6_B: Select all (i.e. no filters specified)
tagSelectionRange EPC_GEN2: Select all

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 147
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

ethernetConfig:
ipAddress: 192.168.0.254
portNumber: 10001
gatewayAddress: 192.168.0.1
subnetMask: 255.255.255.0
notifyChannel:
notifyChannelId: NONE

A.7 Discovering MAC / IP of Reader for DHCP


This is a code sample illustrating how to perform an Ethernet device. The Ethernet device is
the device that implements the Ethernet sub-system on the RF660R Reader.
The first sample is the thread to send the query, receive incoming packets and then parse
the IP and MAC addresses.
The second sample is some application code which must be customised e.g. to report errors
in the desired way.

First application code sample:


package de.siemens.automationsAnsDrives.RF660R.configurator.comms;
import java.util.*;
import java.io.*;
import java.text.*;
import java.net.*;
import java.lang.*;
public class XPortQueryThread2 extends Thread implements Runnable {
final static int queryPort = 0x77FE;
final static int bytesToReceive = 30;
boolean stillRunning;
DatagramSocket mySocket;
// status of procedure
public static final int STATUS_IDLE = 0;
public static final int STATUS_RUNNING = 1;
public static final int STATUS_FINISHED_OK = 2;
public static final int STATUS_TERMINATED = 3; // premature end, terminated by higher
level app
public static final int STATUS_FINISHED_ERROR =4;
// the error codes
public static final int ERROR_UNKNOWN = 0;
public static final int ERROR_QUERY_SEND = 1;
public static final int ERROR_GET_HOSTNAME = 2;
public static final int ERROR_DATAGRAM_RX = 3;
private int status = STATUS_IDLE;
private int error = ERROR_UNKNOWN;
private int duration = 5;

SIMATIC RF660R XML Interface


148 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

// data container. for the first version just use a generic map to store the ip address keyed on
the
// MAC addresses.
private HashMap readerAddrMap = new HashMap();
public XPortQueryThread2(DatagramSocket thisSocket) {
//get the socket to send and receive on
mySocket = thisSocket;
stillRunning = true;
status = STATUS_IDLE;
}

/*
* Sends query firmware version command to port number 30718 (0x77FE). XPorts
* respond with firmware information, MAC and IP address.
*/
public void sendQuery(InetAddress thisAddress) {
byte[] queryMsg = new byte[4];
DatagramPacket queryPacket;
InetAddress broadcastIP; // broadcast IP address for this subnet
// get broadcast address
broadcastIP=getBroadcastAddress(thisAddress);

// format the query string


queryMsg[0] = 0x00;
queryMsg[1] = 0x00;
queryMsg[2] = 0x00;
queryMsg[3] = (byte)0xF6; // query firmware version command
// wrap it up in a datagram packet
queryPacket = new DatagramPacket(queryMsg, queryMsg.length, broadcastIP,
queryPort);
// send the packet out
//Console.addText("Sending query to: " + broadcastIP.toString(), false);
try{
mySocket.send(queryPacket);
status = STATUS_RUNNING;
}
catch(IOException expe){
status = STATUS_FINISHED_ERROR;
error = ERROR_QUERY_SEND;
System.out.println(expe);
}
}

private InetAddress getBroadcastAddress(InetAddress thisAddress) {


InetAddress broadcastIP = null;

try{
// should really check the subnet mask and work out the broadcast
// IP from that
broadcastIP = InetAddress.getByName("255.255.255.255");
}
catch(UnknownHostException uhe){

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 149
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

status = STATUS_FINISHED_ERROR;
error = ERROR_GET_HOSTNAME;
System.out.println(uhe);
}
return(broadcastIP);
}
// not really needed anymore as the thread is self terminating
public void kill() {
stillRunning = false;
status = STATUS_TERMINATED;
error = ERROR_UNKNOWN;
}
public void run() {
InetAddress ipAddr;
String message;

readerAddrMap.clear();

int count = 0; // one cycle per second


// do five quick reads
while (count <= duration){
try{
DatagramPacket packet = new DatagramPacket(
new byte[bytesToReceive], bytesToReceive);
// wait for a packet:
try {
count++;
mySocket.setSoTimeout(1000);
mySocket.receive(packet);
} catch (SocketTimeoutException e) {
// socket timed out, continue
if(count <= duration)
continue;
else
break;
}

Integer packetLength = new Integer(packet.getLength());


// get the address of who sent to the packet
ipAddr = packet.getAddress();
// convert the packet payload to a string
message = new String(packet.getData());
StringBuffer text = new StringBuffer();

// parse packet if it's at least as long as expected


if(packetLength.intValue() >= bytesToReceive){
String macAddr = getMAC_address(message);
// store the ip and mac address in our map
// skip bad entries if any
if(macAddr != null)
readerAddrMap.put(macAddr, ipAddr);
}

SIMATIC RF660R XML Interface


150 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

try{
Thread.sleep(100);
}
catch(InterruptedException interrupted){
}
}
catch(IOException e){
// error receiving datagram so stop thread
status = STATUS_FINISHED_ERROR;
error = ERROR_DATAGRAM_RX;
return;
}
}
// we had a complete scan - doesn't matter if we found any readers or not
status = STATUS_FINISHED_OK;
error = ERROR_UNKNOWN;
}

/*
* The Query message is <00> <00> <00> <F6>.
* The answer will be formatted as:
* <00> <00> <00> <F7>
* <16 bytes of firmware info>
* <4 bytes not used>
* <6 bytes MAC address>
*/
public String getMAC_address(String payload) {
int i;
byte[] byteArray = new byte[payload.length()];
int[] intArray = new int[payload.length()];
// convert the String to a byte array
byteArray = payload.getBytes();

// convert the byte array to an integer array,


// so we can have values of greater than 127
for(i = 0; i < byteArray.length; i++){
intArray[i] = (int)byteArray[i];
if(intArray[i] < 0){
intArray[i] += 256;
}
}
StringBuffer buff = new StringBuffer();

// if the fourth byte is <F7>, we got a status reply


if(intArray[3] == 0xF7 && intArray.length == bytesToReceive){
// MAC address is bytes 24 to 30
for(i = 24; i < 30; i++){
{
// we need a little bodge to handle single digit characters as Integer.toHexString won't
// use leading zeros as padding.
if(intArray[i] > 15)
{
buff.append(Integer.toHexString(intArray[i]).toUpperCase());

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 151
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

}
else
{
String hexStr = Integer.toHexString(intArray[i]).toUpperCase();
hexStr = "0" + hexStr;
buff.append(hexStr);
}
}
if(i!=29){
buff.append("-");
}
}
return buff.toString();
}
else{
return null;
}

public int getStatus()


{
return status;
}

public int getError()


{
return error;
}

public HashMap getReaderAddrMap()


{
return readerAddrMap;
}

public void setDuration( int duration )


{
this.duration = duration;
}
}

SIMATIC RF660R XML Interface


152 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

Second application code sample:


public boolean doPortScan()
{
DatagramSocket mainSocket = null; // socket to send and receive on
InetAddress localIP = null; // address of the machine running program
// get this machines IP address, or quit if it doesn't have one
try{
localIP = InetAddress.getLocalHost();
}
catch(UnknownHostException uhe){
System.out.println(uhe);
return false;
}
// if we're only a local loopback address (127.0.0.1), then quit
if(localIP.isLoopbackAddress()){
return false;
}
// start the procedure

// open a UDP socket


try{
mainSocket = new DatagramSocket();
}
catch(SocketException se){
return false;
}
// open an XPortQuery object with the socket
XPortQueryThread2 listener = new XPortQueryThread2(mainSocket);
// set the scan duration
Integer duration = (Integer)spinnerDuration.getValue();
listener.setDuration(duration.intValue());

// start the listener thread running:


listener.start();

// send XPort query


listener.sendQuery(localIP);

// now wait for the query to finish


while(listener.getStatus() == XPortQueryThread2.STATUS_RUNNING)
{
try
{
Thread.sleep(1000);
}
catch ( InterruptedException e )
{

e.printStackTrace();
}
}
// double check the status

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 153
Appendix
A.7 Discovering MAC / IP of Reader for DHCP

if(listener.getStatus() == XPortQueryThread2.STATUS_FINISHED_OK)
{

// and get new ones


HashMap rmap = listener.getReaderAddrMap();
if(rmap == null)
return true; // this is not an error - we probably didn't find any readers at this point

Collection values = rmap.values();


Collection keys = rmap.keySet();

Iterator it = values.iterator();
Iterator macIt = keys.iterator();
if(values.size() > 0)
// remove the Unknown reader from the combo
this.comboReaders.removeItemAt(0);

while(it.hasNext())
{
InetAddress inetAddr = (InetAddress) it.next();
String addr = inetAddr.getHostAddress();
String macAddr = (String) macIt.next();
String displayItem = addr + "/" + macAddr;
// do whatever the application needs to do with this information.

}
}
else
{
// procedure didn't finish successfully, something went wrong
System.out.println("query listener, unsuccessful finish!");
return false;
}
return true;

SIMATIC RF660R XML Interface


154 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

A.8 Error Codes From The Reader

Error Codes from the reader


The various error codes and their descriptions are given below:
<message>
<name type="r" status="fail" >request message name</name>
<reason> error code </reason>
</message>

Error Code Text String (if applicable) Description


1000 Fatal Error: Failed to program the See Text String
Synthesizer
1001 Fatal Error: Antenna Switch Failure See Text String
1002 Fatal Error: Unable to switch on See Text String
the Power Amplifier
1003 Fatal Error: Unable to set Tx gain See Text String
1004 Fatal Error: Unable to set Rx gain See Text String
1005 Fatal Error: FLASH erase failed See Text String
1006 Fatal Error: FLASH write failed See Text String
1050 None Receive task is in the wrong mode to process the received
message
1051 None Receive task received a message while processing listen before
talk command. If the message is invalid in inactive mode a
BAD_MODE result is sent instead
1052 None Receive task received a RX_RESP message while already
processing a tag response. If the RX_RESP is for a tag protocol
not corresponding to the current mode a BAD_MODE result is sent
instead
1053 None Receive task received a message containing one or more invalid
parameters or an invalid combination of parameters
1216 None The Transceiver Controller received a message that is invalid for
its current state
1300 None Physical Layer Control task is in the wrong profile to process the
received message
1301 None Physical Layer Control task is in the wrong mode to process the
received message
1302 None Physical Layer Control task received a message while still
processing a previous message
1303 None Physical Layer Control task received a message containing an
invalid parameter. Only used for messages with a single parameter
1304 None Physical Layer Control task received a transmit antenna selection
that is not fitted
1305 None Physical Layer Control task received a bad channel ID to listen on
1306 None Physical Layer Control task received a listen period exceeding the
maximum allowed
1307 None Physical Layer Control task received a bad transmit data rate
1308 None Physical Layer Control task received a bad receive data rate

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 155
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


1309 None Physical Layer Control task received a bad modulation index
1310 None Physical Layer Control task received a bad EPC2 tari value
1311 None Physical Layer Control task received a a bad EPC2 x value
1312 None Physical Layer Control task received a bad EPC2 link frequency
1313 None Physical Layer Control task received a bad EPC2 divide ratio
1314 None Physical Layer Control task received a bad EPC2 modulation type
1315 None Physical Layer Control task received a bad EPC2 m value
1316 None Physical Layer Control task received a command length exceeding
the maximum allowed
1317 None Physical Layer Control task received a response length exceeding
the maximum allowed
1318 None Physical Layer Control task received a bad EPC1 command type
1319 None Physical Layer Control task received a bad EPC2 transmit
preamble type
1320 None Physical Layer Control task received a bad combination of valid
parameters
1321 None Physical Layer Control task received a nack message from the
transmit task
1322 None Physical Layer Control task received a nack message from the
receive task
1325 None Physical Layer Control task received a change to protocol mode
command with no transmit antenna selected
1350 None Receive task is in the wrong mode to process the received
message
1351 None Receive task received a message while processing listen before
talk command. If the message is invalid in inactive mode a
BAD_MODE result is sent instead
1352 None Receive task received a RX_RESP message while already
processing a tag response. If the RX_RESP is for a tag protocol
not corresponding to the current mode a BAD_MODE result is sent
instead
1353 None Receive task received a message containing one or more invalid
parameters or an invalid combination of parameters
1370 None Transmit task is in the wrong mode to process the received
message
1392 None Got a mode change to auto but no triggering defined
1393 Fatal Error: Reader initialisation Reader initialisation failed – see result of relevant message
failed
2000 Fatal Error: Software failure See Text String
2001 Error: Config rollback error See Text String
2002 Fatal Error: Failed to save default See Text String
config to FLASH
2003 Fatal Error: Initialisation failure See Text String
2004 None OC received a message that was not expected
5000 Error: Invalid messagingVersion in See Text String
hostGreetings

SIMATIC RF660R XML Interface


156 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


5001 Error: updateFirmware received See Text String
without updateFirmwareReq
5002 Error: flashFirmware received but See Text String
no valid image in memory
5003 Error: Firmware CRC check failed See Text String
5004 Error: Firmware image too large See Text String
5005 Error: Function not supported See Text String
5100 Error: Incoming message buffer full See Text String
5101 Error: Firmware running is not See Text String
firmware selected to boot from
5102 Error: Antennas not connected See Text String
6000 Error: XML message too large See Text String
6001 Error: XML message parsing See Text String
failure
6002 Error: XML message buffer See Text String
allocation failure
6010 Error: XML - missing name tag See Text String
6011 Error: XML - invalid command See Text String
6012 Error: XML - missing parameters See Text String
6013 Error: XML - missing parameters See Text String
6014 Error: XML - invalid parameters See Text String
6028 Error: XML - one or more See Text String
parameters missing
6029 Error: XML - one or more attributes See Text String
missing
6030 Error: XML - missing mode (rm) See Text String
parameter
6031 Error: XML - invalid mode (rm) See Text String
parameter
6040 Error: XML - missing readerProfile See Text String
parameter
6041 Error: XML - invalid readerProfile See Text String
parameter
6050 Error: XML - missing clockTime See Text String
parameter
6051 Error: XML - invalid clockTime See Text String
parameter
6060 Error: XML - missing flashBank See Text String
parameter
6061 Error: XML - invalid flashBank See Text String
parameter
6070 Error: XML - missing protocolId See Text String
parameter
6071 Error: XML - invalid protocolId See Text String
parameter
6072 Error: XML - missing tagIdType See Text String
parameter

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 157
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


6073 Error: XML - invalid tagIdType See Text String
parameter
6074 Error: XML - missing tagId See Text String
parameter
6075 Error: XML - invalid tagId See Text String
parameter
6076 Error: XML - missing memBank See Text String
parameter
6077 Error: XML - invalid memBank See Text String
parameter
6078 Error: XML - missing verifyOn See Text String
parameter
6079 Error: XML - invalid verifyOn See Text String
parameter
6080 Error: XML - missing tagData See Text String
parameter
6081 Error: XML - invalid tagData See Text String
parameter
6082 Error: XML - missing tagAddress See Text String
parameter
6083 Error: XML - invalid tagAddress See Text String
parameter
6084 Error: XML - missing See Text String
tagDataLength parameter
6085 Error: XML - invalid tagDataLength See Text String
parameter
6086 Error: XML - missing password See Text String
parameter
6087 Error: XML - invalid password See Text String
parameter
6089 Error: XML - missing or invalid hex See Text String
data
6090 Error: XML - missing channel type See Text String
6091 Error: XML - invalid channel type See Text String
6092 Error: XML - missing channelList See Text String
parameter
6093 Error: XML - invalid channelList See Text String
parameter
6094 Error: XML - missing fhState See Text String
parameter
6095 Error: XML - invalid fhState See Text String
parameter
6096 Error: XML - missing See Text String
switchingInterval parameter
6097 Error: XML - invalid See Text String
switchingInterval parameter
6098 Error: LBT - invalid state lbtState is included in a channelConfig message and the value is
something other than ON or OFF

SIMATIC RF660R XML Interface


158 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


6110 Error: XML - missing See Text String
switchingState parameter
6111 Error: XML - invalid switchingState See Text String
parameter
6112 Error: XML - missing antenna See Text String
number
6113 Error: XML - invalid antenna See Text String
number
6114 Error: XML - missing antenna See Text String
mode
6115 Error: XML - invalid antenna mode See Text String
6130 Error: XML - missing protocol type See Text String
6131 Error: XML - invalid protocol type See Text String
6132 Error: XML - missing See Text String
rtCommsScheme parameter
6133 Error: XML - invalid See Text String
rtCommsScheme parameter
6134 Error: XML - missing session See Text String
parameter
6135 Error: XML - invalid session See Text String
parameter
6136 Error: XML - missing initialQ See Text String
parameter
6137 Error: XML - invalid initialQ See Text String
parameter
6138 Error: XML - invalid readMode See Text String
parameter
6150 Error: XML - missing portNumber See Text String
parameter
6151 Error: XML - invalid portNumber See Text String
parameter
6152 Error: XML - missing ipAddress See Text String
parameter
6153 Error: XML - invalid ipAddress See Text String
parameter
6154 Error: XML - missing See Text String
gatewayAddress parameter
6155 Error: XML - invalid See Text String
gatewayAddress parameter
6156 Error: XML - missing subnetMask See Text String
parameter
6157 Error: XML - invalid subnetMask See Text String
parameter
6169 Error: XML - invalid ethernet/notify See Text String
address combination
6170 Error: XML - missing notify channel See Text String
type

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 159
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


6171 Error: XML - invalid notify channel See Text String
type
6172 Error: XML - invalid See Text String
messagingVersion
6190 Error: XML - missing See Text String
readTriggerType parameter
6191 Error: XML - invalid See Text String
readTriggerType parameter
6192 Error: XML - missing See Text String
digitalInputType parameter
6193 Error: XML - invalid See Text String
digitalInputType parameter
6194 Error: XML - missing See Text String
digitalInputNumber parameter
6195 Error: XML - invalid See Text String
digitalInputNumber parameter
6196 Error: XML - missing See Text String
triggerDuration parameter
6197 Error: XML - invalid triggerDuration See Text String
parameter
6210 Error: XML - missing See Text String
digitalInputState parameter
6211 Error: XML - invalid See Text String
digitalInputState parameter
6230 Error: XML - missing port number See Text String
parameter
6231 Error: XML - invalid port number See Text String
parameter
6232 Error: XML - missing port state See Text String
6233 Error: XML - invalid port state See Text String
6250 Error: XML - missing epc1Cmd See Text String
parameter
6251 Error: XML - invalid epc1Cmd See Text String
parameter
6252 Error: XML - missing value See Text String
parameter
6253 Error: XML - invalid value See Text String
parameter
6254 Error: XML - missing length See Text String
parameter
6255 Error: XML - invalid length See Text String
parameter
6256 Error: XML - missing pointer See Text String
parameter
6257 Error: XML - invalid pointer See Text String
parameter
6258 Error: XML - missing ISO-B See Text String
address parameter

SIMATIC RF660R XML Interface


160 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


6259 Error: XML - invalid ISO-B address See Text String
parameter
6260 Error: XML - missing ISO-B mask See Text String
parameter
6261 Error: XML - invalid ISO-B mask See Text String
parameter
6262 Error: XML - missing ISO-B action See Text String
parameter
6263 Error: XML - invalid ISO-B action See Text String
parameter
6264 Error: XML - missing type See Text String
parameter
6265 Error: XML - invalid type parameter See Text String
6266 Error: XML - missing filter See Text String
parameter
6267 Error: XML - invalid filter parameter See Text String
6268 Error: XML - too many filters See Text String
6269 Error: XML - invalid EPC2 access See Text String
password
6270 Error: XML - missing action See Text String
parameter
6271 Error: XML - invalid action See Text String
parameter
6272 Error: XML - missing mask See Text String
parameter
6273 Error: XML - invalid mask See Text String
parameter
6274 Error: XML - missing target See Text String
parameter
6275 Error: XML - invalid target See Text String
parameter
6276 Error: XML - too many select See Text String
masks
6277 Error: XML - missing type See Text String
parameter
6278 Error: XML - invalid type parameter See Text String
6279 Error: XML - missing filter See Text String
parameter
6280 Error: XML - invalid filter parameter See Text String
6281 Error: XML - missing target See Text String
parameter
6282 Error: XML - invalid target See Text String
parameter
6283 Error: XML - too many select See Text String
masks
6320 Error: XML - missing lockAction See Text String
parameter

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 161
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


6321 Error: XML - invalid lockAction See Text String
parameter
6322 Error: XML - missing lockMask See Text String
parameter
6323 Error: XML - invalid lockMask See Text String
parameter
6324 Error: XML - missing EPC2Mode See Text String
parameter
6325 Error: XML - invalid EPC2Mode See Text String
parameter
6326 Error: XML - missing nsi parameter See Text String
6327 Error: XML - invalid nsi parameter See Text String
6328 Error: XML - tagIdType See Text String
unsupported
7000 Error: Invalid mode value See Text String
7001 Error: Invalid profile value See Text String
7002 Error: Invalid ETSI switching See Text String
interval
7003 Error: Invalid FCC hopping interval See Text String
7004 Error: Invalid number of subbands See Text String
7005 Error: Invalid channel Id See Text String
7006 Error: Invalid antenna configuration See Text String
7007 Error: Invalid number of switching See Text String
antennas
7008 Error: Invalid number of fixed Tx See Text String
antenna
7009 Error: Invalid protocol Id See Text String
7010 Error: Invalid tag Id type See Text String
7011 Error: Invalid length field See Text String
7012 Error: Invalid tag memory address See Text String
range
7013 Error: Invalid memBank See Text String
7014 Error: Antennas not configured See Text String
7015 Error: Invalid transmit power level See Text String
7016 Error: Invalid antenna gain See Text String
7017 Error: Invalid cable loss See Text String
7018 Error: Invalid Comms Scheme Id See Text String
7019 Error: Invalid session type See Text String
7020 Error: Invalid initial Q value See Text String
7021 Error: Invalid digital port settings See Text String
7022 Error: Invalid channel type See Text String
7023 Error: Invalid comms port number See Text String
7024 Error: Invalid EPC2Write mode See Text String
7025 Error: Tag select invalid See Text String
7026 Error: Invalid read mode See Text String

SIMATIC RF660R XML Interface


162 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


7027 Error: Invalid China hopping Tranceiver Controller received a TC_SET_CHINA_CHAN_CFG
interval with a switching interval >2sec (the maximum average channel
occupancy for CHINA)
7028 Error: LBT - state incompatible with This is raised if LBT is in an invalid state for the operation
requested operation requested (eg LBT ‘on’ in CHINA)
7029 Error: LBT - Invalid profile for See Text String
configuring LBT
8000 Error: Invalid trigger configuration See Text String
8100 Error: Data read - tag not detected See Text String
8101 Error: Data read operation failure See Text String
8102 Error: Data read - buffer allocation See Text String
failed
8103 Error: Data read - failed to get tag See Text String
handle
8104 Error: Data read - access See Text String
password failed
8105 Error: Data read - tag memory See Text String
locked
8106 Error: Data read - tag memory See Text String
location not existent
8120 Error: Data write - tag not detected See Text String
8121 Error: Data write operation failed See Text String
8122 Error: Data write - tag memory See Text String
locked
8123 Error: Data write - buffer allocation See Text String
failed
8124 Error: Data write - verification failed See Text String
8125 Error: Data write - invalid tag See Text String
response
8126 Error: Data write - failed to get tag See Text String
handle
8127 Error: Data write - access See Text String
password failed
8128 Error: Data write - tag memory See Text String
location not exist
8129 Error: Data write - tag has See Text String
insufficient power
8141 Error: Program ID - no tag See Text String
detected
8142 Error: Program ID - more than 1 See Text String
tag detected
8143 Error: Program ID - invalid tag Id See Text String
type
8144 Error: Program ID - tag memory See Text String
locked
8145 Error: Program ID - Operation See Text String
failed

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 163
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


8146 Error: Program ID - verification See Text String
failed
8147 Error: Program ID - invalid tag See Text String
response
8148 Error: Program ID - failed to get tag See Text String
handle
8149 Error: Program ID - access See Text String
password failed
8150 Error: Program ID - tag memory See Text String
location not exist
8151 Error: Program ID - tag has See Text String
insufficient power
8160 Error: Tag lock - no tag detected See Text String
8161 Error: Tag lock - specified tag not See Text String
detected
8162 Error: Tag lock - more than 1 tag See Text String
detected
8163 Error: Tag lock - tag memory See Text String
already locked
8164 Error: Tag lock operation failed See Text String
8165 Error: Tag lock - invalid memory See Text String
address or address not lockable
8166 Error: Tag lock - tag return invalid See Text String
response
8167 Error: Tag lock - failed to get tag See Text String
handle
8168 Error: Tag lock - access password See Text String
failed
8169 Error: Tag lock - tag gave EPC2 tag response "Other error" error code 0x00
response "Other error"
8170 Error: Tag lock - tag has EPC2 tag response "Insufficient power" error code 0x0B
insufficient power
8171 Error: Tag lock - tag gave EPC2 tag response "non-specific error" error code 0x0F
response "Non-specific error"
8172 Error: Tag lock - possible tag See Text String
access failure
8178 Error: Tag erase - tag was not See Text String
erased
8179 Error: Tag erase - operation did not See Text String
complete
8180 Error: Tag kill - specified tag not See Text String
detected
8181 Error: Tag kill - operation failed See Text String
8182 Error: Tag kill - failed to get tag See Text String
handle
8183 Error: Tag kill - access password See Text String
failed

SIMATIC RF660R XML Interface


164 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
A.8 Error Codes From The Reader

Error Code Text String (if applicable) Description


8184 Error: Tag kill - tag has insufficient See Text String
power
8185 Error: Tag kill - kill may be See Text String
successful but not confirmed
8200 Error: EPC command - verify failed See Text String
8220 Error: EPC command - erase failed See Text String
8221 Error: EPC command - erase did See Text String
not complete
8240 None Specified tag not detected
8241 None Failed to complete tagBlockErase operation
8242 None Failed to access tag
8243 None The specified memory location is locked and/or permalocked and
is not erasable
8244 None The specified memory location does not exist or the PC value is
not supported by the Tag
8245 None The Tag has insufficient power to perform the erase operation
8246 None Failed to get handle for tag erase operation
10000 Info: Reader has powered up See Text String
10001 Info: Reader is using the default Tx See Text String
calibration settings
10002 Info: One or more erased EPC1 See Text String
tags detected
10003 Info: EPC2 tag detected with EPC See Text String
ID length of zero
10004 Info: EPC2 tag detected with See Text String
unsupported ID length
10005 Info: Configuration reset to factory See Text String
defaults

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 165
Appendix
A.9 Error Codes - Displayed by ERROR-LED

A.9 Error Codes - Displayed by ERROR-LED


A couple of error codes leading to failures which are described above are displayed by the
reader's red Error-LED. The number of blinks indicates the appropriate error. Each blinking
sequence is repeated after a 3 seconds intermission. Pulse length for each blink is 220ms.
The example below indicates 'Error 5102' -> Error: Antennas not connected -> 3 blinks ->
Antenna disconnection.

(UURUB/('
RQ

RII

PV
PV PV

In many cases the error can be fixed by rebooting the reader. (Power off->on).

Error code Error Code Description Number of Notes


Blinks
- Reader inactive 1 Shows reader is inactive
1000 Fatal Error: Failed to program the Synthesizer 20 Hardware failure
1001 Fatal Error: Antenna Switch Failure 20 Hardware failure
1002 Fatal Error: Unable to switch on the Power Amplifier 20 Hardware failure
1003 Fatal Error: Unable to set Tx gain 20 Hardware failure
1004 Fatal Error: Unable to set Rx gain 20 Hardware failure
1005 Fatal Error: FLASH erase failed 20 Hardware failure
1006 Fatal Error: FLASH write failed 20 Hardware failure
2000 Fatal Error: Software failure 20 Software failure
2001 Error: Config rollback error 20 Software failure
2002 Fatal Error: Failed to save default config to FLASH 20 Hardware failure
5101 Error: Firmware running is not firmware selected to boot from 18 Corrupted firmware
5102 Error: Antennas not connected 3 Antenna disconnection
1 blink is actually not an error, 1 blink just indicates that the reader is presently inactive. It is
listed in the Error Code Table just for better orientation.

SIMATIC RF660R XML Interface


166 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix B
B.1 Certificates and Approvals

Notes on CE marking

Principle

The following applies to the system described in this documentation:


The CE marking on a device is indicative of the corresponding approval:

DIN ISO 9001 certificate


The quality assurance system for the entire product process (development, production, and
marketing) at Siemens fulfills the requirements of ISO 9001 (corresponds to EN29001:
1987).
This has been certified by DQS (the German society for the certification of quality
management systems).
EQ-Net certificate no.: 1323-01

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 167
Appendix
B.1 Certificates and Approvals

Certification for the USA, Canada and Australia

Safety

One of the following markings on a device is indicative of the corresponding approval:


Underwriters Laboratories (UL) to UL 60950 Standard (I.T.E), or to UL508
(IND.CONT.EQ)

Underwriters Laboratories (UL) according to Canadian standard C22.2 No. 60950


(I.T.E) or C22.2 No. 142 (IND.CONT.EQ)

Underwriters Laboratories (UL) according to standard UL 60950, Report E11 5352 and
Canadian standard C22.2 No. 60950 (I.T.E) or UL508 and C22.2 No. 142
(IND.CONT.EQ)

UL recognition mark

Canadian Standard Association (CSA) per Standard C22.2. No. 60950 (LR 81690) or
per C22.2 No. 142 (LR 63533)

Canadian Standard Association (CSA) per American Standard UL 60950 (LR 81690) or
per UL 508 (LR 63533)

EMC

USA
Federal Communications This equipment has been tested and found to comply with the limits for a
Commission Class A digital device, pursuant to Part 15 of the FCC Rules. These limits
Radio Frequency are designed to provide reasonable protection against harmful
Interference Statement interference when the equipment is operated in a commercial
environment. This equipment generates, uses, and can radiate radio
frequency energy and, if not installed and used in accordance with the
instruction manual, may cause harmful interference to radio
communications. Operation of this equipment in a residential area is likely
to cause harmful interference in which case the user will be required to
correct the interference at his own expense.
Shielded Cables Shielded cables must be used with this equipment to maintain compliance
with FCC regulations.
Modifications Changes or modifications not expressly approved by the manufacturer
could void the user’s authority to operate the equipment.
Conditions of Operations This device complies with Part 15 of the FCC Rules. Operation is subject
to the following two conditions: (1) this device may not cause harmful
interference, and (2) this device must accept any interference received,
including interference that may cause undesired operation.

SIMATIC RF660R XML Interface


168 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Appendix
B.2 Service and support

CANADA
Canadian Notice This Class B digital apparatus complies with Canadian ICES-003.
Avis Canadien Cet appareil numérique de la classe b est conforme à la norme NMB-003
du Canada.

AUSTRALIA
This product meets the requirements of the AS/NZS 3548 Norm.

B.2 Service and support

Technical Support
You can reach the technical support team for all IA&DT projects at
● Telephone: +49 (0) 180 5050 222
● Fax: +49 (0) 180 5050 223

Internet
● You can contact us via the Internet at:
http://www.siemens.com/automation/service&support

● We will gladly respond to any support queries at:


http://www.siemens.com/automation/support-request

● You can find the latest general information about our identification systems on the
Internet at:
http://www.siemens.com/simatic-sensors/rf

● You will find the online catalog and the online ordering system at:
http://www.siemens.com/industrymall

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 169
Appendix
B.3 Contact partner

B.3 Contact partner


If you have any further questions on the use of our products, please contact one of our
representatives at your local Siemens office.
The addresses are found on the following pages:
● On the Internet at: http://www.siemens.com/automation/partner
● In Catalog CA 01
● In Catalog FS 10 specially for factory automation sensors

B.4 Training
We offer appropriate courses to get you started. Please contact your local Training Center or
the Central Training Center in
D-90327 Nuremberg.
Telephone: +49 (911) 895-3200
You will find information about our course programme for SITRAIN on the home page at:
http://www.siemens.com/sitrain

SIMATIC RF660R XML Interface


170 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Index
Ethernet, 48
Configuration Changes, 70
A Get Current Configuration, 71
Save Configuration, 70
ack, 25, 135
configVersion, 71
Alert, 131
Connection
Alerts, 20
Control Channel, 45
Antenna
Goodbye, 45
Mode Switching, 58
Initation From The Host, 37
Settings, 58
Set Up Procedure And Messages, 35
antenna gain, 59
Connection Establishment Procedure, 36
antenna power, 59
Contact partner, 170
Antenna Settings, 58
CONTINUOUS, 74, 82
Antenna Mode Switching, 58
Control
antennaConfig, 58
Channel, 10
Get, 55
Control Application, 19
Set, 55
Control Channel Connection, 45
APP_REQUEST, 74, 82, 85
Controlling Reader Mode, 82
Approvals, 167
Convention, 10
AUTONOMOUS, 85
Current Setup, 50
Autonomous mode, 83

D
B
Data bits, 47
Boot Loader, 139
DataWrite, 112
BULK_READ, 67
Default configuration, 147
Device & Data Management, 10
DHCP Based Ethernet Setup, 50
C
Digital Input
cableLoss, 59 Current State, 78
Certificates, 167 Digital Input Configuration, 76
Channel Id, 141, 142, 143 Get The Current State Of The Digital Input, 78
channel spacing, 141 Set The Digital Input Configuration, 76
channelConfig digital output, 86
Get, 55 DIGITAL_INPUT_PORT, 74, 82
Set, 55 DigitalInputNumber, 75
CHINA, 57, 64 digitalInputState, 78
Channel ID, 144 DigitalInputType, 75
Channel Id Settings, 64 digitalOutputState, 79, 86
Frequency, 144
Maximum Transmit Power, 144
Sub-bands, 144 E
Commands
Effective Radiated Power, 59
EPC Class 1 Gen 1, 122
EMC Directives, 168
EPC Class 1 Gen 2, 127
EPC Class 1 Gen 1, 66
Config Application, 10
EPC Class 1 Gen 1 commands, 122
Configuration
EPC Class 1 Gen 2, 66
Digital Input, 76

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 171
Index

EPC Class 1 Gen 2 commands, 127 get, 138


EPC Global Generation 1 Specific Commands, 14 Get
EPC Global Generation 2 Specific Commands, 14 antennaConfig, 55
EPC_GEN_1, 67 channelConfig, 55
EPC_GEN_2, 67 Configuration Messages, 20
ERP, 59 Current Configuration, 71
Error Codes, 155 Current Read Trigger, 75
error response, 27 Current State Of The Digital Input, 78
Error-LED, 166 ethernetConfig, 47
Ethernet, 45, 48 Firmware Version Number, 138
Ethernet configuration, 49 notifyChannel, 47
Ethernet Usage, 18 Protocol Configuration, 69
ethernetConfig, 24, 48 protocolConfig, 55
Get, 47 Reader Profile, 57
Set, 47 readerInfo, 129
ETSI, 57 readerProfile, 55
Frequency Switching, 61
ETSI profile
Zones France, 143 H
Heart Beat, 40
Heart beat Mechanism, 40
F
heartbeat, 35
fail, 27 Host, 10
FCC, 57, 62 hostGoodbye, 45
Channel Id Settings, 62 hostGreetings, 22, 35, 37
FCC profile, 141
Firmware, 139
Firmware Update, 134 I
FlashBank, 137
Initation, 37
Get Firmware Version Number, 138
initialQ, 67
Saving The Image To Flash, 137
IP-address, 50
Set The Reader, 137
ISO 18000-6 B, 66
Update, 139
ISO_18000_6_B, 67
Upload, 136
Version, 138
Firmware Update, 15
L
firmwareInfo, 134, 138
FLASH, 70 LED Error Codes, 166
Flash Firmware Messages, 140
flashBank, 134, 137
flashFirmware, 134, 140 M
Frequency, 141, 142, 143
MAC / IP of the Reader, 148
ETSI, 61
Message
Frequency Hopping mode, 62
Flash Firmware, 140
Frequency Settings, 61
Message Format, 20
Messages
Configuration, 12
G
Connection Establishment and Status, 11
General Enquiries, 15 Control, 13, 79
General Reader Information Digital Input Configuration, 13
Reading, 129 Goodbye, 45

SIMATIC RF660R XML Interface


172 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Index

hostGreetings, 37 '
Operational, 20
'Reader description', 130
Read Trigger Options, 12
Service Provisioning, 11
Tag Exchange, 107
R
With A Single Parameter, 23
With Multiple Parameters, 22 Reader Frequency Settings, 61
With No Parameters, 21 China Frequency Switching Settings, 64
Messages ETSI Frequency Switching Settings, 61
operational, 20 FCC Channel ID Settings, 62
Mod. Index, 145 reader information, 129
Mod. Type, 145 Reader Profile
Modes of Operation, 13 Get, 57
Set, 56
Reader Responses, 25
N Error Responses, 27
Normal Responses, 25
Notification Channel, 52
Notifications, 27
Retrieve Notification Channel Details, 54
With A Single Return Parameter, 26
Setting The Notification Channel, 52
With Multiple Return Parameters, 26
Notifications, 27
Without Any Return Parameters, 25
Notifications Channel, 10
Reader to Tag Communication, 145
notifyChanne, 47
readerDesc, 130
notifyChannel, 54
readerInfo, 129
notifyCount, 79, 85
readerProfile
Get, 55
Set, 55
P
Reading
Parameters Tag Data, 107
Multiple, 22 readTags, 79
No, 21 readTriggerConfig, 73, 75
Serial Port, 47 readTriggerType, 75
With A Single, 23 real time clock, 42
With A Single Return, 26 resetConfig, 70
With Multiple Return, 26 resetReader, 21, 81
Without Any Return, 25 Resetting Configuration to Factory Settings, 72
Protocol Configuration, 66 Retrieve
Get Protocol Configuration, 69 General Info About The Reader, 129
Set The Protocol Configuration, 66 Retrieving
protocolConfig, 22, 24, 66, 69 A Set Of Parameters From The Reader, 24
Get, 55 A Single Parameter From The Reader, 23
Set, 55 RS232, 50
rtCommsScheme, 66, 69
Rx Decode Type, 145
Q Rx Rate, 145
Quick Reference, 11
S
R saveConfig, 70
Saving
RAM, 55
Configuration Changes, 12
The Image To FLASH, 137

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 173
Index

Sequence, 36 ETSI Frequency, 61


Diagram, 36 switching interval, 61
serial port, 47 switchingInterval, 58
Serial Port, 45
Service, 169
Set T
antennaConfig, 55
Tag
channelConfig, 55
Event Reports, 82
CHINA Channel Id, 64
Inventory Management, 89
Configuration Messages, 20
Tag Data Reading, 107
Digital Input Configuration, 76
Tag Inventory Management, 14
EPC Class 1 Gen 1, 66
Tag Protocol, 145
EPC Class 1 Gen 2, 66
tagBlockErase, 127
ethernetConfig, 47
tagDataRead, 107
ETSI Frequency Switching, 61
tagDataWrite, 107, 112
FCC Channel Id, 62
tagLock, 107
Firmware, 134
tagLockSpec, 107
Frequency, 61
tagProgramId, 101
ISO 18000-6 B, 66
tagProgramId message, 99
notifyChannel, 47
tagRead, 85
Protocol Configuration, 66
tagReadSpec, 107
protocolConfig, 55
tagSelectionRange, 91
Reader Profile, 56
tagWriteSpec, 107
readerDesc, 129
Tari, 145
readerMode, 79
TCP/IP, 45
readerProfile, 55
timeout condition, 19
The Reader To Boot From flashBank, 137
Trigger Options
setFirmware, 134
Get The Current Read Trigger, 75
Setup Ethernet, 50
triggerDuration, 75
setupEthernetDHCP, 47, 50
Tx Rate, 145
SIMATIC RF660R, 129
type, 69
single parameter, 23
Typical Convention, 10
SINGLE_TAG, 67
Smart Reader Data Exchange Commands, 14
Standard Configuration Messages, 55
U
Standard Control Messages
Controlling Reader Mode, 82 update, 139
Resetting The Reader, 81 Update Firmware Req Message, 139
Resetting the reader configuration to factory updateFirmware, 134
defaults, 80 updateFirmwareReq, 134, 139
State uploadFirmware, 136
Digital Input, 78
Stop bits, 47
Sub bands: ETSI W
Zones France, 143
WRITE, 112
Sub-bands
write Tag ID, 99
CHINA, 144
Sub-Bands
FCC, 141
X
Support, 169
Switching XML, 20
Antenna Mode, 58 Xon/Xoff, 47

SIMATIC RF660R XML Interface


174 Function Manual, 12/2009, J31069-D0173-U001-A6-7618
Index

SIMATIC RF660R XML Interface


Function Manual, 12/2009, J31069-D0173-U001-A6-7618 175
Get more information
www.siemens.com/simatic-sensors

SIEMENS AG subject to change


Industry Sector J31069-D0173-U001-A6-7618
Sensors and Communication © Siemens AG 2009
Postfach 4848
90026 NÜRNBERG
DEUTSCHLAND

www.siemens.com/automation

Das könnte Ihnen auch gefallen