Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Sander van Grieken
Yeah, I haven't seen SHR-U updates for a while. Helge, is this with a 
self-built image?

grtz,
Sander


On Wednesday 14 October 2009 17:20:56 Martijn van den Broek wrote:
 Is that kernel the one from first of september from below?
 http://shr.bearstech.com/shr-unstable/images/om-gta02/?C=M;O=D
 
 Or is there a more recent kernel available somewhere?
 
 On Wed, Oct 14, 2009 at 1:29 PM, Helge Hafting helge.haft...@hist.nowrote:
  Wifi used to be very unstable and quirky, but is much improved now.
 
  (I use the latest shr-unstable kernel)
 
  I can now run a script that powers up wifi, loads the kernel
  driver module, and then runs wpa-supplicant and udhcpc. And it
  works - everytime!
 
  I can even suspend and resume, and wpa-supplicant keeps
  managing the connection after resume. I had to restart
  udhcpc, but that is of course not a driver problem.
 
  Helge Hafting
 
  ___
  Openmoko community mailing list
  community@lists.openmoko.org
  http://lists.openmoko.org/mailman/listinfo/community
 

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Helge Hafting
Sander van Grieken wrote:
 Yeah, I haven't seen SHR-U updates for a while. Helge, is this with a 
 self-built image?

This kernel is not that new. I think I got it in an opkg upgrade 
session. SHR-U has not updated in a while, so I think it is simple the 
latest SHR-U kernel. I have been using it for a while, and wifi has been 
useable instead of dies randomly all the time, only comes up now and then.

# uname -a
Linux om-gta02 2.6.29-rc3 #1 PREEMPT Tue Sep 1 23:03:59 CEST 2009 
armv4tl unknown

It is definitely not built by me.

Helge Hafting

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Helge Hafting
Michal Brzozowski wrote:

 does the wifi antenna keep eating power while suspended or does it turn 
 off?

I have no way of measuring that.

Helge Hafting

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Helge Hafting
Christ van Willegen wrote:
 Helge,
 
 On Wed, Oct 14, 2009 at 1:29 PM, Helge Hafting helge.haft...@hist.no wrote:
 Wifi used to be very unstable and quirky, but is much improved now.
 I agree!
 
 I can now run a script that powers up wifi, loads the kernel
 driver module, and then runs wpa-supplicant and udhcpc. And it
 works - everytime!
 
 Could you share this script with us? Or put it on the WIki?

Here is the script. Made so it will work from /etc/init.d/


#!/bin/sh
#Start wireless using wpa_supplicant and udhcpc
#
#Contains a sleep, not meant to be run as a starupt script.
#works great interactively, or from SHR settings

PATH=/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin

case $1 in
start)

#Get rid of any old daemons:
killall wpa_supplicant
killall udhcpc

echo Power up!
#Power up WIFI, in case it is off
mdbus -s org.freesmartphone.odeviced \
/org/freesmartphone/Device/PowerControl/WiFi \
org.freesmartphone.Device.PowerControl.SetPower 1

#Work around bugs:
echo Reload!
#The driver is borked after suspend, so
#reload it:
#(not sure if this step is still necessary,
#it definitely was before.)
rmmod ar6000 ; modprobe ar6000 ; sleep 2

#Run wpa_supplicant, it will look for known networks
#and associate to one of them. You need your own
#/etc/wpa_supplicant/wpa_supplicant.conf
echo Starting wpa_supplicant
wpa_supplicant -i eth0 -Dwext \
-c/etc/wpa_supplicant/wpa_supplicant.conf 

#give it a little time (no ifplugd yet)
#My phone needs 12-14 seconds before it associates.
sleep 20

#Attempt dhcp
udhcpc eth0
;;
stop)
killall udhcpc
killall wpa_supplicant
#Save power by turning the interface off
ifconfig eth0 down
rmmod ar6000
#Power down the hardware too:
mdbus -s org.freesmartphone.odeviced \
/org/freesmartphone/Device/PowerControl/WiFi \
org.freesmartphone.Device.PowerControl.SetPower 0
;;
restart)
$0 start
;;
*)
echo Usage: /etc/init.d/wpa {start|stop|restart}
exit 1
;;
esac
exit 0

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Michal Brzozowski
2009/10/15 Helge Hafting helge.haft...@hist.no

 Michal Brzozowski wrote:

  does the wifi antenna keep eating power while suspended or does it turn
  off?

 I have no way of measuring that.


Just check how much power it eats overnight. The battery should run out if
the wifi is on. But that's actually not important. Important to me is
whether you can effectively power off wifi after you're finished using it so
it doesn't drain the battery.
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-15 Thread Sebastian Krzyszkowiak
On 10/15/09, Michal Brzozowski ruso...@poczta.fm wrote:
 2009/10/15 Helge Hafting helge.haft...@hist.no

 Michal Brzozowski wrote:

  does the wifi antenna keep eating power while suspended or does it turn
  off?

 I have no way of measuring that.


 Just check how much power it eats overnight. The battery should run out if
 the wifi is on. But that's actually not important. Important to me is
 whether you can effectively power off wifi after you're finished using it so
 it doesn't drain the battery.


You can. And that script isn't necessary - allocating WiFi resource in
FSO ousaged interface is enough.

-- 
Sebastian Krzyszkowiak
dos

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-14 Thread Christ van Willegen
Helge,

On Wed, Oct 14, 2009 at 1:29 PM, Helge Hafting helge.haft...@hist.no wrote:
 Wifi used to be very unstable and quirky, but is much improved now.
I agree!

 I can now run a script that powers up wifi, loads the kernel
 driver module, and then runs wpa-supplicant and udhcpc. And it
 works - everytime!

Could you share this script with us? Or put it on the WIki?

Christ van Willegen
-- 
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-14 Thread Sebastian Krzyszkowiak
On 10/14/09, Christ van Willegen cvwille...@gmail.com wrote:
 Helge,

 On Wed, Oct 14, 2009 at 1:29 PM, Helge Hafting helge.haft...@hist.no
 wrote:
 Wifi used to be very unstable and quirky, but is much improved now.
 I agree!

 I can now run a script that powers up wifi, loads the kernel
 driver module, and then runs wpa-supplicant and udhcpc. And it
 works - everytime!

 Could you share this script with us? Or put it on the WIki?

 Christ van Willegen
 --
 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

I'm doing just fsoraw -r CPU,WiFi -- more, and after few seconds
udhcpc... And thanks, that reminded me to update WiFi module in SHR
Settings ;)

-- 
Sebastian Krzyszkowiak
dos

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-14 Thread Martijn van den Broek
Is that kernel the one from first of september from below?
http://shr.bearstech.com/shr-unstable/images/om-gta02/?C=M;O=D

Or is there a more recent kernel available somewhere?


On Wed, Oct 14, 2009 at 1:29 PM, Helge Hafting helge.haft...@hist.nowrote:

 Wifi used to be very unstable and quirky, but is much improved now.

 (I use the latest shr-unstable kernel)

 I can now run a script that powers up wifi, loads the kernel
 driver module, and then runs wpa-supplicant and udhcpc. And it
 works - everytime!

 I can even suspend and resume, and wpa-supplicant keeps
 managing the connection after resume. I had to restart
 udhcpc, but that is of course not a driver problem.

 Helge Hafting

 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community




-- 
Martijn van den Broek
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: Thanks for good work on the WIFI driver

2009-10-14 Thread Michal Brzozowski
2009/10/14 Helge Hafting helge.haft...@hist.no

 I can even suspend and resume, and wpa-supplicant keeps
 managing the connection after resume. I had to restart
 udhcpc, but that is of course not a driver problem.

 Helge Hafting


does the wifi antenna keep eating power while suspended or does it turn off?
___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community