<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>UbiquitiNanostationM5</title><revhistory><revision><revnumber>2</revnumber><date>2010-12-07 12:26:29</date><authorinitials>stefanopilla</authorinitials></revision><revision><revnumber>1</revnumber><date>2010-07-25 22:26:54</date><authorinitials>stefanopilla</authorinitials></revision></revhistory></articleinfo><section><title>Ubiquiti Nanostation M5</title><para>Ubiquiti Networks provide a SDK for their Firmware  (AirOS). </para><para>The SDK and the cross-compiler Toolchain can be found at the  support section of their homepage [0]. </para><para>The needs of ninux.org community was to make a links with 2 Nanostation M5 with OLSR Daemon. </para><para>The Images will contains olsrd and some modfications in order to build and  install it. It also contains a modification of the webinterface which  allows the use of no gateway at the network configuration because a  static default route destroys dynamic routing. </para><para><inlinemediaobject><imageobject><imagedata depth="16" fileref="https://wiki.graz.funkfeuer.at/moin_static171/mandarin/img/icon-info.png" width="16"/></imageobject><textobject><phrase>{i}</phrase></textobject></inlinemediaobject>  This patch doesn't change anything at the kernel config or the wifi  driver in order to preserve the stability and functionality of the  original firmware. This means that my patched firmware has <emphasis role="strong">no adhoc mode</emphasis>. </para><para>You can build your own Image on Debian/Ubuntu by invoking the following commands: </para><section><title>SDK 3.5</title><screen><![CDATA[# mkdir ubnt-3.x
# cd ubnt-3.x
# wget http://www.ubnt.com/downloads/sdk/toolchain-mips-ls_0.1-1.deb
# dpkg -i toolchain-mips-ls_0.1-1.deb
# wget http://www.ubnt.com/downloads/firmwares/XS-fw/v3.5/SDK.UBNT.v3.5.4499.tar.bz2
# tar xjf SDK.UBNT.v3.5.4499.tar.bz2
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS3.x/XS2.ar2316.v3.5.with-olsr-0.6.0/patches/UBNT_SDK3.5_files-02.tar.gz
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS3.x/XS2.ar2316.v3.5.with-olsr-0.6.0/patches/UBNT_SDK3.5_with_olsrd-01.patch
# cd SDK.UBNT.v3.5.4499
# patch -p1 < ../UBNT_SDK3.5_with_olsrd-01.patch
# tar xzf ../UBNT_SDK3.5_files-02.tar.gz]]></screen><para>now we have to download and copy the olsrd source </para><screen><![CDATA[# cd apps/gpl/olsrd
# wget http://www.olsr.org/releases/0.6/olsrd-<version>.tar.bz2
# tar --strip 1 -xjf olsrd-<version>.tar.bz2
# rm olsrd-<version>.tar.bz2
# cd ../../../
# make xs5]]></screen><para>You can build a image for 2.4GHz Hardware by replacing the <emphasis role="strong">xs5</emphasis> with <emphasis role="strong">xs2</emphasis>. </para><para>After  building the Image it can be installed via the AirOS Webinterface. If  the interface complaints about a wrong image file you have to upgrade  AirOS to a newer version which allows the use of third party firmware  images. </para></section><section><title>SDK 5.2</title><screen><![CDATA[# mkdir ubnt-5.x
# cd ubnt-5.x
# wget http://www.ubnt.com/downloads/firmwares/XN-fw/v5.2/SDK.UBNT.v5.2.tar.bz2
# tar xjf SDK.UBNT.v5.2.tar.bz2
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS5.x/XM.v5.2.sdk.5090.with-olsr-0.6.0/patches/additional-files.tar.gz
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS5.x/XM.v5.2.sdk.5090.with-olsr-0.6.0/patches/olsrd-package.patch
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS5.x/XM.v5.2.sdk.5090.with-olsr-0.6.0/patches/ubnt-web-with-olsrd.patch
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS5.x/XM.v5.2.sdk.5090.with-olsr-0.6.0/patches/fffversion.patch
# wget http://www.stefanopilla.it/Ninux/ubnt/AirOS5.x/XM.v5.2.sdk.5090.with-olsr-0.6.0/patches/optional-default-gw.patch
# cd SDK.UBNT.v5.2
# patch -p1 < ../olsrd-package.patch
# patch -p1 < ../ubnt-web-with-olsrd.patch
# patch -p1 < ../optional-default-gw.patch
# patch -p1 < ../fffversion.patch
# tar xzf ../additional-files.tar.gz
# cd openwrt
# make]]></screen><para>After building the Image it can be installed via the AirOS Webinterface. </para><para>If  you have successfully installed the image you can turn on olsrd using  the enable button at the services section of the Web Interface. </para><para>You can also download your own olsrd.conf via the  Webinterface. If you download an own configuration file be sure it  includes the configuration lines for the txtinfo plugin as this plugin  is needed by the Web Inteface to show the OLSR Info. </para><para>If  you want to edit the olsrd.conf via ssh or telnet you have to make sure  that it gets stored inside the persistent storage area of the flash.  Create the Configuration file inside the <emphasis>/etc/persistent/</emphasis> directory and invoke the following command: </para><screen><![CDATA[# /bin/cfgmtd -p /etc/ -w]]></screen><para>After that you have to reboot. </para></section></section><section><title>Links</title><para><ulink url="http://www.ubnt.com/support/downloads"/> </para><para><ulink url="http://www.olsr.org"/> </para></section></article>