You are not logged in.

#1 2009-04-26 20:30:07

Lancet
Member
Registered: 2008-11-28
Posts: 9

Wireless stopped working after full upgrade

I am unable to connect wirelessly. My wireless was working fine up until 4/19/2009 when I preformed a full system upgrade.  I was using the following small script to get my wireless to connect before the upgrade:

#!/bin/bash

# general config

. /etc/rc.conf
. /etc/rc.d/functions

stat_busy "Starting wireless connection"

ifconfig wlan0 up > /dev/nul
iwconfig wlan0 essid <essid name> > /dev/nul
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf > /dev/nul
sleep 5s
iwconfig wlan0 ap XX:XX:XX:XX:XX:XX > /dev/nul
sleep 5s
dhcpcd wlan0 > /dev/nul

stat_done

exit0

I am using the b43 driver to for my Broadcom BCM4318 and it is setting up a wlan0. I stopped running the above script at start up and just performed the steps manually to troubleshoot. Here's what happens when I do that:

1) I boot the box and run "ifconfig" - ifconfig shows the loopback (lo) and my wired ethernet (eth0).

2) I run "iwconfig" - wlan0 is there. It has a blank ESSID and the Access Point is "Not Associated" but that's OK right now (I think).

3) I run "ifconfig wlan0 up" - When I run ifconfig again, it shows lo, etho, wlan0, and wmaster0. So the wireless i/f was added.

4) I run "iwconfig wlan0 essid <my essid name>" - When I run iwconfig now, the ESSID field has my ESSID name.

5) I run "wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf" - it just returns to the command prompt. This is using the same wpa_supplicant file that worked before the upgrade.

6) I run "sleep 10s" (just to make myself wait).

7) I run "iwconfig wlan0 ap XX:XX:XX:XX:XX:XX" (with the mac of my access point replacing the XX stuff).

8) I run iwconfig - the output shows my Access Point still "Not Associated". I don't think this is right. I think it should be populated now.

9) I run sleep 10 (again, to make myself wait).

10) I run dhcpcd wlan0 - it waits for carrier and then times out - No joy. Also running ifconfig shows the wlan0 i/f, but it has no ip.

Again, this sequence worked fine before the upgrade. Does anyone know anything that changed recently that would cause this. I have looked at the wireless wiki page (which is pretty good) but didn't see anything that helped. That page is where I got most of this sequence in the first place. I'm not opposed to using a fancy interface manager, but I am more of a KISS guy when possible which is why I just did a script with the iwconfig/wpa_supplicant commands in the first place. It seems like if these commands won't work, an interface manager probably won't either - don't those basically use these commands behind the scenes?

Offline

#2 2009-04-26 21:09:22

JF
Member
From: France
Registered: 2009-03-27
Posts: 39

Re: Wireless stopped working after full upgrade

Hello Lancet,

I'm pretty sure that is is the role of wpa_supplicant to associate you with the ap, so I believe that after launching it you don't need to invoke "iwconfig ap".

Anyway all seem to work fine for you until wpa_supplicant's turn. After the 5th command, you can quickly check the status of wpa_supplicant with the command "wpa_cli status".

So if you're not sure about the wpa_supplicant command, you can test it without the -B switch so it won't daemonize and you'll get all the error messages on your terminal.

Offline

#3 2009-04-26 22:43:39

Lancet
Member
Registered: 2008-11-28
Posts: 9

Re: Wireless stopped working after full upgrade

JF,

Thanks for your quick reply.

As for the "iwconfig ap" line, I think you are right - it *should* not be necessary. However, before the upgrade of death, the only way I could get the script above to work was to add that line. I was following the procedure section of the ARCH wpa_supplicant wiki but couldn't quite get it to work. All the other steps (except for the "iwconfig ap") in my procedure (and script) come from that wiki. After the steps from the wiki *almost* got me running, I searched the ARCH forums and found a script someone was using that contained the "iwconfig ap" line. So I tossed it in my script and shazam. That's why it's there. For some reason, my box just didn't work without it.

Running "wpa_cli status" returns the following:

Selected interface 'wlan0'
wpa_state=SCANNING

Doesn't seem like a bad response to me but I'm not sure what I'm supposed to get.

Also, I ran the wpa_supplicant line with the "-d" argument. If the problem is with wpa_supplicant, I was hoping its output would tell someone something. Here is the output (I edited out the ESSID and the mac address):

Initializing interface 'wlan0' conf '/etc/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='DIR=/var/run/wpa_supplicant GROUP=wheel'
Priority group 0
   id=0 ssid='<ESSID is here>'
Initializing interface (2) 'wlan0'
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf flags 0x0
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: XX:XX:XX:XX:XX:XX
wpa_driver_wext_set_wpa
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wpa_driver_wext_set_drop_unencrypted
RSN: flushing PMKID list in the driver
Setting scan request: 0 sec 100000 usec
WPS: UUID based on MAC address - hexdump(len=16): 62 76 b1 37 4a 8b 51 a9 9f 18 26 d8 57 ab 3e c8
WPS: Build Beacon and Probe Response IEs
WPS:  * Version
WPS:  * Wi-Fi Protected Setup State (0)
WPS:  * Version
WPS:  * Wi-Fi Protected Setup State (0)
WPS:  * Response Type (2)
WPS:  * UUID-E
WPS:  * Manufacturer
WPS:  * Model Name
WPS:  * Model Number
WPS:  * Serial Number
WPS:  * Primary Device Type
WPS:  * Device Name
WPS:  * Config Methods (0)
WPS:  * RF Bands (3)
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
ctrl_interface_group=10 (from group name 'wheel')
Added interface wlan0
Daemonize..

The four lines near the end that start "EAPOL:" and "EAP:" don't seem very good. Does anything in there jump out at you?

Offline

#4 2009-04-27 09:00:25

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Wireless stopped working after full upgrade

[stijn@hermes ~]$ wpa_cli status
Selected interface 'intel'
bssid=xx:xx:xx:xx:xx:xx
ssid=BorrominiNet
id=0
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED

That's what you should see, more or less.

Have you tried to run each step from your script separately to see where it breaks? Also, you should look into netcfg2, it's a framework especially developed for wireless connections.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#5 2009-04-27 10:37:41

JF
Member
From: France
Registered: 2009-03-27
Posts: 39

Re: Wireless stopped working after full upgrade

Hi Lancet,

EAP(OL) is an authentication protocol used by authentication servers (as kerberos or radius), so unless you're using one of those in your network it should not be a worry.

The idea was launching wpa_supplicant without the -B switch, not adding the -d one. The -B switch makes the supplicant daemonize and in this case you don't have any output of the authentication work: you can notice that the output you posted ends with the line "Daemonize.."

Offline

#6 2009-04-29 01:28:19

Lancet
Member
Registered: 2008-11-28
Posts: 9

Re: Wireless stopped working after full upgrade

B,

Thanks for the info. Knowing what I'm supposed to be getting always helps. I have tried the script manually piece by piece. I detailed that in the numbered steps in my inital post. I have thought about looking at netcfg2 and wicd. Seems like if I can't get the manual steps to work, those might not either, but maybe the scripts know something I don't (I sure hope somebody knows something I don't).

JF,

Sorry. In my previous post, I forgot to mention that I did try wpa_supplicant without the -B switch. It starts printing the following line every couple of seconds or so:

CTRL-EVENT-SCAN-RESULTS

That's it just that line every couple of seconds - no other output. I let it go for 5 minutes or so before stopping it.

I'm going to keep fiddling with it (probably try either netcfg2 or wicd or both also). If anyone comes up with anything, please let me know. This is really frustrating since I had it working before and it seems like it's really close now.

Offline

#7 2009-04-29 22:23:22

JF
Member
From: France
Registered: 2009-03-27
Posts: 39

Re: Wireless stopped working after full upgrade

Hi Lancet,

I did some tests tonight and compared the output of your post #3 with mine from a successfull authentication: you're missing a line after the 7th:

Initializing interface (2) 'wlan0'

which is

Interface wlan0 set UP - waiting a second for the driver to complete initialization

I tried with wlan0 up before launching wpa_supplicant and also with wlan0 down and I got this line in both cases.

Also  after your last line (Added interface wlan0 ) and your results (CTRL-EVENT-SCAN-RESULTS) I got several more lines which also look like confirmation about taking control of the interface:

Added interface wlan0
Ignore event for foreign ifindex 3
RTM_NEWLINK: operstate=0 ifi_flags=0x1043 ([UP][RUNNING])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Wireless event: cmd=0x8b19 len=8
Received 308 bytes of scan results (1 BSSes)
CTRL-EVENT-SCAN-RESULTS

Did you check what was updated during the -Syu: wpa_supplicant, the kernel, both ? Maybe you kept the previous versions of the package(s) in pacman cache so you could also try downgrading.

You can also try connecting to a non-encrypted network without wpa_supplicant to determine if it's at fault or if it's the driver.

Offline

#8 2009-04-30 01:08:53

Lancet
Member
Registered: 2008-11-28
Posts: 9

Re: Wireless stopped working after full upgrade

JF,

Wow! Thanks for the testing. It's always helpful to know what to look for from a good run.

I looked in /var/log/pacman.log. My kernel was definitely upgraded (2.6.28.8-1 to 2.6.29.1-3). I didn't see anything else that would directly impact the wireless stuff (no wireless_tools, no wpa_supplicant, etc..) However, the kernel is probably enough alone. Also, there were a bunch of libraries. One of those could probably a problem. I'll keep looking. I don't have a lot of time tonight. However, I wanted to write tonight and thank you immediately.

Thanks again.You're OK.

Offline

#9 2009-05-09 18:55:31

Lancet
Member
Registered: 2008-11-28
Posts: 9

Re: Wireless stopped working after full upgrade

OK guys. I finally beat this one.

Here's my attempt at a concise description of the problem and solution. Hopefully, if someone else has this problem and he/she finds this thread, this entry will be of some use to them.

Problem: My wireless was working fine until I performed a full system upgrade (affectionately known as the upgrade of network death). Once I upgraded, my wireless no longer worked. The following is the script I was using to bring up my wireless network at the time (again, this worked before the upgrade but not after). The essid and mac address of the router have been removed:

#!/bin/bash

# general config

. /etc/rc.conf
. /etc/rc.d/functions

stat_busy "Starting wireless connection"

ifconfig wlan0 up > /dev/null
iwconfig wlan0 essid <my essid here> > /dev/null
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf > /dev/null
sleep 5s
iwconfig wlan0 ap XX:XX:XX:XX:XX:XX > /dev/null
sleep 5s
dhcpcd wlan0 > /dev/null

stat_done

exit0

Solution: I changed the settings of my wireless router to broadcast its essid (previously it had not been broadcasting this). I also commented out the "iwconfig wlan0 ap XX:XX:XX:XX:XX:XX" line from my script (this was probably not absolutely necessary). Once I did these two things it worked.

Discussion:
My problem was that after the upgrade, the line "iwconfig wlan0 ap XX:XX:XX:XX:XX:XX" no longer worked. Before the upgrade, that line set the access point to the mac address of my router. After the upgrade, that didn't happen. Now, apparently, the wpa_supplicant line usually sets the access point when it is run but in my case it didn't set that so I had to run the "iwconfig wlan0 ap" line.

I don't think that the wpa_supplicant can associate the router mac address with the essid when the router isn't braodcasting its essid. Before the upgrade, I fixed this by manually associating the ap with the "iwconfig wlan0 ap..." line. After the upgrade, that stopped working so I had to change my set up so that wpa_supplicant could perform that association. Setting the router to broadcast its essid was the change I needed.

I don't know why the upgrade stopped the "iwconfig wlan0 ap..." line from working.

Offline

Board footer

Powered by FluxBB