Setting up the Raspberry PI 3 As A VMUG Registration System

Sometime in 2016, there were some posts in the VMUG Leader Workspace on vmug.com by Patrick Stasko (@PatrickStasko), from Cleveland VMUG, about setting up Raspberry PI as a VMUG Registration System.  I was very intrigued and decided to look into doing it for NJ VMUG!

We purchased the following items:

Raspberry PI 3 Model B Motherboard
http://amzn.to/2l8bFjk

CanaKit 5V 2.5A Raspberry PI 3 Power Supply/Adapter/Charger
http://amzn.to/2jS61gh

Official Raspberry PI 3 Case – Black/Grey
http://amzn.to/2kHJpmN

Addicore Raspberry PI Heatsink Set for B, B+ 2 and 3 (set of 3 Aluminum Heat Sinks)
http://amzn.to/2l8oXwn

SanDisk Ultra 64gb MicroSDXC UHS-I Card
http://amzn.to/2kD83VL

Dymo LabelWriter 450 Thermal Label Printer (1752264)
http://amzn.to/2kHDEFt

Dymo Compatible 30857 2 1/4in X 4in Name Badge Labels 6 Pack Kenco Label
http://amzn.to/2lcS8u9

ASUS C201PA-DS02 11.6 inch Chromebook (1.8ghz Quad Core, 4GB LPDDR3, 16gb SSD), Navy Blue
http://amzn.to/2lcQSau

Logitech Wireless Mouse M325 with Designed-for-web Scrolling – Light Silver
http://amzn.to/2kwtt4J

C-Line Pin Style Name Badge Holders with Inserts, 3 x 4 Inches, 100 per Box (94043)
http://amzn.to/2kCSkq0

HOOTOO Wireless Travel Router, USB Port, High Performance- TripMate Nano
http://amzn.to/2jQB0OC

The total for all these items came to approx. $420.

As it was my first time with the Raspberry PI, I decided to install Raspbian via Noobs (https://www.raspberrypi.org/downloads/noobs/), the automated Operating System Installer for the Raspberry PI.  The easiest way was to insert the MicroUSB card into my PC and copy Noobs to it, then insert it into the Raspberry PI, to install the OS.

Next, I read up on the “pivmugc” project on Github (https://github.com/tkrn/pivmugc).  I downloaded the binaries and gave the install script a try.  What I found was, only SOME of the apps installed and barely anything was configured properly.  In doing some research, I found the install script hardcodes the Wi-Fi to use the 10.0.0.0 network.  If you’re Wi-Fi router isn’t configured to use 10.0.0.0, the script will lose network connectivity partway through.  I am using a Hootoo router (see above) and it’s set to 10.10.10.254 as its IP.  I tried to change it a few times and was unsuccessful, so I decided it was easier to just modify the code to switch from 10.0.0.1 as the router to 10.10.10.254, and change the network info from 10.0.0.0 to 10.10.10.0.

Lines 85 through 91 of the pivmugc_installer.sh script must be modified.

Here is an excerpt of the original script:


HOSTNAME=$(hostname)
INTERFACES='# interfaces(5) file used by ifup(8) and ifdown(8)\n\n# Please note that this file is written to be used with dhcpcd\n# For static IP, consult /etc/dhcpcd.conf and "man dhcpcd.conf"\n\n# Include files from /etc/network/interfaces.d:\nsource-directory /etc/network/interfaces.d\n\nauto lo\niface lo inet loopback\n\niface eth0 inet manual\n\niface wlan0 inet static\naddress 10.0.0.1\nnetwork 10.0.0.0\nnetmask 255.255.255.0\nbroadcast 10.0.0.255'
DHCPCD='\n#WLAN0 Configuration\n\ninterface wlan0\nstatic ip_address=10.0.0.1/24\nstatic routers=10.0.0.1\nstatic domain_name_servers=10.0.0.1'
WLAN0_CONF='interface=wlan0\nexpand-hosts\ndomain=local\ndhcp-range=10.0.0.10,10.0.0.50,24h\ndhcp-option=6,10.0.0.1'
HOSTAPD_CONF='# Basic configuration\ndriver=nl80211\ninterface=wlan0\nssid=pivmugc\nhw_mode=g\nchannel=8\nauth_algs=1\n\n# WPA configuration\nwpa=2\nwpa_passphrase=PIVMUGCPASS\nwpa_key_mgmt=WPA-PSK\nwpa_pairwise=TKIP\nrsn_pairwise=CCMP\nwpa_ptk_rekey=600\nmacaddr_acl=0'
HOSTAPD_DEFAULT='DAEMON_CONF="/etc/hostapd/hostapd.conf"'
DHCLIENT_CONF='timeout 10;\nlease {\ninterface "eth0";\nfixed-address 169.254.0.10;\noption subnet-mask 255.255.0.0;\nrenew 2 2022/1/1 00:00:01;\nrebind 2 2022/1/1 00:00:01;\nexpire 2 2022/1/1 0:00:01;\n}'

Here is my modified script exerpt:

HOSTNAME=$(hostname)
INTERFACES='# interfaces(5) file used by ifup(8) and ifdown(8)\n\n# Please note that this file is written to be used with dhcpcd\n# For static IP, consult /etc/dhcpcd.conf and "man dhcpcd.conf"\n\n# Include files from /etc/network/interfaces.d:\nsource-directory /etc/network/interfaces.d\n\nauto lo\niface lo inet loopback\n\niface eth0 inet manual\n\niface wlan0 inet static\naddress 10.10.10.254\nnetwork 10.10.10.0\nnetmask 255.255.255.0\nbroadcast 10.10.10.255'
DHCPCD='\n#WLAN0 Configuration\n\ninterface wlan0\nstatic ip_address=10.10.10.1/24\nstatic routers=10.10.10.254\nstatic domain_name_servers=10.10.10.254'
WLAN0_CONF='interface=wlan0\nexpand-hosts\ndomain=local\ndhcp-range=10.10.10.10,10.10.10.50,24h\ndhcp-option=6,10.10.10.254'
HOSTAPD_CONF='# Basic configuration\ndriver=nl80211\ninterface=wlan0\nssid=pivmugc\nhw_mode=g\nchannel=8\nauth_algs=1\n\n# WPA configuration\nwpa=2\nwpa_passphrase=PIVMUGCPASS\nwpa_key_mgmt=WPA-PSK\nwpa_pairwise=TKIP\nrsn_pairwise=CCMP\nwpa_ptk_rekey=600\nmacaddr_acl=0'
HOSTAPD_DEFAULT='DAEMON_CONF="/etc/hostapd/hostapd.conf"'
DHCLIENT_CONF='timeout 10;\nlease {\ninterface "eth0";\nfixed-address 169.254.0.10;\noption subnet-mask 255.255.0.0;\nrenew 2 2022/1/1 00:00:01;\nrebind 2 2022/1/1 00:00:01;\nexpire 2 2022/1/1 0:00:01;\n}'

Once I made those changes, and reinstalled Rasbian… I was ready to start again with my modified script. This time, it installed everything I wanted it to.  However, I found some of the printer config wasn’t there when I ran CUPS (the Printer Daemon.)  I had to find and install the Dymo SDK for Linux.  (http://bit.ly/2kbf1Oo)

Once I had the SDK installed, I was then able to make some modifications I found on another site for using a Dymo label printer with CUPS in Linux (http://bit.ly/2jS65N4.)

  • Run this to make sure the user “pi” can access CUPS as an admin:  sudo usermod -a -G lpadmin pi
  • Run the following to make sure remote users can make changes to CUPS:  sudo nano /etc/cups/cupsd.conf
    • Change the text to say:
    • # Only listen for connections from the local machine
      # Listen localhost:631
      Port 631
  • Scroll further down in the config file until you see the “location” sections. In the block below, we’ve bolded the lines you need to add to the config:

< Location / >
# Restrict access to the server...
Order allow,deny
Allow @local
< /Location >

< Location /admin >
# Restrict access to the admin pages...
Order allow,deny
Allow @local
< /Location >

< Location /admin/conf >
AuthType Default
Require user @SYSTEM

# Restrict access to the configuration files...
Order allow,deny
Allow @local
< /Location >

  • Restart CUPS by issuing the following:  sudo /etc/init.d/cups restart
  • You should now be able to access the print server on any local computer by typing http://{raspberry pi’s IP address}:631

I was then able to go back to the manual install instructions for pivmugc, and make sure my printer was configured to use the proper labels…

https://raspberrypi:631/admin
Click on “Add Printer”
Click on the printer under “Local Printers”
Press “Continue”
Press “Add Printer”
Change the “Media Size” to “99014 Name Badge Label”
Change the “Output Resolution” to the highest possible.
Change “Print Density” to “Dark”
Change “Print Quality” to “Barcodes and Graphics”
Press “Set Default Options”
Click on the Printer name
Under the “Administration” drop down, click on “Set As Server Default”

After that, everything worked properly!  But I wanted to do one last thing… I wanted each of the pages to say NJ VMUG.  I already had a logo we used to have stickers made, so I decided to make some changes…

1. I copied the jpg to the root of /usr/local/nginx/html.
2. I edited admin.htm, checkin.htm, register.htm, and index.htm, where I added the line below to the top of each file.
<center><img src=”NJVMUG_Sticker.jpg” height=100 width=200></center>

Here is the unit on display, on top of the $5 plastic case (purchased at Target) I use to store/transport everything.
20161115_085759

And HERE is the behind the scenes shot of the PI and my Wi-Fi Travel Router. Smile
20161115_115601

Thanks to Patrick Stasko as well as Matt Heldstab (@mattheldstab) for the assistance getting this up and running!

 

Ben Liebowitz, VCP, vExpert
NJ VMUG Leader

Share This:

2 thoughts on “Setting up the Raspberry PI 3 As A VMUG Registration System

    1. Has been working GREAT for us! We do tend to have to have someone at the registration desk and walk people through it, even though we’ve been using the new system for almost a year now.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.