-
Notifications
You must be signed in to change notification settings - Fork 32
How to build Occupy.here
Occupy.here will run on any wifi router supported by OpenWrt, but this documentation is currently limited to a specific router, the TP-Link TL-WR703N. It is light, portable, and runs off a 5V USB connection. Note that the default firmware is in Chinese only. That won’t be a problem, though, even if you aren’t proficient reading Chinese. The English-language TP-Link TL-WR3020 can also be substituted.
The website software is written in PHP and stores content in a SQLite database. Other important software includes Lighttpd and Dnsmasq. There project is also researching future support for PGP encrypted messages and email-based syncing between individual routers.
- A wifi router supported by OpenWrt. Recommended: TP-Link TL-WR703N (buy on Amazon)
- A USB stick, anything over 1GB should work. Recommended: Sandisk Cruzer Fit 8GB (buy on Amazon)
- A computer (with an Ethernet port)
- An ethernet cable
- Optional: portable battery (buy on Amazon)
Your USB stick should be formatted as FAT 32, with a single partition. This is the default on most USB sticks, so you shouldn't have to do anything special.
- Download occupy.here-r1.zip and unzip the contents. You should see a folder called occupy.here.
- Plug in your USB stick and copy the occupy.here folder onto it. Keep the original folder on your computer, you'll need it again in a minute.
- Eject the USB stick and plug it into your wifi router.
- Turn off your computer's wifi and connect it via Ethernet cable to the wifi router.
- Power up the wifi router by connecting the micro USB connector (next to the Ethernet) to a power source. When the blue light stops flashing, and stays solidly lit, you should be ready to continue.
- Load http://192.168.1.1/ in a browser to access the default web admin interface, username admin password admin. (On the TL-MR3020 router, the URL is http://192.168.0.254/)
- You should see a web interface in Mandarin Chinese. Don’t panic, this will be easy! Click the last option in the left-hand menu, then the third sub-option below that. (On the TL-MR3020 router, go to System Tools, then Firmware Upgrade.)
- You should see a thin rectangular box with a button next to it. That is the file selection box. Click on it to browse for the firmware to flash onto the router.
- Browse to the occupy.here folder on your computer, then look inside the firmware folder. Choose the file tl-wr703n-factory.bin.
- Click the lavendar button below and to the left of the file selection box. Confirm by clicking OK and wait for the firmware to flash onto the router.
- The router will automatically reboot and the default admin interface will attempt to reload (and fail), leaving you on a browser error page.
At this point you should have an OpenWrt router, expanded with additional storage from the USB stick. When the router first powers on, it will start blinking its blue light as it starts up. Once the light goes solid, you should be ready to continue.
- Connect your computer to the router via Ethernet cable and configure your computer so that it uses the IP address 192.168.1.2. In OS X, go to System Preferences → Network → Ethernet (or Thunderbolt Ethernet). Choose Manually from the drop-down, then enter IP address 192.168.1.2, Subnet Mask 255.255.255.0, Router 192.168.1.1.
- Open a command line terminal. On OS X, open Applications → Utilities → Terminal.app.
- Type
telnet 192.168.1.1
and press enter. You should see the "OCCUPY.HERE" ASCII banner. If your router just rebooted, you may need to wait a moment before it's ready for you to connect. - Type
df -h
. You should see a list of mounted filesystems, including those mounted to/usb
and/opt
. If you instead see/tmp/root/usb
and/tmp/root/opt
, you should restart your router for the filesystems to get recognized properly, then telnet back in. - Type
cd /usb/occupy.here/bootstrap
. - Type
./install.sh
to start the bootstrap process. It will take a few minutes install packages and configure the software. - You will be prompted to set the root password on your router, and then confirm it by typing it again. After you've set the password, the router will reject telnet connections and start allowing connections via ssh.
- Once the bootstrap script finishes, your telnet session will be shut down and you should have a new wifi network available called OCCUPY.HERE / XXXXXXXXXXXX (the last part is set according to your router's MAC address).
After the router is bootstrapped, the Ethernet port stops allowing telnet and ssh sessions and starts allowing the router to connect to an upstream Internet connection. It does not require an Internet connection, but if one is available it will use it.
- Join the wifi network OCCUPY.HERE / XXXXXXXXXXXX.
- Open a browser and go to the URL: http://occupy.here/
- To connect via ssh, use the IP address 10.0.47.1. In order to login to ssh using public key encryption, copy your public key to /etc/config/dropbear/authorized_keys.
If your Occupy.here router is connected to an Internet connection via Ethernet, you should be able to use its wifi connection instead of your usual wifi network. However, the website http://occupy.here/ will only be available to those on Occupy.here. Be aware that this network is open, without any password protection.