This post documents recent work on a membership based physical access system using radio-frequency identification (RFID) tags as a key. Most discussion of this rfid development has been sprinkled throughout discussions in our google groups. As of this post, all of the parts are working but we haven’t implemented this into the building… yet. We are able to present an authorized tag to the reader, and operate the solenoid. We can also scrape our memberships in order to get the current member list.
To work out all of the small problems, we solved three problems:
Reading/authenticating the card
Operating the solenoid
Updating the access list
When a tag is read by the rfid reader, the rfid reader will give all of it’s contents through serial. This means that we are using the rx/tx pins/UART on the pi to read what the rfid reader throws at us. Previously, when we experimented with the NFC reader at adafruit, we found that we needed to free the UART on the Pi. So go free your UART. We followed the instructions at: https://learn.adafruit.com/adafruit-nfc-rfid-on-raspberry-pi/freeing-uart-on-the-pi
The source for all of our work on the rfid reader is located at: https://github.com/area515/rfidreader . The idea is that we wait for data from the rfid reader. When we have data, we check that it is a tag with the correct format. When we have correctly formatted data, we compare it to all the valid keys to find a match. We keep these keys in a text file. If we have a match, the raspberry pi will set a pin to HIGH to operate the solenoid.
All of the things related to the solenoid were purchased from adafruit.
Updating the access list:
At the moment this is nothing fancy. Instead of an api call, we use Sele=
nium to automate a web browser. This automated steps to get current memb=
ers are the same ones I would use to look at the list. The automation lo=
gs into the site using a limited account, goes to the membership director=
y, and checks for a current members. When a current member is found, the=
ir name is added to the list of authorized people.
Big thanks for advice, support, materials, resources, research, work from: