CrossCompile your programs for OpenWrt

CompileKernelModules for OpenWrt

Set up KeyAuthorization based access

Some UsefulCommands here.

SetTime on openwrt

EasySetup for OpenWrt on reboot.

AntennaDiversity on OpenWrt

Building an image

  1. Obtain the OpenWrt build environment via subversion
    svn export svn:// kamikaze
  2. Add additional OpenWrt packages (optional)
    ./scripts/feeds update
    ./scripts/feeds install -a
  3. Configure OpenWrt and packages
    make menuconfig
    NOTE: Remember that some devices have less memory than others. For instance the Nanostation only has 4MB. So be careful of how many packages you select.

    Recommended Configuration Selections:
    • Target System ---> Atheros AR231x/AR5312
    • Image configuration ---> LAN IP Address --->
    • Base System ---> libstdcpp
    • IPv6 ---> aiccu
    • IPv6 ---> ip6tables
    • IPv6 ---> ip6tables ---> ip6tables-utils
    • IPv6 ---> radvd
    • Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-conntrack-extra (for recent matching)
    • Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-extra (for owner matching)
    • Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-ipopt (for mac, MARK, time matching)
    • Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-nat-extra (for REDIRECT target)
    • Kernel Modules ---> Netfilter Extensions ---> kmod-nfnetlink-queue (for NFQUEUE target)
    • Kernel Modules ---> Netfilter Extensions ---> NOT kmod-nfnetlink-queue (for NFQUEUE target)
    • Network ---> Proxy Servers ---> tinyproxy
    • Network --> Time Synchronization --> ntpclient
    • Network ---> hostapd (NOT hostapd-mini, wpad, or wpad-mini) (for wpa-enterprise / radius auth)
    • Network ---> hostapd-utils
    • Network ---> iptables ---> iptables-mod-conntrack-extra (for recent matching)
    • Network ---> iptables ---> iptables-mod-extra (for owner matching)
    • Network ---> iptables ---> iptables-mod-ipopt (for mac, MARK, time matching)
    • Network ---> iptables ---> iptables-mod-nat-extra (for REDIRECT target)
    • Network ---> iptables ---> iptables-utils(for iptables-save and iptables-restore)
    • Network ---> iw
    • Network ---> ngrep
    • Network ---> tcpdump
    • Network ---> wget
    • Libraries ---> SSL ---> libopenssl
    • Libraries ---> libnetfilter-queue
    • Utilities ---> bandwidthd (uses lots of cpu) (not being used on current bitsnet builds)
    • Utilities ---> gdb
    • layer7, c, c++ (appear to be included by default?)

NOTE: The xt_NFQUEUE.ko module does not seem to be included for some reason. Must make kernel_menuconfig and set the following to build as modules and copy them over manually:

  • Networking support ---> Networking options ---> Network packet filtering framework (Netfilter) ---> Core Netfilter Configuration ---> Netfilter NFQUEUE over NFNETLINK interface
  • Networking support ---> Networking options ---> Network packet filtering framework (Netfilter) ---> Core Netfilter Configuration ---> Netfilter Xtables supprt (required for ip_tables) ---> "NFQUEUE" target support

  1. Build OpenWrt
    To debug:
    make V=99
    Errors encountered: By default some of the warnings are treated as errors. To disable it go to $BASE_DIR/build_dir/toolchain-mips_gcc-4.1.2_uClibc-0.9.29/gdb-6./Makefile and comment out Werror

Upgrading firmware on ubnt picostation/bullet

  1. Power cycle the unit and immediately hold the reset button for ~10 seconds until the leds glow alternately
  2. TFTP the image to (default ip of the ubnt device)
    tftp> binary
    tftp> rexmt 1
    tftp> trace
    tftp> put <image*>.bin

    * For PicoStation2 devices, this is openwrt-atheros-ubnt2-pico2-squashfs.bin
  3. Wait for the image to load on the device
    • This will usually take at least 5 to 10 minutes
    • Once finished, the leds should stop glowing alternatively red and orange
    • Once finished, you should be able to get a ping response from (the default ip of openwrt) or from the ip you set when customizing the image
  4. Create a root password on the device
    1. Telnet the device ip
    2. Set the root password

Setting up wireless

  1. in /etc/config/network set optiont type to router ( this will destroy the br-lan)
  2. in /etc/config/wireless remove the line which disables wireless

More tips

  • To name the pico/nano/bullet machine something other than openwrt edit /etc/config/system
  • In case of the following error:
    firmwarehotplug requires a SDCC Cross Compiler (sdcc) that supports the following targets : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08. You might consider installing the non-free version
    Do this first:
    install package sdcc-nf

-- AmitaEkbote - 19 May 2009

Topic attachments
I Attachment Action SizeSorted ascending Date Who Comment
Unknown file formatgz ping_full.tar.gz manage 68.7 K 2009-05-28 - 19:04 UnknownUser ping tar.gz
Compressed Zip archivetar ping_full.tar manage 180.0 K 2009-05-28 - 18:58 UnknownUser implementation of ping
Copyright 2016 The Board of Trustees
of the University of
Helping Women Faculty Advance
Funded by NSF