# [Solved] wpa_supplicant not connecting

## jazzbassoon

Hello all. I'm unable to get wpa_supplicant to connect to my network. My wife's pc and the wii both connect so the network is working, I just can't quite get it to work in Gentoo. Here are my config files:

/etc/conf.d/net

```

modules_wlan0="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211 -qq"

config_wlan0="wpa_supplicant"

```

/etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=DIR=/var/run/wpa_supplicant

ctrl_interface_group=WHEEL

update_config=1

network={

        ssid="Bradshaw"

        psk="password"

        proto=WPA

        key_mgmt=WPA-PSK

        priority=5

}

```

lspci

```

0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01)

```

Here is the output I get from running wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

```

Successfully initialized wpa_supplicant

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: Failed to initiate AP scan

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

wlan0: SME: Trying to authenticate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Trying to associate with 00:71:cc:5e:0b:95 (SSID='Bradshaw' freq=2437 MHz)

wlan0: Associated with 00:71:cc:5e:0b:95

wlan0: CTRL-EVENT-DISCONNECTED bssid=00:71:cc:5e:0b:95 reason=3 locally_generated=1

```

Any suggestions?

ThanksLast edited by jazzbassoon on Sat Aug 16, 2014 7:37 pm; edited 2 times in total

----------

## Logicien

Did you try

```
wpa_supplicant -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
```

as root? 

It's look like a Broadcom chipset problem. When you do

```
lspci -vvv | less
```

what is the driver in use for Broadcom Corporation BCM4312? If it is b43, did you install the appropriate firmware files that are needed. Be able to scan and see Access Points with

```
iwlist wlan0 scan | less
```

may not be enough to say the module in use work properly. Some module options may help

```
modinfo -p b43
```

You may want ot have a look to b43. Also, be sure that the wireless device is not blocked

```
rfkill list
```

You can try the Broadcom proprietary Sta module if no open sources modules work.

----------

## jazzbassoon

I did run wpa_supplicant as root with several different options

lspci says the kernel driver in use is b43-pci-bridge

There's a directory called b43 in /lib/firmware with lost of files in it

Today I was unable to scan with iwlist, but I think I have been able to in the past

modinfo said b43 could not be found

and it is not blocked with rfkill

----------

## Logicien

So, maybe

```
modinfo b43-pci-bridge | less
```

can give you the informations about the firmware files and module options. You can check the kernel messages for b43 and possible missing firmware files:

```
dmesg | less
```

There's a specific firmwares package in Portage for b43.

----------

## jazzbassoon

```
modinfo b43-pci-bridge

modinfo: ERROR: Module b43-pci-bridge not found.

```

Is there something in the install process I'm missing since I can't seem to find any modules? Is it possible there's something wrong in my kernel config?

dmesg gives me this

```

00 mBm)085835] wlan0: authenticate with 00:71:cc:5e:0b:95

[64375.094835] wlan0: send auth to 00:71:cc:5e:0b:95 (try 1/3)

[64375.097066] wlan0: authenticated

[64375.098292] wlan0: associate with 00:71:cc:5e:0b:95 (try 1/3)

[64375.101125] wlan0: RX AssocResp from 00:71:cc:5e:0b:95 (capab=0x411 status=0 aid=3).101508] wlan0: associated

[64375.102504] wlan0: deauthenticating from 00:71:cc:5e:0b:95 by local choice (reason=3)04027] cfg80211: Calling CRDA to update world regulatory domain

[64375.109441] cfg80211: World regulatory domain updated:

[64375.109448] cfg80211:  DFS Master region: unset

[64375.109451] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)5] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)109459] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)109463] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)109466] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)109470] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)217471] wlan0: authenticate with 00:71:cc:5e:0b:95

[64381.225755] wlan0: send auth to 00:71:cc:5e:0b:95 (try 1/3)

[64381.228196] wlan0: authenticated

[64381.230105] wlan0: associate with 00:71:cc:5e:0b:95 (try 1/3)

[64381.233294] wlan0: RX AssocResp from 00:71:cc:5e:0b:95 (capab=0x411 status=0 aid=3).233674] wlan0: associated

n, max_eirp)3] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)240446] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)240448] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)240451] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)240454] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)455767] wlan0: authenticate with 00:71:cc:5e:0b:95

[64382.464815] wlan0: send auth to 00:71:cc:5e:0b:95 (try 1/3)

[64382.467044] wlan0: authenticated

[64382.468092] wlan0: associate with 00:71:cc:5e:0b:95 (try 1/3)

[64382.471141] wlan0: RX AssocResp from 00:71:cc:5e:0b:95 (capab=0x411 status=0 aid=3)

[64382.471708] wlan0: associated

[64382.471956] wlan0: deauthenticating from 00:71:cc:5e:0b:95 by local choice (reason=3)72876] cfg80211: Calling CRDA to update world regulatory domain

[64382.477558] cfg80211: World regulatory domain updated:

[64382.477566] cfg80211:  DFS Master region: unset

[64382.477570] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)4] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)477578] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)477582] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)477585] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)477589] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)594108] wlan0: authenticate with 00:71:cc:5e:0b:95

00 mBm)

[64384.650521] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

[64402.974208] b43-phy0 debug: Removing Interface type 2

[64402.974795] b43-phy0 debug: Wireless interface stopped

[64402.974809] b43-phy0 debug: DMA-64 rx_ring: Used slots 2/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[64402.974954] b43-phy0 debug: DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[64402.977068] b43-phy0 debug: DMA-64 tx_ring_AC_BE: Used slots 2/256, Failed frames 4/157 = 2.5%, Average tries 1.31

[64402.974809] b43-phy0 debug: DMA-64 rx_ring: Used slots 2/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[64402.974954] b43-phy0 debug: DMA-64 tx_ring_AC_BK: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[64402.977068] b43-phy0 debug: DMA-64 tx_ring_AC_BE: Used slots 2/256, Failed frames 4/157 = 2.5%, Average tries 1.31

[64402.979091] b43-phy0 debug: DMA-64 tx_ring_AC_VI: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

[64402.981089] b43-phy0 debug: DMA-64 tx_ring_AC_VO: Used slots 4/256, Failed frames 3/33765 = 0.0%, Average tries 1.00

[64402.983069] b43-phy0 debug: DMA-64 tx_ring_mcast: Used slots 0/256, Failed frames 0/0 = 0.0%, Average tries 0.00

```

----------

## Logicien

You should have

```
CONFIG_B43=m
```

in your .config. The b43 module support BCM4312 according to everything. You need to have the /lib/firmware/b43 directory with the firmware files for b43. The b43-fwcutter package or a name like that, give those firmware files.

Note that if you have everything needed and the b43 module drive your BCM4312 card, the b43 module cause me a lot of problems before. At the end, it was working well.

That's the reason why I told you that your only choice can be the wl module, created by the broadcom-sta package.

----------

## jazzbassoon

```
CONFIG_B43=y
```

So I need to change this to a module and recompile my kernel and modules then?

----------

## Logicien

I change my last post. See it. I always compile anything who is not critical for the early boot process in modules, including the network support. In module, you can parameter, unload and load b43 as you want. The best I thing including for tests.

Edit: in the kernel image, b43 is missing the firmware files in the kernel image and the initrd probably. So, when it probe BCM4312 at early boot stage, it do not have access to any firmware files. Only later, when the real root partition is mounted, if the firmware files needed are installed.

This delay to access firmware files may be a problem for b43. In module, the kernel access b43 and firmware files at the same time, when the real root partition is mounted.

----------

## jazzbassoon

Recompiled with b43 as a module and everything works! Thanks so much for your help!

----------

