Emergent Mesh
Creator: |
Contents
Overview
Building a wireless mesh network up with DNS, captive portal webpage, and communication infrastructure. A tiny "internet" for disaster stricken areas.
Goals
- Portable power
- batteries, solar, wind turbines, etc
- Mesh network nodes capable of being run on available power.
- OpenWRT capable devices
- Various antenna types
- DNS server
- DHCP server
- Captive portal page containing emergency and general information for people joining the network.
- Communication options
- IRC
- BBS?
- SMS gateway
- Jabber server
- QR code ( http://delivr.com/qr-code-generator ) stickers and/or stencils containing a link or information about the network in a given area. Keep with the nodes and/or on the nodes.
- Have a file repo available and linked off the captive portal containing mesh network packages, etc. Piratebox ( http://wiki.daviddarts.com/PirateBox ) perhaps.
- Local copies of Wikipedia or Appropedia for reference use.
Nodes
Self contained, self powered mesh nodes that require little more than turning them on to operate.
wrt54g node development
Notes
- a 7Ah battery should run a WRT54G for ~29 hours [1]
- "And as a reference point, it was found that a 55 AH SLA battery with a 45W amorphous solar panel under decidedly sub-optimal conditions can run a WRT54G indefinitely." [2]
2011
- strages Huzzah! First mesh node toward @krs and I's emergent network plans. #makerslocal 26 Sep
- strages Huzzah! Freifunk wiki.freifunk.net/Freifunk_Firmw… flashed to the first mesh node! #makerslocal #opensourcemesh 27 Sep
- strages Achievement unlocked! JimShoe found a wrt-54gv2 in a box. Yay for having a second node! #makerslocal #opensourcemesh 28 Sep
- Later found to be a WAP54G v2
- strages Ran down some rather nice tutorials for setting up mesh networks using Freifunk. This should help. #makerslocal 29 Sep
- strages wewt! third mesh node obtained! #makerslocal 3 Oct
- brimstone Debricking one of @strages's APs for his mesh project using only parts found around #makerslocal twitpic.com/6uulda 3 Oct
- strages Totally got a WAP54gv2(Yancey) and WRT54gv5(Josh) meshing with OLSR :D #makerslocal 4 Oct
- strages Alright, unbricked the third node again. Loaded dd-wrt with olsr on it. Might have it talking to the others in the mesh. #makerslocal 6 Oct
- strages 4th mesh node obtained! Brother-in-law gave me a WRT160N :D #makerslocal 7 Oct
- strages Fifth wireless mesh node obtained! A WRT54G v2.2 with swappable antennas! I shall call it Lincoln after where I got it. #makerslocal 13 Oct
- strages Wifi mesh project update: five nodes, three water proof enclosures, one solar panel. Four more nodes in the future. #makerslocal 14 Oct
- strages Found another water proof box! Bringing the total up to 4 :D #makerslocal #mesh 15 Oct
- strages Found node six while unpacking boxes at the shop! :D ...and it shall be called Butterscotch #makerslocal 17 Oct
- strages Pic of my first 6 mesh nodes all freshly labeled http://www.flickr.com/photos/stragesv3/6264767887/in/photostream #makerslocal 20 Oct
- strages Huzzah the 3 new mesh nodes from Birmingham showed up! Thanks @xhizu :D #makerslocal 02 Dec
2012
- strages Looking heavily into http://smesh.org for my mesh network project. Working on finding or compiling a newer image to load. 04 Jan
- strages Settling on kmod-batman-adv for my mesh network. Layer 2 routing for the win. #makerslocal 06 Jan
01/13/12
- <brimstone> 03:00:31 +brimstone | !note strages* At this point in our program, brimstone takes a victory lab as Josh is now running a usable openwrt.
- <brimstone> 03:01:38 +brimstone | 1708032 works
- <brimstone> 03:02:47 +brimstone | 1773568 doesn't
- <brimstone> 03:06:18 +brimstone | i could hack it in there like this one
- <brimstone> 03:09:01 +brimstone | let's see if i can sneak batman-adv into it now
- <brimstone> 03:11:02 +brimstone | !note strages* Now turn to page 2: batman_adv: B.A.T.M.A.N. advanced 2011.2.0 (compatibility version 12) loaded
- <brimstone> 03:12:35 +brimstone | !note strages* i apparently have removed wifi drivers, this is a beast for another day, monday perhaps
- strages @brimston3 is working pretty hard on a openwrt backfire image for 2MB devices containing batman-adv #makerslocal 16 Jan
01/17/12
- Matt Robinson - I might finally have it. Will start testing tonight. 04:38PM 17 Jan
- [23:16] <+brimstone> !note strages* wifi passes traffic in adhoc mode
01/18/12
- [08:56] <strages_work> how did you get it working?
- [08:56] <+brimstone> which part?
- [08:56] <strages_work> I guess what I'm asking, what had to be removed to get wifi and batman-adv in there
- [08:57] <+brimstone> ssh, firewall support, anything crypto related
- [08:57] <+brimstone> usb and network file system support from the kernel
- [08:57] <+brimstone> some wireless regulation stuff (crda)
- [08:58] <+brimstone> pretty progress bars off wget
- [08:58] <+brimstone> a hand full of other things
- [08:58] <+brimstone> i don't remember all right now
- [09:06] <strages_work> fantastic work
- [09:06] <strages_work> thank you
- [09:09] <+brimstone> it's not quite done
- [09:09] <+brimstone> there's still not a good way to change configurations
- [09:11] <strages_work> but one can be set initially?
- [09:12] <+brimstone> yes, but i'm not sure if that's a good thing to do
01/19/12
- [14:44] <+brimstone> strages_work: why did i ask you to send me that lsmod and dmesg output?
- [14:45] <strages_work> oh, you were going to check what driver they were using to do VAPs
- [14:46] <strages_work> you might find some other interesting stuff in there as well
- [14:47] <+brimstone> it's interesting that a lot of the hardware's the same
- [14:47] <strages_work> right
- [14:48] <strages_work> *it's mostly just memory contraints
- [14:48] <strages_work> cheaper manufacturing
- [14:48] <+brimstone> i think the multiple VAPs are controlled by hostapd, and i don't have space for that graaaaa
01/20/12
- 17:19 <+brimstone> strages_work: i tweaked the lzma settings and saved another k out of the kernel
- 17:51 <+brimstone> Kernel: Old: 809812 New: 784844 Size change: -24968
- 17:51 <+brimstone> Busybox: Old: 407679 New: 407679 Size change: 0
- 17:51 <+brimstone> Squashfs: Old: 846014 New: 845889 Size change: -125
- 17:51 <+brimstone> TRX: Old: 1794048 New: 1765376 Size change: -28672
- 17:51 <+brimstone> Room: 4096
- 17:51 <+brimstone> It's good!
- 17:57 < strages_shop> :D
- 17:57 <+brimstone> this might be it
- 17:57 <+brimstone> but it may still give you problems
- 17:57 < strages_shop> oh man oh man oh man
- 17:57 <+brimstone> i removed some of the routing stuff
- 17:57 <+brimstone> and the qos
- 17:57 <+brimstone> and some queuing stuff
- 17:57 < strages_shop> hmm
- 17:58 <+brimstone> but it's got batman, and wifi firmware, and it's small enough to flash
- 17:58 < strages_shop> works on Josh?
- 17:58 <+brimstone> yup
- brimstone Got #openwrt finally under 2MB for this wrt54gs for @strages' mesh at #makerslocal 20 Jan
01/21/12
- 14:28 <+brimstone> strages_home: you didn't tell me these routers only had 8MB of ram too
- 14:35 < strages_home> I didn't know it was an issue :(
- 14:35 <+brimstone> yup
- 14:36 <+brimstone> i've got butterscotch in a weird state too
- 14:36 <+brimstone> boots up fine, then does something to corrupt itself
- 14:42 < strages_home> hmm
- 14:43 <+brimstone> i'm reflashing butterscotch with stock openwrt
- 14:43 <+brimstone> leaves him at least usable
- 14:44 < strages_home> kk
- 14:44 < strages_home> he's a 2.2 which means that's fine
- 14:44 <+brimstone> yeah, but my firmware should have worked
- 14:45 <+brimstone> so there's debugging that
- 14:45 < strages_home> oh you were testing it for use on all the devices, not just the 2MB ones
- 14:45 <+brimstone> yup
- 14:46 < strages_home> buterscotch is 4MB
- 14:46 <+brimstone> right
- 14:46 <+brimstone> why does the 1.7MB firmware fail?
- 14:46 < strages_home> not a clue
- 14:47 < strages_home> check lsmod and dmesg dumps for differences?
- 14:47 <+brimstone> probably the jffs2 stuff getting in the way
- 15:06 <+brimstone> yup, the jffs2 stuff
- 15:11 <+brimstone> pfft, batctl wants a debugfs
- 15:13 < strages_home> don't need it
- 15:38 <+brimstone> debugfs is so biiiiiiig
- 15:39 <+brimstone> +70k!
- 17:54 <+brimstone> Mesh: Built
01/23/12
- [09:56] <strages_work> brimstone: is there a config being written somewhere on Josh that contrains all the settings for the mesh?
- [09:56] <+brimstone> no, josh doesn't have room to save configs
- [09:57] <+brimstone> but /etc/init.d/mesh-setup and /etc/init.d/mesh-finish are the static files i hard coded into the firmware to set it up
- [09:57] <strages_work> ok
- [09:59] <strages_work> I'm thinking we need to replicate those settings in a config file for the 4MB devices and just run straight openwrt 10.3.1 on them. This would let us use tools like batctl etc on at least some of the devices.
- [10:01] <+brimstone> we could also just pull the batctl binary from the package and replace it on the 4MB ones
- [10:01] <+brimstone> the stock firmware has a lot of extra baggage
- [10:01] <+brimstone> ppp, luci, etc
- [10:03] <strages_work> can hostap be installed like that as well?
- [10:03] <+brimstone> yes
- [10:04] <strages_work> ok
- [10:06] <strages_work> so right now, we can install your openwrt image on all the devices (at least the ones we've tested thus far), they'll mesh, and we add packages as needed given room on the device?
- [10:06] <+brimstone> should be able to
- [10:06] <+brimstone> i made sure opkg was still on there
- [10:07] <strages_work> alright because I'm shooting for as little setup time as possible given that it's supposed to be an emergency network
- [10:08] <strages_work> there are a few spinoff ideas after I finish this one utilizing the same or similar setup
- [10:09] <strages_work> like having them in client mode on one of the virtual aps and auto connection to open wireless networks effectively extending the range of existing infrastructure
- [10:09] <strages_work> *auto connecting
- [10:10] <+brimstone> that'll be gross if you're not careful
- [10:10] <strages_work> right, it's just an idea
- [10:10] <+brimstone> as long as you're only linking to one network it should be ok
- [10:11] <strages_work> or use a decent routing protocol to prevent routing loops
- [10:12] <+brimstone> it's more then that
- [10:12] <+brimstone> you can't link to 192.168.1.0/24 networks, you'll get conflicting ips
- [10:12] <+brimstone> you'll knock valid users off networks, or your own users
- [10:13] <strages_work> that seems fixable by using some other network range though by default...
- [10:13] <+brimstone> you don't control the open wifis you're connecting to
- [10:13] <+brimstone> you might be able to do some double/triple nat weirdness, but that's gross
- [10:15] <strages_work> sure I would have difficulty hosting services on the network, but that wasn't really the plan
- [10:15] <+brimstone> you also start limited the range as you're adding additional TTLs
- [10:15] <+brimstone> or subtracting as the case may be
- [10:15] <strages_work> true
- [10:17] <strages_work> regardless this is all hypothetical right now. Getting everything working as an emergency network is the plan then it's building communication services on top of that
- [10:17] <+brimstone> yup
- [10:17] <strages_work> captive portal, message board, chat, possibly crude voip
- [10:18] <strages_work> I wonder if android can do batman-adv
03/30/2012
- To catch everyone up, as the wiki has been neglected :( :
- At last count we have 3 WRT54G devices meshing using Brimstone's custom slim build.
2013
wr703n node development
TODO
- Server side scripting, Lua
- Handle iOS sign-in process
- Verify Android sign-in process
- json endpoints
- datastore dump
- datastore submission
- Syncing cronjob
- node status
- Service Discovery, avahi
- datastore
- ntpd
- tiles?
- web frontend
- pull from json datastore
- datastore submission
- mobile browser niceties
Notes
- To enter failsafe mode on the wr703n routers, hit the reset switch multiple times immediately upon plugging it in. The blue light will begin blinking rapidly if done correctly. You should now be able to set your ethernet IP to 192.168.1.233 and telnet to 192.168.1.1. Run the command mount_root to mount the root filesystem and edit files to restore connectivity.
- running the command firstboot restores default values
- "TP-LINK WR703N Base power consumption 0.50W - 0.55W, Wi-Fi (Access Point Mode + Ad-Hoc Mode)+ USB hub + memory stick + running servald 0.46W - 0.50W" - [3]
- 4:12 PM <fedaykin> strages_, brimstone left a note 1.2 days ago: 703n as is with case: 35g
2012
- strages Just ordered 3 TP-Link TL-WR703N for my mesh network project. #makerslocal 13 Jan
- strages Huzzah! TP-Link WR703Ns have arrived! Time to get back to work on mesh nodes! #makerslocal 19 March
03/30/2012
- strages purchased/obtained 8 TP-Link wr710N wireless routers, 3 of which have been flashed with openwrt.
- strages Huzzah! All 8 wr703n APs flashed with openwrt. Now to get them all meshing... #makerslocal 31 March
- strages Huzzah! Three wr703n's meshing! #ranoutofusbports #makerslocal http://pic.twitter.com/0vg5cHMb 07 Apr
2013
01/21/2013
- Successfully configured an AP and adhoc(mesh) interface on 3 of the 8 routers and they all function properly! Mesh is mesh and AP let's everyone connect into the network over wireless. Still some configuration I have to setup for the physical LAN interfaces. Thanks to this website I now have a uci config that involves 2 line changes per device.
02-19-2013
<strages_work> say a wr703n uses 200mA (.2A) peak, I know it doesn't but humor me.
<strages_work> that 1W peak power (5V x.2A)
<strages_work> *that's
<strages_work> .2A x 24hrs = 4.8Ah
<strages_work> so we'll round up and say a 6Ah battery ought to suffice
<strages_work> now let's day our area gets 6 hours optimal sunlight per day
<strages_work> *let's say
<strages_work> if I had a 6V panel and a 6V battery, then I would need a 1W panel to keep it topped off?
<brimstone> you would need to charge that 6Ah battery in 6 hours
<strages_work> yeah
<strages_work> does all this sound about right for keeping a mesh node going?
<strages_work> ideally you would over engineer with a 1.5 or 2 W panel to account for less than optimal conditions
05-24-2013
- Bought 2 Instapark 10W High-Efficiency Mono-Crystalline Solar Panels for ~$40 apiece in order to build two more prototype units.
05-30-2013
- Bought 3 Instapark SS1203 3Amp Solar Power Charge Controllers for ~$15 apiece that should prevent over-volting and over-discharging the battery.
07-27-2013
- Bought two 14Ah AGM batteries from Batteries+ at $55 apiece.
x86 node
TODO
- Figure out how to respin an Ubuntu live cd
- add batman
- figure out auto ad-hoc all interfaces
- port nodeadm
- load more tiles
- verify cd booting
- verify usb booting
- verify pxe booting
- verify pxe serving?
- toram mode?
List of functional nodes
- Linksys WRT54GS v5 (Josh)
- S/N: CGN70F2A6509
- OS: custom OpenWrt Backfire 10.03.1 w/ kmod-batman-adv
- Owner: strages
- Mesh IP: 192.168.10.102
- Linksys WRT54G v2.2 (Lincoln)
- S/N: CDF70DCM4969
- OS: custom OpenWrt Backfire 10.03.1 w/ kmod-batman-adv
- Owner: strages
- Mesh IP: 192.168.10.100
- Status: locked out because of root password being set and no ssh
- Linksys WRT54G v2.2 (Butterscotch)
- S/N: CDF70DCE1873
- OS: custom OpenWrt Backfire 10.03.1 w/ kmod-batman-adv
- Owner: strages
- Mesh IP: 192.168.10.101
- TP-Link wr703n (blue leader)
- S/N: 12116803322
- OS: OpenWRT ATTITUDE ADJUSTMENT (bleeding edge, r30919)
- Owner: strages
- WLAN IP: ?
- LAN IP:
- TP-Link wr703n (blue1)
- S/N: 12116801066
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.1
- LAN IP:
- TP-Link wr703n (blue2)
- S/N: 12116802930
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.2
- LAN IP:
- TP-Link wr703n (blue3)
- S/N: 11C35603301
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.3
- LAN IP:
- TP-Link wr703n (blue4)
- S/N: 11C35603745
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.4
- LAN IP:
- TP-Link wr703n (blue5)
- S/N: 11C35603488
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.5
- LAN IP:
- TP-Link wr703n (blue6)
- S/N: 11C35603174
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.6
- LAN IP:
- TP-Link wr703n (blue7)
- S/N: 11C35603510
- OS: OpenWRT BARRIER BREAKER (Bleeding Edge, r35445)
- Owner: strages
- WLAN IP: 10.100.1.7
- LAN IP:
Pics
Feature creep
- Limit bandwidth to streaming video (netflix, youtube, etc) and video games (steam, etc).
- This will prevent need bandwidth for communication from getting eaten up by bored folks.
- Pole straps for the enclosures.
- Putting them up high not only helps increase range but also helps protect them from theft.
References
- Building a Rural Wireless Mesh Network
- Solar WRT54G
- HSMM-Mesh
- FabFi firmware and CNC-able reflector designs
- Data logging on a WRT54G through serial port hack
- Adding an SD card slot
- Recovering from a bad flash
- SMesh
- OpenWRT
- B.A.T.M.A.N. Advanced
- Awesome tutorial for installing and configuring batman-adv
- Building a JTag cable
- Using the JTag cable you just built
- The Doctor's Byzantium Sprint #1 notes from March 2011 (wish I had known about this sooner)
- HacDC's how-to on setting up batman-adv in Linux
- The Doctor's Byzantium Sprint #2 notes from April 2011
- HacDC's Byzantium wiki page
- wr703n OpenWRT wiki
- Similar idea being done in Arkansas and partially funded by the NSF
- TP-Link tl-mr11u: equivalent to the wr702n but with a 2000mAh battery!
- daylight calculator
- DIY solar powered wifi promising resource
- trunk for the wr703n chipset
- Getting Serval running on a wr703n
- reverse engineered pcb drawings for the wr703n
- slotted waveguide for the wr703n
- How to unbrick a wr703n with an arduino
- Instapark's Amazon store they're a good source for quality solar stuff