RFID Project
Michael Cichowski
Columbia University
New York, NY 10027
USA
mcichows@cs.columbia.edu
Abstract
The goal of this project was to implement an application that detects the presence of a microphone at a given location using Radio Frequency Identification (RFID) technology to sense physical tags and the Session Initiation Protocol (SIP) for relaying event state messages. It utilizes a RFID Demo Toolkit from Intersoft Inc., consisting of RF tags and a reader. For generating the event state messages, integration with the existing SIP framework developed at Columbia University's Internet Real Time Lab (IRT) was required.
Introduction
There are three main software components to the application: RF/SIP Gateway, Mapping Server and Location Server(s). The RF/SIP Gateway reads tag identification data via a serial port, sends publish messages to the Mapping Server and sends publish messages to the Location server. It is the main controller for distributing the microphone presence state. The Mapping Server is responsible for translating the URN to an AOR. This is accomplished by looking up the information in a database and relaying the appropriate event state messages. The Location Server(s) manages the presence for registered components within its location. The Location Server(s) are external components and were not implemented as part of the scope of this project.
N/A
Background
Radio Frequency Identification (RFID)
Radio Frequency Identification, uses radio frequency communication to automatically identify, track and manage objects, people or animals.
There are several methods of identification, but the most common is to store a serial number that identifies a person or object, and perhaps other information, on a microchip that is attached to an antenna (the chip and the antenna together are called an RFID transponder or an RFID tag). The antenna enables the chip to transmit the identification information to a reader. The reader converts the radio waves reflected back from the RFID tag into digital information that can then be passed on to computers that can make use of it.
[1]
Component Diagram [2]
Session Initiation Protocol (SIP)
SIP, the Session Initiation Protocol, is a signaling protocol for Internet conferencing, telephony, presence, events notification and instant messaging. SIP was developed within the IETF MMUSIC (Multiparty Multimedia Session Control) working group, with work proceeding since September 1999 in the IETF SIP working group.[3]
Within the context of this project, SIP is being utilized for presence and event notification. The microphone presence state is relayed via the SIP publish messages sent by the RF/SIP Gateway.
Architecture
There were two driving forces behind the design decisions that were made. First, was the ease of integration into the existing IRT sipc codebase. This was a major factor due to the requirement to interface with existing modules for message generation and request handling. The sipc codebase is based on modules written in the TCL programming language so it was a natural choice for the implementation. The second, was the ability to interface with Intersoft's RFID Demo Kit-1. All this required was serial port reading capabilities, which are found in the majority of programming languages.
For more information on the SIPC implementation see http://www1.cs.columbia.edu/~xiaotaow/sipc/.
Logical Components
Logical Architecture Diagram [4]
- Bob's RF tag send the urn:x-intersoft-rfid:123456 to the RFID reader.
- RFID reader send the urn:x-intersoft-rfid:123456 to the RF/SIP gateway
through serial port.
- The RF/SIP gateway send a PUBLISH request to the mapping server.
- The mapping server searches for the AOR mapped to urn:x-intersoft-rfid:123456.
If it finds it, it will response a SIP 302 response. The Contact header of the
response will be the AOR. If not found, it will send a 404 response. Once the
RF/SIP gateway gets the 302 response, it will check the Contact header of the
response. The gateway will generate two PUBLISH requests and one REGISTER request.
- One PUBLISH request updates the presence status of the location (microphone).
The content of the PUBLISH follows the PIDF-LO draft. The contact tag of
the content will be Bob's AOR sip:bob@ibm.com. The RF/SIP gateway is preconfigured
with the local location server's address. The gateway will send the PUBLISH
to the local location server. A REGISTER request will also be sent to this server after the PUBLISH.
- The other PUBLISH reuqest updates the presence status of the people (Bob).
The content of the PUBLISH follows the PIDF-LO draft. The civil location part of
the content will be the location Bob is at, e.g., Root 450 microphone. The RF/SIP
gateway will check the domain of the AOR in the 302 response's contact and send
the PUBLISH to the domain of the AOR.
- watcher1 SUBSCRIBE for the location (microphone) status.
- watcher1 get a NOTIFY for location (microphone) status update when the
location server gets the PUBLISH in step #5.
The content of the NOTIFY is simular to the content of the PUBLISH in step #5.
- watcher2 SUBSCRIBE for the people status.
- watcher2 get a NOTIFY for people (Bob) status update when the location server
gets the PUBLISH in step #6. The content of the NOTIFY is simular to the content
of the PUBLISH in step #6.
Modules
- rfsipgateway.tcl - Reads tags from serial port and initiates SIP publish messages.
- mappingserver.tcl - Lookups tag urns against a Mysql database and corresponds with RFSIPGateway.
- controller_msg.tcl - Responsible for the response and request handling.
- dbconnector.tcl - Responsible for connecting to Mysql database.
- rfpreference.tcl - Preference handling. Contains the required constants for all of the related files.
- SQL Files - Creates database, user, tables and loads sample tag data. Tested with Mysql server running on Windows XP.
Program Documentation
Hardware Requirements
- Intersoft RFID Demo Kit-1 (Includes: Reader/Decoder and Passive Read-Only RFID tags)
- Serial Cable
- 9 Volt Battery
Software Requirements
Installation
- Unzip the rfid.zip file in the 'sipc' directory. This will create a 'rfid' directory.
- Verify that the following files are present in the 'rfid' directory:
- rfsipgateway.tcl
- mappingserver.tcl
- controller_msg.tcl
- dbconnector.tcl
- rfpreference.tcl
- setup_db.bat
- other sql files
- If you don't have it already, install ActiveTCL. For more details on this, please see http://www.activestate.com/tcl.
- Verify that Active TCL is in your PATH environment variable. On Windows XP, you can manually add it via the Control Panel.
- If you don't have it already, install MySQL server for Windows. For more details on this, please see http://www.mysql.com.
- If you don't have it already, checkout the latest sipc modules from CVS.
- rfid.conf changes
- serverhost - Set this to initial mapping server host.
- serverport - Set this to initial mapping server port.
- sip - Set to appropriate sip contact.
- ms_agenthost - Set this to mapping server host.
- ms_agentport - Set this to mapping server port.
- rf_agenthost - Set this to rfsipgateway server host.
- rf_agentport - Set this to rfsipgateway server port.
- rf_serialport - Set this to appopriate serial port. Can handle either Windows or Linux notation.
- rf_urnprefix - URN prefix
- rf_db - DB name
- rf_db_user - DB user
- rf_db_pwd - DB password
- rf_db_host - DB host (including port)
- loc_agenthost - Columbia Location Server (DEFAULT)
- loc_agentport - Columbia Agent Port (DEFAULT)
- location_file - Local location file.
- auth_method - Authentication method for REGISTER message.
- reg_username - Username for REGISTER message authentication.
- reg_password - Password for REGISTER message authentication.
Running the Application
- Verify that the MySQL server is up and running. For more details on this, please see MySQL Reference Manual.
- From the 'rfid' directory, run the [ setup_db.bat ] file.
- From the 'rfid' directory, execute the following command [ tclsh84 rfsipgateway.tcl ].
- To start the Mapping Server, from the 'rfid' directory, execute the following command [ tclsh84 mappingserver.tcl ].
- For every RFID tag sensed by the reader the workflow detailed above will be executed. It is important to note that the tags send the information every time they enter the presence of the reader.
- To verify message correctness:
- Check RFID tag read from serial port and urn created by rfsipgateway.
- Check that the urn was sent to the mappingserver in the username field of a publish message.
- The corresponding AOR will be looked up against DB by the mapping server. It will be sent back to the rfsipgateway in the contact field of the response header. This can be verified by the output of the mapping server and rfsipgateway.
- If the AOR is found a 302 message will be sent back to rfsipgateway otherwise a 404.
- If a 302 is sent back then 1 additional publish message and 1 register message will be sent to the location server.
- The content of the first publish message should contain an updated status and contact tag. It will be sent to the local location server specified in the rfid.conf file or the location server obtained via the sip svr lookup.
Sample Output
Database Structure
Each RFID tag had to be manually entered into the TAG_XREF table for lookup purposes. The TAG_DESC field was added for reference purposes and TAG_SOURCE was added for the possibility of using RFID tags from multiple sources. Also, in the TAG_ID field the URN of each tag will be stored. This is needed for tag validation.
TAG_ID |
TAG_SOURCE |
TAG_DESC |
urn:x-intersoft-rfid:0101DBA6EF4A |
INTERSOFT |
RED WEATHER PROOF TAG |
urn:x-intersoft-rfid:04203E21C216 |
INTERSOFT |
WHITE SWIPE CARD TAG |
urn:x-intersoft-rfid:0101301F1A0E |
INTERSOFT |
BLACK SQUARE TAG |
- rfsipgateway.tcl - Need to remove hard-coded end tag value. This would be accomplished by reading rfid.conf in binary mode. Also, the only domain supported for the final publish message is columbia.edu. Other domains and default location servers can be added in the future.
- rfpreference.tcl - Need to add error handling to validate information parsed from sipc.conf. Also, would like to remove all preference.tcl dependencies.
Acknowledgements
Overall, I had several problems in getting the sip message generation to function properly initially. In the end, I was able to get this working correctly, but wouldn't have been able to accomplish this without the significant assistance from Xiaotao. Also, he helped in adding multiple platform support to the application. Thanks, Xiaotao.
- mappingserver.tcl - The majority of this code is based on the sipstack demo.tcl program that came with sipc.
- controller_msg.tcl - The majority of this code is based on the sipstack demo_msg.tcl program that came with sipc.
- rfsipgateway.tcl - Various code segments were taken from controller_publish.tcl, main.tcl and controller_request.tcl.
- rpreference.tcl - The majority of this code is based on the preference.tcl program that came with sipc.
Measurements
Intersoft Demo Kit-1 Read Range Testing
- Test Scenario
- Tests were conducted under the Windows XP operating system with 384 MB of memory.
- The RFID reader was attached with an USB-to-Serial connector device.
- The RFID reader used, model TR-RO1-oem, is a small, short-range reader with a practical maximum of about 90cm, according to the product specifications.
- Used 'Intersoft Demo Kit Monitor application to test read range for all tags. Application displays serial stream of data read and tag identification numbers.
- Test Results
Tag Name |
Description |
Approximate Read Range |
IT75RO (Medium-Sized Black Square) |
General purpose tag and can be used where a large thin tag is required. |
4 inches |
IT30RO (Medium-Sized Red Circle) |
Rugged tag and can be used where a strong weather resistant tag is required. |
3 1/2 inches |
ETCMRO (Animal Tag) |
Designed for animal identification. |
4 1/2 inches |
ISOROCARD (Credit Card) |
ISO format ID card without a magnetic strip. Can be printed or punched and offers visual and RFID identification. |
6 inches |
FOBRO (Key Chain) |
Designed for attaching to key chains. |
2 1/2 inches |
GLT12x2RO |
Used where small size is critical and can be used as an injectable animal identification. |
1 inch |
PNL35x6RO (Screw or Nail) |
Designed to be embedded into wood objects. |
1 1/2 inches |
EPD20RO (Small White Circle) |
Used where heat and chemical resistance is required. |
1 1/2 inches |
LTURO120 (Small Black Circle) |
Small disk that is waterproof and chemical resistant. |
2 1/2 inches |
- Test Conclusions
- Read range is heavily dependent of the RFID tag used.
- Read range is sensitive to which side of the tag used. Better results were found when actual tag inside object was placed closer to reader.
- Overall current RFID demo kit can only be used in applications where the tag is in close proximity to the reader.
- Potentially, could use a long-range antenna with this reader, which could extend read ranges.
Task List
The application workflow was designed by Xiaotao and Ron.
- 1
- Intersoft Corp,
How Does RFID Work?, Intersoft Corp, 1997-2004.
- 2
- Columbia University,
Session Initiation Protocol (SIP), Columbia University, 2004.
- 3
- RFID Journal
Frequently Asked Questions, RFID Journal Inc., Hauppauge, NY.
- 4
- Xiaotao Wu,
RFID Project Design, Columbia University, 2004.
Last updated: 2004-08-22 by
Michael Cichowski