# B43 + Netbook Problems

## onichi

Hey everyone,

I have spent quite a few weeks trying to resolve the problems I have been having with setting up my wireless card on my netbook to work flawlessly with Gentoo. After working on this awhile, I have gotten my card ALMOST working, but now I have encountered a bug that I cannot find any solution to. 

The card can get online fine, I can access the internet and download small files with no problems. When I download a large file, (i.e. emerging something like Firefox) after about 6 seconds of connectivity, dmesg | tail prints out "No probe response from AP <address> after 500ms, disconnecting." And the download fails. I have wpa_supplicant setup to try to reconnect, but it just loops saying it cannot connect due to a timeout. If I reload the B43 driver, it appears to work fine again (until I download a large file.) That is, ifconfig wlan0 down && ifconfig wlan0 up fixes the problem so I can browse the internet no problem, but if I download something I get the "No probe response..." error.

I have a HP Mini 1009TU Netbook on which I have installed the latest version of Gentoo. The laptop uses a Broadcom B4312 card. 

Just for reference:

lspci | grep Broadcom reports:

01:00.0 Network Controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

uname -a reports:

Linux caspar 2.6.32-gentoo-r7 #5 SMP Mon May 17 10:32:20 EDT 2010 i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux

lsmod reports: 

b43

mac80211

I have been having quite an interesting time getting my wireless working. These are the steps I had to follow to get it to the point I am at:

1) Followed Gentoo Guide to setup the b43 driver / card firmware.

- Allowed me to iwscan list fine, but I could not connect to the internet due to DMA errors. My laptop also lagged intermittently due to a constant DMA controller reset from the B43 driver timing out on DMA transfers.

2) Patched the b43 driver to Force PIO Mode. This allowed me to connect to the internet/browse the internet no problem.

- Encountered an issue where I cannot download large files. When downloading files for an extended period of time, dmesg | tail reports "No probe from access point <address> after 500ms, disconnecting" and I cannot reconnect until I reload the b43 driver.

I cant think of there being a problem anywhere but the B43 driver/firmware.

I would appreciate any help you can provide. 

Thank you.

*EDIT* I am trying to increase the beacon poll timeout monitoring interval by editing my kernel source again.. ./net/mac80211/mlme.c

*EDIT* Nope, that didn't fix it. Now it just waits a long period of time not downloading before reporting the timeout   :Crying or Very sad: 

----------

## rh1

Have you tried the broadcom-sta driver?

----------

## onichi

Thanks for the reply man.

I think I did at one point; but that may have been before I found the DMA problem.  I switched to the Broadcom driver which I downloaded from the Broadcom linux page at one point. 

I will try that again.

Thanks again!

----------

## rh1

No need to download, it's in portage, just emerge it 

```
emerge broadcom-sta
```

Just need to add to package.keywords if your running stable , its an ~arch package

----------

## onichi

heh I am actually having some issues with my kernel configuration with that at the moment. Apparently the sta driver requires CONFIG_LIB80211 and not CONFIG_MAC80211... It also says I shouldn't have CONFIG_B43 asserted either. I am working on getting that fixed at the moment :<

Before you can emerge the broadcom-sta driver, you need to add this to your make.conf (for anyone reading this with a masked ebuild error when trying to emerge)

```

ACCEPT_LICENSES="Broadcom"

```

*EDIT* What exactly is the STA driver? And how is it different from the B43 module / firmware? This is probably a dumb question, but I am having problems finding a clear answer.

Never mind, apparently it is a proprietary driver from Broadcom that has a lot better performance  :Smile:  I wish the Gentoo wiki page had mentioned that.

----------

## onichi

Thank you, that fixed it. The STA driver is a LOT better than the B43 module. I can download at rates exceeding 10 kbps now, and I stay connected!

Thanks again.

----------

## rh1

Glad to hear it worked  :Smile:  . I had tried the b43 before but had all kinds of issues too, that's why i also went with broadcom-sta.

 *Quote:*   

> ACCEPT_LICENSES="Broadcom" 

 

I forgot about this.

I got annoyed with accepting licenses and am guilty of using ACCEPT_LICENSES="*".

----------

## d2_racing

Indeed, broadcom-sta are pretty good nowadays.

----------

## lubo777

after spending some time trying to resolv the problem with my b43 card (Broadcom Corporation BCM4312 802.11b/g (rev 01)) I found the solution and now the card is working pretty stable.

The problem was that each time 6 seconds after each AP association  the connection was dropped with this error in the dmesg:

No probe response from AP xxxxxxxxxxxxx after 500ms, disconnecting

The fix is to disable the QOS of the driver.

 *Quote:*   

> 
> 
> sudo touch /etc/modprobe.d/b43.conf
> 
> echo "options b43 pio=1 qos=0" | sudo tee -a /etc/modprobe.d/b43.conf
> ...

 

thanks to chenxiaolong

P.S. The QOS setting depends of the processor, for some it have to be 1

QOS on --> Intel Core Duo, Intel Atom

QOS off --> Intel Core Solo, Intel Core 2 Duo, Intel Core i3/i5/i7, and AMD

----------

## robnotts

Personally I got round the problem by turning off the "Enable Powersave by Default" on all 3 of my laptops, and the desktop with the USB dongle.

But glad to see the broadcom-sta drivers work as well.

----------

## lubo777

 *robnotts wrote:*   

> Personally I got round the problem by turning off the "Enable Powersave by Default" on all 3 of my laptops, and the desktop with the USB dongle.
> 
> But glad to see the broadcom-sta drivers work as well.

 

which driver are you using? br4? what is the card model? 

because when I try 

iwconfig wlan0 power off

I got

Error for wireless request "Set Power Management" (8B2C) :

    SET failed on device wlan0 ; Operation not supported.

----------

## robnotts

```
laptop64 ~ # lsmod

Module                  Size  Used by

nfs                   232505  2 

lockd                  55996  1 nfs

nfs_acl                 1935  1 nfs

auth_rpcgss            33598  1 nfs

sunrpc                155015  15 nfs,lockd,nfs_acl,auth_rpcgss

ntfs                  163088  1 

nvidia              10905272  42 

joydev                  8509  0 

arc4                    1226  2 

ecb                     1777  2 

b43                   147712  0 

mac80211              121812  1 b43

hp_wmi                  4828  0 

cfg80211              120236  2 b43,mac80211

rfkill                 12884  2 hp_wmi,cfg80211

forcedeth              46016  0 

usbhid                 23071  0 

psmouse                31457  0 

firewire_ohci          19518  0 

sdhci_pci               6003  0 

thermal                11775  0 

i2c_nforce2             5000  0 

ssb                    31231  1 b43

ohci_hcd               18013  0 

wmi                     5141  1 hp_wmi

i2c_core               14855  2 nvidia,i2c_nforce2

k8temp                  2963  0 

hwmon                   1273  1 k8temp

rtc_cmos                7678  0 

rtc_core               10885  1 rtc_cmos

rtc_lib                 1506  1 rtc_core

```

```
laptop64 ~ # lspci

00:00.0 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)

00:00.1 RAM memory: nVidia Corporation C51 Memory Controller 0 (rev a2)

00:00.2 RAM memory: nVidia Corporation C51 Memory Controller 1 (rev a2)

00:00.3 RAM memory: nVidia Corporation C51 Memory Controller 5 (rev a2)

00:00.4 RAM memory: nVidia Corporation C51 Memory Controller 4 (rev a2)         

00:00.5 RAM memory: nVidia Corporation C51 Host Bridge (rev a2)                 

00:00.6 RAM memory: nVidia Corporation C51 Memory Controller 3 (rev a2)         

00:00.7 RAM memory: nVidia Corporation C51 Memory Controller 2 (rev a2)         

00:02.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)          

00:03.0 PCI bridge: nVidia Corporation C51 PCI Express Bridge (rev a1)

00:05.0 VGA compatible controller: nVidia Corporation C51 [Geforce Go 6150] (rev a2)

00:09.0 RAM memory: nVidia Corporation MCP51 Host Bridge (rev a2)

00:0a.0 ISA bridge: nVidia Corporation MCP51 LPC Bridge (rev a3)

00:0a.1 SMBus: nVidia Corporation MCP51 SMBus (rev a3)

00:0a.3 Co-processor: nVidia Corporation MCP51 PMU (rev a3)

00:0b.0 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0b.1 USB Controller: nVidia Corporation MCP51 USB Controller (rev a3)

00:0d.0 IDE interface: nVidia Corporation MCP51 IDE (rev f1)

00:0e.0 IDE interface: nVidia Corporation MCP51 Serial ATA Controller (rev f1)

00:10.0 PCI bridge: nVidia Corporation MCP51 PCI Bridge (rev a2)

00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2)

00:14.0 Bridge: nVidia Corporation MCP51 Ethernet Controller (rev a3)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

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

07:05.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller

07:05.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)

07:05.2 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)

07:05.3 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)

```

Hope that helps... for one of the machines anyway.

----------

## lubo777

strange!  :Smile: 

which one is the version of the kernel?

----------

## robnotts

```
rob@laptop64 ~ $ uname -a

Linux laptop64 2.6.34-gentoo-r1 #1 SMP Thu Jun 17 11:22:14 BST 2010 x86_64 AMD Turion(tm) 64 X2 Mobile Technology TL-52 AuthenticAMD GNU/Linux

```

Using the b43 in kernel driver...

```
rob@laptop64 ~ $ dmesg | grep -i b43

[    6.246047] b43-pci-bridge 0000:03:00.0: PCI INT A -> Link[LK4E] -> GSI 19 (level, high) -> IRQ 19

[    6.246068] b43-pci-bridge 0000:03:00.0: setting latency timer to 64

[    7.474149] b43-phy0: Broadcom 4311 WLAN found (core revision 10)

[    7.657519] Registered led device: b43-phy0::tx

[    7.657568] Registered led device: b43-phy0::rx

[    7.657612] Registered led device: b43-phy0::radio

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

[   53.782081] b43 ssb0:0: firmware: requesting b43/pcm5.fw

[   53.844061] b43 ssb0:0: firmware: requesting b43/b0g0initvals5.fw

[   53.935543] b43 ssb0:0: firmware: requesting b43/b0g0bsinitvals5.fw

[   54.187532] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
```

Works wonderfully. Was having problems with random disconnections, but once the powersaving option was turned off it worked well.

----------

## lubo777

```

dmesg | grep b43

[    0.515602] b43-pci-bridge 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[    0.515972] b43-pci-bridge 0000:02:00.0: setting latency timer to 64

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

[    7.417458] b43-phy0 debug: Found PHY: Analog 6, Type 5, Revision 1

[    7.417474] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2062, Revision 2

[    7.425761] Registered led device: b43-phy0::tx

[    7.425777] Registered led device: b43-phy0::rx

[    7.425792] Registered led device: b43-phy0::radio

[   10.694228] b43 ssb0:0: firmware: requesting b43/ucode15.fw

[   10.753515] b43 ssb0:0: firmware: requesting b43/lp0initvals15.fw

[   10.812467] b43 ssb0:0: firmware: requesting b43/lp0bsinitvals15.fw

[   10.980241] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23)

```

The card here is 4312, b43 is build as a module and my the firmware is version 478.104 (2008-07-01 00:50:23), probably power save isn't working yet in Broadcom 4312, but I'll test with your firmware version also (just in case)  :Smile: 

----------

## DaggyStyle

 *lubo777 wrote:*   

>  *Quote:*   
> 
> dmesg | grep b43
> 
> [    0.515602] b43-pci-bridge 0000:02:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
> ...

 

what version of net-wireless/b43-firmware are you using?

----------

## lubo777

```

*  net-wireless/wireless-tools

      Latest version available: 29

      Latest version installed: 29

```

```

broadcom-wl-4.178.10.4

[ 10.980241] b43-phy0: Loading firmware version 478.104 (2008-07-01 00:50:23) 
```

----------

## DaggyStyle

 *lubo777 wrote:*   

> 
> 
> ```
> 
> *  net-wireless/wireless-tools
> ...

 

not what I've  asked for...

what is the output of emerge -s b43-firmware?

----------

## lubo777

robnotts, is it possible to get me your version of the firmware?

P.S. Sorry, I just emerged it ...   :Very Happy:  

----------

## DaggyStyle

 *lubo777 wrote:*   

> robnotts, is it possible to get me your version of the firmware?

 

ok, seems that you don't want my help...

fair enough.

----------

## lubo777

 *DaggyStyle wrote:*   

> 
> 
> not what I've  asked for...
> 
> what is the output of emerge -s b43-firmware?

 

hmm, acctually I used not the gentoo provided firmware, but  broadcom-wl-4.178.10.4.tar.bz2

Ok, I emerged  b43-firmware and now I have:

```
[86416.564235] b43-phy1: Loading firmware version 410.2160 (2007-05-26 15:32:10)

[86416.566662] b43-phy1 debug: b2062: Using crystal tab entry 19200 kHz.

[86417.952293] b43-phy1 debug: Chip initialized

[86417.952396] b43-phy1 debug: PIO initialized

[86417.952416] b43-phy1 debug: QoS disabled

[86417.961137] b43-phy1 debug: Wireless interface started

[86417.965771] b43-phy1 debug: Adding Interface type 2

```

but setting the power save mode is still not working 

```
iwconfig wlan0 power off                        

Error for wireless request "Set Power Management" (8B2C) :

    SET failed on device wlan0 ; Operation not supported.
```

----------

## DaggyStyle

 *lubo777 wrote:*   

>  *DaggyStyle wrote:*   
> 
> not what I've  asked for...
> 
> what is the output of emerge -s b43-firmware? 
> ...

 

you are using kernel 2.6.34, you should use that package.

I have the same card on my dell laptop, using b43 and that package and it works great

unless your trying to get an special feature on, in that case, I apologized, I though you have problems getting the adapter to work.

----------

## lubo777

 *DaggyStyle wrote:*   

> 
> 
> ...
> 
> I have the same card on my dell laptop, using b43 and that package and it works great
> ...

 

hmm, yes with this firmware I think is better - the wifi connection is much stable

what about the qos=0 and power save settings? Do you use them?

what about the drivers's DMA and PIO?

I'm using it with PIO mode on and DMA off and the CPU is under heavy load for 7-8 M network traffic the first CPU is 85% ...

----------

## DaggyStyle

 *lubo777 wrote:*   

>  *DaggyStyle wrote:*   
> 
> ...
> 
> I have the same card on my dell laptop, using b43 and that package and it works great
> ...

 

I don't use qos or powersave

have no idea what DMA and PIO cause and my cpu isn't heavy loading at all.

----------

## robnotts

Sorry, I meant here in the kernel...

Under Networking Support -> Wireless.

```
  --- Wireless                                                     │ │   

  │ │    <M>   cfg80211 - wireless configuration API                      │ │   

  │ │    [ ]     nl80211 testmode command                                 │ │   

  │ │    [ ]     enable developer warnings                                │ │   

  │ │    [ ]     cfg80211 regulatory debugging                            │ │   

  │ │    [ ]     enable powersave by default                              │ │   

  │ │    [*]     cfg80211 wireless extensions compatibility               │ │   

  │ │    [*]   Wireless extensions sysfs files                            │ │   

  │ │    <M>   Common routines for IEEE802.11 drivers                     │ │   

  │ │    [ ]   lib80211 debugging messages                                │ │   

  │ │    <M>   Generic IEEE 802.11 Networking Stack (mac80211)            │ │   

  │ │          Default rate control algorithm (Minstrel)  --->            │ │   

  │ │    [ ]   Enable mac80211 mesh networking (pre-802.11s) support      │ │   

  │ │    [*]   Enable LED triggers                                        │ │   

  │ │    [ ]   Select mac80211 debugging features  --->                   │ │   

  │ │  
```

Then under Device Drivers -> Net Device Support -> Wireless LAN

```
   --- Wireless LAN                                                 │ │   

  │ │    < >   Marvell 8xxx Libertas WLAN driver support with thin firmwar│ │   

  │ │    < >   Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards          │ │   

  │ │    < >   Atmel at76c50x chipset  802.11b support                    │ │   

  │ │    < >   Atmel at76c503/at76c505/at76c505a USB cards                │ │   

  │ │    < >   Intersil Prism GT/Duette/Indigo PCI/Cardbus (DEPRECATED)   │ │   

  │ │    < >   USB ZD1201 based Wireless device support                   │ │   

  │ │    < >   Wireless RNDIS USB support                                 │ │   

  │ │    < >   Realtek 8180/8185 PCI support                              │ │   

  │ │    < >   Realtek 8187 and 8187B USB support                         │ │   

  │ │    < >   ADMtek ADM8211 support                                     │ │   

  │ │    < >   Simulated radio testing tool for mac80211                  │ │   

  │ │    < >   Marvell 88W8xxx PCI/PCIe Wireless support                  │ │   

  │ │    < >   Atheros Wireless Cards  --->                               │ │   

  │ │    <M>   Broadcom 43xx wireless support (mac80211 stack)            │ │   

  │ │    [*]     Broadcom 43xx SDIO device support (EXPERIMENTAL)         │ │   

  │ │    [*]     Support for low-power (LP-PHY) devices (EXPERIMENTAL)    │ │   

  │ │    [ ]     Broadcom 43xx debugging                                  │ │   
```

----------

## d2_racing

Your config seems to be right, did you enable the ssb module ?

----------

## robnotts

 *d2_racing wrote:*   

> Your config seems to be right, did you enable the ssb module ?

 

Yes I know... mine works  :Laughing: 

----------

## d2_racing

B43 drivers can be hard to make it actually work.

Even a kernel release can change how the b43 will react.

----------

