modified on 27 May 2009 at 19:25 ••• 26,511 views

AirOS-SDK

From Ubiquiti Wiki

Jump to: navigation, search

Note: some information on this Wiki is user-created/maintained and thus unofficial. Although we will try our best to maintain the accuracy of this site, Ubiquiti can not guarantee the reliability of all the information on this page.

Contents

AirOS SDK

Overview

LiteStation2 and LiteStation5 are Ubiquiti Networks 400mW integrated subscriber stations specifically designed for long range point-to-multipoint links. The product uses embedded Linux solution, hence this SDK release.

This SDK has been built and used on Ubuntu Linux 6.10 (Edgy Eft) distribution.

Using this SDK you will be able to build v2.1 version firmwares for LiteStation2 and LiteStation5.

SDK framework is (C) Copyright Ubiquiti Networks, Inc

DISCLAIMER. TO THE EXTENT ALLOWED BY LOCAL LAW, THIS SOFTWARE PRODUCT ("SOFTWARE") IS PROVIDED TO YOU "AS IS" WITHOUT WARRANTIES OF ANY KIND, WHETHER ORAL OR WRITTEN, EXPRESS OR IMPLIED. IN NO EVENT SHALL Ubiquiti Networks, Inc BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).

Prerequisites

  • MIPS Toolchain: binaries (gcc-3.3.3 and uClibc-0.9.26) can be downloaded from

"UBNT Site" or alternatively can be built using buildroot (http://buildroot.uclibc.org/)

  • Host tools: fakeroot, gcc, binutils, patch, sed, tar, gzip, bzip2, lzma, flex, bison, make, autoconf, gettext, pkg-config, unzip, libz-dev and libc headers.

NOTE: this may be incomplete list of utilities needed, so if you get any errors during build, look at the error output.

Building The firmware

LiteStation2

  • To build LiteStation2 firmware type (in command line terminal):
 	make clean; make ls2
  • On successfull build you will find the firmware file in directory:
 	rootfs/LS2.ar2316.v2.0.latest
  

NanoStation2

* {missing}

PowerStation2

* {missing}

LiteStation5

  • To build LiteStation5 firmware type (in command line terminal):
 	make clean; make ls5
  • On successfull build you will find the firmware file in directory:
     rootfs/LS5.ar2313.v2.0.latest

NanoStation5 firmware

  • To build NanoStation5 firmware type (in command line terminal):
 	make clean; make xs5

PowerStation5 firmware

  • To build PowerStation5 firmware type (in command line terminal):
 	make clean; make xs5

AirOS Tools

cfgmtd

this does the actual flash reading/writing of the configuration to the MTD (memory technology device)

       -t <type>                       Configuration type to use [1(active)|2(backup)] (Default: 1(active))
       -f <config file>                Configuration file to use. (Default: /tmp/system.cfg)
       -p <persistent directory> Directory to persistent dir. (Default: none)

this specifies a directory to read/write that contains data you want to keep through reboots. note that it will actually only "persist" a subdirectory of what you specify here which is hardcoded to "persistent" so -p /etc will actually persist /etc/persistent

       -w                              - Write to flash action.
                                           write the config file specified by -f as well as the persistent directory to keep
       -r                              - Read from flash action.

ubntconf

this utility parses the config file extracted by cfgmtd into files in the /etc directory. it is NOT limited to writing /etc/sysinit as the -o option might imply but instead writes all over the place in /etc

       -c <config file> - Configuration file to use. (Default: /tmp/system.cfg)
       -p <config file> - Previous config file to differ with file specified in -c option. (Default: none) 
                              will do a diff(erence) between the -c and -p files and print the result to stdout. 			          
                              - it doesn't seem to be used anywhere
       -d <file name>  - File name for script generated from the diff. (Default: /tmp/diff.sh)
                                 is broken and doesn't write anything anywhere
       -o <output directory>  - Directory to output scripts. (Default: /etc/sysinit)

is similarly broken and misleading as it writes everywhere in /etc

                                           it will not write anywhere else no matter what you set it to

factorytest

this seems to be a test used by the ubiquity factory before they ship out an antenna. it will write a file to /tmp/test-XXXXX.dat with the results of various tests, which can be one of "rssi", "throughput", and "setup" and will take the place of the XXXXX in the filename

infctld

is the daemon that allows the discovery utility to do its magic. it seems to listen on port 10001/UDP for discovery packets, as well as sending out CDP advertisement. more information would be useful

regdomain

generates the list of available channels for the regdomain (country) you're in

the options are as follow:
    [-a] all bands 
    [-j] add quotes to the output, for eval() purpose in the cgi scripts
    [-o]  unknown
    [-i]  unknown
    [-w 0-3] filter on bandwidth (0 = 20 or 40 , 1=10, 2=5,3=ALL)
    [-s 2-3] display frequency shift channels (in mhz). valid values seem to be 2 or 5 for G and A respectively
    [ -B -G -S -A -T  ] filter for the band (802.11[ABG], T and S are unknown)
    [cc | rd] countrycode | regulatory domain. 

the output has the format:

frequency
channel
PROTO(A,B,G)
CHANWIDTH
power 

speedicmp

Network Speed ICMP Estimator

speedicmp [options] <ip_address>
       -q                      display output using short format.
       -v                      display verbose statistics calculation output.
       -l <seconds>            time limit in seconds; default: 10
       -n <bytes>              packet size; default: 14800
       -c <number>             repeat test number of times; default: 1
       -h                      display this help and exit.

this only seems to work locally (no routing)

speedsrv, speedtest

network speed tester and server. uses tcp to do a speed test between the two nodes

sysled

turn the "Wan" or "Ready" led on and off. no other leds seem to be available

   -r <0|1>        control "ready" LED

fwupdate

updates the firmware of your radio. it has a few options:

   -c will CRC check the fw image at /tmp/fwupdate.bin and return the version string
   -m will update the firmware, after an implicit -c

fwupdate is actually a wrapper script to fwupdate.real, which does the actual work of updating the firmware it always operates on the file at /tmp/fwupdate.bin. You should always check the md5sum of the image file before you do that.


Other undocumented tools

ltest, ltestf, ltestr, ltestsrv, bgnd.

FAQ

Q: When I 'make xs2' for the AirOS V3.0 SDK I get the following output:

make[3]: uudecode: Command not found

A: please install uudecode:

apt-get install sharutils