PydgetRFID

A front-end for the Phidgets Inc. RFID kit

PydgetRFID is a Python front-end to the Phidgets Inc. RFID kit. It wraps libphidgets with ctypes to communicate with the hardware.

PydgetRFID consists of a D-Bus service that allows other applications (written in any language with D-Bus bindings) to use the hardware. It allows to start and stop reading, and emits a signal whenever a new tag is read. A simple graphical user interface (built with PyGTK) which uses this daemon is also provided.

PydgetRFID is free software: it is licensed under the GNU GPL.

Documentation

Usage

First, you have to start the D-Bus daemon. Before doing so, make sure the reader’s USB cable is plugged into an available USB port on your machine. If you just want to see which tags are read, you can start the GUI.

To run the D-Bus daemon:

$ ./daemon.py

To run the GUI:

$ ./pydget_rfid.py

If you are connecting your own application to the daemon, you have to first call the start_reading method. It starts a loop which keeps reading RFID tags, until stop_reading is called. To do something when a new tag is read, connect your own callback function to the signal tag_changed_signal.

A Python example of using the daemon to do just this is available in examples/client.py. Note that to use signals and callbacks, you need a main loop (e.g. the one provided by GLib).

Download

Stable version

The current stable version is 0.1.1.

Development version

The latest bleeding edge version is available in a Bazaar repository.

To get the code, use:

$ bzr get http://code.jozilla.net/PydgetRFID