====== Project WHITE BOX / Portal ====== {{tag>project hardware electronics infrastructure process hadez}} [[http://www.shackspace.de/gallery/index.php/Projekte/Project-WHITE-BOX-portal/72195989|{{http://www.shackspace.de/gallery/var/thumbs/Projekte/Project%3A-WHITE-BOX-%28portal%29/72195989.jpg}}]] [[http://www.shackspace.de/gallery/index.php/Projekte/Project-WHITE-BOX-portal/72214989|{{http://www.shackspace.de/gallery/var/thumbs/Projekte/Project%3A-WHITE-BOX-%28portal%29/72214989.jpg}}]] [[http://www.shackspace.de/gallery/index.php/Projekte/Project-WHITE-BOX-portal/79579143-361638d7ba5a66b1bd1305a0c6f93bfe-4c0cdf40-full|{{http://www.shackspace.de/gallery/var/thumbs/Projekte/Project%3A-WHITE-BOX-%28portal%29/79579143-361638d7ba5a66b1bd1305a0c6f93bfe.4c0cdf40-full.jpg}}]] Project WHITE BOX' aim is to allow electronic and cryptographically sane access control to shackspace without the requirement to hand out physical keys. ===== Team ===== * Version 1 * (ansi) * hadez * Aktuelle Version * ttb * momorientes * phrewfuf ===== Overview ===== The lock is based on a ELV KeyMatic which is interfaced by a Arduino which in turn is connected to a Fonera WIFI AP via RS232. Users will be provided with an individual cryptographic key which can be used to unlock or lock the door. ===== v1.1 ===== version [[friedhof:white_box:1.1]] documentation ===== How to use it ===== If you're a member and have been around for a while, you can drop a mail to key@lists.shackspace.de and apply for a key. \\ We've documented the [[process:key:key_request|key request process]] (German) in the wiki as well. Got your key and need help logging into portal? Here's a couple of tutorials for various platforms: * [[infrastruktur:lounge:portal:tutorial:windows_putty|Windows/Putty]] * [[friedhof:white_box:tutorial:linux_unix|Linux/Unix (potentiell auch OSX)]] * [[friedhof:white_box:tutorial:mac_osx|Mac OS X]] * [[friedhof:white_box:tutorial:iphone|iPhone, iPod, iPad]] * [[infrastruktur:lounge:portal:tutorial:android|Android]] ===== Hardware ===== ==== Schematics ==== * [[http://www.shackspace.de/gallery/index.php/Projekte/Project-WHITE-BOX-portal/portalschematic|Schematic]] * [[http://www.shackspace.de/gallery/index.php/Projekte/Project-WHITE-BOX-portal/portallayout|Layout]] * [[http://voobar.follvalsch.de/files/portal_rev2_20100830.tar.bz2|Eagle sources (rev2_20100830)]] ==== Arduino <> MEGA8 I/O Mapping ==== http://www.arduino.cc/en/Hacking/PinMapping ==== Burning ATMEGA8 fuses ==== To burn the appropiate fuses, use the following command: sudo avrdude -p atmega8 -c avrispmkII -P usb -B8 -U lfuse:w:0x9f:m -U hfuse:w:0xc0:m For the Arduino ATMEGA8-16PU use: sudo avrdude -p atmega8 -c avrispmkII -P usb -B8 -U lfuse:w:0xdf:m -U hfuse:w:0xca:m sudo avrdude -p atmega8 -c avrispmkII -P usb -B8 -U unlock:w:0x0F:m sudo avrdude -p atmega8 -c avrispmkII -P usb -B8 -U flash:w:ATmegaBOOT.hex arduino-0018/hardware/arduino/bootloaders/atmega8 ==== Fonera ==== The wireless frontend is handled using a slightly hacked series-1 LaFonera access point. === RS232 Interface === A general description including a [[http://www.dd-wrt.com/wiki/index.php/LaFonera_Hardware_Serial-Cable-Port|pinout diagram of the 10-pin header on the Fonera]] is quite useful to wire it to the Atmega8. === SD-Card Hack === We've [[http://www.larsen-b.com/Article/262.html|added a SD-card using the Foneras GPIO port]] and a couple of kernel modules. ===== Software ===== ==== Arduino / Atmega8 ==== Software was prototyped using the Arduino platform. A custom configuration was generated to account for the 12MHz XTAL (otherwise RS232 communications would break). You can get the code from the [[http://code.google.com/p/shackspaceportal/|shackspaceportal project on Google Code]]. ==== Fonera ==== The access point is running [[http://dd-wrt.com/site/index|dd-wrt]]. All data not part of dd-wrt is stored on the SD-Card. A custom init script, also stored on the SD-Card, copies the user database to the appropriate locations inside the live system after boot (ie. /etc/passwd). ==== Data / User Management ==== User data is held in a SQLite3 database and a couple of shell scripts are used to generate, add, manage, and rollout keys to the portal system itself.