Difference between pages "Netbsd vpn gateway basic setup" and "Projects/RFIDpop"

From ENTS
(Difference between pages)
Jump to: navigation, search
(prep to recompile the kernel)
 
 
Line 1: Line 1:
  
===basic setup after vanilla install===
+
== RFID Enabled Pop Machine ==
  
---
 
  
vi /root/.profile
+
== History ==
  
change the path for the pkgsrc repo to:<br />
+
After the kind donation of a 70'sish Coca-Cola Vending machine, we started tearing into it to get it working. While there were a few issues off the start, it's in good mechanical order and tests showed it's power consumption was >50% less than the existing smaller pop machine in the space.
ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/5.0/All/
+
  
  pkg_add lynx<br />
+
One major problem was that the coin mechanism would not accept newer loonies and toonies. A replacement mechanism would be $200 or more. A bit pricy for a starving hackerspace, so we are doing what all good hackers do, overengineer a solution with parts at hand. In this case, utilize the door RFID tags the members have anyways and use them to debit from a pre paid pop account.
  pkg_add pico<br />
+
  pkg_add screen
+
  
---
+
== Mechanics ==
  
vi /etc/ifconfig.fxp0
+
The machine is a Vendo V384. [http://soda-machines.com/index.php?option=com_content&task=view&id=554&Itemid=14 Soda-Machines.com]
  
  192.168.0.20{1,2} netmask 255.255.255.0
+
Oricanus did much of the work to figure out the mechanics of the machine and how to bypass the coin mech to allow us to dispense product. It's actually very easy. On the connector to the coin mech, short pins 1-7 together (all the time) and then momentarily contact pins 1-3 and then make your selection.
  
---
+
The original coke sign is a plexiglass insert, easily replaced.  Behind it is a florecent ballast with a 120v supply line running to it. 
  
vi /etc/sysctl.conf
+
== V1 ==
  
  net.inet.ip.forwarding=1
+
Version 1 is to basically setup the nessecary hardware to replace the coin mech and to use the RFID tags to debit from an account with little or no modification to the existing electro mechanical dispensing system. Various options were considered but parts on hand and flexibility came together in the following:
  
---
+
-Raspberry Pi (Render)
 +
-Parallax Serial RFID Reader (Render)
 +
-TTL level shifter for 5v RFID reader to talk to 3.3v Pi serial gpio pins (Colin)
 +
-Solid state relay board (on order)
 +
-HDMI to DVI Adapter
 +
-Random LCD monitor from around the space
  
vi /etc/resolv.conf
+
Curent Status: In prototype.  RFID via GPIO working.  GPIO relay working.
  
nameserver 64.59.184.13
+
Current goals: Users provide cash or paypal to director who adds to account for thier tag via web interface on the pi.
  
---
+
On scan, Pi checks database for balance.  If sufficient balance, deduct $1 and dispense product.  If insufficent balance, then display an unhapy message .  Once product is dispensed display the username and balance remaining for 15 seconds.
  
vi /etc/rc.conf
+
When 'idle' the screen will goto a slide show of comical and ficticious beverages (Duff, Slurm, Nukacola, etc)
  
hostname=chaosvpn{1,2}.440bx.net<br />
+
== V2 ==
defaultroute=192.168.0.1<br />
+
sshd=yes
+
  
---
+
Feature requests:
  
useradd -m -G wheel chaosvpn_user<br />
+
Product remaining display
passwd chaosvpn_user
+
Tie in with mastercontrol
 
+
Ability to paypal monies directly to the pi to increase balance (or user added code via web interface)
---
+
Random dispense mode (slot machine)
 
+
Ability to dispense products at different prices (water $.25, beer $5)
continue with the steps at:
+
Consumption graphs
 
+
https://wiki.hamburg.ccc.de/ChaosVPN:NetBSDHowto
+
 
+
 
+
---
+
 
+
===prep to recompile the kernel===
+
 
+
make directories
+
 
+
mkdir /usr/src
+
chown chaosvpn_user /usr/src
+
 
+
get the actual source
+
+
ftp -i ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.2/source/sets/
+
mget *.tgz
+
+
extract
+
 
+
for i in *.tgz
+
do
+
tar -xzf $i
+
done
+
 
+
after you realize youve extracted to the wrong dir
+
 
+
mv /usr/src/usr/src/* /usr/src
+
 
+
copy config stuff
+
 
+
cd /usr/src/sys/arch/i386
+
cp GENERIC i686_CVPN_x300
+
 
+
start editing
+
 
+
pico i686_CVPN_x300
+
 
+
reference
+
 
+
http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Options.html
+
 
+
CFLAGS:
+
 
+
CPUFLAGS="-march=pentium3m -mtune=pentium3m"
+
 
+
Commented out:
+
 
+
PowerNow! and SpeedStep since this processor doesnt support it
+
+
Uncommented:
+
 
+
PERFCTRS #since this is going to be non-smp kernel (may or may not ever use this)
+
GATEWAY
+
IPSEC
+
IPSEC_ESP
+
IPSEC_NAT_T
+

Revision as of 14:13, 2 November 2013

Contents

RFID Enabled Pop Machine

History

After the kind donation of a 70'sish Coca-Cola Vending machine, we started tearing into it to get it working. While there were a few issues off the start, it's in good mechanical order and tests showed it's power consumption was >50% less than the existing smaller pop machine in the space.

One major problem was that the coin mechanism would not accept newer loonies and toonies. A replacement mechanism would be $200 or more. A bit pricy for a starving hackerspace, so we are doing what all good hackers do, overengineer a solution with parts at hand. In this case, utilize the door RFID tags the members have anyways and use them to debit from a pre paid pop account.

Mechanics

The machine is a Vendo V384. Soda-Machines.com

Oricanus did much of the work to figure out the mechanics of the machine and how to bypass the coin mech to allow us to dispense product. It's actually very easy. On the connector to the coin mech, short pins 1-7 together (all the time) and then momentarily contact pins 1-3 and then make your selection.

The original coke sign is a plexiglass insert, easily replaced. Behind it is a florecent ballast with a 120v supply line running to it.

V1

Version 1 is to basically setup the nessecary hardware to replace the coin mech and to use the RFID tags to debit from an account with little or no modification to the existing electro mechanical dispensing system. Various options were considered but parts on hand and flexibility came together in the following:

-Raspberry Pi (Render) -Parallax Serial RFID Reader (Render) -TTL level shifter for 5v RFID reader to talk to 3.3v Pi serial gpio pins (Colin) -Solid state relay board (on order) -HDMI to DVI Adapter -Random LCD monitor from around the space

Curent Status: In prototype. RFID via GPIO working. GPIO relay working.

Current goals: Users provide cash or paypal to director who adds to account for thier tag via web interface on the pi.

On scan, Pi checks database for balance. If sufficient balance, deduct $1 and dispense product. If insufficent balance, then display an unhapy message . Once product is dispensed display the username and balance remaining for 15 seconds.

When 'idle' the screen will goto a slide show of comical and ficticious beverages (Duff, Slurm, Nukacola, etc)

V2

Feature requests:

Product remaining display Tie in with mastercontrol Ability to paypal monies directly to the pi to increase balance (or user added code via web interface) Random dispense mode (slot machine) Ability to dispense products at different prices (water $.25, beer $5) Consumption graphs

Personal tools
Namespaces

Variants
Actions
Navigation
Members
Toolbox