1 <?xml version=
"1.0" encoding=
"utf-8"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries tagged mesh network
</title>
5 <description>Entries tagged mesh network
</description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
10 <title>A Raspberry Pi based batman-adv Mesh network node
</title>
11 <link>http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html
</guid>
13 <pubDate>Mon,
21 Oct
2013 11:
40:
00 +
0200</pubDate>
14 <description><p
>The last few days I have been experimenting with
15 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki
">the
16 batman-adv mesh technology
</a
>. I want to gain some experience to see
17 if it will fit
<a href=
"https://wiki.debian.org/FreedomBox
">the
18 Freedombox project
</a
>, and together with my neighbors try to build a
19 mesh network around the park where I live. Batman-adv is a layer
2
20 mesh system (
"ethernet
" in other words), where the mesh network appear
21 as if all the mesh clients are connected to the same switch.
</p
>
23 <p
>My hardware of choice was the Linksys WRT54GL routers I had lying
24 around, but I
've been unable to get them working with batman-adv. So
25 instead, I started playing with a
26 <a href=
"http://www.raspberrypi.org/
">Raspberry Pi
</a
>, and tried to
27 get it working as a mesh node. My idea is to use it to create a mesh
28 node which function as a switch port, where everything connected to
29 the Raspberry Pi ethernet plug is connected (bridged) to the mesh
30 network. This allow me to hook a wifi base station like the Linksys
31 WRT54GL to the mesh by plugging it into a Raspberry Pi, and allow
32 non-mesh clients to hook up to the mesh. This in turn is useful for
33 Android phones using
<a href=
"http://servalproject.org/
">the Serval
34 Project
</a
> voip client, allowing every one around the playground to
35 phone and message each other for free. The reason is that Android
36 phones do not see ad-hoc wifi networks (they are filtered away from
37 the GUI view), and can not join the mesh without being rooted. But if
38 they are connected using a normal wifi base station, they can talk to
39 every client on the local network.
</p
>
41 <p
>To get this working, I
've created a debian package
42 <a href=
"https://github.com/petterreinholdtsen/meshfx-node
">meshfx-node
</a
>
44 <a href=
"https://github.com/petterreinholdtsen/meshfx-node/blob/master/build-rpi-mesh-node
">build-rpi-mesh-node
</a
>
45 to create the Raspberry Pi boot image. I
'm using Debian Jessie (and
46 not Raspbian), to get more control over the packages available.
47 Unfortunately a huge binary blob need to be inserted into the boot
48 image to get it booting, but I
'll ignore that for now. Also, as
49 Debian lack support for the CPU features available in the Raspberry
50 Pi, the system do not use the hardware floating point unit. I hope
51 the routing performance isn
't affected by the lack of hardware FPU
54 <p
>To create an image, run the following with a sudo enabled user
55 after inserting the target SD card into the build machine:
</p
>
58 % wget -O build-rpi-mesh-node \
59 https://raw.github.com/petterreinholdtsen/meshfx-node/master/build-rpi-mesh-node
60 % sudo bash -x ./build-rpi-mesh-node
> build.log
2>&1
61 % dd if=/root/rpi/rpi_basic_jessie_$(date +%Y%m%d).img of=/dev/mmcblk0 bs=
1M
63 </pre
></p
>
65 <p
>Booting with the resulting SD card on a Raspberry PI with a USB
66 wifi card inserted should give you a mesh node. At least it does for
67 me with a the wifi card I am using. The default mesh settings are the
68 ones used by the Oslo mesh project at Hackeriet, as I mentioned in
69 <a href=
"http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
">an
70 earlier blog post about this mesh testing
</a
>.
</p
>
72 <p
>The mesh node was not horribly expensive either. I bought
73 everything over the counter in shops nearby. If I had ordered online
74 from the lowest bidder, the price should be significantly lower:
</p
>
76 <p
><table
>
78 <tr
><th
>Supplier
</th
><th
>Model
</th
><th
>NOK
</th
></tr
>
79 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi model B
</td
><td
>349.90</td
></tr
>
80 <tr
><td
>Teknikkmagasinet
</td
><td
>Raspberry Pi type B case
</td
><td
>99.90</td
></tr
>
81 <tr
><td
>Lefdal
</td
><td
>Jensen Air:Link
25150</td
><td
>295.-
</td
></tr
>
82 <tr
><td
>Clas Ohlson
</td
><td
>Kingston
16 GB SD card
</td
><td
>199.-
</td
></tr
>
83 <tr
><td
>Total cost
</td
><td
></td
><td
>943.80</td
></tr
>
85 </table
></p
>
87 <p
>Now my mesh network at home consist of one laptop in the basement
88 connected to my production network, one Raspberry Pi node on the
1th
89 floor that can be seen by my neighbor across the park, and one
90 play-node I use to develop the image building script. And some times
91 I hook up my work horse laptop to the mesh to test it. I look forward
92 to figuring out what kind of latency the batman-adv setup will give,
93 and how much packet loss we will experience around the park. :)
</p
>
98 <title>Oslo community mesh network - with NUUG and Hackeriet at Hausmania
</title>
99 <link>http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
</link>
100 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html
</guid>
101 <pubDate>Fri,
11 Oct
2013 14:
10:
00 +
0200</pubDate>
102 <description><p
>Wireless mesh networks are self organising and self healing
103 networks that can be used to connect computers across small and large
104 areas, depending on the radio technology used. Normal wifi equipment
105 can be used to create home made radio networks, and there are several
106 successful examples like
107 <a href=
"http://www.freifunk.net/
">Freifunk
</a
> and
108 <a href=
"http://www.awmn.net/
">Athens Wireless Metropolitan Network
</a
>
110 <a href=
"http://en.wikipedia.org/wiki/List_of_wireless_community_networks_by_region#Greece
">wikipedia
111 for a large list
</a
>) around the globe. To give you an idea how it
112 work, check out the nice overview of the Kiel Freifunk community which
113 can be seen from their
114 <a href=
"http://freifunk.in-kiel.de/ffmap/nodes.html
">dynamically
115 updated node graph and map
</a
>, where one can see how the mesh nodes
116 automatically handle routing and recover from nodes disappearing.
117 There is also a small community mesh network group in Oslo, Norway,
118 and that is the main topic of this blog post.
</p
>
120 <p
>I
've wanted to check out mesh networks for a while now, and hoped
121 to do it as part of my involvement with the
<a
122 href=
"http://www.nuug.no/
">NUUG member organisation
</a
> community, and
123 my recent involvement in
124 <a href=
"https://wiki.debian.org/FreedomBox
">the Freedombox project
</a
>
125 finally lead me to give mesh networks some priority, as I suspect a
126 Freedombox should use mesh networks to connect neighbours and family
127 when possible, given that most communication between people are
128 between those nearby (as shown for example by research on Facebook
129 communication patterns). It also allow people to communicate without
130 any central hub to tap into for those that want to listen in on the
131 private communication of citizens, which have become more and more
132 important over the years.
</p
>
134 <p
>So far I have only been able to find one group of people in Oslo
135 working on community mesh networks, over at the hack space
136 <a href=
"http://hackeriet.no/
">Hackeriet
</a
> at Husmania. They seem to
137 have started with some Freifunk based effort using OLSR, called
138 <a href=
"http://oslo.freifunk.net/index.php?title=Main_Page
">the Oslo
139 Freifunk project
</a
>, but that effort is now dead and the people
140 behind it have moved on to a batman-adv based system called
141 <a href=
"http://meshfx.org/trac
">meshfx
</a
>. Unfortunately the wiki
142 site for the Oslo Freifunk project is no longer possible to update to
143 reflect this fact, so the old project page can
't be updated to point to
144 the new project. A while back, the people at Hackeriet invited people
145 from the Freifunk community to Oslo to talk about mesh networks. I
146 came across this video where Hans Jørgen Lysglimt interview the
147 speakers about this talk (from
148 <a href=
"https://www.youtube.com/watch?v=N2Kd7CLkhSY
">youtube
</a
>):
</p
>
150 <p
><iframe width=
"420" height=
"315" src=
"https://www.youtube.com/embed/N2Kd7CLkhSY
" frameborder=
"0" allowfullscreen
></iframe
></p
>
152 <p
>I mentioned OLSR and batman-adv, which are mesh routing protocols.
153 There are heaps of different protocols, and I am still struggling to
154 figure out which one would be
"best
" for some definitions of best, but
155 given that the community mesh group in Oslo is so small, I believe it
156 is best to hook up with the existing one instead of trying to create a
157 completely different setup, and thus I have decided to focus on
158 batman-adv for now. It sure help me to know that the very cool
159 <a href=
"http://www.servalproject.org/
">Serval project in Australia
</a
>
160 is using batman-adv as their meshing technology when it create a self
161 organizing and self healing telephony system for disaster areas and
162 less industrialized communities. Check out this cool video presenting
164 <a href=
"https://www.youtube.com/watch?v=
30qNfzJCQOA
">youtube
</a
>):
</p
>
166 <p
><iframe width=
"560" height=
"315" src=
"https://www.youtube.com/embed/
30qNfzJCQOA
" frameborder=
"0" allowfullscreen
></iframe
></p
>
168 <p
>According to the wikipedia page on
169 <a href=
"http://en.wikipedia.org/wiki/Wireless_mesh_network
">Wireless
170 mesh network
</a
> there are around
70 competing schemes for routing
171 packets across mesh networks, and OLSR, B.A.T.M.A.N. and
172 B.A.T.M.A.N. advanced are protocols used by several free software
173 based community mesh networks.
</p
>
175 <p
>The batman-adv protocol is a bit special, as it provide layer
2
176 (as in ethernet ) routing, allowing ipv4 and ipv6 to work on the same
177 network. One way to think about it is that it provide a mesh based
178 vlan you can bridge to or handle like any other vlan connected to your
179 computer. The required drivers are already in the Linux kernel at
180 least since Debian Wheezy, and it is fairly easy to set up. A
181 <a href=
"http://www.open-mesh.org/projects/batman-adv/wiki/Quick-start-guide
">good
182 introduction
</a
> is available from the Open Mesh project. These are
183 the key settings needed to join the Oslo meshfx network:
</p
>
185 <p
><table
>
186 <tr
><th
>Setting
</th
><th
>Value
</th
></tr
>
187 <tr
><td
>Protocol / kernel module
</td
><td
>batman-adv
</td
></tr
>
188 <tr
><td
>ESSID
</td
><td
>meshfx@hackeriet
</td
></tr
>
189 <td
>Channel / Frequency
</td
><td
>11 /
2462</td
></tr
>
190 <td
>Cell ID
</td
><td
>02:BA:
00:
00:
00:
01</td
>
191 </table
></p
>
193 <p
>The reason for setting ad-hoc wifi Cell ID is to work around bugs
194 in firmware used in wifi card and wifi drivers. (See a nice post from
196 "<a href=
"http://tiebing.blogspot.no/
2009/
12/ad-hoc-cell-splitting-re-post-original.html
">Information
197 about cell-id splitting, stuck beacons, and failed IBSS merges!
</a
>
198 for details.) When these settings are activated and you have some
199 other mesh node nearby, your computer will be connected to the mesh
200 network and can communicate with any mesh node that is connected to
201 any of the nodes in your network of nodes. :)
</p
>
203 <p
>My initial plan was to reuse my old Linksys WRT54GL as a mesh node,
204 but that seem to be very hard, as I have not been able to locate a
205 firmware supporting batman-adv. If anyone know how to use that old
206 wifi access point with batman-adv these days, please let me know.
</p
>
208 <p
>If you find this project interesting and want to join, please join
209 us on IRC, either channel
210 <a href=
"irc://irc.freenode.net/#oslohackerspace
">#oslohackerspace
</a
>
211 or
<a href=
"irc://irc.freenode.net/#nuug
">#nuug
</a
> on
212 irc.freenode.net.
</p
>
214 <p
>While investigating mesh networks in Oslo, I came across an old
215 research paper from the university of Stavanger and Telenor Research
216 and Innovation called
217 <a href=
"http://folk.uio.no/paalee/publications/netrel-egeland-iswcs-
2008.pdf
">The
218 reliability of wireless backhaul mesh networks
</a
> and elsewhere
219 learned that Telenor have been experimenting with mesh networks at
220 Grünerløkka in Oslo. So mesh networks are also interesting for
221 commercial companies, even though Telenor discovered that it was hard
222 to figure out a good business plan for mesh networking and as far as I
223 know have closed down the experiment. Perhaps Telenor or others would
224 be interested in a cooperation?
</p
>
226 <p
><strong
>Update
2013-
10-
12</strong
>: I was just
227 <a href=
"http://lists.alioth.debian.org/pipermail/freedombox-discuss/
2013-October/
005900.html
">told
228 by the Serval project developers
</a
> that they no longer use
229 batman-adv (but are compatible with it), but their own crypto based
230 mesh system.
</p
>