From Openmoko

Jump to: navigation, search

wmiconfig is a tool written by Atheros Communications Inc to configure the Ar6k WIFI chip used in the Neo Freerunner. This is a standalone C executable, released under GPL v2.



Get the source from Openmoko SVN, then compile it:

export ATH_CROSS_COMPILE_TYPE=arm-angstrom-linux-gnueabi-

Otherwise, you may try a Debian package:

wget http://meshy.org/~ato/debian/pool/main/w/wmiconfig/wmiconfig_0.0.18-1_armel.deb
dpkg -i wmiconfig_0.0.18-1_armel.deb

(or find the link to a binary posted by FilipBE to the community mailing list on November 13th, 2008)

SHR-unstable has a OPKG package, works on shr-testing:

opkg install http://shr.bearstech.com/shr-unstable/ipk/armv4t/wmiconfig_0.0.0+svnr4522-r0_armv4t.ipk

Using wmiconfig to enable wakeup-on-wireless (wow)

To have the ar6k wifi module generate an interrupt to host controller upon receiving an ICMP packet:

wmiconfig --sethostmode asleep /* to tell ar6k what host's current is */
wmiconfig --setwowmode enable /* enable wow function */
wmiconfig --addwowpattern 0 1 33 01 ff /* add packet filter pattern, this is the ICMP filter pattern */

The last step above defines the kind of packet that will wake up the controller. More generally, the argument is:

--addwowpattern <list-id> <pattern-size> <pattern-offset> <pattern> <pattern-mask>

Here are some addwowpattern schemes:

Protocol type=IP=0800 Protocol type in IP header=ICMP=01

- To filter for IP packets(offset 22) wmiconfig --addwowpattern 0 2 22 0800 ffff - To filter for ICMP packets (offset 33) wmiconfig --addwowpattern 0 1 33 01 ff

To test the setup:

  1. apm -s
  2. ping IP_of_Neo
  3. The GPIO1 pin would be pulled up. The system would resume then.
  4. wmiconfig --sethostmode awake /* The firmware of ar6k will pull low the GPIO1 pin */

Using wmiconfig to disable/re-enable wifi

The impact on battery life has to be checked yet.

# using Atheros wmiconfig command to disable wlan
./wmiconfig -i eth0 --wlan disable

# To re-enable wlan:
./wmiconfig -i eth0 --wlan enable
# set re-association mode 0 :  do send disassoc when reassociation
./wmiconfig -i eth0 --setreassocmode 0
# now try to reconnect wlan using gui
iwlist eth0 scan

Make your WIFI more reliable

After boot or before connecting do:

wmiconfig -i eth0 --power maxperf
Personal tools