Sunday, December 14, 2008

Dell Wireless and Ubuntu Hardy Heron


I have a Dell Inspiron 1520 with the Dell Wireless 1390 WLAN Mini-Card, one that has given many Linux users big headaches.

After trying many different approaches suggested all over the web, and gathering clues in many Ubuntu forum posts, I finally worked out this solution:

First of all you must check if you have the correct card:

lspci -nn | grep 14e4

Result: 05:00.0 Network controller [0280]: Broadcom Corporation BCM94311MCG wlan mini-PCI [14e4:4311 (rev 01)]

Then proceed to the first step:

1. blacklist bcm43xx

echo blacklist bcm43xx | sudo tee -a /etc/modprobe.d/blacklist

2. install ndiswrapper and related files

sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 ndisgtk

3. download http://ftp.us.dell.com/network/R174291.exe

this is a ridiculous bit of bloat, but the most complete INF for 43xx devices

4. Unzip the drivers.

5. go into folder DRIVER_US inside the result of what you did above

6. use ndiswrapper to install bcmwl5.inf

System -> Administration -> Windows Wireless Drivers -> Install New Driver -> Select bcmwl5.inf from ~/R151517/DRIVER_US

7. Modify rc.local

gksudo gedit /etc/rc.local

Insert these lines ABOVE “exit 0″ line:

modprobe -r b44
modprobe -r ssb
modprobe -r ndiswrapper
modprobe ndiswrapper
modprobe ssb
modprobe b44

8. Restart or simply paste one by one the following lines:

$ sudo rmmod b44
$ sudo rmmod ssb
$ sudo rmmod ndiswrapper
$ sudo modprobe ndiswrapper
$ sudo modprobe ssb
$ sudo modprobe b44

You should see the WiFi led on and you are good to go.

Easy switching network settings (home & office)

You can easily switch your network settings using the netsh command, instead of installing a lot of unnecessary software. Here are two examples, one for dhcp settings, and one for a static address. You can put it into a .bat file:

netsh interface ip set address "Net" source=dhcp
netsh interface ip set address "Net" static 192.168.0.xx 255.255.255.0 192.168.0.1 1

192.168.0.xx is your ip address, followed by the netmask and gateway. The last 1 is the metric. Optionally you can adjust your DNS values as well using set DNS instead of set address. This command helped me switching easily between my home network settings using dhcp and my office where there is a static address.

SSH login without password

If you want to make a bakup script like the one I showed you yesterday, you may need to set your machines to login remotely without asking for a password everytime. This is done by sharing between them the public rsa keys generated by the openssh server.

Login as the user you will use for the transfer script and run:

ssh-keygen -t rsa

Answer the questions but do not enter a password because otherwise you will still need to to pass it when the script runs. You should then have two new files in ~/.ssh, id_rsa and id_rsa.pub. Open id_rsa.pub with your favorite editor and copy everything (there is only one line actually) into the ~/.ssh/authorized_keys on the second machine (the one in which you need to copy).

Now try to login and if everything was set properly it won’t ask you for a a password anymore.

Your Ad Here