Java-RFID is a Java programming library for RFID. Its goal is to create an RFID kit-agnostic API ala JDBC. Thus, programmers will write the same code to communicate with any RFID kit. Java-RFID has been tested with Texas Instruments and Microchip RFID kits.
The Texas Instruments' kit used has been S4100 Multi-Function Reader Evaluation Kit. This kit is fully backwards compatible with all of TI RFid's LF and HF transponders, providing built-in support for the following technologies:
- LF Read Only
- LF Read/Write
- LF DST
- HF Tag-It
- ISO 15693 (Tag-it HF-I)
- ISO 14443 A/B
The Microchip's kit used has been 13.56 MHz Anti-Collision microID Developer's Kit for MCRF355 & MCRF45x.
Java RFID API is publicly available in both binary and source forms under the Apache Software License. Individual JARs and source are available through the following mirrors:
The first release is compatible with Tag-it, MCRF450 and ISO-15963 transponders.
Table of Contents
- Using the Java RFID API
Apart from this essential user guide there is a JavaDoc-based API Reference for the Java RFID API.
- 1. Connections
The first step is set up the kit and PC:
- Connect the power supply to the reader/interrogator.
- Connect the RS-232 cable from your PC to the reader/interrogator.
Note: If your computer hasn't got any serial port, you can connect the reader/interrogator to your PC using an USB to serial cable.
- 2. Using the Java RFID API
- Download RXTX library, which is a native library providing serial and parallel communication for the Java Development Toolkit (JDK). Then, to get serial communications running, add the native library (.so, .dll or .jnilib) included in the appropriate operating system directory to the java.library.path system property: $LD_LIBRARY_PATH (Unix) or %PATH% (Windows). In addition, add the Java comm library (RXTXComm.jar) to your CLASSPATH environment variable.
- Download Java RFID libraries and add the JAR files to your CLASSPATH variable.
- Compile your own program or the examples below.
- Invoke the program as you normally would through the command shell.
- Java 5.0 is required for using Java RFID API. Download and install the Java Runtime Environment (JRE) 5.0.
- Setting the class path. The class path can be set using the -classpath option or by setting the CLASSPATH environment variable.
- Using the -classpath option: java -classpath classpath1;classpath2...
- Setting the class path:
- Linux/Unix type: export CLASSPATH=$CLASSPATH:/path/to/directory
- Windows type: set CLASSPATH=%CLASSPATH%;C:\path\to\directory
- Setting the Java library path.
- Linux/Unix type: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/directory
- Windows type: set PATH=%path%;C:\path\to\directory
- 3. Examples