JMRI Hardware Support - RFID Readers
Keywords: JMRI hardware rfid readers

# Hardware Support: RFID Readers

RFID support in JMRI is rapidly evolving; the actual code might be ahead or behind the documentation on any given day.

JMRI provides support for general JMRI Sensors and Reporters in terms of RFID Reader "events".

## Supported Hardware

### Protocols

JMRI supports several different RFID Reader Protocols:

- CORE-ID / ID-Innovations - since version 2.11.4
- Olimex MOD-RFID125 - since v 3.9.2
- Olimex MOD-RFID1356MIFARE - since v 4.7.5
- Parallax - since v 3.9.2

Choose the appropriate Protocol when setting the Preferences.

JMRI also supports up to 8 individual readers connected via a Concentrator. Right now, the only supported Concentrator is that from MERG, and then only for readers using the CORE-ID protocol.
Select "MERG Concentrator" for the "Adapter" on the Connections tab in the JMRI Preferences.

## Connecting

### Wiring

- Direct serial connections have been supported since JMRI 2.11.4
- Network connections are targeted for the JMRI 4.1.2 release series.

### Settings

You configure JMRI's connection to your RFID hardware in JMRI's Preferences.
It appears as "RFID" in the System Manufacturer drop-down list.

The "Baud rate" advanced connection setting is typically not critical for USB-connected RFID connections so it may be "greyed out" to indicate that it is not selectable.

### Reader Configuration

#### Olimex readers

Olimex MOD-RFID125 and MOD-RFID1356MIFARE readers must be operating in "CDC" mode. This mode is typically configured using a pushbutton on the reader.

### Naming

The system letter for RFID connections is "F". Details of RFID event and object names are described below.

JMRI associates RFID events with individual JMRI objects (Sensors, Reporters, etc.) via System Names. A System Name like "`FSA`" defines a Sensor that follows the "A" reader, whereas a System Name like "`FRB`" defines a Reporter that follows the "B" reader.

### Sensors

RFID readings coming into JMRI applications can be accessed via JMRI Sensor objects. The Sensor's System Name determines which RFID Reader it corresponds to.

A Sensor is defined by two events: The one that sets it ACTIVE, and the one that sets it INACTIVE. When an RFID Tag is within the proximity of an RFID Reader, the associated sensor is ACTIVE; outside of these times it is INACTIVE. You create Sensors using the Add... button on the Sensor Table.

### Reporters

RFID readings coming into JMRI applications can also be accessed via JMRI Reporter objects. The Reporter's system name determines which RFID Reader it corresponds to.

A Reporter can contain arbitrary information, unlike a Sensor which is only ACTIVE or INACTIVE. Each Reporter is associated with some specific source of information on the layout, and makes that devices information available to the rest of JMRI.

When an RFID Reader reports that a specific tag has been seen, the corresponding Reporter will contain details of the specific IdTag seen. This then enables other JMRI tools to react to this information.

#### Reporter Table

The Reporter Table provides easy access to the contents of all Reporters that JMRI knows about. JMRI automatically creates Reporter objects for devices discovered on the layout.
There's also an "Add..." button for manually creating your own internal Reporters.

#### Displaying Reporter Values on Panels

A Reporter's value can be displayed on a Control Panel via either the Panel Editor or the Control Panel Editor. These are the steps for using Panel Editor:

- Open the Panel Editor window for your panel and select "Reporter" from the pulldown menu under "Select the type of icon to Add to Panel."
- Select the Reporter from the list, or add a new one by typing the desired System Name.
- Click the button to "Add to Panel." The Reporter icon will be placed on the Panel. You will see "<no report>" displayed. Use the Reporter Table to change the value.
- You can drag the icon to where you want by right-clicking your mouse and dragging the value.
- The pop-up menu on the icon will let you change the formatting.

Note that a Reporter cannot be displayed directly on a Layout Editor Panel. Instead, use a script such as ReporterFormatter.py to parse the information in the Reporter and copy what you want into a Memory. That Memory can then be displayed on a Layout Editor Panel.