Sunday, November 4

Setting up bcm43xx (Dell Wireless 1390)

Internal Wireless Card

Warning: It is a well known bug that binary nVidia drivers (the ones I installed earlier) and ndiswrapper have conflicts. In this case, using both drivers creates an IRQ 177 error that freezes the computer when using the wireless card. Fortunately, kernels over 2.6.20 r3 should resolve this issue because it supports the BCM4311 card natively (Dell Wireless 1390).

Wireless natively

Call me picky, but I wanted to use both my wireless card AND my video drivers at the same time. To do this, I had to upgrade my kernel above 2.6.20 r3 (as stated above, the module is natively supported in kernels above 2.6.20 r3). While the driver may work, the default firmware does not. After upgrading my kernel I could detect wireless signals and turn the interface on and off but I could not connect to any access points ( I have tried using bcm43xx-fwcutter to create firmware from the windows driver). Researching a bit, I found that all I needed was some hacked, working firmware. Thankfully, the blogger at linux-geek came up with some hacked firmware that works pretty good. For the in depth tutorial and troubleshooting, go here:

In short, I downloaded his .deb package with the firmware and copied the firmware into the correct directory (It's not perfect, but it works). Here's how:


> sudo dpkg -i bcm43xx-firmware_1.3-1ubuntu2_all.deb

Now when I installed the package I ran into this error:

Unpacking replacement bcm43xx-firmware …
Setting up bcm43xx-firmware (1.3-1ubuntu2) …
Note that you need to DISABLE ndiswrapper and wifi-radar for this driver
to work properly! You can do this by removing the ndiswrapper driver.
Use `sudo ndiswrapper -l’ to identify the driver.
Then run `sudo ndiswrapper -e ‘ to remove it. You may also need
to remove the file /etc/modprobe.d/ndiswrapper

The error message is prompted because of a scripting error according to the author. The author said it should extract the firmware regardless of the error. To check if I had firmware, do commanded:

>ls -l /lib/firmware

Immediately it spat this out:

> -rw-r--r-- 1 root root 3504 2006-10-28 21:14 bcm43xx_initval01.fw

> -rw-r--r-- 1 root root 16 2006-10-28 21:14 bcm43xx_initval02.fw

> -rw-r--r-- 1 root root 3504 2006-10-28 21:14 bcm43xx_initval03.fw

> -rw-r--r-- 1 root root 16 2006-10-28 21:14 bcm43xx_initval04.fw

> -rw-r--r-- 1 root root 2536 2006-10-28 21:14 bcm43xx_initval05.fw

> -rw-r--r-- 1 root root 248 2006-10-28 21:14 bcm43xx_initval06.fw

> -rw-r--r-- 1 root root 2536 2006-10-28 21:14 bcm43xx_initval07.fw

> -rw-r--r-- 1 root root 2536 2006-10-28 21:14 bcm43xx_initval08.fw

> -rw-r--r-- 1 root root 248 2006-10-28 21:14 bcm43xx_initval09.fw

> -rw-r--r-- 1 root root 248 2006-10-28 21:14 bcm43xx_initval10.fw

> -rw-r--r-- 1 root root 2872 2007-10-18 20:43 bcm43xx_initval17.fw

> -rw-r--r-- 1 root root 248 2007-10-18 20:43 bcm43xx_initval18.fw

> -rw-r--r-- 1 root root 248 2007-10-18 20:43 bcm43xx_initval19.fw

> -rw-r--r-- 1 root root 2816 2007-10-18 20:43 bcm43xx_initval20.fw

> -rw-r--r-- 1 root root 248 2007-10-18 20:43 bcm43xx_initval21.fw

> -rw-r--r-- 1 root root 2824 2007-10-18 20:43 bcm43xx_initval22.fw

> -rw-r--r-- 1 root root 248 2007-10-18 20:43 bcm43xx_initval23.fw

> -rw-r--r-- 1 root root 2824 2007-10-18 20:43 bcm43xx_initval24.fw

> -rw-r--r-- 1 root root 248 2007-10-18 20:43 bcm43xx_initval25.fw

> -rw-r--r-- 1 root root 27360 2007-10-18 20:43 bcm43xx_microcode11.fw

> -rw-r--r-- 1 root root 26432 2007-10-18 20:43 bcm43xx_microcode13.fw

> -rw-r--r-- 1 root root 16200 2006-10-28 21:14 bcm43xx_microcode2.fw

> -rw-r--r-- 1 root root 19952 2006-10-28 21:14 bcm43xx_microcode4.fw

> -rw-r--r-- 1 root root 22496 2006-10-28 21:14 bcm43xx_microcode5.fw

> -rw-r--r-- 1 root root 1312 2006-10-28 21:14 bcm43xx_pcm4.fw

> -rw-r--r-- 1 root root 1312 2006-10-28 21:14 bcm43xx_pcm5.fw

Great. So I had the hacked firmware, but it's in the wrong directory. Now I simply copied it into the correct one. So:

> sudo mkdir /lib/hotplug/firmware

> sudo cp /lib/firmware/*.fw /lib/hotplug/firmware

That's it! Now I rebooted my computer.

Note: You may notice that the wireless is still detected but will not connect. You may need to manually remove then add the bcm43xx module to modprobe for it to connect. To do this:

> sudo rmmod bcm43xx

> sudo modprobe bcm43xx

Now try to connect. If it doesn't work, you may want to take a look back on that website I gave to troubleshoot. If this isn't your idea of fun, you can try the ndiswrapper method. It takes far less effort to setup and it seems to run faster.

Wireless with ndiswrapper

Installing the drivers is relatively painless with ndiswrapper. There is a comprehensive guide to how install ndiswrapper along with how to install the drivers here: Follow all of the steps and the wireless card should be assigned the interface 'wlan0'.


Clarious said...

I'm going to íntall linux on my Vostro 1500, but i'm still worrying about the wi-fi card, will it work properly with linux? I have tried one liveCD distro with kernel that support bcm3xx, well, it womehow work but not properly, i have a hard time connecting to wifi network, it just say there is no AP nearby while there are many. Only if i push the "recheck" button many times then it will show one, but i still can't connect :(

PS: Nice guide

PS2: I'm not a native english speaker, so sorry for my `english`

JayT said...

It sounds like your live cd doesn't have working firmware. I ran into this problem while writing the guide, but I fixed it by using the hacked firmware linux-geek compiled. I am not sure how live cd's mount their file system, but you will need to find the /lib/hotplug/firmware directory and follow the guide to extract the firmware to the correct directory and reload the module.

Honestly, live cd's are going to prevent you from really experiencing Linux. I'm sure you could get the wireless to work on a live cd, but it is going to be far easier to just install Linux and install it like I did. With a live cd you can run into problems with modules not being loaded. Additionally, any installed software or firmware is erased when you reboot.

That's just my rant about live cd's. Any who, thanks for the praise and I hope that helped.

Udi said...

If you install network-manager, than it will pop error messages into the terminal, to visit the linuxwireless page. After following the guide there, my wifi worked well. But WiFi Radar couldn't handle 128bit encrypted ASCII WEP, so I apt-get install dhcpcd, and I connect to my wifi with two commands:
- iwconfig wlan0 essid MyWiFi key s:MyCode
- dhcpcd wlan0
And than it connects well to my wifi, and gets an IP for it. Maybe this will help for others aswell.