Augmented Knight Castle
C
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
datasheet
.gitignore
Makefile
README.mkd
akc_rfid_config.xsd
config.c
config.h
db.c
db.h
logic.c
logic.h
main.c
reader.c
reader.h
rfid.h
todo.txt

README.mkd

This is a markdown file.

Abstract

akc_rfid stands for "augmented knight castle - radio-frequency identification".

This software was written for the dissertation of Steve Hinske hinske@inf.ethz.ch entitled "Digitally Augmenting Traditional Play Environments".

It queries a locally connected RFID reader and writes enter and leave events for detected RFID tags into a database.

Technical details

The supported RFID reader is a FEIG ID ISC.MR101-A

The supported database is a MySQL 5.0 database.

Dependencies

Setup

mini xml

Build and install mini xml according to the README of the project.

It is recommended to configure mini xml with --enable-threads=no.

Compiletime Configuration

Write a file called config.mk file to make your mxml installation visible to the compiler, e.g. set the INCLUDE_FLAGS and the LIB_FLAGS variables. Example:

INCLUDE_FLAGS=-I ../3rd/mxml/install/include/
LIB_FLAGS=-L ../3rd/mxml/install/lib

The mysql header and library files are considered to be installed in your system's default paths. If not add further -I and -L flags for it.

Runtime Configuration

The configuration file for akc_rfid is a XML 1.0 file. It must be valid according to the XML Schema akc_rfid_config.xsd. Validity can be checked for example with xmlstarlet:

xmlstarlet val -e -s akc_rfid_config.xsd akc_rfid_config.xml

sections

The sections of the config file are:

  • database: configuration for the MySQL connection
  • reader: configuration for the RFID reader driver
  • logic: configuration for the program logic

database

  • host: the hostname of the MySQL server
  • user: the username to use
  • passwd: the password to use
  • dbname: the name of the database to use
  • port: the port to use. Hereby 0 stands for the default port, which is 3306

reader

  • numberofAntennas: how many antennas are attached to the reader
  • device: the device name for the serial connection to the reader
  • timeout: read timeout for the reader

logic

Currently there are no configuration items for this section.

example

<?xml version="1.0"?>
<config>
	<database>
		<host>localhost</host>
		<user>root</user>
		<passwd>foobar</passwd>
		<dbname>test</dbname>
		<port>0</port>
	</database>
	<reader>
		<numberofAntennas>1</numberofAntennas>
		<device>/dev/ttyUSB0</device>
		<timeout>3</timeout>
	</reader>
	<logic>
	</logic>
</config>

Database

The software expects a table according to the following create statement:

create table events (
	id bigint unsigned auto_increment not null, 
	antenna tinyint unsigned not null, 
	time timestamp not null, 
	tag bigint unsigned not null, 
	type enum('enter', 'leave') not null, 
	primary key(id)
);

Compiling

Build the source with make. Clean the directory with make clean. There are no further make targets.

Command line

The executable takes one optional parameter which is the name of the configuration file. The default name for the configuration file is ./akc_rfid_config.xml.

Copying

This software is published under the GPL version 2.

Authors

Alexander Bernauer bernauer@inf.ethz.ch

References

The reader module was derived from an implementation of Raffael Bachmann raffael.bachmann@a4d.ch