Skip to content
This repository has been archived by the owner on Aug 31, 2024. It is now read-only.

Commit

Permalink
PiPass 1.52
Browse files Browse the repository at this point in the history
The PiPass Dashboard can now be used to enable and disable hostapd
security. Also included is a bug fix where Shuffle Zones was not
working as intended after the logging system changes with value
verification.
  • Loading branch information
Matthew-Hsu committed Jun 3, 2015
1 parent 6f4a470 commit 34588c4
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 15 deletions.
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# PiPass - Nintendo 3DS Homepass for the Raspberry Pi
PiPass turns your Raspberry Pi into a Nintendo 3DS Homepass Relay Station. The PiPass Dashboard can be accessed through a computer or mobile device. It can manage features without the need of opening up any files manually. However, some fine-tuning may require getting your hands 'dirty'. Though the process is relatively fast and easy.

This does not showcase a complete list of features, but it gives a sense in what PiPass looks like: <a href="https://www.youtube.com/watch?v=ttoDlpEBqBU" target="_blank">PiPass Video Overview</a>. The video shown is based on PiPass 1.4, however the general work-flow is relatively the same as in PiPass 1.51 with some minor differences.
This does not showcase a complete list of features, but it gives a sense in what PiPass looks like: <a href="https://www.youtube.com/watch?v=ttoDlpEBqBU" target="_blank">PiPass Video Overview</a>. The video shown is based on PiPass 1.4, however the general work-flow is relatively the same as in PiPass 1.52 with some minor differences.

# What's New in Version 1.51
PiPass 1.51 focuses on overall polish and being informative about what is exactly going on "behind the scenes". The biggest feature addition is the logging system that provides extra information regarding status and it also aids in troubleshooting. The changelog for this version of PiPass is as follows:
# What's New in Version 1.52
<b>Note: </b>Those who are using 'PiPass Update' on versions below PiPass 1.52, please go to 'PiPass Settings' and verify 'Hostapd Security'. PiPass 1.52 can now enable / disable hostapd security and it will assume no security if this setting is not updated after updating PiPass to PiPass 1.52. Once this setting has been updated, PiPass will automatically remember this setting for future versions.

PiPass 1.52 focuses on overall polish and being informative about what is exactly going on "behind the scenes". The biggest feature addition is the logging system that provides extra information regarding status and it also aids in troubleshooting. The changelog for this version of PiPass is as follows:

* Hostapd security can now be enabled / disabled through 'PiPass Settings'.
* Fixed 'Shuffle Zones' bug where piPass.py would force it to be enabled.
* PiPass now features a logging system that is accessible through the dashboard.
* piPass.py works with the logging system to diagnose issues. (e.g., hostapd WiFi drivers)
* piPass.py works with the logging system to diagnose issues (e.g., hostapd WiFi drivers).
* PiPass will log all invalid MAC addresses encountered and skip to the next zone.
* PiPass can now reset the network through the dashboard.
* PiPass PHP form validation messages now conforms to responsive design and the user interface.
Expand Down Expand Up @@ -103,7 +107,7 @@ Here is a list of dependencies needed for PiPass, so install the following packa

This would also be a good point where you would install the correct WiFi driver for your WiFi USB dongle.

Now download PiPass from the 1.51 branch as a zip file and extract the contents on your local machine. You will notice three directories inside PiPass: etc, opt, and var. These three directories are the locations where you want to install PiPass (e.g., Linux root locations would be /etc/, /opt/, and /var/). Go ahead and merge the directories and it will be safe to overwrite the files with PiPass' configuration files.
Now download PiPass from the 1.52 branch as a zip file and extract the contents on your local machine. You will notice three directories inside PiPass: etc, opt, and var. These three directories are the locations where you want to install PiPass (e.g., Linux root locations would be /etc/, /opt/, and /var/). Go ahead and merge the directories and it will be safe to overwrite the files with PiPass' configuration files.

For security sake, PiPass will only work on the Nintendo 3DS systems that you authorize. Access the PiPass Dashboard by opening up a web browser on a device of your choice and enter your Raspberry Pi's IP address into the address bar. The PiPass Dashboard should be displayed. Go to your Nintendo 3DS and open up your connection settings to find out your 3DS' MAC address. Once you have your MAC address, you can add it to the authenticated list by doing the following:

Expand Down Expand Up @@ -202,6 +206,10 @@ The KEY would be the value 1OfgyryUHeCPth76ziFT985XNLS-O5EXtjQDa0kA1L6M between

Now you will need to enter the worksheet you want to use. "PiPass DB Worksheet" controls which worksheet to use. The default value of 1 selects the very first worksheet and the value of 2 selects the second worksheet. For example, setting PiPass DB Worksheet to the value of 2 would use the "nintendo_zones" worksheet in the templated spreadsheet that you just copied.

<b>Hostapd Security</b>

This feature can be enabled or disabled through the PiPass Dashboard. Enabling security will make PiPass use the 3DS MAC addresses that are inputted in '3DS Authentication'. Disabling security will allow anyone access to your network. When disabling security, discretion is advised.

<b>3DS Authentication</b>

The authenticated list of 3DS systems that are allowed to connect to PiPass. Enter the 3DS MAC addresses on a separate line and in the format of XX:XX:XX:XX:XX:XX. This option can be found through the dashboard.
Expand Down Expand Up @@ -238,6 +246,8 @@ Please let me know if any other hardware is compatible and I will add them to th

<a href="http://www.amazon.ca/gp/product/B00T2U7R7I/ref=as_li_ss_tl?ie=UTF8&camp=15121&creative=390961&creativeASIN=B00T2U7R7I&linkCode=as2&tag=matthew084-20">Raspberry Pi 2 Model B 1GB</a><img src="http://ir-ca.amazon-adsystem.com/e/ir?t=matthew084-20&l=as2&o=15&a=B00T2U7R7I" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.ca/gp/product/B0096M7IJY/ref=as_li_ss_tl?ie=UTF8&camp=15121&creative=390961&creativeASIN=B0096M7IJY&linkCode=as2&tag=matthew084-20">CanaKit Raspberry Pi 2 Complete Starter Kit (Raspberry Pi 2 + WiFi + 8GB SD Card + Case + Power Supply + HDMI Cable)</a><img src="http://ir-ca.amazon-adsystem.com/e/ir?t=matthew084-20&l=as2&o=15&a=B0096M7IJY" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.ca/gp/product/B00GWTNYJW/ref=as_li_ss_tl?ie=UTF8&camp=15121&creative=390961&creativeASIN=B00GWTNYJW&linkCode=as2&tag=matthew084-20">CanaKit Raspberry Pi 2 (1GB) Ultimate Starter Kit (Over 40 Components: New Raspberry Pi 2 + WiFi Dongle + 8GB SD Card + Case + Power Supply and many more)</a><img src="http://ir-ca.amazon-adsystem.com/e/ir?t=matthew084-20&l=as2&o=15&a=B00GWTNYJW" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.ca/gp/product/B00OL8JSIM/ref=as_li_ss_tl?ie=UTF8&camp=15121&creative=390961&creativeASIN=B00OL8JSIM&linkCode=as2&tag=matthew084-20">Mini RT5370 150Mbps USB Wifi Wireless LAN Card 802.11 N/g/b Adapter with Antenna</a><img src="http://ir-ca.amazon-adsystem.com/e/ir?t=matthew084-20&l=as2&o=15&a=B00OL8JSIM" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
Expand All @@ -248,6 +258,8 @@ Please let me know if any other hardware is compatible and I will add them to th

<a href="http://www.amazon.com/gp/product/B008XVAVAW/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B008XVAVAW&linkCode=as2&tag=matthew08b-20&linkId=IN557BBG3PJEAU7M">CanaKit Raspberry Pi 2 Complete Starter Kit with WiFi (Latest Version Raspberry Pi 2 + WiFi + Original Preloaded 8GB SD Card + Case + Power Supply + HDMI Cable)</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=matthew08b-20&l=as2&o=1&a=B008XVAVAW" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.com/gp/product/B00G1PNG54/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00G1PNG54&linkCode=as2&tag=matthew08b-20&linkId=WF5DSXG3FDINKT63">CanaKit Raspberry Pi 2 (1GB) Ultimate Starter Kit (Over 40 Components: New Raspberry Pi 2 + WiFi Dongle + 8GB SD Card + Case + Power Supply and many more)</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=matthew08b-20&l=as2&o=1&a=B00G1PNG54" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.com/gp/product/B00V39HVY0/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00V39HVY0&linkCode=as2&tag=matthew08b-20&linkId=D5PCSSC5K4XNMGXS">SunFounder RT5370 USB Wireless Network Wifi Adapter for Raspberry Pi with 2dBi Antenna - Plug and Play</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=matthew08b-20&l=as2&o=1&a=B00V39HVY0" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />

<a href="http://www.amazon.com/gp/product/B0067NFSE2/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B0067NFSE2&linkCode=as2&tag=matthew08b-20&linkId=K7P7YF4R4Z3DFFQO">Protronix 150Mbps USB Wireless Network WIFI Adapter for Laptop Notebook 802.11N/G</a><img src="http://ir-na.amazon-adsystem.com/e/ir?t=matthew08b-20&l=as2&o=1&a=B0067NFSE2" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
Expand All @@ -257,8 +269,8 @@ Please let me know if any other hardware is compatible and I will add them to th
# Future Features
I want to expand the functionality of PiPass by adding the following:

* PiPass TBD: I am looking for suggestions, but I cannot guarantee that I will implement a requested feature.
* Borrowing a Raspberry Pi Model B and Raspberry Pi Model B+ for an expanded list of pre-made images.
* I am always looking for suggestions, but I cannot guarantee that I will implement a requested feature. I will try my best though!

# Support
If you have any problems with PiPass, please let me know through my GitHub. I will do my best to help you out. Thanks for trying out PiPass!
22 changes: 18 additions & 4 deletions opt/PiPass/piPass.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ def loadSettings():
try:
PIPASS_SHUFFLE = pipass_config['PIPASS_SHUFFLE']
except KeyError:
PIPASS_SHUFFLE = "on"
logger.warning('Missing the PIPASS_SHUFFLE key in: ' + DASHBOARD + 'assets/json/pipass_config.json. Defaulting to: ' + PIPASS_SHUFFLE + '.')
PIPASS_SHUFFLE = "off"

# The Google Spreadsheet's KEY that is used for PIPASS_DB.
global GSX_KEY
Expand All @@ -126,6 +125,20 @@ def loadSettings():
global PIPASS_DB
PIPASS_DB = "https://spreadsheets.google.com/feeds/list/" + GSX_KEY + "/" + GSX_WORKSHEET + "/public/values?alt=json"

# Controls whether PiPass should have WiFi security enabled or disabled.
global HOSTAPD_SECURITY

try:
HOSTAPD_SECURITY = pipass_config['HOSTAPD_SECURITY']
except KeyError:
HOSTAPD_SECURITY = "0"

# Hostapd uses a binary flag to signal if WiFi security is enabled or disabled. So, perform the conversions here.
if HOSTAPD_SECURITY == "on":
HOSTAPD_SECURITY = "1"
else:
HOSTAPD_SECURITY = "0"

# Hostapd driver for your USB WiFi dongle. If the default value does not work for
# you, you may need to research which driver is compatible. Refer to README at
# https://github.com/Matthew-Hsu/PiPass/blob/master/README.md
Expand Down Expand Up @@ -208,6 +221,7 @@ def sigUsr2(signum, stack):
GSX_KEY = None
GSX_WORKSHEET = None
PIPASS_DB = None
HOSTAPD_SECURITY = None
HOSTAPD_DRIVER = None
DASHBOARD = None

Expand Down Expand Up @@ -337,7 +351,7 @@ def sigUsr2(signum, stack):
logger.info('PiPass has been shutdown with an error.')
exit(1)

conf = "interface=wlan0\nbridge=br0\ndriver=" + HOSTAPD_DRIVER + "\nssid=" + zoneValues[0] + "\nbssid=" + zoneValues[1] + "\nhw_mode=g\nchannel=6\nauth_algs=1\nwpa=0\nmacaddr_acl=1\naccept_mac_file=/etc/hostapd/mac_accept\nwmm_enabled=0\nignore_broadcast_ssid=0"
conf = "interface=wlan0\nbridge=br0\ndriver=" + HOSTAPD_DRIVER + "\nssid=" + zoneValues[0] + "\nbssid=" + zoneValues[1] + "\nhw_mode=g\nchannel=6\nauth_algs=1\nwpa=0\nmacaddr_acl=" + HOSTAPD_SECURITY + "\naccept_mac_file=/etc/hostapd/mac_accept\nwmm_enabled=0\nignore_broadcast_ssid=0"

fo.write(conf)
fo.close()
Expand Down Expand Up @@ -365,7 +379,7 @@ def sigUsr2(signum, stack):
logger.info('PiPass has been shutdown with an error.')
exit(1)

conf = "interface=wlan0\nbridge=br0\ndriver=" + HOSTAPD_DRIVER + "\nssid=" + HOSTAPD_DRIVER + "\nbssid=02:00:00:00:00:01\nhw_mode=g\nchannel=6\nauth_algs=1\nwpa=0\nmacaddr_acl=1\naccept_mac_file=/etc/hostapd/mac_accept\nwmm_enabled=0\nignore_broadcast_ssid=0"
conf = "interface=wlan0\nbridge=br0\ndriver=" + HOSTAPD_DRIVER + "\nssid=" + HOSTAPD_DRIVER + "\nbssid=02:00:00:00:00:01\nhw_mode=g\nchannel=6\nauth_algs=1\nwpa=0\nmacaddr_acl=" + HOSTAPD_SECURITY + "\naccept_mac_file=/etc/hostapd/mac_accept\nwmm_enabled=0\nignore_broadcast_ssid=0"

fo.write(conf)
fo.close()
Expand Down
2 changes: 1 addition & 1 deletion var/www/assets/json/current_list.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion var/www/assets/json/pipass_config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"STREETPASS_CYCLE_MINUTES":"30","PIPASS_SHUFFLE":"on","GSX_KEY":"1OfgyryUHeCPth76ziFT985XNLS-O5EXtjQDa0kA1L6M","GSX_WORKSHEET":"7","AUTHENTICATION":"","HOSTAPD_DRIVER":"nl80211","DASHBOARD":"\/var\/www\/"}
{"STREETPASS_CYCLE_MINUTES":"30","PIPASS_SHUFFLE":"on","GSX_KEY":"1OfgyryUHeCPth76ziFT985XNLS-O5EXtjQDa0kA1L6M","GSX_WORKSHEET":"7","HOSTAPD_SECURITY":"on","AUTHENTICATION":"","HOSTAPD_DRIVER":"nl80211","DASHBOARD":"\/var\/www\/"}
8 changes: 5 additions & 3 deletions var/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h4>Report an Issue</h4>
</div>
<h4>About PiPass</h4>
<p>
Hooray! You are running PiPass 1.51. We're keeping it sleek while being extra informative for all those curious times.
Hooray! You are running PiPass 1.52. We're keeping it sleek while being extra informative for all those curious times.
</p>
</div>
<div class="modal fade" id="info" tabindex="-1" role="dialog" aria-labelledby="About PiPass" aria-hidden="true">
Expand All @@ -201,10 +201,12 @@ <h4>About PiPass</h4>
<h4 class="modal-title" id="About PiPass">About PiPass</h4>
</div>
<div class="modal-body">
<p>PiPass 1.51 Changelog:</p>
<p>PiPass 1.52 Changelog:</p>
<ul>
<li>[+] Hostapd security can now be enabled / disabled through 'PiPass Settings'. View the README for important information regarding this change.</li>
<li>[+] Fixed 'Shuffle Zones' bug where piPass.py would force it to be enabled.</li>
<li>[+] PiPass now features a logging system that is accessible through the dashboard.</li>
<li>[+] piPass.py works with the logging system to diagnose issues. (e.g., hostapd WiFi drivers)</li>
<li>[+] piPass.py works with the logging system to diagnose issues (e.g., hostapd WiFi drivers).</li>
<li>[+] PiPass will log all invalid MAC addresses encountered and skip to the next zone.</li>
<li>[+] PiPass can now reset the network through the dashboard.</li>
<li>[+] PiPass PHP form validation messages now conforms to responsive design and the user interface.</li>
Expand Down
6 changes: 6 additions & 0 deletions var/www/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ <h4 class="mb"><i class="fa fa-angle-right"></i> Configure PiPass</h4>
class="form-control" id="GSX_WORKSHEET" name="GSX_WORKSHEET" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">Hostapd Security</label>
<div class="col-sm-1">
<input type="checkbox" id="HOSTAPD_SECURITY" name="HOSTAPD_SECURITY">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 col-sm-2 control-label">3DS Authentication</label>
<div class="col-sm-5">
Expand Down

0 comments on commit 34588c4

Please sign in to comment.