View source for Wmiconfig

From Openmoko

Jump to: navigation, search

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Administrators.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page:

Return to Wmiconfig.

Personal tools

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:

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

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