]> pere.pagekite.me Git - homepage.git/blobdiff - blog/archive/2013/11/index.html
Generated.
[homepage.git] / blog / archive / 2013 / 11 / index.html
index 484bb26695104d2f004e3019c5bc06b2d502ba2c..75ac256d22a9b4c7442f7574c2194ad70b345ba1 100644 (file)
 
     <h3>Entries from November 2013.</h3>
     
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Running_TP_Link_MR3040_as_a_batman_adv_mesh_node_using_openwrt.html">Running TP-Link MR3040 as a batman-adv mesh node using openwrt</a>
+      </div>
+      <div class="date">
+        10th November 2013
+      </div>
+      <div class="body">
+        <p>Continuing my research into mesh networking, I was recommended to
+use TP-Link 3040 and 3600 access points as mesh nodes, and the pair I
+bought arrived on Friday.  Here are my notes on how to set up the
+MR3040 as a mesh node using
+<a href="http://www.openwrt.org/">OpenWrt</a>.</p>
+
+<p>I started by following the instructions on the OpenWRT wiki for
+<a href="http://wiki.openwrt.org/toh/tp-link/tl-mr3040">TL-MR3040</a>,
+and downloaded
+<a href="http://downloads.openwrt.org/snapshots/trunk/ar71xx/openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin">the
+recommended firmware image</a>
+(openwrt-ar71xx-generic-tl-mr3040-v2-squashfs-factory.bin) and
+uploaded it into the original web interface.  The flashing went fine,
+and the machine was available via telnet on the ethernet port.  After
+logging in and setting the root password, ssh was available and I
+could start to set it up as a batman-adv mesh node.</p>
+
+<p>I started off by reading the instructions from
+<a href="http://wirelessafrica.meraka.org.za/wiki/index.php?title=Antoine's_Research">Wireless
+Africa</a>, which had quite a lot of useful information, but
+eventually I followed the recipe from the Open Mesh wiki for
+<a href="http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config">using
+batman-adv on OpenWrt</a>.  A small snag was the fact that the
+<tt>opkg install kmod-batman-adv</tt> command did not work as it
+should.  The batman-adv kernel module would fail to load because its
+dependency crc16 was not already loaded.  I
+<a href="https://dev.openwrt.org/ticket/14452">reported the bug</a> to
+the openwrt project and hope it will be fixed soon.  But the problem
+only seem to affect initial testing of batman-adv, as configuration
+seem to work when booting from scratch.</p>
+
+<p>The setup is done using files in /etc/config/.  I did not bridge
+the Ethernet and mesh interfaces this time, to be able to hook up the
+box on my local network and log into it for configuration updates.
+The following files were changed and look like this after modifying
+them:</p>
+
+<p><tt>/etc/config/network</tt></p>
+
+<pre>
+
+config interface 'loopback'
+        option ifname 'lo'
+        option proto 'static'
+        option ipaddr '127.0.0.1'
+        option netmask '255.0.0.0'
+
+config globals 'globals'
+        option ula_prefix 'fdbf:4c12:3fed::/48'
+
+config interface 'lan'
+        option ifname 'eth0'
+        option type 'bridge'
+        option proto 'dhcp'
+        option ipaddr '192.168.1.1'
+        option netmask '255.255.255.0'
+        option hostname 'tl-mr3040'
+        option ip6assign '60'
+
+config interface 'mesh'
+        option ifname 'adhoc0'
+        option mtu '1528'
+        option proto 'batadv'
+        option mesh 'bat0'
+</pre>
+
+<p><tt>/etc/config/wireless</tt></p>
+<pre>
+
+config wifi-device 'radio0'
+        option type 'mac80211'
+        option channel '11'
+        option hwmode '11ng'
+        option path 'platform/ar933x_wmac'
+        option htmode 'HT20'
+        list ht_capab 'SHORT-GI-20'
+        list ht_capab 'SHORT-GI-40'
+        list ht_capab 'RX-STBC1'
+        list ht_capab 'DSSS_CCK-40'
+        option disabled '0'
+
+config wifi-iface 'wmesh'
+        option device 'radio0'
+        option ifname 'adhoc0'
+        option network 'mesh'
+        option encryption 'none'
+        option mode 'adhoc'
+        option bssid '02:BA:00:00:00:01'
+        option ssid 'meshfx@hackeriet'
+</pre>
+<p><tt>/etc/config/batman-adv</tt></p>
+<pre>
+
+config 'mesh' 'bat0'
+        option interfaces 'adhoc0'
+        option 'aggregated_ogms'
+        option 'ap_isolation'
+        option 'bonding'
+        option 'fragmentation'
+        option 'gw_bandwidth'
+        option 'gw_mode'
+        option 'gw_sel_class'
+        option 'log_level'
+        option 'orig_interval'
+        option 'vis_mode'
+        option 'bridge_loop_avoidance'
+        option 'distributed_arp_table'
+        option 'network_coding'
+        option 'hop_penalty'
+
+# yet another batX instance
+# config 'mesh' 'bat5'
+#       option 'interfaces' 'second_mesh'
+</pre>
+
+<p>The mesh node is now operational.  I have yet to test its range,
+but I hope it is good.  I have not yet tested the TP-Link 3600 box
+still wrapped up in plastic.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title">
         <a href="http://people.skolelinux.org/pere/blog/Debian_init_d_boot_script_example_for_rsyslog.html">Debian init.d boot script example for rsyslog</a>
@@ -298,7 +436,7 @@ NEW.  I hope it will be available in Debian in a few days.</p>
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (2)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (3)</a></li>
 
 </ul></li>
 
@@ -458,7 +596,7 @@ NEW.  I hope it will be available in Debian in a few days.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (225)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (226)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (21)</a></li>
 
@@ -482,13 +620,13 @@ NEW.  I hope it will be available in Debian in a few days.</p>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (3)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (4)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (25)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (236)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (156)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (157)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (8)</a></li>