iButton door entry system for common rooms.
Switch branches/tags
Clone or download
crawford Merge pull request #20 from jeid64/master
Exception handling for LDAP
Latest commit 7c4daf1 May 4, 2013
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
firmware don't program by default Oct 23, 2011
hardware Fixed some silkscreen issues on board Aug 8, 2011
software Added TIMEOUT exception, and stopped the exception from retrying a Apr 24, 2013
tools Reports error properly now Sep 6, 2011
.gitignore
Capfile Moved configs around Jul 19, 2011
Gemfile Rack-webauth sucks. Removing it Nov 18, 2011
Gemfile.lock
README.md Fixed ambiguity between dAdder and dId Nov 20, 2011

README.md

Gatekeeper

Overview

This is a door entry system for CSH's common rooms. This allows members to gain access to common rooms using just their iButtons, eliminating the need for keys. The hardware reads iButtons and authenicates against the central access server using XBees to wirelessly communicate.

Features

  • Server can query door state (locked, unlocked)
  • Server can send commands to doors (lock, unlock, pop)
  • Doors can store a local access list
    • Users on this list have 24/7 access
    • Does not require the network to authenticate users
  • Doors can query the access server to determine if users are allowed access
  • Access server can push local access lists to each door
  • Doors can flash error codes using an LED

Protocol

The message frame appears as follows:

+---------+----+--------------------+------------+  
| Command | ID | Payload (Optional) | Terminator |  
+---------+----+--------------------+------------+  

Terminator: \n (newline)

  • The command specifies which operation needs to be performed.
  • The ID is a single byte that identifies the message. If the message requires a response, the response will have the same ID.
  • The payload (which is optional) contains any additional data needed for the command.

Commands

+---------+--------------+----------------------------------------------------+  
| Command | Payload      | Description                                        |  
+---------+--------------+----------------------------------------------------+  
|    Q    |      N/A     | Queries the state of the door. Will return         |  
|         |              |  L (locked) or U (unlocked).                       |  
|    R    |dAddr/Response| Sends the door address and the response.           |  
|    L    |      N/A     | Locks the door. Will return L (success).           |  
|    U    |      N/A     | Unlocks the door. Will return U (success).         |  
|    P    |      N/A     | Unlocks the door, pauses, and then relocks the     |  
|         |              |  door. Will return L (success).                    |  
|    C    |      N/A     | Clears the local access list. Will return Y        |  
|         |              |  (success).                                        |  
|    A    |  iButton(s)  | Comma-seperated list of iButton IDs to be appended |  
|         |              |  to the local access list. Will return Y (success).|  
|    S    |  Status Code | Causes the door to flash the status code to the    |  
|         |              |  user. Will return Y (success).                    |  
|    I    |    iButton   | Sends the iButton ID.                              |  
|    E    |  Error Code  | Sends an error code.                               |  
|    D    |    Door ID   | Sets the door ID. This number is used in all       |  
|         |              |  future communications. Will return Y (success).   |  
+---------+--------------+----------------------------------------------------+