Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] How to repair wpa_supplicant gui please?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Thu Jan 14, 2010 11:24 am    Post subject: [Solved] How to repair wpa_supplicant gui please? Reply with quote

I had some trouble getting my wireless going so there was some thrashing around and the installation may not be perfect. However wireless has been working consistently and the gui showed the network. At least it used to.

I now want to access another router so I added the new router details to wpa_supplicant.conf (including the key in plain text which sounds barking mad). I was expecting to be able to go the GUI and select one or other of the wireless networks but the Adapter and Network text boxes in the GUI are blank and there is a message "could not get status from wpa_supplicant".

I went with wpa_supplicant because the documentation http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4 said
Quote:
wireless-tools supports nearly all cards and drivers, but it cannot connect to WPA only Access Points.

but I'm not sure this is true any longer.

I don't want to loose my current wireless connection so should I
a) repair wpa_supplicant GUI; if so how?
b) install wireless tools?
_________________
My time machine is broken which is odd because it was working tomorrow.


Last edited by PeggySue on Fri Jan 15, 2010 4:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Thu Jan 14, 2010 5:09 pm    Post subject: Reply with quote

Well I tried a wpa_supplicant reinstall and I now have no wireless at all. I then followed the instructions on bringing up a new wireless connection but to no avail.

Following a list of instructions is fine if you start from the same point as the author but for a repair they just don't work. What I really need is a wireless configuration and management tool with documentation that explains what the features are and how to use them. The cookbook approach isn't working.

I fear that if I don't understand what is happening I will never get a usable wireless connection.

Any ideas anyone please?
_________________
My time machine is broken which is odd because it was working tomorrow.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jan 14, 2010 8:56 pm    Post subject: Reply with quote

Hi, can you post this :

Code:

# emerge --info
# cat /etc/conf.d/net
# cat /etc/wpa_supplicant/wpa_supplicant.conf
# lspci -n
# ifconfig -a
# iwconfig
# iwlist scan
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Jan 14, 2010 9:08 pm    Post subject: Reply with quote

I would recommend deleting the contents of your wpa_supplicant.conf and start over, using wpa_gui to configure your networks. Delete your current conf and add these lines:

/etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1


When you fire up wpa_gui you will be able to configure your networks through there.

BTW:
1) wpa_supplicant was probably not starting due to an error in your config file
2) wireless-tools doesn't support WPA, only WEP, but wpa_supplicant does
Back to top
View user's profile Send private message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Thu Jan 14, 2010 9:42 pm    Post subject: Reply with quote

Thanks for the posts.

I would be interested to know what went wrong as well as finding a fix, so I have put the outputs you requested on pastebin @ http://pastebin.com/m497e4b5f The only edits are the removal of the wireless keys in plain text. The router that worked has the ssid Dlink4E2C, the other ssid is the new router I need to get to. The line in /etc/conf.d/net "#
wpa_supplicant_wlan0="-Db43" had the name -Dbroadcom but was commented out in any case.

I will wait for your thoughts before I try mikkegpitts idea.
_________________
My time machine is broken which is odd because it was working tomorrow.
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jan 14, 2010 9:59 pm    Post subject: Reply with quote

Ok, try that to see if you wireless card is actually working :

Code:

# ifconfig wlan0 up
# dmesg | tail
# iwlist scan
# dmesg | tail
Back to top
View user's profile Send private message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Thu Jan 14, 2010 10:24 pm    Post subject: Reply with quote

No it's not working now:

Code:
vostro peter # ifconfig wlan0 up
vostro peter # dmesg | tail
[   49.502531] gnome-power-man used greatest stack depth: 4328 bytes left
[ 3481.664064] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
[ 3481.696087] b43-phy0 debug: Chip initialized
[ 3481.696575] b43-phy0 debug: 32-bit DMA initialized
[ 3481.705504] Registered led device: b43-phy0::tx
[ 3481.706691] Registered led device: b43-phy0::rx
[ 3481.706750] Registered led device: b43-phy0::radio
[ 3481.706792] b43-phy0 debug: Wireless interface started
[ 3481.706801] b43-phy0 debug: Adding Interface type 2
[ 3481.711277] ADDRCONF(NETDEV_UP): wlan0: link is not ready
vostro peter #
vostro peter # iwlist scan
lo        Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     Scan completed :
          Cell 01 - Address: 00:23:48:E7:F7:63
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=31/70  Signal level=-79 dBm 
                    Encryption key:on
                    ESSID:"SKY63330"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=000004a74cf4900b
                    Extra: Last beacon: 645ms ago
                    IE: Unknown: 0008534B593633333330
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030101
                    IE: Unknown: 050400010000
                    IE: Unknown: 2A0100
                    IE: Unknown: 2F0100
                    IE: Unknown: 32040C121860
                    IE: Unknown: DD090010180201F4000000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (1) : TKIP
                        Authentication Suites (1) : PSK
          Cell 02 - Address: 00:1B:11:E4:32:98
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=68/70  Signal level=-42 dBm 
                    Encryption key:on
                    ESSID:"Dlink4E2C"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000026779ac6c1e
                    Extra: Last beacon: 228ms ago
                    IE: Unknown: 0009446C696E6B34453243
                    IE: Unknown: 010882848B962430486C
                    IE: Unknown: 030106
                    IE: Unknown: 2A0100
                    IE: Unknown: 2F0100
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: Unknown: 32040C121860
                    IE: Unknown: DD090010180201F4010000
                    IE: Unknown: 2D1A1E181AFFFF000000000000000000000000000000000000000000
                    IE: Unknown: DD1E00904C331E181AFFFF000000000000000000000000000000000000000000
                    IE: Unknown: 3D16060D0000000000000000000000000000000000000000
                    IE: Unknown: DD1A00904C34060D0000000000000000000000000000000000000000
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

eth0      Interface doesn't support scanning.

vostro peter # dmesg | tail
[   49.502531] gnome-power-man used greatest stack depth: 4328 bytes left
[ 3481.664064] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
[ 3481.696087] b43-phy0 debug: Chip initialized
[ 3481.696575] b43-phy0 debug: 32-bit DMA initialized
[ 3481.705504] Registered led device: b43-phy0::tx
[ 3481.706691] Registered led device: b43-phy0::rx
[ 3481.706750] Registered led device: b43-phy0::radio
[ 3481.706792] b43-phy0 debug: Wireless interface started
[ 3481.706801] b43-phy0 debug: Adding Interface type 2
[ 3481.711277] ADDRCONF(NETDEV_UP): wlan0: link is not ready
vostro peter #


Quote:
Ok, try that to see if you wireless card is actually working :


Did you mean try your tests or try mike's plan and then do your tests?

I have to go now but will get back to this tomorrow.

Thanks.
_________________
My time machine is broken which is odd because it was working tomorrow.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Thu Jan 14, 2010 11:14 pm    Post subject: Reply with quote

PeggySue wrote:
Quote:
Ok, try that to see if you wireless card is actually working :

Did you mean try your tests or try mike's plan and then do your tests?
I believe d2_racing meant try those commands to see if your card is working properly, or if it is just a wpa_supplicant issue. Based on what you just posted, it looks like your card is working and scanning fine.

Before you make any modifications to your wpa_supplicant.conf I would suggest making a backup of it somewhere, so you don't loose that version. I still suggest the wpa_gui route, but try adding just this and see what happens:

Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
 
network={
        ssid="Dlink4E2C"
        psk="code removed"
        priority=4
        disabled=1
}



Your /etc/conf.d/net looks fine but you might also try using the WEXT driver, which would automatically select the correct driver for you:
Code:
wpa_supplicant_wlan0="-Dwext"
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jan 14, 2010 11:28 pm    Post subject: Reply with quote

In fact, I wanted to see if your wireless card was able to see your AP near you :P
Back to top
View user's profile Send private message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Fri Jan 15, 2010 2:56 pm    Post subject: Reply with quote

Unfortunately the different versions of wpa_supplicant.conf and /etc/conf.d/net didn't fix it.

I did some more research and searched for "wpa_supplicant bugs" and got a large number of hits!!

It appears that if wpa_supplicant exits in a less than graceful manner it will lock up on restart. Removing the file
Code:
rm /var/run/wpa_supplicant/wlan0
releases it. I did this and made some progress viewing the network with wpa_supplicant on the command line, but still no connection.

The next useful tip was that, apparently, wpa_supplicant must be started in run level 3 but the boot sequence showed it starting just before the switch to run level 3.
Code:
rc-update add  net.wlan0 default
fixed this and the wireless connection returned. The GUI also works and I can scan and connect to both routers now. I will add this to my list of suggestions for the documentation team.

The bad news is I don't know what went wrong to break it and I don't have a clear picture of the structure to fix it in the future.

Have you by any chance come across links or books that explain how the elements of Linux interact - e.g. At start up init.xx calls this and this reads files x,y and z and does nnnn to bring up that. When that is up it ..... etc. Rather than collect a list of fixes I would like to end up with an understanding of the Linux structure but not necessarily memory management or process scheduling; more the hardware interaction side. Understanding the linux kernel, O'riely 2005 sounds too old; Linux kernel development might be good but doesn't come out till July this year.

Should I set this thread to solved? If so how?

Thanks for all your time and effort.
_________________
My time machine is broken which is odd because it was working tomorrow.
Back to top
View user's profile Send private message
mikegpitt
Advocate
Advocate


Joined: 22 May 2004
Posts: 3224

PostPosted: Fri Jan 15, 2010 3:18 pm    Post subject: Reply with quote

PeggySue wrote:
It appears that if wpa_supplicant exits in a less than graceful manner it will lock up on restart. Removing the file
Code:
rm /var/run/wpa_supplicant/wlan0
releases it.

I'm fairly certain that most of the entries in /var/run and created by the init scripts. You might also try `/etc/init.d/net.wlan0 zap` if it isn't shutting down properly and removing the entry in /var/run/. Entries in /tmp/wpa_* can also cause problems and should be removed at each shutdown/reboot.

PeggySue wrote:
The next useful tip was that, apparently, wpa_supplicant must be started in run level 3 but the boot sequence showed it starting just before the switch to run level 3.
Code:
rc-update add  net.wlan0 default
fixed this and the wireless connection returned. The GUI also works and I can scan and connect to both routers now. I will add this to my list of suggestions for the documentation team.

Personally I don't add any of my network devices to any runlevel. I let my machine take care of autostarting these services at each boot, which I believe is the default way gentoo handles things these days, unless you specify otherwise.



PeggySue wrote:
Have you by any chance come across links or books that explain how the elements of Linux interact - e.g. At start up init.xx calls this and this reads files x,y and z and does nnnn to bring up that. When that is up it ..... etc.
I don't have any docs offhand, but I'm sure things exist on Google. To give a (very) brief overview, the hardware itself should be activated by the kernel at boot, when udev probes your hardware and loads the proper module. From that point on it would be the init scripts job (in the case of a network card) to do something with the hardware. You can look through the init scripts to get a better idea of what's happening, but for net.wlan0 all it does is make sure the interface is up, and set the parameters specified in your /etc/conf.d/net. Based on those settings, it may also start wpa_supplicant, which would read your wpa_supplicant.conf and begin scanning for networks based on those preferences.


PeggySue wrote:
Should I set this thread to solved? If so how?

Sure, if it is solved to your satisfaction. Edit your first post and you can change the subject line.
Back to top
View user's profile Send private message
PeggySue
n00b
n00b


Joined: 19 Dec 2009
Posts: 73
Location: Devon, UK

PostPosted: Fri Jan 15, 2010 4:43 pm    Post subject: Reply with quote

As you might say; Hmmmmmmmmmmmm

Bearing in mind that before the rc-update add net.wlan0 default it didn't work and afterwards it did:

I have now deleted it from the run level and it still works. So unless there is something that gets toggled by the change in run level.... who knows? I will leave it out of the default run level and see what happens.

Thanks for your help.
_________________
My time machine is broken which is odd because it was working tomorrow.
Back to top
View user's profile Send private message
sera
Retired Dev
Retired Dev


Joined: 29 Feb 2008
Posts: 1017
Location: CET

PostPosted: Fri Jan 15, 2010 5:06 pm    Post subject: Reply with quote

Udev takes care of launching the init script for network interfaces where a /etc/init.d/net.<interface name> exists.

The rule is defined in /etc/udev/rules/90-network.rules
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum