This is an old revision of the document!
Table of Contents
BrmDoor
~~META: status = active &relation firstimage = :project:pir.jpg ~~
For hackerspace more secure and without the annoyance of physical keys. DIY digital lock control, open/closed space status monitor and burglar alarm.
Status: Currently, we have digital lock control and open/closed space status monitor, doorbell. Burglar alarm is TODO long-in-the-future.
System Architecture: Digital lock, card reader and Club Mate panel are hooked up on an Arduino. The Arduino needs just power - it unlocks the door autonomously, the list of allowed cards is stored internally. The Arduino is further (optionally) reporting to brmd daemon which provides web, IRC interface to the status and unlock notifications.
Unlocking the Door
Executive summary, how to get in without a key - arrange registering your RFID card with stick first, then you need to sometime come physically to brmlab to meet with him; he will add your ID to the Arduino sketch code. (We do not use external database out of security concerns.)
If your card is registered, just put it at the door around the place with the “RFID” sticker. When you unlock the door, you will hear a click - then, you can open it. After a short while, you will hear another click and the door auto-locks itself again. At the other side, unlock visual feedback is provided by the orange Arduino LED.
BrmDoor Hardware
- Simple token-based Identity Check device (we just rely on serial numbers for starters):
- [DONE] MiFare RFID cards (e.g. ISIC, OpenCard, or plain tokens)
- We have Adafruit PN532 NFC/RFID Controller Shield for Arduino. (lessons learned: do not use http://www.seeedstudio.com/depot/1356mhz-rfid-module-iosiec-14443-type-a-p-196.html).
- We have it wired up and can detect a card and receive its serial id. Tested on ISIC and OpenCard, works like a charm!
- It is already duct-taped at the inner side of the door. Most rfid cards have no trouble with talking through the wooden door; a sticked by chido marks the spot. The wires are routed off the door through UTP cable.
- Lock device:
- [DONE] BERA-E electromagnetic clock, sponsored by b00lean!
- From inside, it is possible to open the door anytime by just pushing the handle.
- From outside, it is possible to open the door by turning the lock by the key, OR by pushing the handle if +15V is fed in.
- We have it wired up and can control it fine. The wires are routed off the door through UTP cable.
- AxTheB breadboarded a Darlington IC that switches the 15V based on 5V TTL input. The power source used to be first an old ATX PSU (unreliable, 12V sometimes cannot unstuck the lock), then PoE adapter, now a dedicated DC adapter.
Communication is over SPI: both SEL0 and SEL1 are shorted which turns communication to be over SPI.
Documentation of Adafruit PN532 shield (our revision is 1.2):
BrmDoor Firmware
Source repository: https://github.com/brmlab/brmdoor
List of authorized cards
Card list is on brmlab VPS (vps.brmlab.cz) are exported from JendaSAP, on /root/sap/cards.txt.
GitHub, last commits
- push-cardids.sh update by ruzaq (2017/06/01 18:31)
- Allow dot in card owner name by mrkva@mrkva.eu (2017/05/03 16:55)
- Configuration is no longer hardcoded, spaceapi support implemented by mrkva@mrkva.eu (2017/04/22 21:12)
- Update README by ruzaq (2016/06/07 02:21)
- Update README by ruzaq (2016/06/07 02:20)
Photos (location Ke kaplicce 18)
Yet another Brmdoor implementation - Pythonic this time
The brmdoor_libnfc is another implementation for Raspberry Pi that aims to be clean and documented. The daemon is written in Python that uses wrappers of libnfc written in C++ and Swig.
Features:
- Clean, documented and extensible code
- Authentication data is stored in SQLite DB - no need to restart daemon to make any change; extensible DB schemas
- NFC smartcard communication support (ISO 14443-4)
- Multiple authentication schemes supported
- simple authentication by UID
- Dedicated configuration file and logging facilities
Missing features:
- No sound produced (can be fixed via WiringPi)
- Setting topic is not finished (python-irc has fairly bad API to retrieve topic)