Wmiconfig
From Openmoko
MinhHaDuong (Talk | contribs) (create page, paste from ML and from WIFI page) |
MinhHaDuong (Talk | contribs) m (→Download/installation: fix english) |
||
Line 3: | Line 3: | ||
== Download/installation == | == Download/installation == | ||
− | Get the source from [http://svn.openmoko.org/trunk/src/target/AR6kSDK.build_sw.18/host/tools/wmiconfig/ Openmoko SVN] | + | Get the source from [http://svn.openmoko.org/trunk/src/target/AR6kSDK.build_sw.18/host/tools/wmiconfig/ Openmoko SVN], then compile it: |
<pre> | <pre> | ||
export ATH_CROSS_COMPILE_TYPE=arm-angstrom-linux-gnueabi- | export ATH_CROSS_COMPILE_TYPE=arm-angstrom-linux-gnueabi- | ||
Line 15: | Line 15: | ||
</pre> | </pre> | ||
− | (or find the link to a binary posted by FilipBE to the community mailing list on November 13th, 2008) | + | (or find the link to a binary posted by FilipBE to the community mailing list on November 13th, 2008) |
== Using wmiconfig to enable wakeup-on-wireless (wow)== | == Using wmiconfig to enable wakeup-on-wireless (wow)== |
Revision as of 10:14, 14 November 2008
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.
Download/installation
Get the source from Openmoko SVN, then compile it:
export ATH_CROSS_COMPILE_TYPE=arm-angstrom-linux-gnueabi- make
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)
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:
- apm -s
- ping IP_of_Neo
- The GPIO1 pin would be pulled up. The system would resume then.
- 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