# Broadcom Corporation BCM43224

## FrankRizz0

Good morning all!

Having issues with my weefee (sorry wifi, I love saying weefee).  I haven't been able to get it going and I've followed quite a few wiki's and how-to's.I'm trying to use wpa_supplicant, and here is the output of lspci -k:

```
# lspci -k

03:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01)

        DeviceName: WLAN

        Subsystem: Hewlett-Packard Company WMIB-275N Half-size Mini PCIe Card

        Kernel driver in use: bcma-pci-bridge

        Kernel modules: wl
```

When I try to load it through the gui there is no adapter listed.  Not sure where else to go at this point.

----------

## NeddySeagoon

FrankRizz0,

Can the kernel see it, look in ifconfig -a ?

If not, either the kernel module is missing on the firmware is not being loaded, or both.

What does dmesg have to say about firmware loading ... or not.

If  ifconfig -a shows the interface, its time to play with wpa_supplicant.

If the interface exists and you have configured wpa_supplicant and you nave tried to start the interface, then dmesg may have some messages about associating and authenticating. 

Its all good diagnostic information.

Once you have all the bits and you know it works, you can pass control to a GUI, if you still want to.

All the GUIs are just eye candy over all the other bits.  They don't help solve problems at all.

----------

## FrankRizz0

```
Rizz0-Built ~ # ifconfig -a

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.148  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::db8e:432b:efd9:ced8  prefixlen 64  scopeid 0x20<link>

        ether 00:9c:02:20:db:5f  txqueuelen 1000  (Ethernet)

        RX packets 177520  bytes 118058249 (112.5 MiB)

        RX errors 0  dropped 100  overruns 0  frame 0

        TX packets 144336  bytes 13968033 (13.3 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 0  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0b1: flags=4098<BROADCAST,MULTICAST>  mtu 1500

        inet6 fe80::1bf2:b1f3:c3a7:2f44  prefixlen 64  scopeid 0x20<link>

        ether 20:10:7a:23:52:86  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

Because I was getting a lot of conflicting advice from wiki's etc, I loaded a few wireless modules.  I'm going to fix them after I actually get the wireless figured out.  Here is the output of dmesg:

http://pastebin.com/9Srjkeim

----------

## NeddySeagoon

FrankRizz0,

wlp3s0b1 is a WiFi interface, but you also have the Intel driver loaded, so it may be that.

The giveaway that its broadcom is

```
[    6.819418] brcmsmac bcma0:1 wlp3s0b1: renamed from wlan0
```

This line and a few others don't look good. 

```
[   11.842651] brcmsmac bcma0:1: brcms_ops_start: brcms_up() returned -132.
```

Lets start at the very beginning with knowing your hardware as the kernel sees it.

Please post the output of both lspci and lsusb. 

Wifi can be on either or both.

----------

## FrankRizz0

```
Rizz0-Built ~ # lsusb

-su: lsusb: command not found

Rizz0-Built ~ # lspci

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Complex

00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] BeaverCreek [Radeon HD 6520G]

00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series]

00:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Port

00:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Port

00:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 12h Processor Root Port

00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 40)

00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)

00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)

00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)

00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)

00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 13)

00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 01)

00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)

00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] FCH PCI Bridge (rev 40)

00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)

00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Hudson PCI to PCI bridge (PCIE port 0)

00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB OHCI Controller (rev 11)

00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 11)

00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 0 (rev 43)

00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 1

00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 2

00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 3

00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 4

00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 6

00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 5

00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 12h/14h Processor Function 7

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

02:00.0 FireWire (IEEE 1394): JMicron Technology Corp. IEEE 1394 Host Controller (rev 30)

02:00.1 System peripheral: JMicron Technology Corp. SD/MMC Host Controller (rev 30)

02:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller (rev 30)

03:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01)

```

----------

## NeddySeagoon

FrankRizz0,

Here it is.

```
03:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01) 
```

Lets check the actual chipset.

Run lspci -n and post the line starting 03:00.0.  It will be the last line.  That's the Vendor and Device IDs.

The Debian Wiki says you will need firmware.  

To make life easy until it works, make the kernel driver a loadable module <M>. 

From your dmesg 

```
[    1.550919] b43: probe of bcma0:1 failed with error -524

[    1.552240] Broadcom 43xx driver loaded [ Features: PMNL ]

[    1.553586] Broadcom 43xx-legacy driver loaded [ Features: PLID ]

[    1.554920] brcmsmac bcma0:1: mfg 4bf core 812 rev 23 class 0 irq 19
```

you have the driver built into the kernel binary, as it gets started before root is mounted.

```
[    2.985291] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)

[    2.986831] VFS: Mounted root (ext4 filesystem) readonly on device 8:3.
```

It can be made to work that way but the firmware must also be built into the kernel, since it must be available when the driver is initalised.

When you are trying to get all the parts to play nicely together, using modules will save kernel rebuilds.

----------

## FrankRizz0

Ok rebuilt the kernel, then did modprobe brcmsmac, but I have no idea how to get the firmware mate.

----------

## NeddySeagoon

FrankRizz0,

Reading the kernel wireless wiki tells that you need

 *Quote:*   

> Firmware installation
> 
> Copy brcm/bcm43xx-0.fw and brcm/bcm43xx_hdr-0.fw to /lib/firmware/brcm (or wherever firmware is normally installed on your system).

 

Before you do much more, do check that you name a supported chipset.  Check the Vendor and Device IDs from 

```
lspci -n
```

 against that page.. 

Those files appear to be included in the sys-kernel/linux-firmware package.

```
emerge sys-kernel/linux-firmware
```

 to get lots of firmware.  You can configure it after install, so that updates won't keep things you are not interested in.

```
modprobe -r <driver>
```

since it loaded with no firmware.

With the firmware in position 

```
modprobe <driver>
```

will load the driver, the driver will load the firmware and it should work.

Look at the end of dmesg for any errors.

----------

## FrankRizz0

 *Quote:*   

> Copy brcm/bcm43xx-0.fw and brcm/bcm43xx_hdr-0.fw to /lib/firmware/brcm (or wherever firmware is normally installed on your system).

 

Copy from where?

----------

## NeddySeagoon

FrankRizz0,

Gentoo provides it.

```
emerge sys-kernel/linux-firmware
```

will put those files in the right places for the driver to load.

You don't need to do any copying yourself.

Look in /lib/firmware/brcm once the emerge completes.

----------

## FrankRizz0

Yeah, I already had linux-firmware installed.  The output of lspci -n was 03:00.0 0280: 14e4:4353 (rev 01)

Still unsure of what module to load though.

Edit: I think I figured out what module to load:

```
modprobe brcmsmac
```

But I still have no wireless

----------

## NeddySeagoon

FrankRizz0,

That's on the supported list.  The kernel help says

```

  ┌────────────────── Broadcom IEEE802.11n PCIe SoftMAC WLAN driver ───────────────────┐

  │ CONFIG_BRCMSMAC:                                                                   │  

  │                                                                                    │  

  │ This module adds support for PCIe wireless adapters based on Broadcom              │  

  │ IEEE802.11n SoftMAC chipsets. It also has WLAN led support, which will             │  

  │ be available if you select BCMA_DRIVER_GPIO. If you choose to build a              │  

  │ module, the driver will be called brcmsmac.ko.
```

So its 

```
modprobe -r brcmsmac

modprobe brcmsmac
```

Then test.

The end of dmesg will be useful if you can't get it to work.

----------

## FrankRizz0

Ok so here's the output of ifconfig -a:

```
 # ifconfig -a

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.148  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::db8e:432b:efd9:ced8  prefixlen 64  scopeid 0x20<link>

        ether 00:9c:02:20:db:5f  txqueuelen 1000  (Ethernet)

        RX packets 10178  bytes 6386752 (6.0 MiB)

        RX errors 0  dropped 9  overruns 0  frame 0

        TX packets 9131  bytes 1462777 (1.3 MiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 752  bytes 57280 (55.9 KiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 752  bytes 57280 (55.9 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 0  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0b1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        inet6 fe80::1bf2:b1f3:c3a7:2f44  prefixlen 64  scopeid 0x20<link>

        ether 20:10:7a:23:52:86  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

I unplug the ethernet so the wireless will take over and type /etc/init.d/dhcpcd restart, it then hangs at Mounting network filesystems ...

I also followed this wiki:

https://wiki.gentoo.org/wiki/Wpa_supplicant

Edit: On another note, wlp3s0b1 has now showed up in the wpa_gui, but I can't connect to it.

----------

## FrankRizz0

Connected, thank you AGAIN Neddy!

----------

## FrankRizz0

So it turns out I completely broke my gentoo, so after a reinstall and some configuring, I have failed to get my wireless back up.  Not sure where to look at this point, but I will post some error messages.  First, here is my dmesg:

[   11.623118] r8169 0000:01:00.0 enp1s0: link down

[   11.623137] r8169 0000:01:00.0 enp1s0: link down

[   11.623182] IPv6: ADDRCONF(NETDEV_UP): enp1s0: link is not ready

[   11.745037] brcmsmac bcma0:1: brcms_ops_bss_info_changed: qos enabled: false (implement)

[   11.745050] brcmsmac bcma0:1: brcms_ops_config: change power-save mode: false (implement)

[   11.746115] IPv6: ADDRCONF(NETDEV_UP): wlp3s0b1: link is not ready

[   13.211563] r8169 0000:01:00.0 enp1s0: link up

[   13.211589] IPv6: ADDRCONF(NETDEV_CHANGE): enp1s0: link becomes ready

```
# ifconfig -a

enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.1.148  netmask 255.255.255.0  broadcast 192.168.1.255

        inet6 fe80::db8e:432b:efd9:ced8  prefixlen 64  scopeid 0x20<link>

        ether 00:9c:02:20:db:5f  txqueuelen 1000  (Ethernet)

        RX packets 6646  bytes 6378217 (6.0 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 5367  bytes 769907 (751.8 KiB)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536

        inet 127.0.0.1  netmask 255.0.0.0

        inet6 ::1  prefixlen 128  scopeid 0x10<host>

        loop  txqueuelen 0  (Local Loopback)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480

        sit  txqueuelen 0  (IPv6-in-IPv4)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0b1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether 20:10:7a:23:52:86  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

```
# lspci -k

03:00.0 Network controller: Broadcom Corporation BCM43224 802.11a/b/g/n (rev 01)

   DeviceName: WLAN

   Subsystem: Hewlett-Packard Company WMIB-275N Half-size Mini PCIe Card

   Kernel driver in use: bcma-pci-bridge

   Kernel modules: bcma

Rizz0-Built ~ # 
```

Edit: I forgot to mention, wpa_gui says Could not get status from wpa_supplicant.

wpa_cli returns:

```
wpa_cli

wpa_cli v2.4

Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors

This software may be distributed under the terms of the BSD license.

See README for more details.

Interactive mode

Could not connect to wpa_supplicant: (nil) - re-trying
```

----------

## FrankRizz0

Something I just notice:

```
# /etc/init.d/net.wlp3s0b1 start

bash: /etc/init.d/net.wlp3s0b1: No such file or directory
```

Obviously one of, if not the only reason I can not get my wifi started, but I unfortunately don't know how to fix this   :Embarassed: 

----------

## NeddySeagoon

FrankRizz0,

You must have done it before.

The script /etc/init.d/net.lo (you should have that) runs as whatever its called as.

You need a symlink net.wlp3s0b1 -> net.lo in /etc/init.d/

In fact, you need symlinks for all of your interfaces.  

Its in the Handbook fine print under Automatically start networking at boot

----------

## FrankRizz0

Hey Neddy, thanks for the reply.

I did get that part figured out, and I was able to get connected last night (I had to install over and above linux-firmware, b43-firmware), but my internet dropped this morning.  Wpa_gui sees wlp3s0b1 and my router, but won't let me connect.  Here is one of the errors that I've noticed:

```
# /etc/init.d/net.wlp3s0b1 restart

 * Bringing down interface wlp3s0b1

 *   Stopping wpa_cli on wlp3s0b1 ...                                     [ ok ]

 *   Stopping wpa_supplicant on wlp3s0b1 ...                              [ ok ]

 * Bringing up interface wlp3s0b1

 *   Starting wpa_supplicant on wlp3s0b1 ...

Successfully initialized wpa_supplicant

rfkill: WLAN hard blocked                                                 [ ok ]

 *   Starting wpa_cli on wlp3s0b1 ...                                     [ ok ]

 *   Backgrounding ... ...

 * WARNING: net.wlp3s0b1 has started, but is inactive
```

That was after a reboot.  Before I rebooted it said t wasn't mounting network file systems   :Confused: 

----------

## NeddySeagoon

FrankRizz0,

```
rfkill: WLAN hard blocked  
```

means that the system has detected that the WiFi is powered off.

Many systems have a physical switch or a keyboard combination for that, as its good for battery life.

My netbook has a switch which is read by software, so it should and does report soft blocked.

Unfortunately, when I restart the Wifi, I've seen it report hard blocked too.  That's a very bad thing for me as I don't have a power switch.  The only way out I have is to reboot.

----------

## FrankRizz0

Ok thanks Neddy, but I still have an issue with the network.  If I try to connect internally to my ftp site (which I have not opened the port on my router) it's like I'm connecting outside of my network.  Also, those errors are there wether I can connect or not.  Currently, I am connected to my wifi with the same waring:

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

----------

## NeddySeagoon

FrankRizz0,

```
* WARNING: net.wlp3s0b1 has started, but is inactive
```

is mostly harmless.

Look in /run/openrc/inactive/.  If its not listed there, it was active by the time you looked.

Do you connect to your ftp site by name or by IP?

If its by name, how do you do name resolution?

----------

## FrankRizz0

No I connect by ip address.  Didn't have these problems before I broke my system, not sure what other step/s I took   :Confused: 

----------

## NeddySeagoon

FrankRizz0,

Show the routing table on both boxes and their private IP addresses.

If you don't have a static route between the subnets, either in the boxes themselves or in your router, your traffic may indeed be going up to your ISP and back.

traceroute may tell - test from both ends.

----------

