Difference between revisions of "Omegix/USB Auth 1.7"

From Makers Local 256
Jump to: navigation, search
m (Python Approach: added pin assignments)
(Steps Taken: added steps for adding pi to i2c group)
Line 16: Line 16:
 
# [http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c Followed this guide to get I2C available]
 
# [http://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c Followed this guide to get I2C available]
 
#* Used [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=34611&p=293472&hilit=cpuinfo#p293472 this article] to determine that I had a 256MB Model B RaspberryPi.  This is important, because when checking i2cdetect I have to use "-y 0" instead of the "-y 1".
 
#* Used [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=66&t=34611&p=293472&hilit=cpuinfo#p293472 this article] to determine that I had a 256MB Model B RaspberryPi.  This is important, because when checking i2cdetect I have to use "-y 0" instead of the "-y 1".
 +
# This article is good too, it mentions to add the pi user to the i2c group so you don't have to run sudo all the time. 
 +
#* http://www.skpang.co.uk/blog/archives/575
 +
#* sudo adduser pi i2c
  
 
== Troubleshooting ==
 
== Troubleshooting ==

Revision as of 15:22, 27 May 2013

Creator:
User Name
Status:
Your Status
Born On:
18:03, 9 May 2013 (CDT)
Last Updated:
15:22, 27 May 2013 (CDT)

Overview

  • RaspberryPi
    • Running Rasbpian
      • ssh raspberrypi.local

Setup

Steps Taken

  1. Installed Raspbian on a 16GB SD memory card
  2. Followed this guide to get I2C available
    • Used this article to determine that I had a 256MB Model B RaspberryPi. This is important, because when checking i2cdetect I have to use "-y 0" instead of the "-y 1".
  3. This article is good too, it mentions to add the pi user to the i2c group so you don't have to run sudo all the time.

Troubleshooting

  • Ran into this error when running DannyO's (hubcitylabs) poll.py script:

quick2wire/i2c.py", line 72, in transaction

   ioctl(self.fd, I2C_RDWR, addressof(ioctl_arg))

Resources

Python Approach

  • usbScan.py
    • Script will continuously scan for new USB devices, and call ldap Check. If ldap check successful, call DoorUnlock.
  • nfcScan.py
    • same as usbScan.py, except for NFC (and RFID)
  • ldapCheck.py
    • Take in value, see if it's in the LDAP
  • DoorUnlock.py
    • Throw pins high and low on the GPIO to trigger relays that will be tied to a powerbolt1000.
    • Monitor pins wired to reed switches to ensure door is closed before re-locking.
    • Pin Assignments
      • Relay for Door Unlock (IN1 on Keyes Relay Board): #23 on GPIO
      • Relay for Door Lock (IN2 on Keyes Relay Board): #24 on GPIO
  • ScanReedSwitch
    • Pin Assignments: #25 on GPIO

Perl Approach

  • Would have to write an PN532 driver in perl
  • Alternatively have perl call python scripts, python already has a PN532 driver written
  • Write a new ackis module for NFC monitoring