]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2013/10/10.rss
Generated.
[homepage.git] / blog / archive / 2013 / 10 / 10.rss
index 705d206d4109441cf3391816fe3d1eb280c0b3fb..19a5ceb240a11032e189a2dac694b5700614a58d 100644 (file)
@@ -6,6 +6,94 @@
                 <link>http://people.skolelinux.org/pere/blog/</link>
 
        
+       <item>
+               <title>A Raspberry Pi based batman-adv Mesh network node</title>
+               <link>http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html</link>        
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/A_Raspberry_Pi_based_batman_adv_Mesh_network_node.html</guid>
+                <pubDate>Mon, 21 Oct 2013 11:40:00 +0200</pubDate>
+               <description>&lt;p&gt;The last few days I have been experimenting with
+&lt;a href=&quot;http://www.open-mesh.org/projects/batman-adv/wiki&quot;&gt;the
+batman-adv mech technology&lt;/a&gt;.  I want to gain some experience to see
+if it will fit &lt;a href=&quot;https://wiki.debian.org/FreedomBox&quot;&gt;the
+Freedombox project&lt;/a&gt;, and together with my neighbors try to build a
+mesh network around the park where I live.  Batman-adv is a layer 2
+mesh system (&quot;ethernet&quot; in other words), where the mesh network appear
+as if all the mesh clients are connected to the same switch.&lt;/p&gt;
+
+&lt;p&gt;My hardware of choice was the Linksys WRT54GL routers I had lying
+around, but I&#39;ve been unable to get them working with batman-adv.  So
+instead, I started playing with a
+&lt;a href=&quot;http://www.raspberrypi.org/&quot;&gt;Raspberry Pi&lt;/a&gt;, and tried to
+get it working as a mesh node.  My idea is to use it to create a mesh
+node which function as a switch port, where everything connected to
+the Raspberry Pi ethernet plug is connected (bridged) to the mesh
+network.  This allow me to hook a wifi base station like the Linksys
+WRT54GL to the mesh by plugging it into a Raspberry Pi, and allow
+non-mesh clients to hook up to the mesh.  This in turn is useful for
+Android phones using &lt;a href=&quot;http://servalproject.org/&quot;&gt;the Serval
+Project&lt;/a&gt; voip client, allowing every one around the playground to
+phone and message each other for free.  The reason is that Android
+phones do not see ad-hoc wifi networks (they are filtered away from
+the GUI view), and can not join the mesh without being rooted.  But if
+they are connected using a normal wifi base station, they can talk to
+every client on the local network.&lt;/p&gt;
+
+&lt;p&gt;To get this working, I&#39;ve created a debian package
+&lt;a href=&quot;https://github.com/petterreinholdtsen/meshfx-node&quot;&gt;meshfx-node&lt;/a&gt;
+and a script
+&lt;a href=&quot;https://github.com/petterreinholdtsen/meshfx-node/blob/master/build-rpi-mesh-node&quot;&gt;build-rpi-mesh-node&lt;/a&gt;
+to create the Raspberry Pi boot image.  I&#39;m using Debian Jessie (and
+not Raspbian), to get more control over the packages available.
+Unfortunately a huge binary blob need to be inserted into the boot
+image to get it booting, but I&#39;ll ignore that for now.  Also, as
+Debian lack support for the CPU features available in the Raspberry
+Pi, the system do not use the hardware floating point unit.  I hope
+the routing performance isn&#39;t affected by the lack of hardware FPU
+support.&lt;/p&gt;
+
+&lt;p&gt;To create an image, run the following with a sudo enabled user
+after inserting the target SD card into the build machine:&lt;/p&gt;
+
+&lt;p&gt;&lt;pre&gt;
+% wget -O build-rpi-mesh-node \
+    https://raw.github.com/petterreinholdtsen/meshfx-node/master/build-rpi-mesh-node
+% sudo bash -x ./build-rpi-mesh-node &gt; build.log 2&gt;&amp;1
+% dd if=/root/rpi/rpi_basic_jessie_$(date +%Y%m%d).img of=/dev/mmcblk0 bs=1M
+%
+&lt;/pre&gt;&lt;/p&gt;
+
+&lt;p&gt;Booting with the resulting SD card on a Raspberry PI with a USB
+wifi card inserted should give you a mesh node.  At least it does for
+me with a the wifi card I am using. The default mesh settings are the
+ones used by the Oslo mesh project at Hackeriet, as I mentioned in
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Oslo_community_mesh_network___with_NUUG_and_Hackeriet_at_Hausmania.html&quot;&gt;an
+earlier blog post about this mesh testing&lt;/a&gt;.&lt;/p&gt;
+
+&lt;p&gt;The mesh node was not horribly expensive either.  I bought
+everything over the counter in shops nearby.  If I had ordered online
+from the lowest bidder, the price should be significantly lower:&lt;/p&gt;
+
+&lt;p&gt;&lt;table&gt;
+
+&lt;tr&gt;&lt;th&gt;Supplier&lt;/th&gt;&lt;th&gt;Model&lt;/th&gt;&lt;th&gt;NOK&lt;/th&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;Teknikkmagasinet&lt;/td&gt;&lt;td&gt;Raspberry Pi model B&lt;/td&gt;&lt;td&gt;349.90&lt;/td&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;Teknikkmagasinet&lt;/td&gt;&lt;td&gt;Raspberry Pi type B case&lt;/td&gt;&lt;td&gt;99.90&lt;/td&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;Lefdal&lt;/td&gt;&lt;td&gt;Jensen Air:Link 25150&lt;/td&gt;&lt;td&gt;295.-&lt;/td&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;Clas Ohlson&lt;/td&gt;&lt;td&gt;Kingston 16 GB SD card&lt;/td&gt;&lt;td&gt;199.-&lt;/td&gt;&lt;/tr&gt;
+&lt;tr&gt;&lt;td&gt;Total cost&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;943.80&lt;/td&gt;&lt;/tr&gt;
+
+&lt;/table&gt;&lt;/p&gt;
+
+&lt;p&gt;Now my mesh network at home consist of one laptop in the basement
+connected to my production network, one Raspberry Pi node on the 1th
+floor that can be seen by my neighbor across the park, and one
+play-node I use to develop the image building script.  And some times
+I hook up work horse laptop to the mesh to test it.  I look forward to
+figuring out what kind of latency the batman-adv setup will give, and
+how much packet loss we will experience around the park. :)&lt;/p&gt;
+</description>
+       </item>
+       
        <item>
                <title>Perl library to control the Spykee robot moved to github</title>
                <link>http://people.skolelinux.org/pere/blog/Perl_library_to_control_the_Spykee_robot_moved_to_github.html</link>