# Wifi-card Broadcom BCM4318 stops working after few seconds

## elko

Hello, I am quite new to Gentoo and this forums and I hope this is the right place for this topic.

I have troubles with my wifi card in HP Compaq nx6110 notebook.

 *Quote:*   

> 
> 
> # lspci -vnn
> 
> ...
> ...

 

I have followed http://en.gentoo-wiki.com/wiki/Broadcom_43xx. Using kernel driver didn't work for me at all. I tried both emerging b43-fwcutter and compiling as the b43-fwcutter (version 12 instead of 11 from portage) described in http://linuxwireless.org/en/users/Drivers/b43 ("You are using the b43 driver from linux-2.6.25 or newer"). It is not possible to get the card running.

 *Quote:*   

> 
> 
> # ifconfig wlan0 up
> 
> SIOCSIFFLAGS: Unknown Error 132
> ...

 

So I have recompiled the kernel and removed the b43 driver and tried ndiswrapper following http://en.gentoo-wiki.com/wiki/Ndiswrapper. I have tried several drivers (from HP and Asus sites) but everyone behaves the same. When the notebook is booting up it is possible to see the networks around me. But when the boot is complete it is not possible to connect to any network because no one is visible.

Later I have tried unloading and modprobing ndiswrapper module and it helps but only for few moments:

 *Quote:*   

> 
> 
> # rmmod ndiswrapper
> 
> # modprobe ndiswrapper
> ...

 

I can see the networks once or twice but after few seconds I am stuck with:

 *Quote:*   

> 
> 
> # iwlist wlan0 scan
> 
> wlan0     No scan results
> ...

 

However, once and only once I was able to use my wifi card for longer time (around 30-60 minutes) using ndiswrapper. Then I decided to reboot and see what happen and the behavior was the same as before - I can see the networks but only few moments.

 *Quote:*   

> 
> 
> ndiswrapper -l
> 
> bcmwl5 : driver installed
> ...

 

 *Quote:*   

> 
> 
> # ifconfig wlan0 down
> 
> # ifconfig wlan0 up
> ...

 

Lines above do not help but " ifconfig wlan0 up" results in "ADDRCONF(NETDEV_UP): wlan0: link is not ready" added to the "dmesg" output.

 *Quote:*   

> 
> 
> # rmmod ndiswrapper
> 
> # dmesg
> ...

 

I have tried to google someone having similar problems as I do. But internet is full of cards not working at all that suddenly start working and no one has claimed that the card is working for only few moments.

Previously I have been using Ubuntu on this notebook and the card was running perfectly probably using the b43 kernel module but I am not 100%  sure.

I would like to ask if anyone has seen anything similar to my problem or if anyone has a suggestion what to try next.

EDIT: one of the links correctedLast edited by elko on Sat Feb 20, 2010 3:12 pm; edited 1 time in total

----------

## dE_logics

Thanks dude, I'm with you.

BCM4311

----------

## Rexilion

You guys are probably carrying a so called LP (Low-Power) variant of the broadcom card. The reason it does not work under Gentoo is that because the kernel is too old to support it *properly* *OR* that is because Ubuntu uses different firmware. Basically (as far as I know) there are three types of firmware as of today:

- Firmware (& driver?) from broadcom specifically for Linux (Broadcom STA)

- Firmware 'taken' from drivers of other vendors (ie. messing around with fwcutter etc, this variant is shown on the linuxwireless site)

- Opensource firmware

So... , you better start comparing  :Smile: 

P.S. Support for the LP variant is being worked on, using the latest git kernel should give you a good connection...

----------

## elko

Thanks for the posts.

 *Rexilion wrote:*   

> 
> 
> - Firmware (& driver?) from broadcom specifically for Linux (Broadcom STA)
> 
> - Firmware 'taken' from drivers of other vendors (ie. messing around with fwcutter etc, this variant is shown on the linuxwireless site)
> ...

 

The  Broadcom STA driver is not an option for me because I have unsupported card (http://www.broadcom.com/support/802.11/linux_sta.php). However, the comment may still be helpful for another users.

Yes, I was messing up with different firmware a lot. It is still possible that there exists some firmware that I didn't try and works better than my current one.

Thank for pointing that open source firmware exists, too. If somebody is interested, read http://lwn.net/Articles/314313/ and http://www.ing.unibs.it/openfwwf/.

 *Rexilion wrote:*   

> You guys are probably carrying a so called LP (Low-Power) variant of the broadcom card. P.S. Support for the LP variant is being worked on, using the latest git kernel should give you a good connection...

 

Nice to know that something like LP exists and that is being worked on. I guess that it is possible that kernel in Ubuntu may had these pathches included in earlier version of kernel. BTW my current kernel is 2.6.31-gentoo-r6 so it is rather old.

I have an update about my current situation. I have found out that if I boot and I don't have a wired connection pluged in, I am able to make my broadcom card run. All my three tries were successful and wifi was up and running for hours. Either right after the boot or after removing and modprobing the ndiswrapper driver. I plan to test it more when I'll have more suitable conditions.

----------

## Rexilion

Good progress! You could also try compiling the wireless compat, that might already include patches for LP devices. This is very convenient, because it won't force you to upgrade to, for example, a git kernel.

----------

## szmytson

 *elko wrote:*   

> 
> 
> BTW my current kernel is 2.6.31-gentoo-r6 so it is rather old.
> 
> 

 

I successfully set up my wifi card using b43 with compaq v3000 (hp 2000 series) some time ago (I think my kernel was older than yours).

I definitely recommend using b43 instead of ndiswrapper.

Your card seems to be supported by the driver (http://linuxwireless.org/en/users/Drivers/b43)

Did you get any errors in /var/log/messages when trying to set it up ?

--

szmytson

----------

## Xamindar

 *Rexilion wrote:*   

> The reason it does not work under Gentoo is that because the kernel is too old to support it *properly* *OR* that is because Ubuntu uses different firmware. 

 

I don't think this is correct. I just started having trouble with my b43 wireless card after UPGRADING my kernel to 2.6.32. I was using 2.6.25 on this machine before and my wireless always worked fine with the b43legacy driver.

I keep getting "Unknown error 132" when I try to associate to an AP.

----------

## elko

I have learnt that it is not entirely true that the card stops working after few moments. It is correct that searching for available networks is unsuccessful. But when I use my network manager wicd to search for available networks (just after I reload ndiswrapper module) I am able to connect to a found network and the connection is stable. So for now I am able to use my card when I need it. Often the card is connected to a known network when the system is booted up.

When I have more time I will probably use this thread to search for another solution but for the time being I am content that my wifi is working quite well. Thanks all for your contribution to this thread.

----------

## luiss

Hi all, 

I got  a problem that's very similar to yours, I have a BCM4311 card on a dell xps m1330, I installed the b43-firmware that's in portage, I'm able to make the card run with 

  iwconfig wlan0 txpower on

  iwconfig wlan0 essid networ

  ifconfig wlan0 up

But it does not work with /etc/init.d/net.wlan0 start.

It says 

* Starting wlan0

SIOCSIFFLAGS: Unknown error 132

SIOCSIFFLAGS: Unknown error 132

SIOCSIFFLAGS: Unknown error 132

 *   Configuring wireless network for wlan0

 *   Failed to configure wireless for wlan0                               [ !! ]

And if I type  "ifconfig wlan0 up" before using iwconfig commands it says

SIOCSIFFLAGS: Unknown error 132

.

My dmesg says nothing, and the only errors seems to be in /var/log/messages:

[  115.829256] b43 ssb0:0: firmware: requesting b43/ucode5.fw

Jun  7 19:07:07 m1330 kernel: [  115.903857] b43 ssb0:0: firmware: requesting b43/pcm5.fw

Jun  7 19:07:07 m1330 kernel: [  115.926650] b43 ssb0:0: firmware: requesting b43/b0g0initvals5.fw

Jun  7 19:07:07 m1330 kernel: [  115.956342] b43 ssb0:0: firmware: requesting b43/b0g0bsinitvals5.fw

Jun  7 19:07:07 m1330 kernel: [  116.087267] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)

Jun  7 19:07:07 m1330 kernel: [  116.138597] ADDRCONF(NETDEV_UP): wlan0: link is not ready

Jun  7 19:07:17 m1330 rc-scripts: Failed to configure wireless for wlan0

Any help?

Oh my /etc/conf.d/net is very simple:

config_eth0=("dhcp")

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dwext"

config_wlan0=("dhcp")

----------

## Rexilion

That error: Is the actual wireless switch (ie. the button on your laptop) turned ON ?  :Mr. Green:  .

----------

## luiss

Yes, double checked  :Very Happy: 

----------

## luiss

I have done 

iwconfig wlan0 txpower on;

wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf wlan0 -dd &

iwlist wlan0 scan

and it works

with /etc/init.d/net.wlan0 start 

It doesn't, it seems he can't power the card or execute wpa_supplicant...

----------

## Rexilion

 *luiss wrote:*   

> I have done 
> 
> iwconfig wlan0 txpower on;
> 
> wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf wlan0 -dd &
> ...

 

You do:

```
iwconfig wlan0 txpower on
```

Questions: Why?

Gentoo's networkscripts don't execute that command (only iwconfig up maybe?). So I guess that fixes it...

Does your method also fail if you don't use that command? If yes, than that's your problem, but you already provided a fix  :Smile:  .

----------

## luiss

Well it says 

#iwconfig wlan0 up

iwconfig: unknown command "up"

Then if I dont execute 

#iwconfig wlan0 txpower on

the wpa_supplicant demon says "l2_packet_receive - recvfrom: Network is down" and it doesn't works

BTW yes I found a solution, but I'd like to dig and foind why standard scripts does not works properly...

----------

## Rexilion

 *luiss wrote:*   

> Well it says 
> 
> #iwconfig wlan0 up
> 
> iwconfig: unknown command "up"
> ...

 

The txpower is your solution. The reason why it doesn't work with the scripts is that it's not 'normal' to execute that command. I suggest you just stick it in there (init scripts) and be done with it  :Wink:  .

----------

## luiss

Ok found my solution, I had the driver for the kernel compiled directly into the kernel, I changed to modules, rebooted, and wicd started working like a charm  :Very Happy: 

----------

## Xamindar

Do you guys have the rfkill module loaded?

----------

## luiss

here lsmod gives 

nvidia

b43

but I'm quite sure rfkill kernel module I have it compiled in kernel..

----------

## Xamindar

I found rfkill was disabling my card and causing the error "SIOCSIFFLAGS: Unknown error 132". The particular laptop didn't even have a hardware wifi switch on it. I disabled that module and recompiled the kernel and all is good with my card now.

----------

