Jump to content

Wireless Geocache Tutorial


Rumigo

Recommended Posts

I created a wireless Geocache! Here is a tutorial for how I set it up:

Requirements:

1. A Raspberry Pi (model B is tested) imaged with the default debian/raspbian os

2. A low powered WiFi Access Point enabled USB (recommended: http://www.amazon.com/Edimax-EW-7811Un-150Mbps-Raspberry-Supports/dp/B003MTTJOY)

3. The zip from the link: https://github.com/harryallerston/RPI-Wireless-Hotspot

4. vsftpd

5. lighttpd or some other web-hosting package

6. An ethernet connection for setup

7. An 8GB sdcard or more

 

Instructions:

Part 1: Install

0. connect the ethernet cable and a keyboard... NOTHING ELSE

1. Boot up the pi

1a. Log in

2. Set it up normally (expandfs, set the locale & keyboard layout, etc.) EXCEPT for the gpu/cpu memory split. Set that to 16

3. Type this code and press the enter key after every line (note -- cAsE SeNsItIvE):

3a.

sudo su
apt-get install -y vsftpd lighttpd && \
wget https://github.com/harryallerston/RPI-Wireless-Hotspot/archive/master.zip && \ 
unzip master.zip && \ 
cd RPI-Wireless-Hotspot-master && \
./install \
y

4. Go with the defaults by pressing enter at every prompt but the first one (press y and then enter)

4a. Wait for reboot

4b. Log in and type

sudo su

 

Part 2: Configuration

5. Edit the hostapd.conf file

5a. IMPORTANT! Control+X, pressing y, and then enter closes and saves your config using these commands!

5b.

nano /etc/hostapd/hostapd.conf

5c. Edit the ssid and wpa settings, or just put a # (Shift+3 on many US keyboards) in front to comment them out (no authentication).

5d. Close and save the document (Step 5a)

6. Edit the ftp server config (so only local users can log in).

nano /etc/vsftpd.conf

6a. Edit or uncomment the settings to say:

Anonymous_enable=NO
Local_enable=YES
Write_enable=YES
Ascii_upload_enable=YES
Ascii_download_enable=YES

6b. Close and save the document (Step 5a)

7. This is the last setting. Edit the rc.local file:

7a.

nano /etc/rc.local

7b. Edit it to look like this:

7c.

#!/bin/sh -e
udhcpd
exit 0

7d. Close and save the document (Step 5a)

7e. That was to manually start the udhcpd service on the system since some systems don't autostart it on boot

8. Make the folder editable by ftp user pi for Part 3:

chmod a=rwx -R /var/www

9. Finally! Reboot it by typing reboot and pressing enter!

 

10. You DO NOT need to log in to your pi again. You can disconnect the power & keyboard, and connect the USB WiFi device.

 

Note - if you get any errors on boot, use your favorite search engine!

 

Part 3: Website Setup

If you connect your mobile device or your computer to your new wireless access point, and go to any webpage, it will take you to a temporary index.html page hosted on your pi.

We need to change it!

1. Download the doc format of the Geocache info page (https://www.geocaching.com/articles/geocachenote.doc) and save it as an html webpage in Microsoft Word or OpenOffice Writer.

2. Name it index.html

3. Now open up your favorite ftp software on your computer and connect to the Raspberry Pi.

4. Connect to the ip of the Raspberry Pi with the pi user (the default password is 'raspberry' without quotes).

5. Go to the /var/www directory. You may be in the /home/pi directory when you log in.

6. Overwrite the index.html file with your new index.html that you made.

7. Exit everything

8.(Optional) Add a QR code or a link that links to the log page of your Geocache! This would be put at the bottom of the Geocache page.

 

Congratulations!

If you got this far, you have a working Wireless Geocache!

 

Now all you have to do is figure out how to power it, where to hide it, and how to protect it! Maybe you could instruct your users to bring a 9 volt battery, and have a tiny inverter inside the Geocache.

 

I used this link to write this tutorial: https://github.com/harryallerston/RPI-Wireless-Hotspot

 

That ends this tutorial.

I can't wait for what people will do with this!

Have fun Geocaching!

 

EDIT: Wrong chmod command! It has been corrected.

EDIT: Step 1 is now fully automatic from ssh (if you copy and paste the whole thing)

Edited by Rumigo
Link to comment

Wow. Cool. Seems pretty complex.

 

Was really getting into it until you said, "8.(Optional) Add a QR code or a link that links to the log page of your Geocache! This would be put at the bottom of the Geocache page."

 

That's not happening any time soon...

Why not? It's just a QR code that brings you to the logging page on geocaching.com. Like the QR code on some trackables.

 

Basically, the URL will bring you to something like :

 

http://www.geocaching.com/seek/log.aspx?WP=GC10&logtype=2

 

(I picked GC10 for this example because it is locked for logging)

 

Not introducing any new element to the game, merely adding a way to get to the log page for those who wants to use it.

 

Edit : unless the OP meant to link to the log page on a server running on the Raspberry Pi. Which can be done, as long as a physical log is also provided. Standard disclaimer : check with your reviewer.

Edited by Chrysalides
Link to comment

I am confused. Other than being cool, what is the Pi doing? Just providing a QR code?

 

I think I could follow those instructions, and it looks like this would cost about $40 to do. What is the Pi doing? I believe that, when powered (either the cache owner would come up some some kind of permanent source, or the finder is supposed to bring their own) it hosts a webpage, and the OP is suggesting it host the standard Geocaching stash note saved as an HTML file. The QR code taking you to the logging page on Geocaching.com is just optional (being put on the bottom of the stash note saved as an HTML file).

 

Of course only people in the short range of the wifi access point would be able to see this webpage hosted on the pi. All in all, a very innovative concept. Which, I have to add, I believe would never fly on Geocaching.com.

Link to comment

I am confused. Other than being cool, what is the Pi doing? Just providing a QR code?

 

I think I could follow those instructions, and it looks like this would cost about $40 to do. What is the Pi doing? I believe that, when powered (either the cache owner would come up some some kind of permanent source, or the finder is supposed to bring their own) it hosts a webpage, and the OP is suggesting it host the standard Geocaching stash note saved as an HTML file. The QR code taking you to the logging page on Geocaching.com is just optional (being put on the bottom of the stash note saved as an HTML file).

 

Of course only people in the short range of the wifi access point would be able to see this webpage hosted on the pi. All in all, a very innovative concept. Which, I have to add, I believe would never fly on Geocaching.com.

Having a QR code on the stash note on a web page hosted on the Raspberry Pi does not make much sense, since it will be displayed on the phone's screen. How are you going to use your phone's camera to scan its own screen? A mirror?

 

You can include a URL to go to the logging page on geocaching.com, but presumably your Pi does not actually have Internet connection, so the user won't be brought to that page. But they can bookmark that URL, and visit the page when they are connected.

 

One way this concept can meet the guidelines (disclaimer : ask your reviewer) is if the web page shows coordinates or directions on how to retrieve a physical geocache, instead of being the cache itself.

 

Another way it may be able to pass muster (same disclaimer applies) is if it allows you to log electronically within the Raspberry Pi itself, but also have a physical cache and log somewhere. The CO can choose to accept electronic logging only without physical log, and must accept physical log without electronic log. I think it should be able to pass muster, but again, check with your reviewer. It would be nice if some reviewers can chime in with their thoughts (but that does not mean YOUR reviewer will publish such a cache).

 

You can get a Pi Model A with Edimax 7811Un for under $35. Figure another $5 for a mains based power supply, and $5 for a SD card - if you're running this indoors. A waterproof enclosure will set you back $20 to $50. A solar based power supply with sufficient battery backup is easily $100 and goes way, way up. If you require a user to provide their own power by bringing a battery, they will need to wait for the Pi to boot up (minimum of 30 seconds) before they can connect to the hot spot.

 

I think this works best if you run it from your home, office (make sure you have permission) or your own shop - an off-grid power solution is too expensive. If you don't want muggles connecting to your hotspot, either require a password that you provide in the cache page, or don't broadcast the SSID.

Link to comment

 

Of course only people in the short range of the wifi access point would be able to see this webpage hosted on the pi. All in all, a very innovative concept. Which, I have to add, I believe would never fly on Geocaching.com.

Agreed...

 

Yup. As this cache is conceived of in the OP, this wifi hotspot that is hosting a web page would be quite suitable for other Geocaching sites that allow codewords for log verification. This code could be put on that web page, and only people who connect to this wifi hotspot (and you have to be in close proximity to it to see it) could "find" the cache. Of course idiots could share this codeword, but there really isn't an issue with that on those websites. Here, people would cheat like crazy. :P This is not to say there is not a way to implement the idea on Geocaching.com; coords on that webpage for the final with a logbook for example.

Link to comment

Of course only people in the short range of the wifi access point would be able to see this webpage hosted on the pi. All in all, a very innovative concept. Which, I have to add, I believe would never fly on Geocaching.com.

Agreed...

 

Yup. As this cache is conceived of in the OP, this wifi hotspot that is hosting a web page would be quite suitable for other Geocaching sites that allow codewords for log verification. This code could be put on that web page, and only people who connect to this wifi hotspot (and you have to be in close proximity to it to see it) could "find" the cache. Of course idiots could share this codeword, but there really isn't an issue with that on those websites. Here, people would cheat like crazy. :P This is not to say there is not a way to implement the idea on Geocaching.com; coords on that webpage for the final with a logbook for example.

 

What if the Pi (or the website) constructed a fresh codeword every time, and notified the partner device of the new codeword?

 

Not that codeword caches would pass by a Groundspeak reviewer no matter how it is done...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...