MRG
From RFID Guardian
Contents |
The Guardian software
The software that runs on top of the OS or the RTOS: Guardian Main, Reader, simulator, etc.
Please read our ramblings on repository usage first!
Get a checkout of the source tree
Checkout a version from the repository:
| $ cd ~/projects |
| $ mkdir mrg |
| $ svn checkout https://svn.rfidguardian.org/mrg/trunk mrg |
We will refer the directory .../mrg as ~MRG in all the RFID Guardian documentation.
MRG Configuration
| $ cd ~MRG |
| $ bash ./configure [options] |
The configure options will reflect the type of build you want to do.
Options you may want to know about here:
| target platform | |
| --ecc=<eCos .ecc> | build for eCos; select the eCos build description file. CPU type etc is inferred. You will often choose ~ECOS/radiotuna/radiotuna.ecc. Beware: don't use home directory expansion. Bash fails on it. |
| -sim | build a simulator |
| -host | build a standalone environment to control the Pegoda reader |
| optional modules | |
| -acl --no-acl | (don't) build ACL support |
| --ssl=[path] | indicate where openssl lives. For simulator and host builds, specify --ssl=/usr. For eCos builds, specify --ssl=~MRG/openssl/install. Beware: don't use home directory expansion. Bash fails on it. |
| -java --no-java | (don't) build Java stubs for the GP messages |
| -ui --no-ui | (don't) build a command-line User Interface |
Note: to build the Guardian Main program, you need -acl and -ui; for cryptographic operations (authentication, key transfer) you also need --ssl=[OpenSSL path]
OpenSSL
If your build will use OpenSSL, you need an appropriate OpenSSL package. This is the case if your build will use GP (Guardian Protocol), for example. For simulator and host builds, any pre-installed OpenSSL is fine (it might be named something like openssl-devel or libssl-dev). For eCos, proceed as follows.
| $ cd ~MRG/openssl/ecos |
Get an openssl-0.9.7g tarball from http://www.openssl.org. Extract it *here*, so the distribution lives as openssl-0.9.7g/ under ~MRG/openssl/ecos/.
| $ patch -p0 < Configure.patch |
| $ bash ./BUILD.eCos |
This will configure and build your eCos openssl. Have a cup of coffee. It will also attempt to make and run the OpenSSL test suite. This will obviously fail. Ignore any error messages that result from this.
Build MRG
| $ cd ~MRG |
| $ make |
This builds the RFID Guardian library. On my 2007 system (dual-core Athlon 3800+), a build takes between 1 and 2 minutes.
This library must be linked with a main program. Examples are given in Tutorial:_guardian_programs.
Build the Java jar for the Cell Phone User Interface
An ant build.xml is provided in ~MRG/java. It is invoked from the top-level make if Java support has been configured in. This build.xml creates a .jar and a .jad in ~MRG/build/. These can be uploaded to a cell phone, or fed to a cell phone emulator.


