{"id":278,"date":"2011-06-01T11:04:22","date_gmt":"2011-06-01T18:04:22","guid":{"rendered":"http:\/\/..\/?p=278"},"modified":"2011-06-01T11:04:22","modified_gmt":"2011-06-01T18:04:22","slug":"mesh-networking-the-zipit","status":"publish","type":"post","link":"https:\/\/blog.engine12.com\/?p=278","title":{"rendered":"Mesh Networking the ZipIt"},"content":{"rendered":"<p><a href=\"..\/wp-content\/uploads\/2011\/06\/ZipIts.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignright size-medium wp-image-293\" src=\"..\/wp-content\/uploads\/2011\/06\/ZipIts-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/blog.engine12.com\/wp-content\/uploads\/2011\/06\/ZipIts-300x169.jpg 300w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2011\/06\/ZipIts-768x433.jpg 768w, https:\/\/blog.engine12.com\/wp-content\/uploads\/2011\/06\/ZipIts.jpg 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Back in December ZipIts were selling for $9.99 on amazon.\u00a0 It seemed like way too good a deal to be true, but I couldn&#8217;t resist the urge to get one, they have so many features that interest me.\u00a0 I figured it was worth the risk.\u00a0 I received the ZipIt, installed Linux, and tested out the hardware.\u00a0 Impressed as I was, I ordered 10 more.\u00a0 One of the primary reasons for acquiring\u00a0 this many ZipIts was to set up and experiment with a mesh network.\u00a0 I&#8217;m not disappointed, the value of my Zipits went way up this past weekend!\u00a0 This post describes the steps for configuring the ZipIt as a node on a mesh network.<\/p>\n<p>As of Linux kernel 2.6.38 the <a href=\"http:\/\/www.open-mesh.org\/\">batman-adv kernel module<\/a> is in mainline.\u00a0 Using buildroot I configured and built the kernel to include the module.\u00a0 I cross-compiled the user land utility <a href=\"http:\/\/www.open-mesh.org\/wiki\/open-mesh\/Download\">batctrl<\/a> and installed it to the \/usr\/sbin directory of <a href=\"http:\/\/hostwork.com\/users\/matt\/zipitz2\/\">Z2Lite<\/a>.<\/p>\n<p>To set up a mesh network node, boot Z2Lite and issue the following commands.\u00a0 I put them in a script file and assigned the script to a key in tmux.conf.\u00a0 Be sure to kill the wpa-supplicant process if it&#8217;s running.<\/p>\n<p style=\"padding-left: 30px\">z2lite:~# <span style=\"color: #ff9900\">modprobe batman-adv<\/span><\/p>\n<p style=\"padding-left: 30px\">z2lite:~# <span style=\"color: #ff9900\">ifconfig wlan0 down<\/span><\/p>\n<p style=\"padding-left: 30px\">z2lite:~# <span style=\"color: #ff9900\">ifconfig wlan0 mtu 1476<\/span><br \/>\nz2lite:~# <span style=\"color: #ff9900\">iwconfig wlan0 mode ad-hoc<\/span><br \/>\nz2lite:~# <span style=\"color: #ff9900\">iwconfig wlan0 essid zipit ap 02:1A:34:56:78:9A channel 1<\/span><\/p>\n<p style=\"padding-left: 30px\">z2lite:~# <span style=\"color: #ff9900\">batctl if add wlan0<\/span><\/p>\n<p style=\"padding-left: 30px\">z2lite:~# <span style=\"color: #ff9900\">ifconfig bat0 192.168.11.219<\/span><br \/>\nz2lite:~# <span style=\"color: #ff9900\">ifconfig wlan0 up<\/span><br \/>\nz2lite:~# <span style=\"color: #ff9900\">ifconfig bat0 up<\/span><\/p>\n<p>Assign a unique AP mac address for each node (i.e. ZipIt) and choose a channel that best suits your environment.\u00a0 That&#8217;s it, everything else is just like other IP networks, ping, ssh etc.\u00a0 The batctl utility has a few commands for troubleshooting the network if you have issues.\u00a0 I haven&#8217;t had time to experiment yet, but the first is going to be location triangulation.\u00a0 I think it&#8217;s built into the protocol.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/www.open-mesh.org\/\">http:\/\/www.open-mesh.org\/<\/a><\/p>\n<p><a href=\"http:\/\/hostwork.com\/users\/matt\/zipitz2\/\">http:\/\/hostwork.com\/users\/matt\/zipitz2\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back in December ZipIts were selling for $9.99 on amazon.\u00a0 It seemed like way too good a deal to be true, but I couldn&#8217;t resist the urge to get one, they have so many features that interest me.\u00a0 I figured it was worth the risk.\u00a0 I received the ZipIt, installed Linux, and tested out the <a href='https:\/\/blog.engine12.com\/?p=278'>[&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[4,8,9,13],"_links":{"self":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts\/278"}],"collection":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278"}],"version-history":[{"count":0,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=\/wp\/v2\/posts\/278\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.engine12.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}