# [SOLVED] cannot connect to wireless network with wpa_supplic

## kindofblue

Hello everybody,

I've seen posts related to my problem in the forum, but I still cannot establish a wireless connection.

I'm running Gentoo on an HP Pavilion dv2 notebook equipped with an AMD64 Neo processor. The wireless chip is a BroadComm BCM4322. I had to use the wl driver from BroadComm because the b43 driver does not support this chip yet, as documented at http://linuxwireless.org/en/users/Drivers/b43.

wpa_supplicant can properly use the driver to configure the interface:

```
# iwconfig eth1

eth1      IEEE 802.11abgn  ESSID:"questar"  Nickname:""

          Mode:Managed  Frequency:2.437 GHz  Access Point: Not-Associated

          Bit Rate:11 Mb/s   Tx-Power:24 dBm

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Managementmode:All packets received

          Link Quality=5/5  Signal level=0 dBm  Noise level=-90 dBm

          Rx invalid nwid:0  Rx invalid crypt:60  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

but it cannot associate with the access point:

```
# wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -ieth1

ioctl[SIOCGIWSCAN]: Invalid argument

CTRL-EVENT-SCAN-RESULTS

Trying to associate with 00:0f:66:9a:89:85 (SSID='questar' freq=2437 MHz)

ioctl[SIOCSIWAP]: Device or resource busy

Association request to the driver failed

Associated with 00:0f:66:9a:89:85

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

Authentication with 00:00:00:00:00:00 timed out.

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

ioctl[SIOCGIWSCAN]: Resource temporarily unavailable

```

Here's the config file for wpa_supplicant:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

eapol_version=1

ap_scan=1

network={

        ssid="questar"

        proto=WPA

        key_mgmt=WPA-PSK

        pairwise=TKIP

        group=TKIP

        psk=5a6956d332f86bb551a4a82c19a92a3c2b8206a56233b6068b9c7b90f6030f80

        priority=5

}

```

I know that the router is good because I connect to it wirelessly with a MacBook.

I don't know what I can try next. Thanks in advance.

----------

## Rexilion

Are you using MAC(not Apple MAC   :Razz:  )-based filtering rules?

----------

## toralf

Maybe off-topic, but shouldn't you post here the psk ?

----------

## kindofblue

I don't know what are filtering rules. Should they be part of the configuration file of wpa_supplicant?

The psk is shown in the config file.

----------

## Rexilion

 *kindofblue wrote:*   

> I don't know what are filtering rules. Should they be part of the configuration file of wpa_supplicant?

 

No no, I mean some sort of filter or protection in the router itself that denies wifi-connections based on MAC.

 *kindofblue wrote:*   

> The psk is shown in the config file.

 

Loralf means that you *should* not post it because someone nearby you consulting this forum might get into your network   :Wink: 

----------

## toralf

 *Rexilion wrote:*   

> Loralf means that you *should* not post it because someone nearby you consulting this forum might get into your network  

 Right, Lexilion  :Smile: 

----------

## kindofblue

Ok thanks for the replies, and sorry for my limited comprehension of the subject.

No, there's no filtering rules in the router. From the messages put out by wpa_supplicant, e.g. "ioctl[SIOCGIWSCAN]: Invalid argument", it looks to me like it could be a problem with the driver, or else some kind of incompatibility between wpa_supplicant and the driver.

I'll generate a new psk, even if the likelihood of somebody in my neighborhood reading this forum is very small.

Thanks again.

----------

## kindofblue

Victory!!

I was missing a module.

The README for driver wl from BroadCom says that the driver needs a security module, either lib80211 or ieee80211_crypt_tkip. I ran make menuconfig to have those built as modules. What was created is lib80211_crypt_tkip.ko, but looking at the source code of the driver, this is what it's looking for for kernel version >= 2.6.29.

It now works. wpa_supplicant can associate with the access point and dhcpcd assigns an IP address to the network interface, eth1.

Thanks anyway for the help.

----------

## solamour

I had a similar problem (i.e. wpa_supplicant was giving me "Invalid argument"). It looked like I needed CONFIG_LIB80211 and/or CONFIG_LIB80211_CRYPT_TKIP, but those weren't present when I did "make menuconfig" (kernel 3.10.x). It turned out that when I enabled CONFIG_HOSTAP, LIB80211 and its friends came along automatically. I thought HOSTAP was for making my laptop as an access point, but well, it works, so that's good enough for me.

__

sol

----------

