# Cannot make wireless work (Broadcom 4312)

## odin_ago

Hello.

I am trying to get wireless with Broadcom 4312. It somehow works with Gentoo livedvd. But when I boot normal environment, 

```
#ifconfig -a
```

 does not show the interface wlan0 unlike what happens in livedvd environment. My first idea was that I need more modules, in "normal" (non-livedvd) case lsmod lists only 4 modules (b43 is among them). In livedvd, it lists much more modules, and I think that what I need could be mac80211 and cfg80211. But after 

```
# modprobe mac80211

# modprobe cfg80211

# lsmod
```

,

I see the same 4 modules (I see no error after modprobe, but actually I don't see that these modules are added). The networking interface is also not present.

I tried to add mac80211 and cfg80211 to /etc/conf.d/modules, and the first thing I notices is that there were no modules at all in this file, so b43 is loaded by something else, not by this file. OK, I added b43 to this file too, but now during the reboot process I see an error message that says that modules could not be loaded. And lsmod still gives the same 4 modules.

So, my questions are:

1. What loads the module b43?

2. Why do I fail to load mac80211 and cfg80211?

3. Right now I have the package b43-firmware installed in my system, and, as I know, it is not open-source. Is there an open-source firnware for broadcom? I heard about something called maranello, but I don't know a gentoo package for it.

----------

## BillWho

odin_ago,

Did you set the symlink net.wlan0 -> /etc/init.d/net.lo and add it to the default runlevel   :Question: 

And did you make any changes in /etc/conf.d/net   :Question: 

----------

## odin_ago

I think I didn't try these ideas before (there were no file or link named net.wlan0 anywhere on my hard drive, /etc/conf.d/net did not say anything about wlan0), but now I have tried both ideas, and they did not help. Namely, I've made a link to /etc/init.d/net.lo named net.wlan0 in the same directory (I don't really know, I am not very familiar with gentoo: does this mean "to add to the default runlevel"?), then I've added lines about net_wlan0 to /etc/conf.d/net similar to the lines about eth0 that already were there. Then I've restarted, and I still don't have wlan0 in ifconfig -a.

----------

## Odward

add to the default runlevel for gentoo means use rc-update

```
rc-update add service default
```

In this example you would replace service with net.wlan0

That however assumes you're using wpa_supplicant to manage your wireless connection.  And you would need the proper

instructions in your /etc/conf.d/net to use wpa_supplicant

If you were using wicd or networkmanager then they would be the service to add to default so they started when you booted.

But that might be getting slightly ahead since the interface hasn't been found yet, and yet b43 is loaded as a module.

With my b43 card I did the following from here

```
emerge b43-fwcutter
```

If you have a regular user you can su or sudo from, you can start as that regular user and do something like

```
mkdir ~/work && cd ~/work
```

If you're using a kernel 3.2 or NEWER (You can use 'uname -a' to see the running kernel version, mine for example is 3.3.8-gentoo)

```
export FIRMWARE_INSTALL_DIR="/lib/firmware"

wget http://www.lwfinger.com/b43-firmware/broadcom-wl-5.100.138.tar.bz2

tar xjf broadcom-wl-5.100.138.tar.bz2

sudo b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" broadcom-wl-5.100.138/linux/wl_apsta.o
```

**Edit: It just occurred to me if you don't have a network connection you'll have to obtain firmware from the wget command

by another means - ask if you need help.  If your eth0 is working and you can connect wired for now, it should work fine.  

Otherwise you could do these things from the livedvd after you chroot just like in the handbook, since you mentioned it worked.**

That last line is the only time you would need to sudo or su.  You could do the exact same steps as root, just break that habit

asap and do as much as possible as normal user.  I didn't install b43-firmware via gentoo so not sure where the

necessary files are located.  This method just fetches the firmware and uses b43-fwcutter to install.

After you do these steps you should be able to

```
modprobe -r b43
```

```
modprobe b43
```

Then see if wlan0 exists yet. (ifconfig -a)

**Edit: If you received errors above post those first, otherwise:

If it still doesn't exist, can you

```
emerge wgetpaste
```

then

```
cat /usr/src/linux/.config | wgetpaste
```

Post the resulting url here so we can make sure the kernel is configured for wireless.

**Another edit!  This step is probably moot, the b43 module would depend on mac80211 being set.  You can verify rather than post if you want

```
grep CONFIG_CFG80211= /usr/src/linux/.config
```

```
grep CONFIG_MAC80211= /usr/src/linux/.config
```

The end of both results will probably be "=y" and that means they're built into the kernel, so they won't be separate modules.  This is fine.

----------

## odin_ago

rc-update did not help at all, but when I updated my kernel from 2.6.39 to 3.3.8 (since you say that the instructions are valid starting from 3.2), I moved one step further: the interface wlan0 appeared, and it is still there even if I

```
cd /etc/init.d/

rc-update delete net.wlan0 default

unlink net.wlan0
```

In kernel settings, I did not change anything, just said

```
<...>

eselect kernel set 4

cd /usr/src/linux

zcat /proc/config.gz >.config

make menuconfig

<...change only local version and exit...>

make

<...>
```

(On the other hand, now the speaker makes strange noise at the very moment of reboot, but this is another problem.)

Now I come back to the other question again: as I understood, the instruction with b43-fwcutter do not use opensource firmware - they simply download the proprietary firmware and install it. Befrore I proceed, I would like to know if opensource firmware is available under gentoo for broadcom? I heard about something called maranello, but there is no gentoo package called maranello.

----------

## Odward

I'm afraid I have no experience with open source drivers for your card.  Maybe someone else can point you there.

If you wanted to use a 2.6 series kernel, going back to the link I provided above it also gives the url for the Pre 3.2

firmware.  Proprietary version still.  As well as a modified b43-fwcutter command.

Just for the sake of clarity, I hope, regarding the rc-update the wlan0 should exist, provided the module is loaded, 

regardless of having wlan0 in the default runlevel.  The purpose of having wlan0 in the default runlevel is so that during 

boot it can pass instructions to load wpa_supplicant (for example) and Configure the wlan0 interface to connect.

But wlan0 merely appearing, or not, in 'ifconfig -a' is a result of the kernel / modules being properly configured and loaded.

Basically once it is seen, then you have to take the next step(s) to configure it for your AP(s).  You can also use a gui

style program to handle your wireless sessions, such as wicd or networkmanager, instead of wpa_supplicant directly.

I have both setups, on my b43 box I 'emerge wicd' and once it's done I was able to open the gui and enter my home

wireless SSID and WPA2 passphrase - select automatically connect to this network and then issue an 'rc-update add wicd default'

Now wicd starts during boot and my wireless is configured.

----------

## eccerr0r

For my networkmanager based b43 laptop, it also autoloads the driver.  Check your dmesg if there's any info about why the driver would not load.  I had to emerge the firmware binary separately with another setup.

There was another recent f.g.o post in where a guy solved his wireless problem by making sure he had a rate controller compiled in (usually minstrel).  Somehow he had none built and the driver, though for a different wireless card (atheros 5000) would not load...

----------

## odin_ago

 *eccerr0r wrote:*   

> Check your dmesg if there's any info about why the driver would not load.

 

It looks like it loads, even in the old kernel (2.6.39), I see:

```
lsmod

Module                  Size  Used by

b43                   108233  0 

battery                10547  0 

ac                      3115  0 

button                  4239  0
```

I don't have the wireless interface in ifconfig -a. However, dmesg shows something (in the old kernel) :

```
dmesg |grep b43

[    0.969213] b43-pci-bridge 0000:45:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19

[    0.969476] b43-pci-bridge 0000:45:00.0: setting latency timer to 64

[    6.687696] b43-phy0: Broadcom 4312 WLAN found (core revision 15)

[    6.702153] b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 6, Type 5, Revision 1)

[    6.702176] b43: probe of ssb0:0 failed with error -95

dmesg |grep broadcom

dmesg |grep wlan

dmesg |grep wlan0
```

----------

## BillWho

odin_ago,

I noticed you have the b43-firmware package installed, but according to the config help for  Broadcom 43xx wireless support it requires net-wireless/b43-fwcutter. Did you try installing it   :Question: 

----------

## odin_ago

Yes, I have both b43-firmware and b43-fwcutter. My question was not about them, but about possible open-source firmware.

----------

