Getting the Belkin N600 DB to work on Ubuntu

January 5, 2013

Background (skip if you just want the important stuff)

For about 6 1/2 years I have had the same desktop computer. Its the only computer I've ever needed; I used it all through college and grad school and it has always worked great. Over the years I have upgraded/modified a few components (added more RAM, added a hard drive, removed a graphics card). Until now, I have always used a wired Ethernet connection on my computer. The computer did not come with a wireless adapter (back in 2006, desktops generally didn't). Recently I moved into a new apartment. Generally I have always had my computer right next to my router and cable or DSL modem and the Ethernet connection has been fine. But in my new apartment, the way things are arranged, my only option was to run a long Ethernet cable across the floor of my living room in order to have internet access. Some people probably wouldn't care, and for the most part I'm one of those people; however, I don't like the idea of myself or someone else stepping or tripping on the cable or having the cable get caught and ripped out of my computer or the router. Plus it just looks stupid.

The good news: My awesome friends bought me a USB wireless adapter for Christmas.
The bad news: The adapter didn't work with my Linux installation

Specs

CPU: AMD Athlon 64 X2 5000+
RAM: 6 GB
OS: Ubuntu 10.04 x64 / Ubuntu 12.04 x64 (Details to come)

Wireless Adapter Model: Belkin N600 DB Dual-Band Wi-Fi USB Adapter (F9L1101)
Wireless Adapter Chipset: Broadcom BCM4323
Wireless Adapter Device ID: 050D:615A

These steps also likely work with the following USB Device IDs (although I have only tested the card above):
050D:825C
050D:6050
0846:9011
0846:9020

The Problem

Linux has pretty good driver support these days, so I figured that a modern USB WiFi adapter should just plug and play. That didn't work. I was running Ubuntu 10.04 x64 and the adapter did not simply get picked up and start working. I have heard that Linux and wireless networking is always a challenge, but have never dealt with it until now.

The Research / The Process (skip if you don't care about my struggles)

The first thing I noticed is that the adapter box only lists WinXP SP3, WinVista, and Win7 as supported OSes. Sure enough, the drivers on the CD only include Windows drivers. Next step: Google (of course). When I start researching stuff, I am notorious for opening a billion tabs to solve whatever problem I'm working on. I ended up with 38 open tabs (that's excluding all the ones I opened, read, and closed; those were the semi-useful ones). Based on some information I found, I tried using ndiswrapper in order to use the WinXP drivers supplied on the CD with the adapter. I couldn't get this to work.

After quite a bit of reading about ndiswrapper and other people's issues with it and various network hardware, I found some information that suggested that WiFi drivers had improved quite a bit over the past couple years and that Ubuntu 12.04 may just support the device. I have been considering upgrading my OS for a while now, but have not had a strong reason to. Ubuntu 10.04 has been working well for me for a long time and in-place upgrades are sometimes sketchy. I haven't felt like doing a full-wipe/install/setup/configure, so I have just put it off. This finally gave me a good reason to upgrade. I did a backup of my system, and then went through with the in-place upgrade. I've been running for about 6 days now and didn't have any trouble with the in-place upgrade. It took me a few minutes to get my system configured the way I like it, but nothing broke with the upgrade (at least nothing I've noticed yet).

After the upgrade I tried the wireless adapter again...no luck.

Again I reverted to trying ndiswrapper, as that is what all the information I could find suggested. After fighting with it for several hours, I finally was able to make it work.

The Solution

This information has been pulled from several different sources. I will try to list the various useful resources at the end, but I may forget some of them. This solution is targeted at a 64 bit system running Ubuntu 12.04 LTS x64, a Belkin N600 DB wireless adapter, and a router configured using WPA2 security. This is what worked for me with that setup. If your setup is different, you may have success using these steps or you may not. I am no expert in getting wireless adapters to work on Linux, I was just able to get my setup to work and wanted to share with anyone who may have a similar problem. I hope it works for you too.

Key Information:

  • ndiswrapper is a driver wrapper that only works with Windows XP drivers (do not try to use drivers for Windows Vista/7/8).
  • You must know your system architecture (Various notations: 32 bit vs. 64 bit; x86 vs. x86_64; x86 vs. x64; i386 vs. amd64). This guide is targeted at x64 hardware/OS.
  • The router must be configured for b/g access only; having n enabled does NOT work

Code Color Guide:

My terminal prompt (yours will be different) is dark grey $

commands you enter will appear in green

output from the commands (yours will
likely be different) is in light grey


the important output (again, yours could
be different) is in light grey, bold and
highlighted in yellow


text you put into various files will
be dark blue, but the parts that will
be different
for you on your machine
will appear in red


Steps:

Check your ndiswrapper version:

brian@Brian-Zier:~$ ndiswrapper -v
utils version: '1.9', utils version needed by module: '1.9'
module details:
filename:      /lib/modules/3.2.0-35-generic/misc/ndiswrapper.ko
version:       1.57
vermagic:       3.2.0-35-generic SMP mod_unload modversions

If your version of ndiswrapper is less than 1.57 (1.57 is included in the 12.04 repo), you need to uninstall and build from source.

Uninstall the built-in ndiswrapper and clean up any configuration you previously had:

sudo apt-get remove --purge ndiswrapper-common ndiswrapper-utils-1.9 ndisgtk
sudo rm /lib/modules/$(uname -r)/kernel/ubuntu/ndiswrapper/ndiswrapper.ko
sudo rm /etc/modprobe.d/ndiswrapper.conf
sudo rm -r /etc/ndiswrapper/*

Next, build ndiswrapper from source:

sudo apt-get install linux-headers-$(uname -r) build-essential
wget http://downloads.sourceforge.net/project/ndiswrapper/stable/ndiswrapper-1.57.tar.gz
tar -xvf ndiswrapper-1.57.tar.gz
cd ndiswrapper-1.57
make
sudo make install
sudo depmod -a
sudo update-initramfs -u


Now that you have 1.57 or greater, the drivers should work. The drivers on the CD may work; I tried them, but didn't try all of the steps below. So it is possible that you may be able to use them instead. However, I read that the drivers attached to this page are slightly modified by Broadcom for the chipset and they are what I used to get this working. If you choose to use the drivers included on the CD, be sure to use the XP drivers. The rest of this guide assumes you will use the included Broadcom drivers.

Download the drivers somewhere you can work with them.

Extract the included drivers:

tar -xvf Broadcom_bcm43xx_USB_32_64bit_v2.tar.gz

To prevent conflicting drivers from loading, we need to blacklist several modules in the modprobe configuration. Append the following lines to the end of your /etc/modprobe.d/blacklist.conf file:

blacklist bcm43xx
blacklist b43
blacklist b43legacy
blacklist ssb

The above drivers are the drivers that have been included in recent Linux kernels for Broadcom chips; however, these drivers are intended for PCI cards, not USB adapters and they do not work. Otherwise you should have just been able to plug and play the adapter.

Now you can install the downloaded drivers with ndiswrapper (change directory to the extracted driver folder):

sudo ndiswrapper -i bcmn43xx64.inf

List the ndiswrapper drivers and devices to ensure your device is present

brian@Brian-Zier:~$ ndiswrapper -l
bcmn43xx64 : driver installed
    device (050D:615A) present

Now you can load the driver module:

sudo depmod -a
sudo modprobe ndiswrapper

If all goes well, the wireless adapter should now be enabled. I am using nm-applet to configure the NetworkManager, so this guide will be targeted at getting that setup to work. You should now be able to click on the Network Manager Applet and select your wireless network. However, the problem I ran into here was an issue dealing with the WPA2 security on my wireless network. If I selected my network from the list, it would attempt to connect and prompt for my WPA2 PSK (WiFi password). Even though I entered the appropriate password, after a minute or two, it would re-prompt for the key again. Now you need to use a tool called wpa_supplicant. This will configure your wireless adapter for WPA2 authentication.

First, install wpa_supplicant (if its not already installed):

sudo apt-get install wpasupplicant

Now you need to configure wpa_supplicant by editing the /etc/wpa_supplicant.conf file. Add the following:

network={
        ssid="YOUR_NETWORK_ESSID"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk="YOUR_NETWORK_PASSWORD"
}

If you prefer not to store your WiFi password in plain-text, you can use the wpa_passphrase tool to generate the hexadecimal representation of your PSK:

brian@Brian-Zier:~$ wpa_passphrase <ssid> [passphrase]
network={
    ssid="ssid"
    #psk="[passphrase]"
    psk=1528658d87cade7673e953b73accc900ba3aae659b8ed28ddba770d3db405acc
}

You can then copy the generated PSK code to your /etc/wpa_supplicant.conf file instead of using the plain-text (Note: there are now no quotes around the PSK value):

network={
        ssid="YOUR_NETWORK_ESSID"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk=HEX_REPRESENTATION_OF_YOUR_NETWORK_PASSWORD
}

Now you can attempt to connect using this command (be sure to replace wlan0 with the interface name of your adapter):

sudo wpa_supplicant -iwlan0 -Dwext -c/etc/wpa_supplicant.conf -B

The next step is to get an IP address from the router (if using DHCP; again replace wlan0 with your interface):

sudo dhclient wlan0

At this point, everything should be working... if not, make sure you didn't miss any steps. If you're sure you didn't miss any steps, its possible that I forgot something in my write-up. I'm doing this from memory and from the various pages that helped me through it over the course of a few days. I tried lots of stuff, so I could have easily missed something.

If everything IS working, the last step is to configure things so that the proper module/driver/settings are loaded on boot, so you don't have to go through many of these steps every time you reboot your machine.

As long as I'm not forgetting anything, all you need to do is write a configuration for ndiswrapper and edit your /etc/modules file to include ndiswrapper. First, execute the following in order to generate the ndiswrapper configuration:

ndiwrapper -m

Then simply append this to the bottom of your /etc/modules file:

ndiswrapper

Now, just reboot your machine and test it out. If I can figure out how to enable comments for everyone on this page, let me know if you were able to get it working or not (and where you got stuck if you did, I may have left something out and your comment may remind me).

Resources:

Below are links to the various pages that helped me get my adapter working and helped me write this guide. If you get stuck along the way, these pages may be able to help you too:

In no particular order:

https://bbs.archlinux.org/viewtopic.php?id=127710

http://ubuntuforums.org/showthread.php?t=1139037

http://www.cyberciti.biz/faq/linux-ndiswrapper-wpa_supplicant-howto/

https://help.ubuntu.com/community/WifiDocs/WPAHowTo (This one is really old)

https://help.ubuntu.com/community/WifiDocs/Driver/Ndiswrapper

http://ubuntuforums.org/showpost.php?p=11612708

http://ubuntuforums.org/showpost.php?p=11811107&postcount=79

http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php?title=Main_Page

http://sourceforge.net/apps/mediawiki/ndiswrapper/index.php?title=Belkin_F9L1101v1

http://ubuntuforums.org/showthread.php?t=2023035

http://memoryallocation.blogspot.com/2012/08/how-to-use-belkin-n450n600-db-usb-wi-fi.html

http://ubuntuforums.org/showthread.php?p=11915309


I may have left out some of the good ones and included some of the less-than-good ones, but hopefully between the information I have on this page and the information on those pages I did link to, you can get your adapter working too.


Comments


Comments




ċ
Broadcom_bcm43xx_USB_32_64bit_v2.tar.gz
(865k)
Brian Zier,
Jan 6, 2013, 11:48 AM