Test Programs

From RFID Wiki


A large number of test programs reside under ~MRG/test. cd to the appropriate directory and 'make'.

Some of them are very much deprecated. The ones that may be of most interest:


Contents

[edit] ~MRG/test/guardian-main

The main program as it runs on the Guardian. If you run under eCos, there is no way to pass runtime flags or environment variables. The required values must be compiled in.

However, for simulator builds, you may have a look at the following options:

Options:

-port [port name]
Values for [port name]:
'none' if no (emulated) RFID channel is desired
'socket tag' if an emulated RFID tag channel is desired. The program will attempt to connect to a process that emulates an RFID reader. It will ask for a hostname/port pair on stdin.These are printed on stdout by the reader emulator process.
-console [options] {-console [options]}*
Values for [options]:
'loopback' a UI that listens to stdin is desired (default)
'no-loopback' no UI that listens to stdin is desired
'socket' a UI that opens a server socket connection for a socket UI.
This will print a hostname/port pair on stdout, to be used by a socket console program
'no-socket' no socket UI (default)
'bt' a UI that listens on the serial port that is connected to a BlueTooth module. (default if ecos)
'no-bt' no BlueTooth UI (default if not ecos)
-log [log file]
Default: /log/audit/log.0 if ecos; none if not ecos


[edit] ~MRG/test/reader-main

Control an RFID reader.

Options:

-port [port name]
Values for [port name]:
'socket reader' emulate an RFID reader channel. A hostname/port is printed on stdout. Use these to connect from a guardian main program
'Philips Pegoda reader' use the Pegoda Reader. For this, you will need a -host configuration on a Cygwin PC.


The program is interactive. Commands are listed after a '?' command.


[edit] ~MRG/test/tag-spoofer

Spoof one or more RFID tags.

Options:

-uid [hex uid]
Multiple uid options are allowed
{--no}-ui
Use an interactive user interface


The program can be configured to run in interactive fashion, so tag uids can be added, deleted, viewed. Commands are then listed after a '?' command.


[edit] ~MRG/test/socket-console

Open a UI that sets up a socket console to a simulated Guardian Main that runs with the option '-console socket'. If a BlueTooth connection exists between a Guardian and the host PC, the name of the BlueTooth device can be used: '/dev/rfcomm0' under Linux, '/dev/ttyS6' (or something) under Cygwin.


[edit] ~MRG/test/log-reader

Reads an audit scan log from file and displays it in human-readable fashion.


[edit] ~MRG/test/acl/parse-reader

Program to read ACLs and process human-readable RFID queries, and print the ACL verdict.

Options:

-i [dir]
load a complete ACL description from directory [dir]; it must contain files 'example.tags', 'example.readers', 'example.context', and 'example.acl'
-reader [reader name] {-reader [reader name]}*
Values for [reader]:
Any reader name that is defined in 'example.readers' or '/anonymous'
-context [context name]
Values for [context name]:
any context name that is defined in 'example.acl' or '/ANY'


Reads RFID queries from standard input or any remaining filename arguments. See e.g. request.acl.


A growing number of ACL definitions, sometimes with corresponding requests, is found in directories under ~MRG/acl/ex/.


[edit] Java GUI program on Cell Phone

If the MRG build was configured with java, you have ended up with a jar and jad file in MRG/java/build/. There is an ant build.xml in MRG/java to build the classes and jar. This build.xml also sports an 'ant emulator' target that fires up the WTK phone emulator.

The jar is not signed, so if it is uploaded to a cell phone, the installer will complain. Ignore this. The MidLet uses a BlueTooth connection to speak with the Guardian; BlueTooth must be enabled by hand before the MidLet is started. Device discovery and connection establishment can be done from the MidLet.

The Guardian can also be a Guardian Simulator that listens to a BlueTooth serial line (like /dev/rfcomm in Linux, or COM15 = /dev/ttyS14 in Windows/Cygwin/BlueSoleil).