Government Limited Rights Notice: All documentation and manuals were
developed at private expense and no part of it was developed using
Government funds.
The U.S. Government’s rights to use, modify, reproduce, release, perform,
display, or disclose the technical data contained herein are restricted by
paragraph (b)(3) of the Rights in Technical Data — Noncommercial Items
clause (DFARS 252.227-7013(b)(3)), as amended from time-to-time. Any
reproduction of technical data or portions thereof marked with this legend must
also reporduce the markings. Any person, other than the U.S. Government, who
has been provided access to such data must promptly notify ThingMagic, Inc.
ThingMagic, Mercury, Reads Any Tag, and the ThingMagic logo are trademarks
or registered trademarks of ThingMagic, Inc.
Other product names mentioned herein may be trademarks or registered
trademarks of ThingMagic, Inc. or other companies.
The ThingMagic® Mercury®6e embedded module is an RFID engine that you can
integrate with other systems to create RFID-enabled products which support the custom
Transcore tag protocols: eGo, SeGo, ATA and Allegro/Title-21.
The Arbser utility provides an easy to use command line inter face to conf igure the rea der,
read from and write t ags, and demon strate t he modules capabil ities. ArbSer can issue t he
Command Set
the ArbSer application, see Appendix B: Using the ArbSer Application
This document is for developers and explains how to incorporate the Mercury6e-
Transcore (M6e-TC) into a third-party host system.
that is detailed in this document in thier hex format. For information about
.
Hardware Overview
The M6e-TC module is based on the Mercury5e (M5e) embedded module, designed to
be incorporated into products requiring powerful RFID capabilities in a small form factor.
The following table shows the basic features of the M6e-TC hardware:
Introduction to the Mercury6e-Transcore Module 13
Hardware Overview
Features of the M6e-TC Hardware
ItemM6e-TC
ProcessorAtmel AT91SAM7SE-256
Flash memory256 kB
On-chip RAM32 kB
RF ArchitectureASIC Intel R2000 with ThingMagic front end
The M6e-TC is a single board module designed for more space- constrained appl ication s.
The digital and analog electronics are on the same circuit board.
Microcontroller
The M6e-TC uses the Atmel ARM7 microcontroller with 256 kB of on-chip flash memory
for storage of all calibration and program data.
RFID ASIC
All base-band analog circuitry and PLL circuitry are contained within the Impinj R2000
RFID ASIC with ThingMagic front end for improved sensitivity.
Connectors
The M6e-TC supports one MMCX connectors for a single monost a tic antenna.
14Introduction to the Mercury6e-Transcore Module
Firmware Overview
M6e-TC Digital Connectors
The digital connector provides power, serial communications signals, and access to the
GPIO inputs and output s. The communications i nterface for the M6e-TC is a 14-pin di gital
connector. This connector provides power , serial communications signals, including USB
support, and access to the GPIO inputs and outputs. See the following table:
Pin-out of 14-pin Digital Communications Connector
The software (SW) for the M6e-TC consists of two separat e programs that coex ist in flash
memory:
The boot loader, which is started at power on, is not field upgradable. It is
programmed into flash when the module is manufactured.
Introduction to the Mercury6e-Transcore Module15
Firmware Overview
The application firmware, which implements the actual reader functionality, is field
upgradable.
Boot Loader
The boot loader provides low-level functionality. This program provides a customer
interface for upgrading the application firmware and storing data into fl ash.
When a module is powered up or reset, the boot loade r code is au tomaticall y copied from
sector 0 of flash into the Microprocessor’s on-chip RAM, and executed. The boot loader
provides the following features:
The application firmware (FW) is an important software component of the module. It
contains the protoc ol code as well as all the use r int erf aces t o set and get va rious syst em
parameters. The applicati on FW is st arted using the Boot Firmware command in the
boot loader; it does not start by itself upon power up.
Note
You can use the Arbser utility to upgrade the reader firmware.
Verifying Application FW Image CRC
The application FW has an image level Cycl ic Redundancy Check (CRC) embedded in it
to protect against corrupted firmware during an upgrade process. (If the upgrade is
unsuccessful, the CRC will not match the contents in f lash.) When the boot loader starts
the application FW, it first verifies that the image CRC is corr ect. If this check fails, then
the boot loader does not start the application FW.
The upgrade process uses a series of individual 250- byte packet write operations to
ensure that an upgrade is successful ly completed f or the complet e image. It also ensur es
that the application FW in flash was not corrupted acci dently, and can be expected to
perform properly when executed.
16Introduction to the Mercury6e-Transcore Module
Functionality of the Embedded
This section highlights some of the functionality of the modules. The details for using the
serial commands to control this functionality are found in Overview of the Communication
Protocol.
Regional Support
The modules have differing levels of support for operation and use under the laws and
guidelines of several regions.
Note
A region must be set before the module will perform any RF operations.
The regional support is shown in the following table.
Modules
Supported Regions
RegionRegulatory SupportM6e-TC
North America (NA)FCC 47 CFG Ch. 1 Part 15
Industrie Canada RSS-210
Open RegionNo regulatory compliance enforcedYes
The regional functionality i s set using a single serial command, Set Configuration
Commands. Setting the Region configures the regional default settings including:
Loads the Frequency Hop Table with the appropriate table for the selected region.
Sets the PLL frequency to the first entry in the hop table, even if the RF is off.
Selects the transmit filter, if applicable.
Note
The Open Regi on allo ws the modu le to be manually configur ed withi n the ful l
capabilities supported by the hardware. No regulatory limits, including:
frequency range, channel spacing and transmit power limits, are enforced.
The Open Region should be used with caution.
Functionality of the Embedded Modules 17
Yes
Frequency Setting
The modules have a PLL synthesizer that sets the modulation frequ ency to the desired
value. Whenever the frequency is changed, th e module must first power off the
modulation, change the frequency, and then turn on the modulation again. Since this can
take several mill iseconds, it is possible that tags are powered off during a frequency hop.
In addition to setting the defaul t regional setti ngs, the modules have commands t hat allow
the transmit frequency to be set manually.
Frequency Setting
!!
CAUTION!
Use these commands with extreme caution.
It is possible to change the module’s compliance with the regional regulations.
Frequency Units
All frequencies in the Mercury embedded products are expressed in kHz using unsigned
32-bit integers. For instance, a carrier frequency of 915 MHz is expressed as 915000
kHz.
The PLL is set automatically to the closest frequency - based on the minimum frequency
quantization for the current region - that matches the specified value. The Mercury
embedded modules have an absolute minimum quantization of 50 kHz. Each region also
has a minimum quantization based on regulatory specifications, which may be greater.
The following table detai ls the frequency quantization in kHz for each region setting.
When manually setting frequencies the module will round down for any value that is not
an even multiple of the supported frequency quantizati on.
18Functionality of the Embedded Modules
Frequency Setting
For example: In the NA region, setting a frequency of 902,999 kHz results in a
setting of 902,750 kHz.
When setting the frequency of the module, any frequencies out side of the valid range for
the specified region are rejected.
Frequency Hop Table
The frequency hop table determines the frequencies used by the modules when
transmitting. The hop table charact eristics are:
Contains up to 62 slots.
Valid frequencies for the region currently selected.
Changes not stored in flash, thus changes made are not retained after a power cycle
or a restart of the boot loader.
Inability to c hange indivi dual en tr ies af t er upl oading wi thou t reloadi ng the enti re table.
Frequencies used in the order of entries in the table.
If necessary for a region, the hop table can be randomized to cr eate a pseudo-random
sequence of frequencies to use. This is done automati cally using the default hop tables
provided for each region.
Frequency Hop Interval
When hopping frequencies the period of time the module will stay on an individual
frequency is defined by the Hop Interval. This value is based on the region’s regulatory
requirements and indicates th e maximum time the re ader will stay on a frequency which
maybe lower than that allowed by the regulatory requirement s.The supported region s and
their maximum hop interval is defined in the following table:
Maximum Frequency Hop Interval
RegionMax Hop Interval
NA200 ms
Open400 ms
Functionality of the Embedded Modules19
RF Power Setting
The power setting is calibrated at the factory and parameters are stored in flash memory
to ensure the power output is within +/– 1 dB of the desired setting. The power limits are
set by both hardware limitati ons and e nforced by the firmware.
Power Units
All power values are reported in centi-dBm. Therefore, a power setting of 2500
corresponds to 25 dBm. All power values in the serial interface are specified as signed
16-bit integers. A dBm means power referenced to 1mW . Therefore, the conversion from
watts to dBm is:
RF Power Setting
dBm = 10 log
For example: 0.1W = 100mW = 20dBm and 1W = 1000mW = 30dBm.
(power in mW)
10
Power Calibration
A power calibration event occurs when the Power set point is changed, the Frequency is
changed, or the RF field is turned on. The power calibration routine calibrates the power
within 10 ms.
Note
Power calibration onl y o ccur s on ce w h en the R F powe r is t ur ne d o n. It do es
not occur periodically when the RF field is on.
This is not an issue during normal operation,= since a frequency hop occur s within the
regulatory hop interval (see Maximum Frequency Hop Interval
and thermal drift does not aff e ct the power level significantly. However, in CW waveform
mode (Transmit CW Signal), no power calibration occurs unless the power or frequency
is changed. Thus, it is possi ble to experienc e th ermal drif t in thi s usage i f the un it is l ef t t o
transmit continuously for a significant period of time.
for region specific values)
TX Read Power
The TX read power is used for all non-write commands to tags. This may include, but is
not limited to, commands to read a tag ID and read tag data.
20Functionality of the Embedded Modules
TX Write Power
The TX write power is used only during commands that change a tag’s state. This
includes commands for Lock, Kill, as well as Tag ID Write and Tag Data Write.
Note
During Write commands, which both write to and verify the written contents,
the entire operation will be done at the Tx Write Power, including tag
singulation and the write verify.
Power Amplifier Protection
Certain usage scenarios can cause the M6e-TC to operate into very low return loss
situations and/or cause a considerable amount of reflected power to feed back into the
M6e-TC power amplifier (PA). Under such conditions damage to the M6e-TC power
amplifier has been observed due to this reflected power. To avoid damage to the P A in
such cases the software protecti on wil l shut the transmitter down when these conditions
are detected and the module will return the fault code 0x050 5-
FAULT_LOW_RETURN_LOSS – 505h
- for the response status code.
Power Amplifier Protection
The PA protection feature is on by default. It can be turned off using the Set Reader
Configuration(9Ah) command.
WARNING!
ThingMagic does not recommend turning off PA protection under any
circumstance. Turning off PA protection greately increases the
possibility of hardware damage. Module operation with PA protection off
is at the users o wn risk.
Antenna Ports
Monostatic Mode
The M6e-TC has one antenna port which both transmits and receives.
To set up the mo dule to use a single ant enna in monostat ic mode, connect the antenna t o
port 1 (labeled J1 on Printed Circuit Board) wh ich is responsible for both TX and RX
communication.
Functionality of the Embedded Modules21
Power Management
The modules use different methods and levels of power management.
Power Modes
The M6e-TC was designed for power efficiency and offers several dif ferent power
management modes, set using Set Power Mode (98h)
modes being offered:
Full Power Mode – In this mode, the unit operates at full power to attain the best
performance possible. This mode is only intended for use in cases where power
consumption is not an issue. This is the default Power Mo de at startup.
Minimal Saving Mode – This automatically executes basic power savings that do not
severely degrade system performance May result in a nominal 1 ms additional delay.
Power Management
. The following lists the current
Medium Saving Mode – This mode may add up to 50 ms of delay between
commands. It performs more aggressive power savings, such as automatically
shutting down the analog section between serial commands, and then restarting it
whenever a tag command is issued.
Maximum Saving Mode – This mode essentially shuts down the digital and analog
boards, except to power the bare minimum logic required to wake the processor. It
can take up to 150 ms to wake the processor and execute the desired command .
Note: In Maximum Saving Mode the USB interface is disabled and the RS232 interface
communication speed is limited to 9600 baud.
Tag Buffer
The Tag buffer stores tags, and their metadata, found using the Read Tag Multiple
command. The size of the tag buffer for each module is defined in the following table:
22Functionality of the Embedded Modules
Tag Buffer Size
Tag Buffer
M6e-TC
Tag Buffer Size in Tag ID
entries
190
Each tag entry consis ts of a f ixed number of bytes. The size dep ends on t he value set fo r
the Max EPC Length parameter in Set Reader Configuration(9Ah)
. Each entry consists of
the following fields:
Tag Buffer Entry
Total Ent ry
Size
18 bytes
(Max EPC
Length = 96bits)
68 bytes
(Max EPC
Length = 496bits)
FieldSizeDescription
EPC
Length
PC Word2 bytesContains the Protocol Control bits for the tag.
EPC12 bytesContains the tag’s EPC value padded with
Tag CRC2 bytesThe tag’s CRC.
EPC
Length
2 bytesIndicates the actual EPC length of the tag
read. Cannot exceed the Max EPC length
setting.
trailing zeros if the size is less than the Max
EPC Length size.
2 bytesIndicates the actual EPC length of the tag
read. Cannot exceed the Max EPC length
setting. Varies by Protocol:
• Gen2 = PCWord + EPC ID + CRC
• Other = EPC ID + CRC
PC Word2 bytesContains the Protocol Control bits for the tag.
EPC62 bytesContains the tag’s EPC value padded with
trailing zeros if the size is less than the Max
EPC Length size.
Tag CRC2 bytesThe tag’s CRC.
In addition to the tag EPC data each entry contains meta data about how, where and
when the tag was read. When using the Get Tag Buffer (29h)
command you can choose to
get the following tag meta data returned with each tag extracted from the tag buffer:
Functionality of the Embedded Modules23
Flash Memory
Tag Read Meta Data
Meta Data FieldDescription
Antenna IDThe antenna on with the tag was read.
Read CountThe number of times the tag was read on [Antenna ID].
TimestampThe time the tag was read, relative to the time the command to
read was issued, in milliseconds. If the Tag Read Meta Data is
not retrieved from the Tag Buffer between read commands
there will be no way to distinguish order of tags read with dif-
ferent read command invocations.
FrequencyThe frequency on which the tag was read
RFUReserved for Future Use - ThingMagic Only
LQI/RSSIThe receive signal strength of the tag response.
Protocol ID
Whenever a Tag entry is placed in the buffer, it uses up a single entry with the EPC
section containing the maximum EPC length number of b its, r egardless of the actual EPC
size of the tag read. The extra bits in the entr y are padded with trailing zeros.
After the Multi-Protocol Tag Read command finishes, it places all of the found tags into
the Tag buffer, and then returns the number of tags found to the user. Only unique tags
read on each antenna are added t o the Tag buffer; none of the ent ries show repeated Tag
EPCs. Repeated reads on an antenna will cause the Read Count fie ld to be incremented
for that tag entry. Multiple Get Tag Buffer commands must be sent to read out the Tags.
The Tag buf fer acts as a First In First Out (FIFO) — the first Tag found by the reader is the
first one to be read out. See Get Tag Buffer (29h)
The Tag buffer is reset only when the Clear Tag Buffer command is sent. See Clear Tag
Buffer (2Ah). This allows multiple Multi-Protocol Tag Read commands to be used to
acquire one consistent tag buffer set.
Flash Memory
The M6e-TC has on-board flash memory. This flash is di vided into four diff erent sectors of
varying sizes. Table 4 shows the memory map for the M6e-TC. Only sector 0x03 is set
aside for user data and the other secto rs are used by the application FW. The flash sector
utilities simplify the interface providing a means to develop interfaces that work acros s
these platforms.
The tag’s Protocol ID as defined by the
.
Tag Protocol IDs table
24Functionality of the Embedded Modules
Flash Memory Sector Mapping
Flash Memory
M6e-TC
SectorAccessCode
BootLoaderRead Only0x010x00000016 kBnana
ApplicationRead/Write0x020x00C000208 kB0x089591210x02254410
User MemoryRead/Write0x030x00800016 kB0x791387660x76346700
Hardware Info
Application
Data (RAM)
Read Only0x040x004000
Start
Address
0x200000
M6e-TC
Size
(bytes)
16 kB
32 kB
Erase
Password
Write
Password
nana
Accessing the Flash
The flash is accessed onl y through t he boot loader pr ogram. Flash is not acc essible whi le
the application FW is running.
All accesses to flash are in terms of two-byte word addresses and word lengths. Thus,
the Write Flash Sector, Read Flash Sector, Erase Flash Sector, and Modify Flash Sector commands all use the same argument types. The maximum amount of flash that
can be written or modified at a single time is 125 words, and the maximum amount of
flash that can be read at a single time is 124 words. This is a limitation of the serial
interface and data packet sizes. Multiple data packets are used to read/write/modify a
larger area of flash.
When using the Erase Flash Sector or Write Flash Sector commands, the correct
password must be provided to complete the operation. This is done to protect against
accidentally erasing or writing to the flash. See Boot Loader Commands
.
Upgrading Application FW
The application FW is upgraded in flash. New versions of f irmware are released in a .sim
binary file format . The .sim binary file format is a compressed file format that stores the
data in raw binary.
Functionality of the Embedded Modules25
Serial and USB Interfaces
The M6e-TC module can communicate to a host processor via the TTL logic level RS-232
serial protocol or via Universal Serial Bus (USB) protocol, both accessed on the 14-pin
M6e-TC Digital Connectors
The module does not need to be software configured to operate on one or the othe r
interface, just s end data o ver the int erface to use it. However , the followi ng considerati ons
should be made when using one or both interfaces:
Once a command is initiated on one interface, the entire synchronous operation (full
command and response) must be completed on that interface. Upon completion of
an operation a new command can be sent on either interface.
If both interfaces are to be used the user is responsible for maintaining order of
execution. If commands are sent on both interfaces simultaneously execution order
cannot be guaranteed.
When setting the baud rate via Set Baud Rate (06h) this changes the communication
speed on the RS232 Interface only, whether set using the RS232 interface or USB.
The USB speed is not changed. USB communication speed is dictated by the USB
protocol and has a maximum bitrate of 12Mbps.
.
Serial and USB Interfaces
When configuri ng Power Modes, using Maximum Saving Mode (0x03) will shut off the
USB interface. If Set Power Mode (98h)
0x03 is specified the module will instead be set to Medium Saving Mode (0x02). In
order to set the module to mode 0x03 the command must b e cal led usi ng the RS232
interface.
is called using the USB interface and mode
Power consumption will increase when the USB interface is connected.
A level converter is necessa ry to i nter face t o other devi ces that use s t andard 12V RS-
232.
Only three pins are required for RS232 communicatio n (TX, RX, and GND). Hardware
handshaking is not supported.
The interfaces use an interrupt-dr iven FIFO that empties into a circular buffer.
The developer is responsible for ensuri ng that the host processor’s RS232 receiver
has the capability to receive up to 256 bytes of data at a time without overflowing.
Installi ng the USB Driver
Windows
When connecting to the M6e-TC through the USB interface from a Windows PC a few
installation steps are required for Windows to recogniz e the M6e-TC and properly
26Functionality of the Embedded Modules
General Purpose Inputs/Outputs (GPIO)
configure the communications protocol. In order to use the USB interface with Windows
you must have the m6etc.inf file. The installation steps are:
1. Plug in the USB cable to the M6e-TC (devkit) and PC.
2. Windows should report “Found New Hardware - M6e-TC Serial” and open the
Hardware Installation Wizard.
3. Select the Install from a list or specific location (Advanced) option, click Next.
4. Select Don’t search..., click Next, then Next again.
5. Click Have Disk and navigate to where the m6etc.inf file is stored; select it, click
Open, then OK.
6. “Mercury6eTC” should now be shown under the Model list. Select it and click Next
then Finished.
Note
The M6e-TC driver file has not been Microsoft certified so comp atibility
warnings will be displayed. These can be ignored and clicked through.
7. A COM port should now be assigned to the M6e-TC. If you aren’t sure what COM
port is assigned you can find it using the Windows Device Manager:
a. Open the Device Manager (located in Control Panel | System).
b. Select the Hardware tab and click Device Manager.
c. Select View | Devices by Type | Ports (COM & LPT)
The device appears as Mercury6eTC (COM#).
General Purpose Inputs/Outputs (GPIO)
The M6e-TC modules has four TTL level signals, two 3.3/5V serial input sensor ports
(GPIO inputs) and two output indicator ports (GPIO outputs) of up to 24 mA, available on
the 14-pin digital connector. These can be controlled via the Get User GPIO Inputs and Set User GPIO Outputs commands.
For further information, see Get User GPIO Inputs (66h)
and Set User GPIO Outputs (96h).
Functionality of the Embedded Modules27
Default Settings
Since default settings may change across release and be different across platforms we
recommend using the Get Configuration Commands
None of the configurable set tings in the appl ication FW are saved in non- volatile memory.
Thus the system will always boot up in the same default state, regardless of how it was
previously configured.
Default Settings
to obtain default settings.
28Functionality of the Embedded Modules
Overview of the Communication
Protocol
The serial communication between a computer (host) an d the reader is based on a
synchronized command-response/master- slave mechanism. Whenever the host sends a
message to the reader, it cannot sen d anot her me ssage until af te r it rec eiv es a respo nse.
The reader never initiates a communication session; only the host initiates a
communication session.
This protocol allows for each command to have its own timeout because some
commands require more time to execute than others. The host manages retries, if
necessary. The host keeps track of the state of the intended reader if it reissues a
command.
Host-to-Reader Communication
Host-to-reader communication is packetized according to the following diagram. The
reader can only accept one command at a time, and commands are executed serially, so
the host waits for a reader-to-host response before issuing another host-to-reader
command packet.
HeaderData LengthCommand
HdrLenCmdCRC HiCRC LO
1 byte1 byte1 byte0 to N bytes2 bytes
Overview of the Communication Protocol 29
Data
CRC-16 Checksum
I
Host-to-Reader Communication
The fields are summarized in the following table.:
FieldLengthDescription
Header (Hdr)1 byteDefines the start of the packet. Equal to 0xFF
1
Data Length (Len)
Command1 byteSpecifies the command that the reader is to execute.
DataN bytes
CRC-16 Checksum
(CRC HI, CRC LO)
1 byteDefines the length, N, of the data field contained in the
packet.
Defines the binary data required by the reader for use with a
(0 to 250)
2 bytesCRC-16 checksum (high order byte first). CRC polynomial is
command. This could, for example, represent transponder
data to be written. The length, N, can vary between 0 and
250 bytes.
CCITT CRC-16, with a preload of 0xFFFF . This does not fully
specify the operation of the CRC, see
CCITT CRC-16 Cal-
culation.
1.Minimum packet lengt h is 5 bytes; the maximum packet length is 255 bytes.
30Overview of the Communication Protocol
Reader-to-Host Communication
The following diagram defines the format of the generic Response Packet sent from the
reader to the host. The Response Packet is different in format from the Request Packet.
Reader-to-Host Communication
HeaderData LengthCommandDataCRC-16 Checksum
HdrLen
1 byte1 byte
Cmd
1 byte
Status Word
Status Word
CRC HICRC LO
0 to M bytes2 bytes
2 bytes
The fields are summarized in the following table.:
FieldLengthDescription
Header (Hdr)1 byteDefines the start of the packet. Equal to 0xFF
1
Data Length (Len)
1 byteDefines the length, M, of the data field contained in the
packet. Length can be 0 – 248 bytes
2
Command
3
Status Word
DataM bytes
CRC-16 Checksum
(CRC HI, CRC LO)
1 byteOpCode of the last command received
2 bytesSpecifies the status of the last command, Successful =
0x0000, else it contains a fault code.
Defines the binary data returned by the reader in response to
(0 to 248)
2 bytesCRC-16 checksum (high order byte first). CRC polynomial is
a command. This could, for example, represent data read
from a transponder. Data length, M, can be a minimum of 0
and a maximum of 248 bytes.
CCITT CRC-16, with a preload of 0xFFFF. This does not fully
specify the operation of the CRC, see
CCITT CRC-16 Calcu-
lation.
Overview of the Communication Protocol31
Reader-to-Host Communication
1.The minimum packet length is 7 bytes and the maximum packet length is 255 bytes.
2.Each host command recei v es a resp onse fro m the read e r. In th e resp onse pack et, the Head er, Data Lengt h, Co mmand , Dat a, and
Checksum are functionally similar to the command packet.
3.The only difference is the addition of the Status Word field. The Status Word has two types of values. A Status Word value of 0
(Zero) means the command received was successful. Any other value represents a fault.
CCITT CRC-16 Calculation
The same CRC calculation is performed on all serial communications between the host
and the reader. The CRC is calculated on the Data Length, Command, Status Word, and
Data bytes. The header (SOH, 0xFF) is not included in the CRC.
A sample implementation of the CCITT CRC-16 algorithm is shown in this section. The
CRC_calcCrc8() function is written to calculate the CRC one byte at a time, with the
calculated value stored in crc_calc. The crc_calc value must be pre-loaded the first time
the CRC_calcCrc8() function is called with 0xFFFF to initialize the calculated CRC. The
final value of crc_calc is sent as the 16-bit CRC at the end of the message.
32Overview of the Communication Protocol
Reader-to-Host Communication
An example implementation of CRC calculation, taken from the Arbser source CrcUtils.c,
is shown here:
/** @fn void CRC_calcCrc8(u16 *crcReg, u16 poly, u16 u8Data)
* @ Standard CRC calculation on an 8-bit piece of data. To make it
* CCITT-16, use poly=0x1021 and an initial crcReg=0xFFFF.
*
* Note: This function allows one to call it repeatedly to continue
*calculating a CRC. Thus, the first time it's called, it
*should have an initial crcReg of 0xFFFF, after which it
*can be called with its own result.
*
* @param *crcRegPointer to current CRC register.
* @param polyPolynomial to apply.
* @param u8Datau8 data to perform CRC on.
* @return None.
*/
// Get the carry bit. This determines if the polynomial should be
// xor'd with the CRC register.
xorFlag = *crcReg & 0x8000;
// Shift the bits over by one.
*crcReg <<= 1;
// Shift in the next bit in the data byte
bit = ((u8Data & dcdBitMask) == dcdBitMask);
*crcReg |= bit;
// XOR the polynomial
if(xorFlag)
{
}
// Shift over the dcd mask
dcdBitMask >>= 1;
}
}
*crcReg = *crcReg ^ poly;
Overview of the Communication Protocol33
Format for Microprocessor Reply to Host
Format for Microprocessor Reply to Host
There are three different types of replies tha t the microprocess or can make to the host as
follows:
Acknowledge that the command was properly processed (ACK)
Return a fault code
Provide data that is requested by the host
This section describes each of these three types.
Unless otherwise specified, all commands ret urn, as part of the Reply message, a status
word with an ACK or a Fault. Those commands that return a Data Reply message are
clearly shown.
Microprocessor ACK Message
Many of the commands require the microprocessor to perform a function, but do not
require the microprocessor to send data back t o the host. Howev er, since the host cannot
send a message until the microprocessor replies, an ACK is sent.
The ACK message contains no data. It returns the same OpCode that was sent or igina lly
to the microprocessor, sets the Status Word to 0x0000 (zero) and the Data Length to
0x00 (zero).
34Overview of the Communication Protocol
Format for Microprocessor Reply to Host
The following shows an example of an ACK message to an Erase Flash command.
FF00070000F427
SOHLengthOpCodeStatusCRC
The value in the OpCode field (0x07) is the same as the Erase Flash OpCode, 0x07.
Microprocessor Fault Reply Message
If a problem occurs during the execution of a command, the microprocessor returns a
non-zero status value. Although this usually implies a fault or error, sometimes the nonzero status simply indicates a condition of the system. For instance, when executing a
Read Tag Single command, if no t ags are found, a sta tus code of 0x0 400 is retur ned. An
example of a fault reply message is shown for the Erase Flash command.
FF00070200F627
SOHLengthOpCodeStatusCRC
A list of error codes is included in Appendix C: Error Messages
. Refer to this list when
encountering any non-zero status codes.
Microprocessor Data Reply Message
If the requested command requires that the microprocessor returns data, then the
microprocessor creates a message similar to the Microprocessor ACK Message with the
data length set to a non-zero value. Sin ce this command does not r equire a data f ield, the
length field is set to Zero.
FF00070000F427
SOHLengthOpCodeStatusCRC
Overview of the Communication Protocol35
Format for Microprocessor Reply to Host
Here is an example of a Reply message with Data Field Length not zero. This message
happens to be a successful reply to Read Tag Single command.
FF0A210000C80507A80084C4FF9EE0F725
SOHLengthOpCodeStatusTag IDTag CRCCRC
36Overview of the Communication Protocol
Command Set
The following list def ines t he OpCodes that a re used in the embedd ed modul es fi rmware.
As these products grow, more OpCodes will be added to enhance the functionality of the
product. The timeout for the commands are in milliseconds. The maximum value for any
user-configurable timeout is 65,535msec (0xFFFF), unless otherwise noted. The
OpCodes are divided into five main categories:
0x00 – 0x1F: Boot Loader Commands
0x20 – 0x5F: Application Tag Commands - Depending on the current protocol setting
will correspond to:
– Multi-Protocol Tag Commands
– Allegro/Title-21 Tag Commands
– eGo/SeGo Tag Command Set
– ATA Tag Co m mand Se t
– Gen2 Tag Commands
0x60 – 0x8F: Get Configuration Commands
0x90 – 0xBF: Set Configuration Commands
0xC0 – 0xCF: FCC Test Commands
Command Set37
Boot Loader Commands
Boot Loader Commands
The BootLoader is automatically started upon power up, and allows access to the onboard flash memory along with other commands. The program exits only when the Boot Firmware command is received. Once that occurs, the firmware image starts executing
and sends back a reply to the Boot Firmware command. The BootLoader can also be
started using command 0x09, Start BootLoader.
The following table shows which commands are supported by the Boot loader and in
some cases the application.
Boot Loader Commands
OpCodeCommand NameArgumentsReturnBLApp
0x02
0x03
0x04
0x06
0x07
0x08
0x09
0x0C
0x0D
0x0E
Flash Read Sector (02h)
Get Boot Loader/Firmware
Version (03h)
Boot Firmware (04h)
Set Baud Rate (06h)
Erase Flash Sector (07h)
Verify Image CRC (08h)
Start Bootloader (09h)
Get Current Program (0Ch)
Write Flash Sector (0Dh)
Get Sector Size (0Eh)
Address, Sector,
bytes
noneAcknowledgeYN
noneAcknowledgeYN
Baud RateAcknowledgeYY
Sector Number ,
password
noneAcknowledgeYN
noneAcknowledgeNY
none1 Byte indicating
Sector enum, memory
offset, length, data to
write
Sector enumSize of sector in
DataYN
AckYN
YY
program currently
running
noneYN
YN
bytes
0x0F
Modify Flash Sector (0Fh)
Sector enum, memory
offset, length to read
Data in flashYN
38Command Set
Boot Loader Commands
Flash Read Sector (02h)
The Flash Read Sector command reads the contents of flash from the specified sector
and offset address. Since the length of the Microprocessor reply packet is limited to 248
bytes, reading the application firmware data requires multiple read commands.
Note
Length is defined as the num be r of 16- b it wo rd s, an d the maximum value of
length is 124 words.
In this example, the sector number 02 indicates the application area. This command
reads the first five data elements of the application, which is equivalent to the original
command (using data length of 05). The sect or codes can be found in Flash Memory
Sector Mapping..
FF0602000000000205FA59
SOHLengthOpCodeStart AddressSectorNum Bytes To ReadCRC
The reply to this command looks like this
FF0A0200000123456789ABCDEF0123BCED
SOHLengthOpCodeStatus
1.Word 1 contains the data located at address 0x208000.
2.Word 2 contains the data at ad dre ss 0x208001, and so forth. (Remember that the Microproce sso r dat a is wo rd a ddre ssed.)
1
Word 1
2
Word 2
Word 3Word 4Word 5CRC
Get Boot Loader/Firmware Version (03h)
The Get Boot Loader command returns the Boot Loader, Hardwar e, and Application
version numbers. The Boot Loader, Hardware, and Application FW version numbers are
stored in flash. The Boot Loader and Hardware version numbers are each 32-bit
numbers. The application has a 96-bit version code. The command to retrieve firmware
version is shown in the following table.
FF00031D0C
SOHLengthOpCodeCRC
Command Set39
Boot Loader Commands
Responses
A sample response for the M6e-TC is as follows:
FF1403000007091700010000012007101209051200
SOHLengthOpCodeStatusBootLoader VerHardware VerFirmware DateFirmware Version
000000106BCC
Supported ProtocolsCRC
The following information is embedded in the reply to the command:
The boot loader version is 07.09.17. 00. This number is in hex format.
HW Version is 01000001. For a definition, see Returned HW Versions.
The application firmware was compiled on 2007-October-12.
The application firmware versi on is 09.05.12.00. This number is in hex format.
The protocol supported by this firmware – Gen2 and ISO 18000-6C.
Returned Hardware Version Table
The following table provides a definition of each HW version returned by the Get Boot Loader/Firmware Version command.
Returned HW Versions
ModuleDefinedVersionDescription
M6e-TCHW_VERID_1_0W0x10000001A0 and B0 prototypes
If the Get Boot Loader/Firmware Version command returns a dif ferent val ue than those
listed in the table, you should contact support@thingmagic.com
.
Boot Firmware (04h)
The Boot Firmware command tells the boot loader to run the current firmware image
stored in flash in the following sequence:
1. If flash is locked application firmware is run.
40Command Set
Boot Loader Commands
1. If flash is not locked: the application f irmware i mage CRC veri fied and flash i s lo cked
before it is run.
2. If the image is invalid, a fault code is returned to the host.
3. If the application firmware is started successfully, it sends the response to the Boot
Firmware command.
FF00041D0B
SOHLengthOpCodeCRC
The response is identical to the response to a Get Version command, except that
the OpCode is 0x04 instead of 0x03.
Note
The Applicati on Firmware boot up time takes ap proximately 600ms the f i rst
time it is run after a new firmware installation. Subsequent boot up times will
be approximately 50ms.
Set Baud Rate (06h)
The Set Baud Rate command has a default baud rate of 9600 bps. Since the code
method of specifying the baud rate is processor dependent, a new interface was created
to make the modules easily interchangeable.
The following table shows the hexadecimal equi valent for each baud rate:
In the following example, the baud rate is specified as a 32-bit value. This example sets
the baud rate to 115200:
FF04060001C200FD30
SOHLengthOpCodeBaud RateCRC
The response to baud rate change is sent at the baud rate that the Set Baud Rate
command was transmitted. Once the baud rate has changed, t he new rate i s in ef fect until
the baud rate is changed by power cycling the reader. The baud always reverts to 9600
after a power cycle.
Note
Set baud rate has no effect on the USB interface speed, only the RS232
interface, whether executed from the RS232 interface or USB.
42Command Set
Boot Loader Commands
Erase Flash Sector (07h)
The Erase Flash Sector command erases the sector specified by the sector number. as
defined by Flash Memory Sector Mapping
.
The following example shows the command to erase sector 2 of the flash.
FF050708959121027F91
SOHLengthOpCodePasswordSectorCRC
Verify Image CRC (08h)
After uploading a new application fi rmware image, the application CRC can be checked
with the Verify Image CRC command. The application CRC is already embedded in the
firmware image, so this command cal culates the f irmware’ s CRC in f lash and comp ares it
to the pre-stored value. It returns a fault code if the application firmware fails the CRC
checks. A failed CRC means that the application cannot run, and needs to be
downloaded again.
FF00081D07
SOHLengthOpCodeCRC
The boot loader runs this command automatically before loading the application the first
time it is l run. If the CRC check fails, the boot load er does not run the application to
prevent corrupted code from executing on the Microprocessor. Subsequent invocations
will not verify the CRC since the flash is locked.
Start Bootloader (09h)
The Start Bootloader command shuts off the analog board and starts the boot loader
while inside the application. This is necessary to perform an upgrade of the firmware
while the system is running.
FF00091D06
SOHLengthOpCodeCRC
Command Set43
Boot Loader Commands
Get Current Program (0Ch)
The Get Current Program command returns a code for the current program being
executed in the module. These codes are defined as follows:
CodeProgram
0x21M6e-TC Bootloader
0x22M6e-TC Application
To get the current program command, send the following to the module:
FF000C1D0C
SOHLengthOpCodeCRC
The module responds as follows, indicating that it is the application program:
FF010C000022????
SOHLengthOpCodeStatusProgramCRC
Write Flash Sector (0Dh)
The Write Flash Sector command is used to write data to the flash memory. Before
writing to flash it is imperative that the flash be erased first. Attempting to write to flash
before it is erased will generate an error. Alternatively the Modify Flash Sector (0Fh)
command can be used.
Loading an Application Image
A series of write flash commands is used to load a new application program image into
flash. The Write Flassh Sector command verifies the CRC of the received data but does
not verify the CRC of the complete application image. Use the Verify Image CRC (08h)
command to verify the application once it i s uploaded.
The start address is a 32-bit se ctor offset address. It is a word address, that is different
from the byte address used for instr uction memory. The application code must be loaded
44Command Set
Boot Loader Commands
starting from word address 0x00000000. Since the flash is a 16-bit device, there must be
an even number of dat a bytes. Th e number of dat a bytes to be written is embedded in th e
length of the payload (N) by the formula:
LengthDataToWriteInWords = (N – 8) / 2
The password required for each sector is defined in Flash Memory Sector Mapping
.
The following example shows a Write Flash Sector command writi ng to the Application
Sector, starting at the beginning
FF0F0D022544100000000002123456789012734C
SOHLengthOpCodePasswordStart AddressSectorData T o WriteCRC
Note
DO NOT send a packet that spans two sectors. Split the packet into 2
separate messages, then send the first message to sector “x” and the
second to sector “x+1”.
Get Sector Size (0Eh)
The size of a flash sector can be retrieved from the module using the Get Sector Size
command. Since different prod ucts may have dif ferent flash sector si zes, this command is
useful for ensuring that the module has enough memory to store the desired data. This
example receives the sector size for the application area:
FF01OE02D1BF
SOHLengthOpCodeSectorCRC
The response to this command is shown in the following example:
FF04OE00 00000340008854
SOHLengthOpCodeStatusSize of SectorCRC
The size of the sector is returned in bytes. Sector 2 (application) is 212992 bytes.
Modify Flash Sector (0Fh)
The Modify Flash Sector command is used as a read-modify-write operation in the
flash. Since the Modify Flash Sector command erases the flash sector each time it is
Command Set45
Boot Loader Commands
called, it could prematur ely wear out the flash i f it i s used too of ten. This command s hould
only be used to modify a few variables (that is less than one seri al packet’s worth) at a
time.
This command works only for the User area.
FF0F0F7913876600000000031234567890124CFA
SOH Length OpCodePasswordStart AddressSectorData To WriteCRC
46Command Set
Multi-Protocol Tag Commands
The application commands are used to interact with RFID t ags in the field. These
commands can have slightly differ ent behavior based upon the current protocol selected
in the system.
Applications Commands
OpCodeCommand Name
Multi-Protocol Tag Commands
0x29
0x2A
0x2F
Get Tag Buffer (29h)
Clear Tag Buffer (2Ah)
Multi-Protocol Tag Read (2Fh)
Get Tag Buffer (29h)
After a Multi-Protocol Tag Read command is executed, the found tags are stored in an
internal Tag Buffer
operations depending on the syntax used. These operations are:
Get tags remaining in the tag buffer
Get tag EPCs
Get tag EPCs and their Tag Read Meta Data.
Get Tags Remaining
To determine the number of tags remaining in the buffer, send the Get Tag Buffer
command with a data length of zero:
. The Get Tag Buffer command can perform several different
FF00291D26
SOHLengthOpCodeCRC
This command returns the current read index, the location of the next t ag to be read, and
the current write index, the locati on where the next tag will be written. These t wo numbers
can be used to get the number of tags left in the tag buffer:
47
Multi-Protocol Tag Commands
Tags Left = WriteIndex - ReadIndex
The following response shows there are three tags left in the buffer, and the first one has
already been read (the read index parameter starts counting from 0.):
FF0429000000 0100 048772
SOHLengthOpCodeStatusReadIndexWriteIndexCRC
Get Tag EPCs
When you want to get the tag EPCs out of the buffer and don’t care about the tag read
metadata, the options available with this syntax maybe useful. This syntax reads out the
requested number of tags from the buffer. A maximum of 13 tags are read at a time, less
if Max EPC Length is set to 496 bi ts. Mult iple Get Tag Buffer commands may be required
to obtain the complete result s from a single Multi-Protocol Tag Read command. If more
tags are requested than remain in the buffer an error will be returned.
All tag buffer indexes are encoded as 16-bit unsigned integers. The indexes start
counting from 0. Thus, a start index of 0 indicates tag #1, and a start index of 10 would
indicate tag #11.
There are two ways to read tag EPCs out of the buffer when you only want EPC values.
The first way is to send a Get Tag Buffer command with the desired number of tags, n.
This retrieves the next n tags, starting from the current read index. In the previous
example, the read index was 1, indicat ing th at one tag was already read. To read the next
two tags, set the number of tags p arameter s to 2. This returns tags number 2 and 3 in the
tag buffer:
FF0229000257EB
SOHLengthOpCode# Tag IDs to ReturnCRC
When using the Get Tag Buffer command in this way, the read index is automatically
incremented internally. Thus, if the read index was ‘1’ before getting two tags, then it is
incremented to ‘3’ at the end of this command.
Another way to get the second and third tags is to explicitly send the start and end
indexes of the tags to read. This is used to ret rieve any contiguous block of tag buffer
entries at any time.
48
Multi-Protocol Tag Commands
FF042900 0100 03CC94
SOHLengthOpCodeStart IdxEnd IdxCRC
Using the start and end index method does not af fect the read index that is internally
stored in the module. The above request returns a message with two tags. The length of
each tag EPC record returned is defined based on the max EPC length configured with
Set Reader Configuration(9Ah)
and fields of the EPC portion of a tag buffer entry is defined in the Tag B uffer Entry
, regardless of the size of a specific tag’s EPC. The sizes
table.
For example:
A 64-bit tag has the length set to 0x60 (16-bit PC + 64-bit t ag EPC + 16-bit t ag CRC),
but only the first 12 bytes of th e tag recor d is filled in, th e trail ing bytes, af ter t he CRC
are padded with zeros.
An 96-bit GEN2 tag, the l ength i s 0x80 (16- bit PC (Pro toco l Contr ol) wor d + 96 -bi t tag
EPC + 16-bit tag EPC CRC).
In the response below, two tag EPCs are returned. Tag #1 is a 96-bit EPC tag and t ag #2
is a 64-bit EPC tag.
FF24290000
SOHLengthOpCodeStatus
008030001111222233334444555566661835
EPC
Length
006020001111222233334444C24100000000
EPC
Length
PC WordTag EPCTag CRC
PC WordTag EPCTag CRCPadding
D332
CRC
Note
Using this syntax the number of tags in the response is not specified. It must
be determined by the message length.
49
Multi-Protocol Tag Commands
Get Tag EPCs and Metadata
Using this syntax for getting information from the tag buffer provides several benefits:
When at t ag EPC is returned there is no paddi ng if the actual tag EPC is shorter than
the configured max EPC length. This helps minimize the amount of data returned.
Any or all fields of the Tag R ead M eta Data can be returned.
In the event of a commu nic ation err or th e last Get EPC and Metada ta r equest can be
repeated.
When data is requested using this syntax the response will contain as many tags as can
be fit in the response packet. The response will indicate how many tags were returned
and should be processed accordingly.
This version of Get Tag Buffer takes two additional fields: the Metadata Flags which
defines what metadata will be returned and the Read Options which specifies special
read functionality. The following table lists the supported values for t hese fields.
Get EPC and Metadata Request Fields
FieldValueDescription
Metadata Flags
(to specify more
than one OR
the values
together)
0x0000When no flags are set no meta data will be returned, only the tag
EPC (including PC bits and tag CRC)
0x0001When bit 0 is set the Read Count will be returned
0x0002When bit 1 is set the LQI/RSSI will be returned
0x0004When bit 2 is set the Antenna ID will be returned
0x0008When bit 3 is set the Frequency will be returned
0x0010When bit 4 is set the Timestamp will be returned
0x0020RFU (ThingMagic Only)
0x0040
When bit 6 is set the Protocol ID, as defined by the
IDs table, will be returned
Tag Protocol
50
Multi-Protocol Tag Commands
FieldValueDescription
Read Option0x00Read the next set of tags from the Tag Buffer
0x01Re-send the last set of tags.
Note: When setting this option the tags will be resent
starting at the same ReadIndex as the last
command. If the metadata requested is different
than the last request the number of tags returned
might be different. To get those ‘missing’ tags,
additional Get Tag Buffer commands should be sent
without the re-send option, otherwis e it will reset the
ReadIndex again.
51
Multi-Protocol Tag Commands
Examples
An example command requesting Read Count, AntennaID and Timestamp Metadata
Flags = 0x0001 OR 0x0004 OR 0x0010 = 0x0015 is as follows:
FF03290015009755
SOHLengthOpCodeMetadata FlagsRead OptionsCRC
A response contains the followin g inf o rmation:
Get EPC and Metadata Response Fields
FieldLengthValue
SOH1 byte0xFF
Length1 byteBased on data returned
OpCode1 byte0x29
Metadata Flags2 bytesMetadata contained in response
Read Options1 byteAs sent in request
Tag Count1 byteNumber of tags in response
Read Count1 byteTag EPC/Antenna Read Count
RSSI
1
Antenna ID
1
1 byteReturn Signal Strength Indicator
1 byteAntenna ID, 4 MSBs for TX and 4
LSBs for RX
Frequency
Timestamp
1
1
3 bytesFrequency in kHz
4 bytesRTC Timestamp
52
Multi-Protocol Tag Commands
FieldLengthValue
RFU
1
2 bytesReserved for Future Use - ThingMagic
Only
Protocol ID1 byteProtocol ID of tag read
EPC Length2 bytesNumber of bits in EPC including PC
and CRC bits
PC Word2 bytesTag EPC Protocol Control bits
EPC IDN bytesTag EPC.
Tag CRC2 bytesTag EPC CRC
Repeat fields starting at Read Count for remaining tags in message as defined
by Tag Count
CRC2 bytesM essage CRC
1 - Conditionally returned depending on the Metadata Fields specified in the request.
Here is an example response to the example request specified above. The response
contains two tags as specified in the Tag Count field each with its EPC info and requested
tag read metadata: Read Count, AntennaID and Timestamp:
FF3429000000 15 00
02
SOHLengthOpCodeStatusMetadata
22110250CEF6008031C1111122223333444455556666FB15
Read
Count
Read
Count
Ant
ID
OE11041D3D3C008030000500000000000000000023544AC8
Ant
ID
TimestampEPC
Length
TimestampEPC
Length
Flags
PC WordTag EPCTag CRC
PC WordTag EPCTag CRC
Read
Options
Tag
Count
1AB8
CRC
53
Multi-Protocol Tag Commands
Clear Tag Buffer (2Ah)
The Clear Tag Buffer command res ets the tag buff er . This clears the buff er of any current
tags and reset the read index to 0. A Multi-Protocol Tag Read or Read Tag Multiple
command must be issued to load new tags into the buffer.
FF002A1D25
SOHLengthOpCodeCRC
If Clear Tag Buffer or Get Tag Buffer is not used after a Multi-Protocol Tag Read to
remove all tags, old tags wi ll be left in the buffer. This means that if tags that have not
been removed from the buffer are read again they will not be added to the buffer as
second time, only their Read Count will be incremen ted.
Multi-Protocol Tag Read (2Fh)
The Multi-Protocol Tag Read command allows tag reading and inventorying commands to
be performed on tags with different protocols at the same time, using a single command.
This command contains the following request fields:
Multi-Protocol Tag Read Request Fields
FieldValueDescription
TM OpCode0x2FTM OpCode indicating a multi-protocol opera-
tion.
Timeout[2 bytes]Indicates how long the entire command
should spend attempting the operation, in milliseconds. When TM Option=0x00 the time
gets divided equally across each proto col
specified.
TM Options• 0x00 = Basic Multi-protocol search.
Uses Protocol Bitmask
Command Opcode• 0x00 - reserved
• 0x21 - tag read single
• 0x22 - tag read multiple
Indicates the operation to perform and additional fields that will be required.
Indicates the command that will be performed
for each protocol specified.
Note: Allegro/Title-21 is not supported
with tag read multiple.
54
Note: Allegro/Title-21 uses Read Request
(28h; C003h) for tag read single.
Multi-Protocol Tag Commands
FieldValueDescription
Search Flags[2 bytes - bitwise setting]
Bit 0 = Enable end on tags found
Note: Least Significant Bit = bit 0
TM Option = 0x00 Fields - The following field is only used when TM Option = 0x00
Protocol Bitmask
Enables
[4 bytes - bitwise setting]
bit 0-3 = not used
bit 4 (0x00000010) = Gen2
bit 5-25 = not used
bit 26 (0x04000000) = eGo
bit 27 (0x08000000) = SeGo
bit 28 (0x10000000) = ATA
bit 29 (0x20000000) = Allegro/Title-21
Indicates search options. When bit is set = 1
the option will be enabled.
• Bit 0 = 1 (0x01) the search will stop after
the first tag is found, after completing that
protocols entire timeout. i.e. if 4 protocols
are specified with a 100ms timeout and a
tag is found during searching on the
second protocol the remaining protocols
will not be sear ched and the command w ill
return after 50ms.
Bit 0 = 0 all protocols will be searched,
using entire timeout.
Indicates the protocols to operate on. If the
protocols bit is set to ‘1’ tags of that protocol
will be included in the operation.
OR values together for final setting
Note: Least Significant Bit = bit 0
55
Multi-Protocol Tag Commands
Examples
TM Option = 0x00 Request
FF??2F????00???? ???? ?? ?? ???? ??
SOHLengthOpCodeTimeoutTM
Options
Response
FF??2F????00???? ??
SOHLengthOpCod
e
StatusTM
??????????....
Protocol
Id1
??????????....
Protocol
Id2
Option
Protocol
Response
Length
Protocol
Response
Length
Cmd
Opcode
Protocol Response Data
(Includes Status word)
Protocol Response Data
(Includes Status word)
Cmd
Opcode
Search
Flags
????
CRC
Search
Flags
Protocol
Bitmask
Enables
CRC
Note: If a multi-protocol Tag Read Single (command code 0x21) search results in zero tags
found it will not be reported. Only successful searches are reported.
56
Allegro/Title-21 Tag Commands
The Allego/Title-21 tag commands are used to operate on Allegro/Title-21 tags and
perform operations specific to those tags. These commands can only be used when the
Tag Protocol of the reader is set to Allegro/Title-21 (0x001E) using Set Current Tag
Protocol (93h). These commands cannot be run when in Bootloader mode, only in
All Allegro/T itle-21 tag commands, except Read Tag ID Single, follow the same standard
syntax. The commands are grouped into three Thi ngMagic M6e-TC OpCodes, as defined
in the Allegro/Title-21 Tag Commands
addition to the 1 of 3 OpCodes each command will have the following fields:
Standard Request Fields
FieldValueDescription
TM OpCode0x24TM OpCode
Timeout[2 bytes]Indicates how long the command should spend
TM Options0x00Reserved for Future Use.
Transaction Type Code[2 bytes]Allegro/Title-21 code indicating operation to per-
table, indicating their general operation type. In
attempting the operation, in milliseconds.
form.
The remaining fields for each command are as defined by Transcore based on the
Transaction Type Code. They occur in the same order and require the same values as
described in the [Transcore doc reference].
58
Allegro/Title-21 Tag Commands
Read Tag ID Single (21h)
The Read Tag ID Single/Tag Detect command performs a search operation and returns
the first Allegro/Title-21 tag it finds.
Read Tag ID Single Request Fields
FieldValueDescription
TM OpCode0x21TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempting
the operation, in milliseconds.
TM Options
Note: This and following
fields are optional.
Metadata Flags (to specify
more than one OR the values together)
Examples
An example, without TM Options, command:
Bit 4
(LSB=bit 0))
0x0000When no flags are set no meta data will be returned, only the
0x0001When bit 0 is set the Read Count will be returned
0x0002When bit 1 is set the LQI/RSSI will be returned
0x0004When bit 2 is set the Antenna ID will be returned
0x0008When bit 3 is set the Frequency will be returned
0x0010When bit 4 is set the Timestamp will be returned
0x0020When bit 5 is set the RFU (ThingMagic Only) will be returned
0x0040When bit 6 is set the Protocol is returned.
• 0 - Metadata flags must not be passed and Meta Data will
not be returned.
• 1 - Metadata flags must be passed and the corresponding
Metadata shall be returned with the tag EPC.
tag EPC.
FF022100 FAD61B
SOHLengthOpCodeTime-
out (ms)
CRC
59
ACK Response
FF042100 00????????????
SOHLengthOpCodeStatusTag IDCRC
NACK Response
No Response
Allegro/Tit le-21 Tag Commands
FF0021?? ??????
SOHLengthOpCodeStatusCRC
FF002104 00B483
SOHLengthTM
OpCode
StatusCRC
60
Allegro/Title-21 Tag Commands
Write Request (24h; A003h)
The Write Request command writes dat a to t he specified ar ea of t he specified tag. A nonacknowledge (NACK) error response shall be returned if an invalid password was
included in the request. This command contains the following request fields:
Write Request Fields
FieldValueDescription
TM OpCode0x24TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xA003Allegro/Title-21 code indicating operation to per-
form.
Options[1 byte]Command specific options
Page Number[2 bytes]Indicates which page of the tag is to be written to.
Tag ID[4 bytes]Optional, based on value of Options parameter.
Indicates the ID of the tag to operate on.
User Password/
Global Password
[4/8 bytes]Optional, based on the value of the Options param-
eter. The password to operation on the tag, if
required.
Page Data Byte Count[1 byte]Indicates the number of data bytes to follow.
Page Data Bytes[N bytes]Data to write to the tag.
Examples
An example command requesting ? be written to tag ? with a User Password = 0x? is:
FF0E + N24?? ??00A0 03???? ??
SOHLengthTM
OpCode
?????????? ?? ?? ????NNNN????
Timeout
(ms)
TM
Option
Transaction
Type Code
OptionPage
Number
Tag IDUser/Global
Password
Page
Data
Count
Page DataCRC
61
ACK Response
Allegro/Tit le-21 Tag Commands
FF
SOHLengthTM
0C +
(N+1)
2400 0000A0 03???????????? ???? NNNN????
OpCode
FF0B2404 0A00A0 03??
SOHLengthTM
Title-21 ACK Request (24h; C000h)
StatusTM
Option
NACK Response
OpCode
No Response
Transaction
Type Code
StatusTM
FF002404 00E426
SOHLengthTM
OptionsTag IDPage
Option
Transaction
Type Code
OpCode
OptionsTag IDCRC
StatusCRC
???????
Number
Page Data
Count (if
requested)
?
Page DataCRC
????
62
The Title-21 ACK Request command informs the tag that the reader has successfully
received the tag ID. This will result in the tag not responding to any message whose
transaction type is identical to the most recent ly received message for a specified period
of 10 seconds, as defined in Title 21 release 1. This command contains the following
request fields:
Allegro/Title-21 Tag Commands
Title-21 ACK Request Fields
FieldValueDescription
TM OpCode0x24TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xC000Allegro/Title-21 code indicating operation to per-
form.
Tag ID[4 bytes]Indicates the ID of the tag to operate on.
Reader ID[4 bytes]The reader number for the reader that is acknowl-
edging the receipt of the message.
Transaction Status Code[2 bytes]Code indicating the status of the transaction.
Examples
An example command requesting an ACK from tag XXX from reader XXX is:
FF0D24?? ??00C0 00????????????????????????
SOHLengthOpCodeTime-
out (ms)
ACK Response
FF0324?? ??00C0 00????
SOHLengthTM
NACK Response
FF0B24?? ??00C0 00??????????????
SOHLengthTM
OpCode
TM
Option
Transaction
Type Code
OpCode
StatusTM
Option
Tag IDReader IDTransaction
StatusTM
Option
Transaction
Type Code
Status Code
Transaction
Type Code
OptionsTag IDCRC
CRC
CRC
63
No Response
Allegro/Tit le-21 Tag Commands
FF002404 00E426
SOHLengthTM
OpCode
StatusCRC
General ACK Request (24h; F00Fh)
The General ACK Request, or Sign Off Request, command informs the tag that it should
not respond to any commands from the reader for the specified time period. This
command contains the following request fields:
General ACK Request Fields
FieldValueDescription
TM OpCode0x24TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xF00FAllegro/Title-21 code indicating operation to per-
form.
Options[1 byte]Command specific options
64
Tag ID[4 bytes]Indicates the ID of the tag to operate on.
Time Out[1 byte]Indicates the amount of time the tag shall ignore
commands from the reader, in seconds from 0-127.
Condition Code Bits[1 byte]Represents a condition applicable to a tolling envi-
ronment.
LCD Message Page Pointer[1 byte]Tag memory page where the LCD message to be
displayed is stored in ASCII. Valid range = 0x02 -
0x0F.
Allegro/Title-21 Tag Commands
Examples
An example command requesting an ACK from tag XXX from reader XXX is:
FF0C24?? ??00F0 0F????????????????????
SOHLengthOpCodeTimeout
(ms)
ACK Response
FF0324?? ??00F0 0F????
SOHLengthTM
NACK Response
FF0A24?? ??00F0 0F??
SOHLengthTM
No Response
OpCode
TM
Option
Transaction
Type Code
OpCode
StatusTM
Option
FF002404 00E426
SOHLengthTM
OptionTag IDTime
StatusTM
Option
Transaction
Type Code
OpCode
Transaction
Type Code
OptionsTag IDCRC
StatusCRC
Out
CRC
???????
Condition
Code
?
????
LCD
Page
Ptr
CRC
T itle-21 Read Request (28h; 8000h)
The Title-21 Read Request command reads the Title-21 tag ID from the tag. This
command contains the following request fields:
65
Allegro/Tit le-21 Tag Commands
Title-21 Read Request Fields
FieldValueDescription
TM OpCode0x28TM OpCode for Read operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0x8000Allegro/Title-21 code indicating operation to per-
form.
Agency Code[2 byte]Agency operating the reader installation.
Examples
An example command requesting an ACK from tag XXX from reader XXX is:
FF0428?? ??0080 00?? ??????
SOHLengthOpCodeTime-
out (ms)
TM
Option
Transaction
Type Code
Agency
Code
CRC
ACK Response
FF0A2800 000080 00????????????
SOHLengthTM
OpCode
StatusTM
Option
Transaction
Type Code
Tag IDCRC
NACK Response
FF0B28?? ??0080 00????
SOHLengthTM
OpCode
StatusTM
Option
Transaction
Type Code
CRC
No Response
FF002804 0025AA
SOHLengthTM
OpCode
StatusCRC
66
Allegro/Title-21 Tag Commands
Read Request (28h; C003h)
The Read Request command reads data fr om the specified are a of the specified tag. This
command contains the following request fields:
Read Request Fields
FieldValueDescription
TM OpCode0x28TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xC003Allegro/Title-21 code indicating operation to per-
form.
Options[1 byte]Command specific options.
• Determines whether the AntiPlayBack/BIST
data will be included in the response.
Start Page Number[2 bytes]Indicates which page of the tag is to be read.
Page Count[1 byte]Number of pages to read.
Tag ID[4 bytes]Optional, based on value of Options parameter.
Indicates the ID of the tag to operate on.
User Password/
Global Password
[4/8 bytes]Optional, based on the value of the Options param-
eter. The password to operation on the tag, if
required.
The Random Number Request command requests a 32-bit random number from the
specified tag which is used in the P/W authentication scheme. This command also
specifies which page is to be read or written to with the encrypted P/W on the next cycle.
This command contains the following request fields:
68
Allegro/Title-21 Tag Commands
Random Number Request Fields
FieldValueDescription
TM OpCode0x28TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xD001Allegro/Title-21 code indicating operation to per-
form.
Options[1 byte]Command specific options
Tag ID[4 bytes]Indicates the ID of the tag to operate on.
Page Number[2 bytes]Species which page is to be operated on in the next
transaction.
Next Command[2 bytes]Specifies which command the reader will be send-
ing ot the tag on the next transaction, by Transac-
tion Type Code. Only Read and Write Request
commands are supported.
Examples
An example command:
FF0C28?? ??00D0 01??
SOHLengthTM
OpCode
ACK Response
FF?? + N2800 0000D0 01?????????? ??????
SOHLengthTM
NACK Response
FF0B2804 0A00D0 01??????????????
SOHLengthTM
Timeout
(ms)
OpCode
OpCode
TM
Option
StatusTM
StatusTM
Transaction
Type Code
Option
Option
OptionTag IDPage
Transaction
Type Code
Transaction
Type Code
???????
Random NumberATA
OptionsTag IDCRC
?? ???? ??????
?
Page
Number
Next Com-
mand
CRC
Number
CRC
69
No Response
Allegro/Tit le-21 Tag Commands
FF002804 0025AA
SOHLengthTM
OpCode
StatusCRC
TDMA Read Request (28h; E003h)
The TDMA Read Request command returns the tag ID from the first tag to respond
only. This command contains the following request fields:
TDMA Read Request Fields
FieldValueDescription
TM OpCode0x28TM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xE003Allegro/Title-21 code indicating operation to per-
form.
Options[1 byte]Command specific options
70
Number of Slots[1 byte]Specifies how many slots are available for the tags
to choose from. Valid values from 0x01-0xFF
Examples
An example command is:
FF??28?? ??00E0 03????????
SOHLengthTM
OpCode
ACK Response
FF0B2800 0000E0 03??????????????
SOHLengthTM
OpCode
Timeout
(ms)
StatusTM
Option
TM
Option
Transaction
Type Code
Transaction
Type Code
OptionNumber
OptionTag IDCRC
of Slots
CRC
Allegro/Title-21 Tag Commands
NACK Response
FF0B2804 0A00E0 03??????????????
SOHLengthTM
OpCode
StatusTM
Option
Transaction
Type Code
OptionsTag IDCRC
No Response
FF002804 0025AA
SOHLengthTM
OpCode
StatusCRC
Jump to Reset Request (2Ch; D203h)
The Jump to Reset Request command requests the tag perform a hard reset. The reset
will occur the same as a hardware reset and the decis ion is made by the t ag to perfor m a
cold boot or a warm boot by analyzing the first 32 bits of p age 0000 in the tag. If the bits
are all 0s or all 1s, then a cold boot will be performed, otherwise a warm boot will occur.
This command contains the following request fields:
Jump to Reset Request Fields
FieldValueDescription
TM OpCode0x2CTM OpCode for tag modification operations
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x00Reserved for Future Use.
Transaction Type Code0xD203Allegro/Title-21 code indicating operation to per-
form.
Examples
An example command is:
FF052C?? ??00D2 03????
SOHLengthTM
OpCode
Timeout
(ms)
TM
Option
Transaction
Type Code
CRC
71
NACK Response
Allegro/Tit le-21 Tag Commands
FF002C04 00652E
SOHLengthTM
OpCode
StatusCRC
72
eGo/SeGo Tag Command Set
The eGo/SeGo tag commands are used to operate oneGo/SeGo tags and perform
operations specific to those tags. These commands can only be used when the Tag
Protocol of the reader is set to eGo/SeGo (0x001B or 0x001C) using Set Current Tag
Protocol (93h). These commands cannot be run when in Bootloader mode, only in
Application mode.
eGo/SeGo Tag Commands
OpCodeCommand Name
eGo/SeGo Tag Command Set
0x21
0x22
0x24
0x25
0x28
0x2D
Read Tag ID Single (21h)
Read Tag ID Multiple (22h)
Write Tag Data (24h)
Lock Tag Data (25h)
Read Tag Data (28h)
Custom Tag Operations (2Dh)
73
eGo/SeGo Tag Command Set
Command Syntax
All eGo/SeGo tag commands follow the same standard syntax. Each command has the
following common fields followed by additional fields required for the specific operation
being performed:
Standard Request Fields
FieldValueDescription
TM OpCode0xXX
TM OpCode as defined in
eGo/SeGo Tag Com-
mands
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x01Must be set to 0x01, indicating Command Type and
eGo/SeGo specific fields to follow.
Command Type[1 byte]Depending on the operation indicates either the
Group Select Options to apply or a specific sub-
command.
Group Select Options
The following table defines the Command Type values to use for the desired Group
Select Option when performing a Read Tag ID Single (21h)
Write Tag Data (24h)
. The Group Select Option along wi th the Select Fi elds (Byte Address,
Byte Mask and Word Data) determine which tags will respond to the specifi ed query.
Group Select Options
Command
Type Value
Group Select OptionTag Selection Behavior
, Read Tag ID Multiple (22h) or
74
0x00GROUP_SELECT_EQAll tags in the field whose data EQUALS the
specified Select Fields will respond.
0x01GROUP_SELECT_NEAll tags in the field whose data does NOT
EQUAL the specified Select Fields will
respond.
0X02GROUP_SELECT_GTAll tags in the field whose data is GREATER
THAN the specified Select Fields will
respond.
eGo/SeGo Tag Command Set
Command
Type Value
0X03GROUP_SELECT_LTAll tags in the field whose data is LESS
0X04GROUP_UNSELECT_EQAll tags except those in the field whose data
0X05GROUP_UNSELECT_NEAll tags except those in the field whose data
0X06GROUP_UNSELECT_GTAll tags except those in the field whose data is
0X07GROUP_UNSELECT_LTAll tags except those in the field whose data is
Group Select OptionTag Selection Behavior
THAN the specified Select Fields will
respond.
EQUALS the specified Select Fields will
respond.
does NOT EQUAL the specified Select Fields
will respond.
GREATER THAN the specified Select Fields
will respond.
LESS THAN the specified Select Fields will
respond.
75
eGo/SeGo Tag Command Set
Read Tag ID Single (21h)
The Read Tag ID Single command executes a query for tags matching the criteria
specified by the Command Type and subsequent fields and returns the first tag found.
Read Tag ID Single Request Fields
FieldValueDescription
TM OpCode0x21TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempt-
ing the operation, in millisecon ds .
TM OptionsBit 0• 1 - Indicates Command Type and additional fields to
Bit 4
(LSB=bit 0))
Metadata Flags (to specify
more than one OR the values together)
Command Type[1 byte]Indicates the Group Select criteria to apply as defined in
0x0000When no flags are set no meta data will be returned,
0x0001When bit 0 is set the Read Count will be returned
0x0002When bit 1 is set the LQI/RSSI will be returned
0x0004When bit 2 is set the Antenna ID will be returned
0x0008When bit 3 is set the Frequency will be returned
0x0010When bit 4 is set the Timestamp will be returned
0x0020When bit 5 is set the RFU (ThingMagic Only) will be
0x0040When bit 6 is set the Protocol is returned.
follow.
• 0 - Metadata flags must not be passed and Meta
Data will not be returned.
• 1 - Metadata flags must be passed and the
corresponding Metadata shall be returned with the
tag EPC.
only the tag EPC (including PC bits and tag CRC)
returned
Group Select Options.
Byte Address[1 byte]
Byte Mask[1 byte]
Word Data[8 bytes]
76
eGo/SeGo Tag Command Set
Examples
An example command:
FF0E21?? ??0100????????????????????????
SOHLengthOpCodeTime-
out (ms)
TM
Option
Command
Type
Byte
Address
Byte
Mask
Word DataCRC
ACK Response
FF0C21?? ??01??????????????????????????
SOHLengthOpCodeStatusTM
Option
Command
Type
Tag DataCRC
NACK Response
FF0221?? ??01??????
SOHLengthOpCodeStatusTM
Option
Command
Type
CRC
No Response
FF002104 00B483
SOHLengthTM
OpCode
StatusCRC
Read Tag ID Multiple (22h)
The Read Tag ID Multiple command performs a search for the specified period of time
then returns the number of t ags that have been found. Af t erwards, multi ple Get Tag Buffer
(29h) commands can be sent to receive the found tag IDs.
Standard Syntax
The search criteria for the Standard Synt ax whic h allows contr ol over the select cri teri a is
specified by the Command Type and subsequent fields.
77
eGo/SeGo Tag Command Set
Read Tag ID Multiple Request Fields
FieldValueDescription
TM OpCode0x22TM OpCode
TM Options0x01Indicates Command Type and additional fields to follow.
Search Flags0x0000Reserved for Future Use.
Timeout[2 bytes]Indicates how long the command should spend attempt-
ing the operation, in millisecon ds .
Command Type[1 byte]Indicates the Group Select criteria to apply as defined in
Group Select Options.
Byte Address[1 byte]
Byte Mask[1 byte]
Word Data[8 bytes]
Examples
An example command requesting :
FF10220100 00?? ??00????????????????????????
SOHLengthOpCodeTM
Option
ACK Response
SOHLengthOpCodeStatusTM
NACK Response
Search
Flags
FF??22?? ??0100 00??????????
Timeout
(ms)
FF0222?? ??01??????
SOHLengthOpCodeStatusTM
Command
Type
Option
Byte
Address
Search
Flags
Option
Byte
Mask
Word DataCRC
Command
Type
Command
Type
Tag IDs
Detected
CRC
CRC
78
No Response
eGo/SeGo Tag Command Set
FF002204 0084E0
SOHLengthTM
OpCode
StatusCRC
Minimal Syntax
The Read Tag ID Multiple command can also be used in a reduced syntax format. In
this case only the Timeout is specified. This syntax performs a search for the specified
period of time with no selection criteria, returning the number of tags that have been
found.
Example
FF022203 E8E56A
SOHLengthOpCodeTimeout (ms)CRC
An example response is as follows:
FF012200000246BA
SOHLengthOpCodeStatus# Tag IDs FoundCRC
Write Tag Data (24h)
The Write Tag Data command writes data to a tag. The tag to write to, the loca tion and
the data to write are specified in the fields as defined below:
79
eGo/SeGo Tag Command Set
Write Tag Data Request Fields
FieldValueDescription
TM OpCode0x24TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempt-
ing the operation, in milliseconds.
TM Options
Note: T M O p ti o ns field
combines bits 0-4
indicating the
verification method
and bits 5 & 6 for
authentication
information. For
the final TM
Options setting,
the two “fields”
should be OR’d.
Command Type
Note: If TM Options bits
0-4=0 then the
Command Type is
implicity = 0x0D
and this byte
should not be
specified in the
request command.
[1 byte]
excluding bits
5 & 6
(LSB = bit 0)
• 0x00 = A READ is executed after the WRITE has
reported success for verification. Lock if requested.
Note: When 0x00 the Command Type is impli city =
0x0D and the Command Type 1 byte field
should be removed from the request
command.
• 0x01 = No verification is executed after WRITE reports
success.
• 0x02 = A READ_VERIFY is executed after the WRITE
reports success for verification.
• 0x03 = Only used with Command Type = 0x0E or
0x93. Indicates extra Select fields will be specified.
bits 5 & 6
(LSB = bit 0)
0x0DIndicates the eGo/SeGo Write by Byte operation will be
0x8DIndicates the eGo/SeGo Write by Page operation will be
0x0EIndicates the eGo/SeGo Write Multiple operation will be
0x93Indicates the eGo/SeGo Streamlined Group Select
Specify authentication method to use:
• 0x00 = authentication is disabled and Key values must
not be passed.
• 0x20 = RFU
• 0x40 = authent ic ati on i s en abl ed and Key values must
be passed.
• 0x60 = RFU
used.
used
used.
Equal Page Write operation will be used.
80
eGo/SeGo Tag Command Set
FieldValueDescription
Lock[1 byte]• 0x00 = no lock
• 0x01 = lock the data specified by Write Data
Write by Page won’t lock if authentication information is
not specified.
Write multiple won’t lock
Write Address[1|4byte]Indicates the start address of tag memory to be written:
• 4 Byte Address when TM Option = 0xX0
• 1 Byte Address otherwise
Select Command Type[1 byte]Indicates the Group Select criteria to apply as defined in
Group Select Options.
Only passed when TM Option=0x03.
For Command Type = 0x0E, indicates Select Type
For Command Type = 0x93, RFU
Select Address[1 byte]Only passed when TM Option=0x03.
Select Mask[1 byte]Only passed when TM Option=0x03.
For Command Type = 0x0E, indicates Select Mask
For Command Type = 0x93, RFU
Tag ID | Select Data[8 bytes]When:
Write Data[1|8 byte] Indicates the data to be written to the specified tag starting
at the specified address.
• 1 Byte when Command=0x0D and 0x0E
• 8 Bytes (1 page) when Command=0x8D and 0x93
Key Address[1 byte]Only passed when authentication enabled in TM Options.
Key Length in Bytes[1 byte]Only passed when authentication enabled in TM Options.
81
eGo/SeGo Tag Command Set
FieldValueDescription
Key[0-N bytes]Only passed when authe nti ca tio n enabl ed in TM Opti ons.
Note: Value passed with MSB first.
Examples
An example command requesting :
FF0F24?? ??010D??????????????????????????
SOHLengthOpCodeTimeout
(ms)
ACK Response
When Command Type = 0x0D or 0x0E,
SOHLengthOpCodeStatusTM
When Command Type = 0x8D
FF0A24?? ????8D
SOHLengthOpCodeStatusTM
When Command Type = 0x93
FF1 324?? ????93??
TM
Option
FF0 324?? ????0D | O E??????
Command
Type
LockWrite
Address
Option
Option
Tag IDWrite
Command
Type
Command
Type
Verified
Write Data
?? ?? ?? ??
?? ?? ?? ??
Verified Write
Data
?? ?? ?? ??
?? ?? ?? ??
CRC
????
CRC
?? ?? ?? ??
?? ?? ?? ??
Data
CRC
????
SOHLengthOpCodeStatusTM
Note
ACK Status will be:
0x0000 FAULT_SUCCESS_CODE
0x0403 FAULT_WRITE_PASSED_LOCKED_FAILED
82
Option
Command
Type
Tag ID
Length
Tag ID (length
defined by ID
Length)
Verified Write
Data
CRC
NACK Response
FF0224?? ??010D????
eGo/SeGo Tag Command Set
SOHLengthOpCodeStatusTM
Option
Command
Type
CRC
No Response
FF002404 00E426
SOHLengthTM
OpCode
StatusCRC
Lock Tag Data (25h)
The Lock Tag Data command locks and unlocks a tag’s memory locations. The tag to
(un)lock and memory location to be (un)locked are speci fied in the fields as defined
below:
Lock Tag Data Request Fields
FieldValueDescription
TM OpCode0x25TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempt-
ing the operation, in milliseconds.
TM Options
Note: TM Options field
combines bit 0
indicating general
processing
information and
bits 5 & 6
indicating
authentication
method. For the
final TM Options
setting, the two
“fields” should be
OR’d.
0x01Indicates Command Type and additional fields to follow.
bits 5 & 6
(LSB = bit 0)
Specify authentication method to use:
• 0x00 = authentic ation is disabl ed and Key value s must
not be passed.
• 0x20 = RFU
• 0x40 = authenticat ion is en able d and Key values must
be passed.
• 0x60 = RFU
83
eGo/SeGo Tag Command Set
FieldValueDescription
Command Type0x00Performs a QueryLock, immediate followed by an UnLock
0x01Performs a QueryLock, immediate followed by a Lock
0x0FLockByte operation. Performs QLock/Lock/QLock
0x10UnLock Byte. Performs QLock/UnLock/QLock
0x11QueryLock
0x8FLock Page. Performs QLock/Lock/QLock
0x90UnLock Page. Performs QLock/UnLock/QLock
Lock Address[1 byte]Indicates the address of tag memory to be (un)locked.
Tag ID[8 byte]Indicates the Tag ID of the tag to be (un)locked.
Key Address[1 byte]Only passed when authentication enabled in TM Options.
Key Length in Bytes[1 byte]Only passed when authentication enabled in TM Options.
Key[0-N bytes]Only passed when authentication enabled in TM Options.
Note: Value passed with MSB first.
Examples
An example command requesting :
FF0D25?? ??010F??????????????????????
SOHLengthOpCodeTimeout
(ms)
TM
Option
Command
Type
Lock
Address
Tag IDCRC
84
ACK Response
When Command Type = 0x00 or 0x01
FF0325?? ????00 | 01??????
eGo/SeGo Tag Command Set
SOHLengthOpCodeStatusTM
Option
Command
Type
(Un)Lock
Response
CRC
When Command Type = all others
FF0425?? ??????????????
SOHLengthOpCodeStatusTM
Option
Command
Type
Lock
Response
Query Lock
Response
NACK Response
FF0325?? ????????????
SOHLengthOpCodeStatusTM
Option
Command
Type
Lock
Response
No Response
FF002504 00F407
SOHLengthTM
OpCode
StatusCRC
CRC
CRC
Note
For eGo Plus tags a k ey must be provided for lock/ unlock operations. If a
key is not provided then the tag will not respond. In that case a
status=0x0400 is the expected command response.
Read Tag Data (28h)
The Read Tag Data command reads data from a tag. The tag to read from and the
location to read the data from are specified in the fields as defined below:
85
eGo/SeGo Tag Command Set
Read Tag Data Request Fields
FieldValueDescription
TM OpCode0x28TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempting the
operation, in milliseconds.
TM Options
Note: TM Options field
combines bits 0-4
indicating general
processing
information and
bits 5 & 6
indicating
authentication
method. For the
[1 byte]Indicates Command Type and additional fields to follow:
• 0x01 = For Standard Read Operations
bits 5 & 6
(LSB = bit 0)
Specify authentication method to use:
• 0x00 = authentic ati on is di sab le d and Key values must not
be passed.
• 0x20 = RFU
• 0x40 = authentication is enabled and Key values must be
passed.
• 0x60 = RFU
final TM Options
setting, the two
“fields” should be
OR’d.
Command Type0x0CeGo/SeGo Read, or Protected Read
0x0BeGo/SeGo Data_ Read
0x12eGo/SeGo Read_Verify
Note: Requires a Write to occur immediately before.
Note: Requires a Write to occur immediately before.
RFU[1 byte]Reserved for Future Use
Read Byte Count[1 byte]Number of bytes starting at Read Address to read. Can
request 1 to 8 bytes.
Read Address[1 byte]Indicates the start address of tag memory to be read.
86
eGo/SeGo Tag Command Set
FieldValueDescription
Tag ID | Select Data[8 bytes]When:
• Command Type = 0x0B, 0x0C, 0x12 or 0x92:
8 bytes = Tag ID
• Command Type = 0x80
[1 byte] = Selec t Ad d r es s
[1 byte] = Select Data
[6 bytes] = RFU
Key Address[1 byte]Only passed when authentication enabled by TM Options.
Key Length in Bytes[1 byte]Only passed when authentication enabled by TM Options.
Key[0-N bytes]Only passed when authentication enabled by TM Options.
Note: Value passed with MSB first.
Examples
An example command requesting :
FF0F28?? ??010C??????????????????????????
SOHLengthOpCodeT imeout
(ms)
TM
Option
Command
Type
RFURead
Byte
Count
Read
Address
Tag IDCRC
ACK Response
FF??28?? ??010C??????
SOHLengthOpCodeStatusTM
Option
Command
Type
Read
Data
CRC
When Command Type = 0x80
FF??28?? ????80??
SOHLengthOpCodeStatusTM
Option
Command
Type
Tag ID
Length
?? ?? ?? ??
?? ?? ?? ??
Tag ID (length
defined by ID
Length)
?? ?? ?? ??
?? ?? ?? ??
Read DataCRC
????
87
NACK Response
FF0228?? ??010C????
eGo/SeGo Tag Command Set
SOHLengthOpCodeStatusTM
Option
Command
Type
CRC
No Response
FF002804 0025AA
SOHLengthTM
OpCode
StatusCRC
Custom Tag Operations (2Dh)
The Custom Tag Operations command provides access to several eGo/SeGo tag
specific operations including: Fail, Success, Initialize, Resend, Read_All_Data,
Read_All_Lock, and RN_Request. The operation to be performed is indicated by the
Command Type field:
Custom Tag Operations Request Fields
FieldValueDescription
TM OpCode0x2DTM OpCode
88
Timeout[2 bytes]Indicates how long the command should spend
attempting the operation, in milliseconds.
TM Options0x01Indicates Command Type to follow.
Command Type0x08Fail
0x09Success
0x0AInitialize
0x15Resend
0x81RN Request
0x82Tag Authentication. When specified the Key fields
also must be passed.
0x83Mutual Authentication. When specified the Key
fields also must be passed.
eGo/SeGo Tag Command Set
FieldValueDescription
Key Address[1 byte]Only passed when Command=0x82 or 0x83.
Key Length in Bytes[1 byte]Only passed when Command=0x82 or 0x83.
Key[0-N bytes]Only passed when Command=0x82 or 0x83.
Note: Value passed with MSB first.
Examples
An example command requesting :
FF042D?? ??010C????
SOHLengthOpCodeTimeout
(ms)
TM
Option
Command
Type
CRC
ACK Response
FF052D?? ??010C?? ... NN????
SOHLengthOpCodeStatusTM
Option
Command
Type
Tag Data
(0-N based on
Command Type)
NACK Response
FF022D?? ??01??????
SOHLengthOpCodeStatusTM
Option
Command
Type
CRC
No Response
FF002D04 00750F
SOHLengthTM
OpCode
StatusCRC
CRC
89
eGo/SeGo Tag Command Set
90
ATA Tag Command Set
The ATA tag commands are used to perform operations specific to ATA tags. These
commands can only be used when the Tag Protocol of the reader is set to ATA (0x001D)
using Set Current Tag Protocol (93h)
mode, only in Application mode.
OpCodeCommand Name
. These commands cannot be run when in Bootloader
ATA Tag Commands
ATA Tag Command Set
0x21
0x22
Read Tag ID Single (21h)
Read Tag ID Multiple (22h) [Not yet
Implemented]
91
ATA Tag Command Set
Command Syntax
All ATA tag commands follow the same st andard syntax. Each command has the
following common fields followed by additional fields required for the specific operation
being performed:
Standard Request Fields
FieldValueDescription
TM OpCode0xXX
Timeout[2 bytes]Indicates how long the command should spend
TM OpCode as defined in
attempting the operation, in milliseconds.
ATA Tag C ommand s
92
ATA Tag Command Set
Read Tag ID Single (21h)
The Read Tag ID Single/Tag Detect command performs a search operation and returns
the first ATA tag it finds.
Read Tag ID Single Request Fields
FieldValueDescription
TM OpCode0x21TM OpCode
Timeout[2 bytes]Indicates how long the command should spend attempting
the operation, in milliseconds.
TM Options
Note: This and following
fields are optional.
Metadata Flags (to specify
more than one OR the values together)
Examples
An example, without TM Options, command:
Bit 4
(LSB=bit 0))
0x0000When no flags are set no meta data will be returned, only the
0x0001When bit 0 is set the Read Count will be returned
0x0002When bit 1 is set the LQI/RSSI will be returned
0x0004When bit 2 is set the Antenna ID will be returned
0x0008When bit 3 is set the Frequency will be returned
0x0010When bit 4 is set the Timestamp will be returned
0x0020When bit 5 is set the RFU (ThingMagic Only) will be returned
0x0040When bit 6 is set the Protocol is returned.
• 0 - Metadata flags must not be passed and Meta Data will
not be returned.
• 1 - Metadata flags must be passed and the corresponding
Metadata shall be returned with the tag EPC.
tag EPC.
FF0221?? ??????
SOHLengthOpCodeTime-
out (ms)
CRC
93
ATA Tag Command Set
ACK Response
FF0A21?? ??????????????????????
SOHLengthOpCodeStatusTag IDCRC
NACK Response
FF0021?? ??????
SOHLengthOpCodeStatusCRC
No Response
FF002104 00B483
SOHLengthTM
OpCode
Read Tag ID Multiple (22h)
[Not yet implemented]
StatusCRC
94
Gen2 Tag Commands
The Gen2 tag commands are used to operate on Gen2 tags and perform operations
specific to those tags. These commands can only be used when the Tag Protocol of the
reader is set to Gen2 (0x0005) using Set Current Tag Protocol (93h)
cannot be run when in Bootloader mode, only in Applicati on mode .
Gen2 Tag Commands
OpCodeCommand NameArgumentsReturnBLApp
Gen2 Tag Commands
. These commands
0x21
0x22
0x23
0x24
0x25
0x26
0x28
0x29
0x2A
0x2D
Read Tag Single (21h)
Read Tag Multiple (22h)
Write Tag EPC (23h)
Write Tag Data (24h)
Lock Tag (25h)
Kill Tag (26h)
Read Tag Data (28h)
Get Tag Buffer (29h)
Clear Tag Buffer (2Ah)
Gen2 Tag Specific (2Dh)
Timeout (ms)Tag IDNY
Timeout (ms),
Antennas Flag
Timeout (ms), lock
bit, password, tag
ID
Timeout (ms), lock
bit, address, data
Timeout (m s ), p r oto col specific data
Timeout (m s ), p r oto col specific data
Timeout (ms),
Address, Tag ID
variousvariousNY
nonenoneNY
Timeout (ms), Chip
Type, option, Kill
password, Access
password, Tag ID
Multiple Tag
IDs
NoneNY
NoneNY
NoneNY
NoneNY
Tag dataNY
noneNY
NY
0x2E
Erase Block Tag Specific
(2Eh)
Timeout (ms), chip
type, option addr,
mem bank, number
of words to erase
noneNY
95
Gen2 Tag Commands
Tag Singulation/Select Functionality
Many of the Gen2 tag commands now support the ability to singulate a specif ic tag or
inventory only tags matching a defined criteria, i.e. matching on values in the EPC, TID
and User Memory banks.
Select Algorithm and Parameters
The algorithm used to perform a Gen2 Select and its impact on subsequent Gen2 Query
operations on a population of tags is deter mined by several user defined settings which
either correspond directly to or are used t o determine the var ious Gen2 Select and Query
parameters as defined by the EPCGlobal Gen2 v1.2 Specification. The current user
controlled options are:
Gen2 Session (User Contr o ll e d)
This setting determines which tag inven tory flag is altere d when a tag responds to a Gen2
Query (each flag has a unique persistence profile, as defined by the Gen2 Specificat ion).
The value of Gen2 Session is set using the Set Protocol Configuration (9Bh)
The supported values are 0, 1, 2, or 3.
command.
Select Invert (User Controlled)
This setting is used to determine the Gen2 Action value sent in the Gen2 Select
command. The value of Select Inv ert is def ined using bit 3 o f the Select Opt ion fiel d in the
Tag Singulation Fields
. The supported values are:
0 (False) - Tags which match the Select criteria are to respond. Set Gen2
Action=0.
1 (True) - Tags which DO NOT match the Select criteria a re t o respond. Set Gen2
Action=4.
The settings specified for Gen2 Session and Select Invert determi ne the settings within
the Select command which is sent befor e the correspondin g Gen2 Query and the sett ings
in the subsequent Gen2 Query(s). These implicit sett ings used by the Gen2 Select are:
Gen2 Action (defined by Select Invert)
This parameter can be one of 8 values, as defined by the Gen2 specification, which
determine which of 4 possible flag actions (assert, de-assert, negate, or leave alone) will
be done if the criteria matches and, similarly, which of the 4 possible flag actions will be
done if the criteria does not match. Only two values are currently used:
96
Gen2 Tag Commands
0 - Assert (or put in state “A” for inven tory f lags) t he t ar get flag if there IS a match;
de-assert (or put in state “B” for inventory flags) the target flag if there IS
NOT a match.
4 - Assert (or put in state “A” for inventory flags) the target flag if there IS NOT a
match; de-assert (or put in stat e “B” for inventory flags) the target flag if
there IS a match
Gen2 Target (Static)
This setting determines which inventory flag or SL flag is going to have its state
determined by the matching algorithm. Curr ently always set to ‘4’, indicating the Gen2
Select command modifies a tag’s SL flag.
The following table defines the currently supported User Settings and the resulting
behavior of the Gen2 Select and Gen2 Query:
Gen2 Select and Query Behavior
User SettingsSelect BehaviorQuery BehaviorComments
• Gen2 Session =
0,1,2,3
• Invert = 0
• Gen2 Session =
0,1,2,3
• Invert = 1
Gen2 Select Settings:
• Target = 4
• Action = 0
If tags match the criteria,
put their SL flag in the
‘Assert’ state; and SL of
non-matching tags into the
‘De-assert’ state.
Gen2 Select Settings:
• Target = 4
• Action = 4
If tags match the criteria,
put their SL flag in the ‘Deassert’ state; and SL of
non-matching tages into the
‘Assert’ state.
Gen2 Query Settings:
• SEL = 3
• Target = “A”
• Session = [User
Defined]
Ask tags to respond if their
SL flag is in the ‘Assert’
state and their session
appropriate inventory flag is
in the ‘A’ state. Once a tag
responds, it puts the inventory flag in the ‘B’ state, preventing further matches
until the inventory flag’s
Flag Persistence Rules
returns it to the ‘A’ state.
Tag state persistence
before a Query is based
on SL flag persistence;
Tag state persistence
after a Query is based on
inventory flag corresponding to the Session
used.
Select Proces s
The following defines how the Select process work s when attempt ing to select tags that
match a defined criteria:
97
Gen2 Tag Commands
1. The Reader issues a Select containing the desired tag memory values and
instructions for the t ag to assert if its contents matches that specified in the request
(and, conversely, de-assert the SL flag if it does not match) as defined by the Tag
Singulation Fields. The de-assert will generally have no effect because the de-
asserted state is the defaul t, but is hel pful i f tags st ill have their SL fl ag assert ed from
a previous Select.
– Tags that are selected, at this point, are not selected withi n a specific Sessi on. The
persistence of their state depends ent irely on that of the SL flag.
2. A Query is issued which specifies the flag settings whi ch must match b efore a tag will
respond:
– The SL flag must be asserted
– The Session flag for session 0, 1, 2, or 3 (specific Session value is in the Query
and depends on the reader’s Session setting) must be ‘A’ (the default value).
3. Matching tags will respond to the Query, but after responding, will change their own
state in the following way:
– The Inventory flag corresponding to the Session specified in the Query will be
changed to the ‘B’ state.
– The SL flag will remain asserted (per its ongoing Flag Persistence Rules
4. If subsequent indentical Queries are issued (identical to the first), this tag will remain
silent until the Flag Persistence Rules
state cause the flag to fall back into the ‘A’ state. At that point, the t ag will respond
again (assuming that the persistence rule s of the SL flag are still keeping it in the
‘assert’ state).
for the inventory flag that was put int o the ‘B’
)
Note
A search with Invert=1 specified will perform the same steps except in step
1 the tag will “de-assert if its contents matches that specified in the request
(and, conversely, assert the SL flag if it does not match) as defined by the
Tag Singulation Fields.”
Note
A Select will be performed once per antenna when Select is specified during
a
Read Tag Multiple (22h) with multiple antennas configured.
Flag Persistence Rules
Session 0
Keeps state as long as tag is energized
98
Gen2 Tag Commands
Returns to default state as soon as the tag is no longer energized
Its state will often get reset during the course of executing a singl e command, for
example, between inventory rounds, or when there is a frequency hop, or when a new
antenna is selected during a Read Tag Multiple search. the result is that when the session
is set to ‘0’, all tags will respond to every appropriat e Query, considerably lengthening the
time to inventory a large population of tags. Session 0 is typically used for operations
where a single tag is expected to be in the field, for example, printers.
Session 1
Keeps its st ate between 0.5 and 5 seconds, regardless of whether the tag is
energized or not.
The intent is that when the sessi on is set to 1 t he t ag will respo nd to an ap propria te Query
immediately, and then respond periodically if the Query is repeated by the reader. This
allows a larger population of tags to be reliable read. Session 1 is typically used i n
applications where a large population of tags is being continuously inventoried allowing
for it to be determined when tags enter and leave the field.
Session 2, 3 and SL Flags
Keeps state as long as the tag is energized.
Keeps its state for at least 2 seconds after the tag is no longer energized and will
refresh its state if the tag is re-energized during that period.
The intent is that when the session is set to ‘2’ or ‘3’ a tag will only respond once to an
appropriate Query, then remain silent as the Query is repeated by the reader to elicit
responses from other tags. Typically used in oper ations when you are performing an
action on tag or population of tags which you do not want/need repeated.
Operations supporting Tag Singulation/Select
The commands currently supporting tag singulati on through Select are:
Read Tag Single (21h)
Read Tag Multiple (22h)
Write Tag Data (24h)
Lock Tag (25h)
Kill Tag (26h)
99
Gen2 Tag Commands
Read Tag Data (28h)
The following fields apply to all the specif ied commands. Please check each command for
exact order, and any exceptions, as they may not all correspond with the order below.
Tag Singulation Fields
FieldValuesDescription
Select Option0x00Select functionality is disabled. First tag found will be the tag
operated on. No other Tag Singulation Fields should be
specified. Option field must always be specified.
0x01Select on the value of the EPC. Requires all fields except
the Select Address field.
0x02Select on contents of TID memory bank (Gen2 bank 0x02).
Requires all fields.
0x03Select on contents of User Memory memory bank (Gen2
bank 0x03). Requires all fields.
0x04Select on contents of the EPC memory bank (Gen2 bank
0x01). Requires all fields.
0x08Sets Invert Flag. This results in tags NOT matching the
specified Tag Singulation Fields will be returned, as defined
Select Algorithm and Parameters.
in
Select Address4 bytesContains the offset, in bits, within the memory bank, speci-
fied by the Option value, at which the comparison is to start.
NOTE: specifying Option=0x04 and Select Address=0x 20 is
the equivalent, for Gen2 v1 tags, of specifying Option=0x01,
both specify a comparison against the tag EPC ID data.
Note: Addresses are always zero-based. Specifying
0x00 indicates starting at the first address
location.
Select Data Length1 byteContains the length of the data (Select Data) to be com-
pared, in bits, to the EPC when Option=0x01, or to the data
beginning at Select Address for other options.
Select DataM bytesContains the data to be compared against the specified tag
data (memory bank and address, or EPC as specified by the
Option value)
100
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.