Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 95 lines (58 sloc) 4.338 kb
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
1 # haiku wifi
cf77c29 @jedahan update readme
authored
2
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
3 haiku wifi is a neighborhood bulletin board, hosted on a router, living in the wireless cloud.
cf77c29 @jedahan update readme
authored
4
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
5 look for wireless networks to see the current haiku. connect to the haiku network to write a new haiku.
cf77c29 @jedahan update readme
authored
6
1550e8a @electronicwhisper cropped screenshot
electronicwhisper authored
7 ![screenshot](http://farm8.staticflickr.com/7148/6793325161_714bdb4849_o.png)
cf77c29 @jedahan update readme
authored
8
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
9 [More screenshots](http://www.flickr.com/photos/42137335@N07/sets/72157629093151189/) and [people writing poetry](http://www.flickr.com/photos/37234044@N07/sets/72157629094958315/)
3d8d1b6 @jedahan include fourth ssid, and uhttpd configuration
authored
10
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
11 ## credits
3d8d1b6 @jedahan include fourth ssid, and uhttpd configuration
authored
12
1550e8a @electronicwhisper cropped screenshot
electronicwhisper authored
13 haiku wifi was created by jonathan dehan and toby schachman at [art hack day 2012](http://arthackday.net) at [319 scholes](http://319scholes.org/).
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
14
15 special thanks to sean mcintyre for lending us a router and tons of assistance with configuration. thanks also to jonathan kiritharan for assistance and josh keay for design ideas.
16
17 ## how it works
18
19 The commodity wifi router (we used a Netgear N600) runs the [Open-WRT](https://openwrt.org/) firmware, a linux distribution for embedded devices (like wireless routers). Essentially this gives us an open linux box with wifi routing capabilities.
20
21 With Open-WRT, you can create as many SSIDs as you want by simply changing the config file `/etc/confic/wireless` (the preferred way of doing this on Open-WRT is to use the included [uci](http://wiki.openwrt.org/doc/start#uci.configuration) utility). We made 3 placeholder SSIDs (named `-1 ...`, `-2 ...`, `-3 ...`) and 1 SSID which doesn't change named `-4 --- ☁ haiku wifi ☁ ---`. The 3 placeholder SSIDs will be renamed by the users.
22
23 We installed Python and [Flask](http://flask.pocoo.org/) on our router. This gives us a little web server to serve the web page form to change the haiku. Our Python web app makes command line calls to reconfigure our wireless config file and restart the wifi.
24
25 Finally, we changed the default admin interface to run on port 81 (instead of 80). We made an init script to run our Python web app on startup (on port 80). And we configured dnsmasq to forward all domains to 192.168.1.1, so that when a user went to any website they would see the haiku page.
26
27 ## installation
28
29 1. Install [Open-WRT](https://openwrt.org/) on your router.
30
31 2. Install Python on your router.
32
33 opkg install python
34
35 3. Install [setuptools](http://pypi.python.org/pypi/setuptools#cygwin-mac-os-x-linux-other).
36
37 4. Install [Flask](http://flask.pocoo.org/).
38
39 5. Configure your wireless interfaces to create 3 placeholders (the Python web server will be changing these) and (optionally) one that won't change. You can use `uci` or edit `/etc/config/wireless` directly. You'll want your `wifi-iface`s to be like the following:
40
41 config 'wifi-iface'
42 option 'device' 'radio0'
43 option 'mode' 'ap'
44 option 'encryption' 'none'
45 option 'network' 'lan'
46 option 'ssid' '-1 ...'
7c1299b @jedahan reduce whitespace
authored
47
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
48 config 'wifi-iface'
49 option 'device' 'radio0'
50 option 'mode' 'ap'
51 option 'encryption' 'none'
52 option 'network' 'lan'
53 option 'ssid' '-2 ...'
7c1299b @jedahan reduce whitespace
authored
54
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
55 config 'wifi-iface'
56 option 'device' 'radio0'
57 option 'mode' 'ap'
58 option 'encryption' 'none'
59 option 'network' 'lan'
60 option 'ssid' '-3 ...'
7c1299b @jedahan reduce whitespace
authored
61
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
62 config 'wifi-iface'
63 option 'device' 'radio0'
64 option 'mode' 'ap'
65 option 'encryption' 'none'
66 option 'network' 'lan'
67 option 'ssid' '-4 --- ☁ haiku wifi ☁ ---'
68
69 Note that the web app is expecting to reconfigure `wifi-iface` 0-2, so if you don't have these placeholders as the first `wifi-iface`s, change the code in the web app.
70
71 6. Make LuCI (the default web admin tool for Open-WRT) start up on port 81. In `/etc/config/uhttpd`, change this line
72
73 list listen_http 0.0.0.0:80
7c1299b @jedahan reduce whitespace
authored
74
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
75 to
7c1299b @jedahan reduce whitespace
authored
76
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
77 list listen_http 0.0.0.0:81
78
79 7. Put the web app--this repository--on your router in `/root/arthackday`. (`git clone` it and then `scp` it to the router.)
80
a7e0eca @jedahan bundle initscript
authored
81 8. Install the initscript to run the python web app when the router starts up:
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
82
a7e0eca @jedahan bundle initscript
authored
83 cp init.d/haiku /etc/init.d/haiku
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
84
85 and enable it by running
7c1299b @jedahan reduce whitespace
authored
86
a9730e9 @electronicwhisper more documentation in readme
electronicwhisper authored
87 /etc/init.d/haiku-wifi enable
88
89 9. Configure dnsmasq to point all domains at 192.168.1.1. Append these lines to `/etc/dnsmasq.conf`:
90
91 address=/apple.com/0.0.0.0
92 address=/#/192.168.1.1
93
7c1299b @jedahan reduce whitespace
authored
94 10. All set! Power cycle the router.
Something went wrong with that request. Please try again.