wakeup-on-wlan works!
Timo Juhani Lindfors
timo.lindfors at iki.fi
Fri Mar 12 10:27:06 CET 2010
niubee_007 <pengningkun at gmail.com> writes:
> I googled wakeup-on-wlan for SHR and found this link
> http://shr-project.org/trac/ticket/305
I have been trying to get wake on wlan work on debian for a long
time. Using andy-tracking a3587e4ed77974ad on gta02v5. That
echo 1 >/sys/module/s3cmci/parameters/persist
finally did the trick and I can finally make the phone wake up on
wlan! Thanks a lot for pointing me to this ticket. (I really wish we
had distro independent documentation for kernel /sys parameters...)
Anyways, here's what I did:
##### turn wlan off
sudo ifdown wlan
om wifi power 0
sleep 5
##### check that the wakeup pin is high
# http://docs.openmoko.org/trac/browser/trunk/doc/hardware/GTA02v2/gpio.txt?rev=2587&format=txt
# GPF5 I EINT5 WLAN_GPIO1 wlan wakeup GPIO
sudo bin/gpio | grep ^F -A1
##### turn wlan on
om wifi power 1
sudo ifup wlan=private_c22
##### check that the wakeup pin is low
sudo bin/gpio | grep ^F -A1
##### set the magic parameter mentioned in http://shr-project.org/trac/ticket/305
sudo sh -c 'echo 0 > /sys/module/s3cmci/parameters/persist'
#### set other equally magic parameters
#### mentioned on http://wiki.openmoko.org/wiki/Wmiconfig
#### and documented in wmiconfig and ar6000 sources
sudo wmiconfig -i wlan --power maxperf
sudo wmiconfig -i wlan --setwowmode enable # enable wow function
sudo wmiconfig -i wlan --addwowpattern 0 1 33 01 ff # add packet filter pattern, this is the ICMP filter pattern
#### tell ar6k to pull wakeup pin high on matching packet
#### DO NOT ping the phone between this and apm command
#### If the pin gets pulled high already before apm command
#### no wakeup can occur.
sudo wmiconfig -i wlan --sethostmode asleep # to tell ar6k what host's current is
#### suspend the system
sudo apm -s
#### ping the device from other computer and witness that it wakes up
#### since wakeup pin is pulled up:
sudo bin/gpio | grep ^F -A1
sudo wmiconfig -i wlan --sethostmode awake # The firmware of ar6k will pull low the GPIO1 pin
More information about the community
mailing list