Professional Documents
Culture Documents
R F I D P RO J E C T R E P O RT
NOUMAN KHALID
ERIC AMBACK
MU QIAO
KENNY KUNTZ
1) Introduction
2) What is RFID?
3) Library Application
4) RFID Website
6) Future Tasks
7) References
INTRODUCTION
technologies. The purpose of RFID group was to investigate this technology and try
to develop an understanding of it. The project was sponsored by P&G labs and
their purpose was to have our team investigate and try to improve their current
In order to achieve our project partners demands it was necessary to learn this
technology and try to develop a small application to get a better understanding. The
group came up with some of the following Applications that can be used to better
a) An antenna or coil
There are many different types of RFID systems out in the market. The are categorized
according to there frequency ranges. Some of the most commonly used RFID kits are as
follows:
These frequency ranges mostly tell the RF ranges of the tags from low-
frequency tag ranging from 3m to 5m, mid-frequency ranging from 5m to 17m and
high frequency ranging from 5ft to 90ft. The cost of the system is based according
to there ranges with low-frequency system ranging from a few hundred dollars to a
Library Application
application that can be used for the betterment of student life at Purdue University.
someone puts the book in a different shelf. Our team decided to put RF tags inside
the books and create an application for the PDA devices that can be used to track
down those RF tags and thus finding the books we are seeking.
RFID Website
To obtain information from Purdue University’s Library web page, THOR, we decided
the easiest way to extract call numbers of books from Purdue’s website, is through
our own web page. What we hoped to achieve was to create the RFID Software
application to interface with our web page in order to access the call numbers from
the search results page provide by THOR. We learned that the library was not
going to give us access to their databases and therefore had to find a way to gain the
necessary data. A web page was to be developed that would search the database, via
manipulation of their code and copying portions of it into our own, it was
eventually discovered that it would be impossible to use this method to get results
returned into our own web page. Purdue has a server-side cgi script that searches
through their database for the requested books and generates its’ own html code to
was to extract the source code for this results web page and save it into a local file.
At this point, the contents of the file would be searched and individual call numbers
could be pulled from the file and into our won database where we would be able to
display them on our own generated web page. Unfortunately, this step in the
process has not been completely figured out. Bits of code have been found that
demonstrate how to view source code from a button on a web page. The following
<html>
<head>
<!-- This PerlScript file enable you to read the source code on your brower directly -->
<hr>
<pre>
<%
# make sure filename does not contain any path info
$_ = $filename;
if (/[\/\\]/) {
%> Error in filename <%= $filename %> <%
}
else {
# get path of this file
$path = $Request->ServerVariables('PATH_TRANSLATED')->item;
$path =~ s/[\/\\](\w*\.asp\Z)//m;
# make path to look at
$filename = substr $path.$path_from_root, 0, 100;
open(SOURCE, $filename);
while(<SOURCE>) {
s/</</g;
s/>/>/g;
s/<%/<%<b>/g;
s/%>/<\/b>%>/g;
$Response->write($_);
}
close(SOURCE);
} # else valid filename
%>
</pre>
<hr>
<a HREF="<%=$URL%>">
<p>Return </a></p>
<p><%
$url = $Request->ServerVariables('PATH_INFO')->item;
$params = 'filename=showsource.asp&URL='."$url";
$params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg;
%> <a HREF="showsource.asp?<%=$params%>"></p>
A sample of JavaScript has also been found that will display the source code of the current
source.net/javascript_view_source2.htm
<script language=JavaScript>
function ViewSource() {
window.location = "view-source:" + window.location.href }
</script>
Place this code where you would like your link to appear.
<a href=javascript:ViewSource()>View Source</a>
JavaScript required a lot less lines but at the same time, it displayed the results in yet another
window. The problem of these samples of code is it is not yet understood how to either
search through the code to extract the call numbers or how to save the source code into a
For the following semester, it would be desired to find a way to access these call
numbers without having to create an entire separate database using methods similar
able to access these call numbers through our PDA developed application.
MHZ kit by RFID INC worked, plan out how to write out the application and what
kind of interface should our application have. This whole process was divided into
two parts
b) Communicating with the serial port and get the RF tag data input into application
We also had the source code available from the RFID INC for their reader,
which was used as a guideline in writing out our application. We decided to use
Visual Basic 6.0 since it allows us to build an interface as well as program according
to our needs. Below is the VB code for the entire application designed by the RFID
We needed to build a test database since the Purdue Library database was not
available to us. We used Microsoft Access to build our database. The database was
created in a table format where each table represented a category. We decided the
categories according to the Purdue libraries search page. Below are the categories
i) Authors
ii) BookAuthors
iii) BookCategories
iv) Books
v) Categories
Authors: This category contained Authors First and Last names with an AuthorID
assigned as a number.
BookAuthors: This category contained AuthorID from above category and matched it
with the BookID for a comparison and linking the two categories.
comparison in a search and linking the above categories with this one.
Books: This category contained the BookID, Title, CallNumber, RFID number and
description of the book. This is where we enter all the book information for our
because there are many different way people perform search operation. A search can
be done using author’s name, call number, RFID number or even title of the book.
A good database should have all these categories created and linked with each other
using at least one common category ID (e.g. BookID linked with RFID number) so
when writing the code we can create search queries based on these different ID’s.
Below is the VB code written in order to search the database using Authors first
name, last name, book title, RFID number and call number.
VB code:
Code Explainaion:
This code is written so that when a user enters either a title, author name, RFID
number or call number the above code takes that entry and matches it with the
database and compares one at a time until it finds a result and then returns it in a
query box. I have made the strquery bold so that you know that these are the
different ways I uses to scan out the data from the database.
For example:
entered Author first or last name with the matching Book titles and when it finds the
This is an example of an IF statement from the code. This purpose of this statement is
that if someone performs a search it first goes into the database and does a search to
match that word with Book names and if it finds a match it considers that as a true
result and returns that match otherwise if its not true it consider that to be a false and
The above code consist of the comparison using the query statements and then
using IF statements for checking if our search matches that particular category in the
database and if it doesn’t it sends that query to be compared in the next category.
The code to communicate with the communication port is given below. The fist block
strB = MSComm1.InBufferCount
If MSComm1.InBufferCount = 40 Then
strOut = MSComm1.Input
lblCommPort.Caption = strOut
The code starts by identifying the local variables as character strings of data. StrB equals
the amount of space in the buffer that is being used by the communication port. The reader
sends in 40 characters when it is first turned on to the communication port. These 40
characters describe the reader as the RFIDInc reader. If the buffer is equal to 40 then it
dumps the buffer into the label above the communication port text box. The next if
statement comes from the size of the of the TI RFID tags. When a TI tag is identified the
reader sends 30 characters to the buffer and a prompt waiting for the program to tell the
reader what to do next. The 30 characters and the prompt equal 31 buffer spots. The first
time a tag is scanned the buffer will equal 31. When the buffer equals 31 the port dumps the
31 characters into the variable strOut. The RFID number is only 8 characters long. The
other characters are there to identify the tag as a TI tag since the readers can read tags from
many other manufactures. The code then manipulates the string into the 8 digit code and
displays it in the text box. MSComm1.InputLen = 0 empties the buffer. The 3rd if
statement is the same as above. The reason the buffer size is 30 is incase there is no prompt
in given from the communication port.
End If
str = "S"
Call ParseString(str, 10)
End Sub
This code above is for the Select button. This button is used to talk to the reader. After
the reader sends the program the tag info it prompts the user to give it the next command;
read, write or select tag. Since we just want to see the tag number we send the select
command. The read command could be used as well. The write tag command might be
used for an administrator type program, but we don’t want users to write to pre-assigned
tags and/or changing their ID numbers. It opens the port if it was closed and sends the
values S and 10 to the function ParseString. The value S can be replaced by R and W if you
want to read or write respectively.
Next i
txtCommPort.Text = ""
End Sub
The function ParseString was modified from the RFID source code. The function is
used to send commands to the reader when prompted by the reader. The command it
This code is written so that the input from RFID reader is compared with the RFID
numbers stored in data base and assigns the value of lblFound.Caption according to the
result of comparison. If a match is found, the lstMatchedBooks is updated with the
book’s title, author name, RFID number and call number. The program also notifies
the user that the book is found by updating the lblFound.Caption to "Found". If no
match is found, the lblFound.Caption will be updated to "Not Found".
We also obtained RFID Mid-range evaluation kit in the middle of this semester. The
TI RFID read is more complex but also more powerful that the RFID Inc. reader.
For this semester our team focused on the simple reader because of the time
constrain.
TI RFID reader responses to the request from a host (computer) and sends back a
http://www.ti.com/tiris/docs/products/readers/RI-STU-TRDC.shtml
The Program has some bugs in it. One of the bugs is that every time
the application is started the reader has to be off and turned on after
from database after getting one result and comparing it with Reader
new search.
Reasons for Using RFID INC Reader
The reason why we used RFID INC reader and kit was because the
company was very helpful. We had the open source code for there
For future teams below is the contact information for RFID INC
E-mail: james@rfidinc.com
Website: www.rfidinc.com
Future Tasks
For future teams who will be working on this project need to fix
following problems:
a) Replace Scan button. The application needs to run continuously without pushing
c) Work on the Texas Instrument Reader since its better and can
References
These websites and books are good references about programming Visual Basic and learning
about RFID. Everything that the RFID group used for reference can be found on the CD given to
Maribel.
SAMS Teach Yourself Visual Basic 6 in 21 days by Greg Perry, Macmillan Computer Publishing
1998
www.rfidinc.com
http://shay.ecn.purdue.edu/~mobility/RFID/
http://www.ti-rfid.com
http://www.amtech.com
khalid_nouman@hotmail.com
qiaom@purdue.edu
eamback1@purdue.edu