# problem getting b43 working [solved]

## raungst

I'm trying to get the b43 driver for my Broadcom 4318 working. I sucessfully compiled the b43 module, and can successfully modprobe it. However, further back in my dmesg, I get this:

```
b43-phy0: Broadcom 4318 WLAN found

phy0: Selected rate control algorithm 'pid'

phy0: Failed to initialize wep

b43: probe of ssb0:0 failed with error -12

Broadcom 43xx driver loaded [ Features: P, Firmware-ID: FW13 ]

```

I also don't have a /dev/eth1 for my wireless, but from the message above, the kernel clearly found my card. What steps should I take to start figuring this out? I found a similar thread, tried what it suggested, but it didn't help...

https://forums.gentoo.org/viewtopic-t-697404-highlight-b43.html

Thanks!Last edited by raungst on Sat Aug 09, 2008 1:58 am; edited 1 time in total

----------

## pappy_mcfae

Check out this thread. 

If b43 doesn't work, install ndiswrapper and the windoze driver, and be done with it. It will save much in the way of headaches.

Blessed be!

Pappy

----------

## raungst

Thanks for the help. I tried some more yesterday, and couldn't get any headway with b43. Do you know of a good howto for ndiswrapper? I understand the concept, but not sure on the implementation. Is it basically going to use the original b43 drivers instead of having to extract them?

----------

## pappy_mcfae

To answer your first question, you cannot use ndiswrapper if you have b43 setup. The b43 module conflicts with ndiswrapper as does the Sonics Silicon Backplane (SSB) module, which gets set in the kernel if you choose any Broadcom devices. Therefore, you want to go through every network driver and make sure there are NO broadcom devices setup. If you need to use a different Broadcom device, we'll cross that bridge when we get there. For now, the assumption is the only Broadcom device you have is the wireless adapter.

Speaking of kernels; for best results, start out using the 2.6.22.19 vanilla-sources kernel. If ndiswrapper will work with your system, it will work with 2.6.22.19. Also note that you won't have to worry about the SSB with that version of the kernel, which is a REAL plus. Also note ndiswrapper support sucks out loud in the .23 kernel family, and is all but gone from the .24. In other words, no not use those kernel versions with ndiswrapper. The .25 family has somewhat shaky ndiswrapper support, and .26 is almost perfect again. However, none of them beat 2.6.22.19.

Below are the relevant kernel .config setups.

```
#

# Wireless

#

CONFIG_CFG80211=y

CONFIG_NL80211=y

CONFIG_WIRELESS_EXT=y

CONFIG_MAC80211=m

###break###

#

# Wireless LAN

#

# CONFIG_WLAN_PRE80211 is not set

CONFIG_WLAN_80211=y

# CONFIG_IPW2100 is not set

# CONFIG_IPW2200 is not set

# CONFIG_LIBERTAS is not set

# CONFIG_AIRO is not set

# CONFIG_HERMES is not set

# CONFIG_ATMEL is not set

# CONFIG_PRISM54 is not set

# CONFIG_USB_ZD1201 is not set

# CONFIG_USB_NET_RNDIS_WLAN is not set

# CONFIG_RTL8180 is not set

# CONFIG_RTL8187 is not set

# CONFIG_ADM8211 is not set

# CONFIG_P54_COMMON is not set

# CONFIG_ATH5K is not set

# CONFIG_IWLCORE is not set

# CONFIG_IWLWIFI_LEDS is not set

# CONFIG_IWL4965 is not set

# CONFIG_IWL3945 is not set

# CONFIG_HOSTAP is not set

# CONFIG_B43 is not set

# CONFIG_B43LEGACY is not set

# CONFIG_ZD1211RW is not set

# CONFIG_RT2X00 is not set
```

Once your kernel is set up properly, make sure that its source directory is symlinked to /usr/src/linux. This is important as ndiswrapper compiles against the kernel, and creates modules that go into the /lib/modules directory. If you have different kernel versions on your machine, you have to compile ndiswrapper against each kernel.

Once that's done, get your latest and greatest WinXP drivers, and copy the .INF and .SYS files for the drivers into a neutral directory. cd to said directory, and type

```
ndiswrapper -i <win_driver_inf>
```

Note: at the time of writing ( 08-06-08 ) Vista drivers do not work with ndiswrapper.

Once that's done, then enter:

```
ndiswrapper -l
```

That should return something like this:

```
bcmwl5 : driver installed

   device (14E4:4311) present
```

If you get that output, smile, you're almost therre.

If you already have an /etc/conf.d/net file set up, it should work with ndiswrapper. If you are using wpa_supplicant, be absolutely sure that you use the line 

```
wpa_supplicant_wlan0=( "-Dwext" )
```

to invoke wpa_supplicant. If you try to use -Dndiswrapper, or put anything after the -Dwext, wpa_supplicant will not play nicely.

The final thing is to autoload ndiswrapper on the next reboot. There are two ways to do this, depending on whether you are running baselayout-1.x or baselayout-2/openrc. 

Baselayout-1.x: open file /etc/modules.autoload.d/kernel-2.6, and add "ndiswrapper" without the quotes. Save and exit.

Baselayout-2/openrc: Open file /etc/conf.d/modules, and add "modules=ndiswrapper" without quotes, Save and exit.

Reboot.

If things are working close to right, you should get something like this

```
ndiswrapper version 1.53 loaded (smp=no, preempt=yes)

ndiswrapper: driver bcmwl5 (Broadcom,10/12/2006, 4.100.15.5) loaded

ACPI: PCI Interrupt 0000:06:00.0[A] -> GSI 18 (level, low) -> IRQ 18

PCI: Setting latency timer of device 0000:06:00.0 to 64

ndiswrapper: using IRQ 18

wlan0: ethernet device 00:1a:73:20:85:cb using NDIS driver: bcmwl5, version: 0x4640f05, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 14E4:4311.5.conf

wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA,
```

when you do a dmesg. If you do, then ndiswrapper is properly installed. 

If any problems arise, please don't hesitate to post back.

Blessed be!

Pappy

----------

## F_

Before trying ndiswrapper, also read this thread: https://forums.gentoo.org/viewtopic-t-694287-highlight-b43.html

----------

## raungst

Thanks a lot for the how-to. I don't have b43 setup, unfortunately. I can modprobe b43 successfully, but from there - nothing. The init script complains that it can't find a driver. I'm assuming its related to the error above. I'll probably poke at it a little bit more, and then just go for ndiswrapper.

----------

## IvanMajhen

```
b43-phy0: Broadcom 4318 WLAN found

phy0: Selected rate control algorithm 'pid'

phy0: Failed to initialize wep

b43: probe of ssb0:0 failed with error -12

Broadcom 43xx driver loaded [ Features: P, Firmware-ID: FW13 ] 
```

This is error from Cryptographic API. 

Be sure that everything is selected as on this link:

https://forums.gentoo.org/viewtopic-p-5111252-highlight-.html#5111252

----------

## raungst

Thanks to everyone for their help. I ended up getting both b43 and ndiswrapper working. The cryptographic API problems were what was causing that error. 

From my experiences with both drivers, the ndiswrapper route provides much better performance and stability. The b43 drivers certainly have come a long way, though.

----------

