Wmiconfig

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Using wmiconfig to disable/re-enable wifi)
 
Line 69: Line 69:
 
</pre>
 
</pre>
  
[[Category:Settings Applications]]
 
  
 
== Make your WIFI more reliable ==
 
== Make your WIFI more reliable ==
Line 77: Line 76:
 
wmiconfig -i eth0 --power maxperf
 
wmiconfig -i eth0 --power maxperf
 
</pre>
 
</pre>
 +
 +
[[Category:Wlan software]]
 +
[[Category:Settings Applications]]

Latest revision as of 15:20, 10 July 2009

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.

Contents

[edit] 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)

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

[edit] 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 */


[edit] 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


[edit] Make your WIFI more reliable

After boot or before connecting do:

wmiconfig -i eth0 --power maxperf
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.

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)

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