WLAN from SDIO to SPI: sneak preview

quatrox at gmail.com quatrox at gmail.com
Sun Sep 7 18:03:47 CEST 2008


On 2008-09-04, Werner Almesberger <werner at openmoko.org> wrote:
> Christ van Willegen wrote:
>> Yes, it shows my network and the one of the neighbours (encrypted as
>> well :-(
>
> Excellent ! So it works :-) Does your own network appear encrypted
> as well ?
>
>> Please have a look at http://docs.openmoko.org/trac/ticket/1250. I've
>> recently put in a dump of wpa_supplicant's failure to associate.
>
> If it's not encrypted, you shouldn't need wpa_supplicant and all
> that stuff. A simple
>
> iwconfig eth0 essid your-essid
> udhcpc eth0
>
> should do. (Maybe kill off all the GUI stuff before that, lest
> it tries to do its own reconfiguration behind your back.)
>
> Then you should be able to ping your router. With the default
> settings of the WRT, udhcpc will print
>
> adding dns 192.168.1.1
>
> That's the address you should be able to ping.
>
> If that works, then the problem with not being able to associate
> is probably somewhere higher up.

I have a Linksys WRT54G(L) flashed with dd-wrt.

On my neo, I use this script to connect:

#!/bin/bash
/sbin/ifconfig eth0 192.168.3.202
/sbin/route del default
/sbin/route add default gw 192.168.3.1
/sbin/iwlist eth0 scan
/sbin/iwlist eth0 scan
/sbin/iwconfig eth0 essid dd-wrt4
sleep 3
/sbin/iwlist eth0 scan
#echo "nameserver 195.159.0.100" >/etc/resolv.conf

It always work, but sometimes I need to run it twice.
I think that is good.
To compare, I need this script for my laptop:

#!/bin/bash
ifconfig wlan0 down;
route del default;
ifconfig wlan0 192.168.3.184;
route add default gw 192.168.3.1;
iwlist wlan0 scan; sleep 3;
iwlist wlan0 scan; sleep 1;
iwconfig wlan0 essid dd-wrt4;
sleep 1;
while `iwconfig wlan0 |grep Link\ Quality:0`; do
	ifconfig wlan0 192.168.3.184;
	route add default gw 192.168.3.1;
	iwlist wlan0 scan; sleep 3;
	iwlist wlan0 scan; sleep 1;
	iwconfig wlan0 essid dd-wrt4; sleep 1;
	iwlist wlan0 scan; sleep 1;
done

So in general, it helps to scan before associating:)



More information about the openmoko-kernel mailing list