Grimreaper - CIF-Rochester/wiki GitHub Wiki
- IP =
###.###.220.9 - Purpose = Card reader server
- Kerberized logins = No
- AFS client = No
- OS = Gentoo
- Model = Dell Optiplex
- Architecture = x86-64
- Processor = 1.70GHz Pentium 4
- Memory = 384MB (?)
- Storage = 10GB HDD
Grimreaper is a server dedicated to running the card reader daemon and interfacing with the card reader firmware. It is located above the door to the lab. We are not sure when this machine was retired, however by 2018 another computer was being called Grimreaper that fulfilled the same purpose. This was then replaced by hal in January 2020.
Grimreaper is connected directly to a microcontroller, which interfaces with the card reader and door strike wires. In our case, the microcontroller is an Arduino Uno R3 with a custom shield. The shield has wires soldered to it which connect to the card reader and door strike wires via wire caps. The Arduino is then connected to Grimreaper via a USB cable. Communication with this firmware is done over a serial port, usually one of the /dev/ttyACM devices.
The firmware is updated by uploading a hex file from Grimreaper to the Arduino with avrdude. Simply pull the latest version of the repo, run make clean and then make to compile the hex. To upload to the Arduino, the shield must be removed and the daemon must be shut down. This can be done while the Arduino is powered on, but for safety, it's best to unplug all cables. Plug the Arduino back in without the shield and run make upload to upload to the device. The shield can then be reattached, and the daemon should be restarted.
The daemon runs on Grimreaper and simply communicates with the firmware over the serial connection. When the daemon receives a request for a student ID and LCC, it queries LDAP for that ID and sends back a status code to the firmware. The status code triggers beeping and the door strike to unlock if access was granted. .
There is currently a crontab that should be running /root/ruby_daemon/restart.sh every Wednesday at 5:00 AM from September to November and February to April. This script does not run over breaks because the card reader should be turned off when the residence halls are closed.