# BCM4322 and WPA_supplicant

## thomasfannes

Hello,

I have a laptop with a BCM4322 network card installed:

c:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)

I've installed wpa_supplicant, openrc and broadcom-sta.

my /etc/conf.d/net file looks like this:

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_eth1="-Dwext"

```

when I start my /etc/init.d/net.eth1 with the option --verbose i get the following:

```

PC ~ # /etc/init.d/net.eth1 start --verbose

 * Caching service dependencies ...                                                                                                                                                                            [ ok ]

 * Bringing up interface eth1

 *   Loaded modules: apipa arping bonding tuntap ccwgroup macchanger macnet ifplugd iwconfig ssidnet ifconfig pppd system dhcpcd ip6to4

 *   Configuring eth1 for MAC address f0:7b:cb:2e:6e:24 ...                                                                                                                                                    [ ok ]

 *   ifplugd does not work with wireless

 *   Configuring wireless network for eth1

 *   Scanning for access points

 *     Found ........

```

It looks like he's unable to find the module wpa_supplicant. If I run wpa_supplicant manually, it works:

wpa_supplicant -ieth1 -c/etc/wpa_supplicant -Dwext

Any idea anybody?

I've tried changing /etc/conf.d/net to

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules="wpa_supplicant"

wpa_supplicant_eth1="-Dwext"

```

but still it doesn't work

Thanks in advance

----------

## d2_racing

Hi, can you post this :

```

# lspci -n

# ifconfig -a

# iwconfig

# iwlist scan

# dmesg | tail

# cd /usr/src/linux

# cat .config | grep -i 802

# cat .config | grep -i kill

# cat .config | grep -i b43

# cat .config | grep -i ssb

```

----------

## thomasfannes

lspci -n

```
00:00.0 0600: 8086:2a40 (rev 07)

00:01.0 0604: 8086:2a41 (rev 07)

00:19.0 0200: 8086:10f5 (rev 03)

00:1a.0 0c03: 8086:2937 (rev 03)

00:1a.1 0c03: 8086:2938 (rev 03)

00:1a.2 0c03: 8086:2939 (rev 03)

00:1a.7 0c03: 8086:293c (rev 03)

00:1b.0 0403: 8086:293e (rev 03)

00:1c.0 0604: 8086:2940 (rev 03)

00:1c.1 0604: 8086:2942 (rev 03)

00:1c.2 0604: 8086:2944 (rev 03)

00:1c.3 0604: 8086:2946 (rev 03)

00:1d.0 0c03: 8086:2934 (rev 03)

00:1d.1 0c03: 8086:2935 (rev 03)

00:1d.2 0c03: 8086:2936 (rev 03)

00:1d.7 0c03: 8086:293a (rev 03)

00:1e.0 0604: 8086:2448 (rev 93)

00:1f.0 0601: 8086:2917 (rev 03)

00:1f.2 0101: 8086:2928 (rev 03)

00:1f.3 0c05: 8086:2930 (rev 03)

00:1f.5 0101: 8086:292d (rev 03)

01:00.0 0300: 10de:06eb (rev a1)

03:01.0 0607: 1180:0476 (rev ba)

03:01.1 0c00: 1180:0832 (rev 04)

03:01.2 0805: 1180:0822 (rev 21)

03:01.3 0880: 1180:0843 (rev 11)

0c:00.0 0280: 14e4:432b (rev 01)

```

ifconfig -a

```

eth0      Link encap:Ethernet  HWaddr 00:26:b9:b9:6f:a8  

          inet addr:10.5.0.32  Bcast:10.5.255.255  Mask:255.255.0.0

          inet6 addr: fe80::226:b9ff:feb9:6fa8/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:344266 errors:0 dropped:0 overruns:0 frame:0

          TX packets:202535 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:327601625 (312.4 MiB)  TX bytes:14435268 (13.7 MiB)

          Memory:f6fe0000-f7000000 

eth1      Link encap:Ethernet  HWaddr f0:7b:cb:2e:6e:24  

          inet6 addr: fe80::f27b:cbff:fe2e:6e24/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:166 errors:1 dropped:0 overruns:0 frame:363046

          TX packets:11 errors:28 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:18953 (18.5 KiB)  TX bytes:2702 (2.6 KiB)

          Interrupt:17 Base address:0xc000 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:92 errors:0 dropped:0 overruns:0 frame:0

          TX packets:92 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:7184 (7.0 KiB)  TX bytes:7184 (7.0 KiB)

sit0      Link encap:IPv6-in-IPv4  

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

iwconfig

```

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

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

          Mode:Ad-Hoc  Frequency:2.462 GHz  Cell: 02:18:DE:00:A1:F4   

          Bit Rate=54 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=4/5  Signal level=-60 dBm  Noise level=-92 dBm

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

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

```

iwlist scan

```

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

sit0      Interface doesn't support scanning.

eth1      Scan completed :

          Cell 01 - Address: 00:0C:E6:03:92:E6

                    ESSID:""

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:1/5  Signal level:-86 dBm  Noise level:-92 dBm

                    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

          Cell 02 - Address: 12:06:01:A2:78:DF

                    ESSID:""

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:5/5  Signal level:-45 dBm  Noise level:-92 dBm

                    Encryption key:off

                    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

          Cell 03 - Address: 12:06:01:B5:F1:EA

                    ESSID:""

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:5/5  Signal level:-45 dBm  Noise level:-92 dBm

                    Encryption key:off

                    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

          Cell 04 - Address: 1A:06:01:2E:6E:24

                    ESSID:"Vesalius802_1x-WPA2"

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:5/5  Signal level:-47 dBm  Noise level:-92 dBm

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : 802.1x

                    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

          Cell 05 - Address: 0A:06:01:2E:6E:24

                    ESSID:"VesaliusWEP"

                    Mode:Managed

                    Frequency:2.437 GHz (Channel 6)

                    Quality:5/5  Signal level:-47 dBm  Noise level:-92 dBm

                    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

          Cell 06 - Address: 12:28:01:93:71:02

                    ESSID:""

                    Mode:Managed

                    Frequency:5.2 GHz (Channel 40)

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

                    Encryption key:off

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

          Cell 07 - Address: 12:28:01:2E:6E:24

                    ESSID:"Vesalius"

                    Mode:Managed

                    Frequency:5.2 GHz (Channel 40)

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

                    Encryption key:off

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

          Cell 08 - Address: 0A:28:01:2E:6E:24

                    ESSID:"VesaliusWEP"

                    Mode:Managed

                    Frequency:5.2 GHz (Channel 40)

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

                    Encryption key:on

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

          Cell 09 - Address: 1A:28:01:2E:6E:24

                    ESSID:"Vesalius802_1x-WPA2"

                    Mode:Managed

                    Frequency:5.2 GHz (Channel 40)

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

                    IE: IEEE 802.11i/WPA2 Version 1

                        Group Cipher : CCMP

                        Pairwise Ciphers (1) : CCMP

                        Authentication Suites (1) : 802.1x

                    Encryption key:on

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

          Cell 10 - Address: 16:28:01:2E:6E:24

                    ESSID:"Vesalius802.1x"

                    Mode:Managed

                    Frequency:5.2 GHz (Channel 40)

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

                    IE: WPA Version 1

                        Group Cipher : TKIP

                        Pairwise Ciphers (1) : TKIP

                        Authentication Suites (1) : 802.1x

                    Encryption key:on

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s

                              36 Mb/s; 48 Mb/s; 54 Mb/s

```

dmesg | tail

```

[10277.000325] usb usb7: suspend_rh

[10277.000339] hub 4-0:1.0: hub_suspend

[10277.000341] usb usb4: bus auto-suspend

[10277.000343] usb usb4: suspend_rh

[10287.454298] udev: starting version 151

[10288.931638] iwconfig used greatest stack depth: 5064 bytes left

[10299.518258] eth1: no IPv6 routers present

[10311.157009] eth1: no IPv6 routers present

[10315.030198] tar used greatest stack depth: 4764 bytes left

[17638.114004] CE: hpet increasing min_delta_ns to 33750 nsec

```

grep -i 802

```

# CONFIG_VLAN_8021Q is not set

# CONFIG_IEEE802154 is not set

CONFIG_CFG80211=y

# CONFIG_NL80211_TESTMODE is not set

# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set

# CONFIG_CFG80211_REG_DEBUG is not set

CONFIG_CFG80211_DEFAULT_PS=y

# CONFIG_CFG80211_DEBUGFS is not set

CONFIG_CFG80211_WEXT=y

CONFIG_LIB80211=y

CONFIG_LIB80211_CRYPT_WEP=y

CONFIG_LIB80211_CRYPT_CCMP=y

CONFIG_LIB80211_CRYPT_TKIP=y

# CONFIG_LIB80211_DEBUG is not set

# CONFIG_MAC80211 is not set

# CONFIG_LEDS_BD2802 is not set

# CONFIG_RTC_DRV_RX8025 is not set

# CONFIG_RTC_DRV_BQ4802 is not set

```

grep -i kill

```

CONFIG_RFKILL=y

CONFIG_RFKILL_LEDS=y

CONFIG_RFKILL_INPUT=y

# CONFIG_TOSHIBA_RFKILL is not set

```

grep -i b43

```

empty

```

grep -i ssb

```

CONFIG_SSB_POSSIBLE=y

# CONFIG_SSB is not set

```

----------

## d2_racing

Can you post your current /etc/wpa_supplicant/wpa_supplicant.conf ?

----------

## thomasfannes

Contents of /etc/wpa_supplicant/wpa_supplicant.conf

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={

        ssid="xxxxxxxxxx"

        psk="xxxxxxxxxxxx"

        proto=RSN

        key_mgmt=WPA-PSK

        pairwise=TKIP

}

```

----------

## d2_racing

On which AP you want to connect ?

----------

## thomasfannes

The iwlist scan is taken at a different location (not at home).

at home I get the following data:

```

          Cell 01 - Address: 00:22:6B:7C:5C:74

                    Channel:1

                    Frequency:2.412 GHz (Channel 1)

                    Quality=55/70  Signal level=-55 dBm  

                    Encryption key:on

                    ESSID:"drogenberg"

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

                              18 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s

```

I'm not sure if it clear from what I posted at the top, but I'm able to connect to my wireless network using wpa_supplicant, but I have to do it manually:

```

wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant/wpa_supplicant.conf

dhcpcd eth1

```

I also have another machine (machineB) at home with the same wpa_supplicant.conf file and the same /etc/conf.d/net file and that connects perfectly to the wireless at boot. If I restart my network on machineB, I get the following:

```

* Bringing up interface wlan0

 *   Loaded modules: apipa arping bonding tuntap ccwgroup macchanger macnet ifplugd wpa_supplicant ssidnet ifconfig pppd system dhcpcd ip6to4

 *   Configuring wlan0 for MAC address 00:1c:10:60:af:e9 ...                                                                                                                                                   [ ok ]

 *   ifplugd does not work with wireless

 *   Starting wpa_supplicant on wlan0 ...

 *   Detaching to start `/usr/sbin/wpa_supplicant' ...                                                                                                                                                         [ ok ]

 *   Starting wpa_cli on wlan0 ...

 *   Detaching to start `/usr/bin/wpa_cli' ...                                                                                                                                                                 [ ok ]

 *   Backgrounding ... ...

 * WARNING: net.wlan0 has started, but is inactive

```

Here he says he has loaded the module wpa_supplicant, and that is missing on machineA. But I don't know how to load it...

----------

## d2_racing

Ok, can you try this little one /etc/conf.d/net and retry :

```

modules="wpa_supplicant" 

wpa_supplicant_eth1="-Dwext"

config_eth1=( "dhcp" )

```

----------

## thomasfannes

Still no sign of wpa_supplicant

```

* Bringing up interface eth1

 *   Loaded modules: apipa arping bonding tuntap ccwgroup macchanger macnet ifplugd iwconfig ssidnet ifconfig pppd system dhcpcd ip6to4

 *   Configuring eth1 for MAC address f0:7b:cb:2e:6e:24 ...                                                                                                                                                    [ ok ]

 *   ifplugd does not work with wireless

 *   Configuring wireless network for eth1

 *   Scanning for access points

 *     Found "drogenberg" at 00:22:6B:7C:5C:74, managed, encrypted

 *     Found "SMC" at 00:0A:E9:0F:9E:F7, managed

 *     Found "belkin54g" at 00:17:3F:55:C4:D8, managed

 *   WEP key is not set for "drogenberg"

Error for wireless request "Set Encode" (8B2A) :

    SET failed on device eth1 ; Invalid argument.

Error for wireless request "Set AP Address" (8B14) :

    SET failed on device eth1 ; Device or resource busy.

 *   Connecting to "SMC" in managed mode (WEP Disabled) ...                                                                                                                                                    [ ok ]

 *     eth1 connected to SSID "SMC" at 00:0A:E9:0F:9E:F7

 *     in managed mode (WEP disabled)

 *   Configuring eth1 for SSID SMC ...                                                                                                                                                                         [ ok ]

 *   dhcp ...

 *     Running dhcpcd ...

dhcpcd: version 5.2.2 starting

dhcpcd: eth1: rebinding lease of 192.168.1.103

dhcpcd: eth1: broadcasting for a lease

dhcpcd: timed out

dhcpcd: allowing 8 seconds for IPv4LL timeout

dhcpcd: timed out                                                                                                                                                                                              [ !! ]

 * ERROR: net.eth1 failed to start

```

----------

## d2_racing

Can you post this :

```

# emerge -pv wpa_supplicant

```

----------

## thomasfannes

emerge -pv wpa_supplicant

```

These are the packages that would be merged, in order:

Calculating dependencies  ... done!

[ebuild   R   ] net-wireless/wpa_supplicant-0.7.1  USE="dbus qt4 readline ssl -debug -eap-sim -fasteap -gnutls -madwifi (-ps3) -wps" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

```

----------

## d2_racing

Can you post this :

```

# cd /usr/src/linux

# cat .config | grep -i crypto

```

----------

## thomasfannes

Kernel config for crypto:

```

# CONFIG_BLK_DEV_CRYPTOLOOP is not set

CONFIG_CRYPTO=y

# Crypto core or helper

CONFIG_CRYPTO_ALGAPI=y

CONFIG_CRYPTO_ALGAPI2=y

CONFIG_CRYPTO_AEAD=y

CONFIG_CRYPTO_AEAD2=y

CONFIG_CRYPTO_BLKCIPHER=y

CONFIG_CRYPTO_BLKCIPHER2=y

CONFIG_CRYPTO_HASH=y

CONFIG_CRYPTO_HASH2=y

CONFIG_CRYPTO_RNG2=y

CONFIG_CRYPTO_PCOMP=y

CONFIG_CRYPTO_MANAGER=y

CONFIG_CRYPTO_MANAGER2=y

# CONFIG_CRYPTO_GF128MUL is not set

# CONFIG_CRYPTO_NULL is not set

CONFIG_CRYPTO_WORKQUEUE=y

# CONFIG_CRYPTO_CRYPTD is not set

CONFIG_CRYPTO_AUTHENC=y

# CONFIG_CRYPTO_TEST is not set

# CONFIG_CRYPTO_CCM is not set

# CONFIG_CRYPTO_GCM is not set

# CONFIG_CRYPTO_SEQIV is not set

CONFIG_CRYPTO_CBC=y

# CONFIG_CRYPTO_CTR is not set

# CONFIG_CRYPTO_CTS is not set

CONFIG_CRYPTO_ECB=y

# CONFIG_CRYPTO_LRW is not set

# CONFIG_CRYPTO_PCBC is not set

# CONFIG_CRYPTO_XTS is not set

CONFIG_CRYPTO_HMAC=y

# CONFIG_CRYPTO_XCBC is not set

# CONFIG_CRYPTO_VMAC is not set

# CONFIG_CRYPTO_CRC32C is not set

# CONFIG_CRYPTO_CRC32C_INTEL is not set

# CONFIG_CRYPTO_GHASH is not set

# CONFIG_CRYPTO_MD4 is not set

CONFIG_CRYPTO_MD5=y

CONFIG_CRYPTO_MICHAEL_MIC=y

# CONFIG_CRYPTO_RMD128 is not set

# CONFIG_CRYPTO_RMD160 is not set

# CONFIG_CRYPTO_RMD256 is not set

# CONFIG_CRYPTO_RMD320 is not set

CONFIG_CRYPTO_SHA1=y

# CONFIG_CRYPTO_SHA256 is not set

# CONFIG_CRYPTO_SHA512 is not set

# CONFIG_CRYPTO_TGR192 is not set

# CONFIG_CRYPTO_WP512 is not set

CONFIG_CRYPTO_AES=y

CONFIG_CRYPTO_AES_586=y

# CONFIG_CRYPTO_ANUBIS is not set

CONFIG_CRYPTO_ARC4=y

# CONFIG_CRYPTO_BLOWFISH is not set

# CONFIG_CRYPTO_CAMELLIA is not set

# CONFIG_CRYPTO_CAST5 is not set

# CONFIG_CRYPTO_CAST6 is not set

CONFIG_CRYPTO_DES=y

# CONFIG_CRYPTO_FCRYPT is not set

# CONFIG_CRYPTO_KHAZAD is not set

# CONFIG_CRYPTO_SALSA20 is not set

# CONFIG_CRYPTO_SALSA20_586 is not set

# CONFIG_CRYPTO_SEED is not set

# CONFIG_CRYPTO_SERPENT is not set

# CONFIG_CRYPTO_TEA is not set

# CONFIG_CRYPTO_TWOFISH is not set

# CONFIG_CRYPTO_TWOFISH_586 is not set

# CONFIG_CRYPTO_DEFLATE is not set

# CONFIG_CRYPTO_ZLIB is not set

# CONFIG_CRYPTO_LZO is not set

# CONFIG_CRYPTO_ANSI_CPRNG is not set

CONFIG_CRYPTO_HW=y

# CONFIG_CRYPTO_DEV_PADLOCK is not set

# CONFIG_CRYPTO_DEV_GEODE is not set

# CONFIG_CRYPTO_DEV_HIFN_795X is not set

```

----------

