El día Thursday, September 25, 2008 a las 08:02:18PM +0100, Al Johnson escribió:
> > I think the work that wpa_supplicant daemon does is only to control the > > association to the AP and bringing up the interface; then in FreeBSD > > a devd (device daemon) lets you describe what to do else, for example > > launch a script when IF_UP; in this script you may, based on the MAC of > > the AP, do whatever is needed: ifconfig static IP or DHCP or .... > > > > it is similiar to what I have described here for the cdce0 (USB) interface: > > > > http://wiki.openmoko.org/wiki/Usb_networking#FreeBSD > > > > a logic like that must exist in Debian too, I'm wrong? > > and this is not much scripting work, or? > > Exactly. The logic exists in debian. wpa_supplicant associates with the > access > point then some scripts apply the configuration you set > in /etc/network/interfaces that matches the AP it associated with. > Unfortunately in 2007.2 the bit that applies the settings is missing. For > someone who knows their way around the inner workings of the debian system it > would probably be easy to fix, but I don't. Since ASU was moving to use > connman instead of the debian method of network management I didn't see the > benefit in digging deeper at the time. Well, today morning I started investigating the Wifi of the FR gadget: I configured the MAC addr of the eth0 of FR into my AP; I enabled the Wifi in the settings and FR saw my home SSID and asked for the key; this AP at home is WEP protected and the 'password' (which I normaly use in my laptop) is something like this wpa_supplicant entry: network={ ssid="tarara" scan_ssid=1 key_mgmt=NONE wep_tx_keyidx=0 wep_key0=42FEEDDEAFBABEDEAFBEEFAA55 } I've typed in the key in the FR again and again but it always said after some time 'ERROR Unable to join network' then I SSH'ed into the FR and configured by hand: # cat /etc/network/interfaces: ... iface eth0 inet dhcp wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf # cat /etc/wpa_supplicant/wpa_supplicant.conf network={ ssid="tarara" scan_ssid=0 key_mgmt=NONE wep_tx_keyidx=0 wep_key0=42FEEDDEAFBABEDEAFBEEFAA55 } and restarted the eth0 interface with: # ifdown eth0 && ifup eth0 this produced the following output: sed: unrecognized option `--quiet' BusyBox v1.9.1 (2008-09-04 08:23:57 CST) multi-call binary Usage: sed [-efinr] pattern [files...] WPA: Terminating sed: unrecognized option `--quiet' BusyBox v1.9.1 (2008-09-04 08:23:57 CST) multi-call binary Usage: sed [-efinr] pattern [files...] WPA: Configuring Interface ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported ioctl[SIOCSIWENCODEEXT]: Operation not supported udhcpc (v1.9.1) started run-parts: /etc/udhcpc.d/00avahi-autoipd exited with return code 1 Sending discover... Sending select for 192.168.2.100... Lease of 192.168.2.100 obtained, lease time 86400 run-parts: /etc/udhcpc.d/00avahi-autoipd exited with return code 1 adding dns 192.168.2.1 the network came up fin, including DNS: # ping www.muc.de PING www.muc.de (193.149.48.10): 56 data bytes 64 bytes from 193.149.48.10: seq=0 ttl=246 time=96.697 ms 64 bytes from 193.149.48.10: seq=1 ttl=246 time=114.740 ms 64 bytes from 193.149.48.10: seq=2 ttl=246 time=232.842 ms 64 bytes from 193.149.48.10: seq=3 ttl=246 time=154.134 ms 64 bytes from 193.149.48.10: seq=4 ttl=246 time=377.435 ms 64 bytes from 193.149.48.10: seq=5 ttl=246 time=88.150 ms the routing looks a bit broken: note there are two default gateways: # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 193.149.48.10 192.168.2.1 255.255.255.255 UGH 0 0 0 eth0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 usb0 0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0 0.0.0.0 192.168.0.200 0.0.0.0 UG 0 0 0 usb0 it would be nice to create some icon in the Om2008.9 desktop to launch this "ifdown eth0 && ifup eth0", but I already learned that this is another complex storry and at the moment I can't compile the eet library for modifying the desktop at all; so I have to live with the command on the sheel (which is not a big thing); in my office the AP runs WPA-PSK and it seems that it is not associating at all; the entry in /etc/wpa_supplicant/wpa_supplicant.conf reads: network={ ssid="santaclara" key_mgmt=WPA-PSK psk="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" } again, it is the same as I use in my laptop; and I have no idea why it does not associate; can I launch somehow the wpa_supplicant in FR in debug mode? or I will enable the debugging in the AP and have a look if nobody has some other hint on this; thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e <[EMAIL PROTECTED]> - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows _______________________________________________ Openmoko community mailing list [email protected] http://lists.openmoko.org/mailman/listinfo/community

