This is a set of software tools used in a Raspberry Pi RFID enabled Kiosk.
- running chromium in kiosk mode as a single .xinitrc program browsing localhost (see example.xinitrc)
- getting RFID id and store it locally (see redis-rfid-serial.c)
- use the locally stored rfid, add some other values on a web form (see example-ajax.html)
- send data via web-service to a remote (ADempiere) server (see sinatra app redis-rfid.rb)
Endlessly reads RFID card tokens (serially from /dev/ttyUSB0) and pushes the value into redis with name rfidcard. Tested on a Raspberry Pi with a Sparkfun RFID USB Reader SEN-09963
- first get and compile the hiredis c library https://github.com/antirez/hiredis
- then compile this program and link it with libhiredis.a
$ cc -o redis-rfid-serial redis-rfid-serial.c libhiredis.a
$ ./redis-rfid-serial &
then swipe some rfid card or tag on the reader and check
$ redis-cli get rfidcard
- a makefile
- a redis connection settings and serial reader settings as parameter
- a debug flag to show on stdio what's happening
- wrap up an init.d script to daemonized the thing
This is a very minimal and simple sinatra application that demonstrate how to wrap it all up. It contains:
- the ajax call to refresh the input text with the last rfid card read
- a lookup function to retrive operator's picture
- add ajax code to show picture on web page
Simple way to start x windows in kiosk mode with chromium.
Simple file to show rfidcard refresh with ajax and webdis
The unicorn init.d file i'm using.
The rc.local i'm using
The inittab i'm using