# broadcom BCM4312 wifi problems

## eniac

Hello,

I'm trying to setup my Broadcom BCM4312 wifi card on a WPA network.

First I installed the broadcom-sta package and the wpa_supplicant package.

```
emerge broadcom-sta wpa_supplicant
```

Next I edited /etc/conf.d/net like this:

```
modules=("wpa_supplicant")

wpa_supplicant_eth1="-Dbroadcom"

```

When I run net.eth1 start I get:

Unsupported Driver "Broadcom".

After reading the wpa_supplicant manual page I understood the driver is chosen at compile time so I ran emerge -pv wpa_supplicant.

The strange thing is that wpa_supplicant doesn't have a compile use flag for broadcom ?

----------

## rh1

I can't check right now , at work, but i believe the the driver is called "wl" or something like that

----------

## albright

 *Quote:*   

> I understood the driver is chosen at compile time

 

I suspect you build the driver when building your *kernel*, not

when building wpa_supplicant. The driver in the kernel is either

b43 or b43legacy.

----------

## 3igHankCh0w

The driver command you need is -Dwext I have just enabled the wireless on my HP mini 311 which has the BCM4312 card

like yours if you need more help ask I am using the last mac I'll ever own when I get mousepad on the mini 311 I can post 

my config files if you still need them. Note I am using the 2.6.32-gentoo-r7 kernel I had problems with the 2.6.33-gentoo-r2

some of the modules pulled in caused my netbook to freeze during boot but you may not have that problem on your machine

----------

## eniac

Thanks for the advice!

Indeed it seems to work with the -Dwext driver. Which is very odd since the wpa_supplicant manual talks about a specific broadcom driver.

Anyhow not all my problems are out of the way.

The /etc/init.d/net.eth1 service starts without errors but no connection is made.

Contents of my wpa_supplicant.conf file:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

   ssid="Remus"

   proto=WPA

   key_mgmt=WPA-PSK

   pairwise=CCMP TKIP

   group=CCMP TKIP WEP104 WEP40

   psk="******"

   priority=5

   }

```

When I run wpa_cli I get the following messages:

```

Trying to associate with 5c:33:8e:17:f3:5c (SSID='Remus' freq=3412 Mhz)

Association request to the driver failed

CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys

...

```

wpa_cli -> scan_results gives me the following:

```

5c:338e17:f3:5c    2412    198    [WPA-PSK-TKIP] Remus

```

I've setup my router like this:

Security: WPA (I can also choose WPA2 or WPA/WPA2)

WPA Type: Passpharse (I can also select 256 Bit key)

Encription: TKIP (I could also select AES or AES/TKIP)

WPS: disabled

----------

## 3igHankCh0w

Do you have the /etc/conf.d/net file set correctly that is where it tells my wireless device to us dhcp to make the connection

# /etc/conf.d/net

config_eth1=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

dhcpcd_eth1"-t 10"

# End of /etc/conf.d/net

the last line is to allow the wireless device time to come on before using dhcpcd to make the connection with my 

provider

Most of this information is in the installation guide in Chapter 8 Configuring your System

I hope this helps

----------

## d2_racing

What happen when you run this :

```

# iwlist scan

# dmesg  | tail

```

----------

## eniac

dmesg output:

```
[    5.982522] sd 6:0:0:0: Attached scsi generic sg2 type 0

[    5.982734] usb-storage: device scan complete

[    5.986045] usb 1-5:1.0: uevent

[    5.986160] usb 1-5: uevent

[    5.986882] sd 6:0:0:0: [sdb] Attached SCSI removable disk

[    5.987519] usb 1-5:1.0: uevent

[   12.438691] sky2 eth0: enabling interface

[   12.438867] ADDRCONF(NETDEV_UP): eth0: link is not ready

[   20.236051] eth1: no IPv6 routers present

[   42.613054] sky2 eth0: disabling interface

```

iwlist output:

```

eth1      Scan completed :

          Cell 01 - Address: 5C:33:8E:17:F3:5C

                    ESSID:"Remus"

                    Mode:Managed

                    Frequency:2.412 GHz (Channel 1)

                    Quality:4/5  Signal level:-65 dBm  Noise level:-92 dBm

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : PSK

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

 

```

----------

## eniac

Some more information:

I've forgotten to load the lib80211 module.

This improves my problem but doesn't fix it.

The Association request to the driver failed  doesn't appear anymore.

But I still get the Disconnect event - remove keys message while running wpa_cli.

----------

## eniac

Thinks I'm going to try to make an insecure connection first, without any authentication.

And see if that works and the work my way up from there.

But I can't find any details on how to setup wpa_supplicant.conf for networks without any authentication ?

----------

## d2_racing

Look here : http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

```

# Plaintext connection (no WPA, no IEEE 802.1X)

network={

  ssid="plaintext-test"

  key_mgmt=NONE

}

```

----------

## eniac

Thanks!

I've setup my router to only accept connections from specific MAC adresses, using no security method.

It works fine.

Can this be considered as being save ?

----------

## d2_racing

No way, because I can spoof your MAC adress with ifconfig  :Razz: 

----------

## eniac

I know but then you should have had access to my computer to find out my MAC address right ?

----------

## cach0rr0

 *eniac wrote:*   

> I know but then you should have had access to my computer to find out my MAC address right ?

 

nope

I can sit with airodump-ng (and other tools) and see client mac addresses, as well even see which essid they are probing for, and connected to

----------

## d2_racing

Indeed cach0rr0  :Razz: 

aircrack-ng has a lot of tools  :Razz: 

----------

