Followup, using newly released wicd 1.6.0 on Fedora 10 with RaLink 
RT2860 on ASUS EeePC 1000 HE


1) Although the Associate method in wnettools.py has changed, I still 
have the same problem - trying to set the Access point doesn't work - 
commenting out the Misc.Run() command for this action and I can connect 
to any open wifi network

2) However, I cannot connect to a WEP encrypted network.  The odd thing 
here is the iwconfig parameters are set correctly, including the WEP key 
(using the external tools and wext driver) so after wicd fails with "bad 
password" I can start dhclient by hand and connect immediately.  Here is 
a dump of the debug -

2009/06/16 06:48:54 :: Connecting to wireless network TG374
2009/06/16 06:48:54 :: /sbin/dhclient -v -r eth0
2009/06/16 06:48:54 :: ifconfig eth0 0.0.0.0 
2009/06/16 06:48:54 :: /sbin/ip route flush dev eth0
2009/06/16 06:48:54 :: ifconfig eth0 down
2009/06/16 06:48:54 :: ifconfig eth0 up
2009/06/16 06:48:54 :: Putting interface down
2009/06/16 06:48:54 :: ifconfig ra0 down
2009/06/16 06:48:54 :: Releasing DHCP leases...
2009/06/16 06:48:54 :: /sbin/dhclient -v -r ra0
2009/06/16 06:48:54 :: iwconfig ra0
2009/06/16 06:48:54 :: Setting false IP...
2009/06/16 06:48:54 :: ifconfig ra0 0.0.0.0 
2009/06/16 06:48:54 :: Stopping wpa_supplicant
2009/06/16 06:48:54 :: wpa_cli -i ra0 terminate
2009/06/16 06:48:54 :: Flushing the routing table...
2009/06/16 06:48:54 :: /sbin/ip route flush dev ra0
2009/06/16 06:48:54 :: iwconfig ra0 mode Managed
2009/06/16 06:48:54 :: Putting interface up...
2009/06/16 06:48:54 :: ifconfig ra0 up
2009/06/16 06:48:54 :: enctype is wep-hex
2009/06/16 06:48:54 :: Attempting to authenticate...
2009/06/16 06:48:54 :: ['wpa_supplicant', '-B', '-i', 'ra0', '-c', 
'/var/lib/wicd/configurations/001f90d4a790', '-D', 'wext']
2009/06/16 06:48:54 :: ['iwconfig', 'ra0', 'essid', 'TG374']
2009/06/16 06:48:54 :: iwconfig ra0 channel 6
2009/06/16 06:48:54 :: iwconfig ra0 ap 00:1F:90:D4:A7:90
2009/06/16 06:48:54 :: WPA_CLI RESULT IS DISCONNECTED
2009/06/16 06:48:55 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:48:56 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:48:57 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:48:58 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:48:59 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:00 :: found backend in configuration external
2009/06/16 06:49:00 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:01 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:02 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:03 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:04 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:05 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:06 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:08 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:09 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:10 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:11 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:12 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:13 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:14 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:15 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:16 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:17 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:18 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:19 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:20 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:21 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:22 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:23 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:24 :: WPA_CLI RESULT IS SCANNING
2009/06/16 06:49:25 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:26 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:27 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:28 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:29 :: WPA_CLI RESULT IS ASSOCIATING
2009/06/16 06:49:30 :: wpa_supplicant authentication may have failed.
2009/06/16 06:49:30 :: exiting connection thread
2009/06/16 06:49:30 :: Sending connection attempt result bad_pass
2009/06/16 06:49:30 :: ifconfig eth0
...


[n...@sammy ~]$ sudo iwconfig ra0
ra0       Ralink STA  ESSID:"TG374"  Nickname:"RT2860STA"
          Mode:Managed  Frequency=2.437 GHz  Access Point: 00:1F:90:D4:A7:90   
          Bit Rate=54 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:DEAD-BEEF-AD
          Link Quality=100/100  Signal level:-52 dBm  Noise level:-81 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[n...@sammy ~]$ sudo dhclient -v ra0
Internet Systems Consortium DHCP Client 4.0.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/ra0/00:22:43:95:c3:99
Sending on   LPF/ra0/00:22:43:95:c3:99
Sending on   Socket/fallback
DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.1.1
DHCPREQUEST on ra0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.4 -- renewal in 38931 seconds.


So, something in the wpa_supplicant is failing, but I am not exactly 
sure how to test this.  Any ideas?  I tried using the RALINK legacy 
driver but it didn't really work, and I've browsed a fair amount of 
forums but haven't come up with any hints for debugging.  Could it be 
that wicd just doesn't work for my hardware?

Thanks

Steve

Steve Nahn wrote:
> Hi
>   I just downloaded the stable version of wcid for my ASUS 1000HE 
> running Fedora 10.  I find when trying to connect to some wireless 
> (with essid MIT for instance) wcdi erases the current essid a,d never 
> executes the command to associate the correct essid.  The status text 
> is ":Obtaining an IP address" but by executing iwconfig by hand I can 
> see the parameters are not set.  In addition, if I set the parameters 
> by hand using iwconfig, suddenly the text changes to "MIT:Obtaining an 
> IP address"  where MIT is the essid I set by hand, and the connection 
> succeeds.
>
> I believe this is because of a problem with the Associate method in 
> the wnettools.py class, or possibly in the Run() method of the misc.py 
> class.  If I look at the log, I see
>
> 2009/05/29 18:05:19 :: Connecting to wireless network MIT
> 2009/05/29 18:05:19 :: Executing pre-connection script
> 2009/05/29 18:05:19 :: Putting interface down
> 2009/05/29 18:05:19 :: ifconfig ra0 down
> 2009/05/29 18:05:19 :: Releasing DHCP leases...
> 2009/05/29 18:05:19 :: Setting false IP...
> 2009/05/29 18:05:19 :: ifconfig ra0 0.0.0.0 
> 2009/05/29 18:05:19 :: ifconfig eth0 0.0.0.0 
> 2009/05/29 18:05:19 :: Stopping wpa_supplicant and any DHCP clients
> 2009/05/29 18:05:19 :: killall wpa_supplicant
> 2009/05/29 18:05:19 :: Flushing the routing table...
> 2009/05/29 18:05:19 :: ip route flush dev ra0
> 2009/05/29 18:05:19 :: ip route flush dev eth0
> 2009/05/29 18:05:19 :: Putting interface up...
> 2009/05/29 18:05:19 :: ifconfig ra0 up
> 2009/05/29 18:05:19 :: iwconfig ra0 mode Managed
> 2009/05/29 18:05:19 :: ['iwconfig', 'ra0', 'essid', 'MIT', 'channel', '11', 
> 'ap', '00:0F:66:75:18:46']
> 2009/05/29 18:05:19 :: Running DHCP
> 2009/05/29 18:05:19 :: /sbin/dhclient ra0
> 2009/05/29 18:05:23 :: iwconfig ra0
>
>   
> The line
> 2009/05/29 18:05:19 :: ['iwconfig', 'ra0', 'essid', 'MIT', 'channel', '11', 
> 'ap', '00:0F:66:75:18:46']
>
>   
> should really translate to
>
> 2009/05/29 18:05:19 :: iwconfig ra0 essid MIT channel 11 ap 00:0F:66:75:18:46
>
> The offending code is in the Associate method of wnettools.py
>
> """
> if not self.iface: return False
> cmd = ['iwconfig', self.iface, 'essid', essid]
> if channel:
>  cmd.extend(['channel', str(channel)])
>  if bssid:
>   cmd.extend(['ap', bssid])
>  if self.verbose: print cmd
>  misc.Run(cmd)
>
>   
> It appears that if I just remove
>   cmd.extend(['ap', bssid])
> everything works fine, so I guess python is having some trouble there 
> - the Popen command is translating the colon-separated numbers in a 
> strange way.  If I do it from the command line, it works fine.
> I am running Python 2.5.2 and in fact I think it looks like this 
> should work so I don't really know why it fails yet, but I am not a 
> Python programmer.  The output of python subprocess.py looks like:
> [r...@sammy wicd]# python ../../subprocess.py
> Process list:
>   PID TTY          TIME CMD
>  5440 pts/0    00:00:00 su
>  5451 pts/0    00:00:01 bash
>  8118 pts/0    00:00:00 python
>  8119 pts/0    00:00:00 ps
>
> uid=100 gid=0(root) 
> groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) 
> context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> Looking for 'hda'...
> 'hda_codec: Unknown model for ALC269, trying auto-probe from BIOS...\nALSA 
> sound/pci/hda/hda_codec.c:3021: autoconfig: line_outs=1 
> (0x14/0x0/0x0/0x0/0x0)\nALSA sound/pci/hda/hda_codec.c:3025:    
> speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)\nALSA sound/pci/hda/hda_codec.c:3029:    
> hp_outs=1 (0x15/0x0/0x0/0x0/0x0)\nALSA sound/pci/hda/hda_codec.c:3030:    
> mono: mono_out=0x0\nALSA sound/pci/hda/hda_codec.c:3038:    inputs: mic=0x12, 
> fmic=0x18, line=0x0, fline=0x0, cd=0x0, aux=0x0\n'
>
> Trying a weird file...
> The file didn't exist.  I thought so...
> Child traceback:
> Traceback (most recent call last):
>   File "../../subprocess.py", line 1057, in _execute_child
>     os.execvp(executable, args)
>   File "/usr/lib/python2.5/os.py", line 353, in execvp
>     _execvpe(file, args)
>   File "/usr/lib/python2.5/os.py", line 377, in _execvpe
>     func(file, *argrest)
> OSError: [Errno 2] No such file or directory
>
> [r...@sammy wicd]# 
>
>
>   
> Since I doubt I'll ever need to specify the access point, I'll leave 
> it as is for now but if someone knows the fix, that would be great.  I 
> also believe others might be suffering from the same bug so posting 
> this to the appropriate bug report is a good idea, but I am not 
> registered so I trust a developer  to do it.
>
> Be nice to know if this were fixed...
>
>
> Stev e


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
wicd-devel mailing list
wicd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicd-devel

Reply via email to