All my geeky stuff ends up here. Mostly Unix-related

Junior working with WPA

leave a comment »

Junior is now working with WPA-based wireless. Hoping it might be useful to somebody else, this here retraces the steps I had to take to make it work.

There are basically two ways you can control the VT6655-based card provided with Norhtec Microclient Jr: through a native Linux driver, or through an encapsulation of Windows drivers achieved by a piece of software called ndiswrapper.

Browsing the VIA web site for drivers only provided a native driver for other versions of the kernel (mostly Fedora). Since the kernel API has changed in between, there is no way to make these work on a Debian Etch kernel (2.6.18-4-486). Going beyond that means pressuring VIA into either releasing the driver sources or releasing a binary version for this very kernel, an effort which would have to be repeated every time the kernel is upgraded to a non-compatible version (i.e. every new release). Forget it.

The other way proved to be the right one.

Through trial and failure, I found out that the default ndiswrapper version available on Debian corresponds to version 1.28, which is kind of late considering the latest version is 1.47. Many bugs corrections have happened in between and some of them are actually related to the VT6655 chip, so you definitely want to install it from the sources. As a side note, the Debian version is anyway only released through sources, you have to follow a non-obvious procedure to install it. A search on your favorite Search Engine for “debian install ndiswrapper” should yield results.

To install from sources: get the tar file from sourceforge. Untar it, cd into the directory you just decompressed and type make to build it. Change user to root and make install should install it all.

Now you have a kernel module that can encapsulate Windows drivers, but you still need to get the drivers. I cannot unfortunately host binary files on this site but you should be able to find them on Norhtec’s web site:

(URL soon published here)

Get the file, unzip it somewhere and cd into the directory. Now ask ndiswrapper to wrap it up with:

ndiswrapper -i VNWL.inf

Once the driver is available, type ndiswrapper -l to check it is actually there:

# ndiswrapper -l
vnwl : driver installed device (1106:3253) present

Now you can load the module into the kernel. Still as root:

# modprobe ndiswrapper

A quick look at kernel logs with dmesg should tell you about the driver being correctly loaded:

ndiswrapper version 1.47 loaded (smp=no)
ndiswrapper: driver vnwl (VNT,01/18/2005, loaded
ndiswrapper: using IRQ 5wlan0: ethernet device xx:xx:xx:xx:xx:xx using NDIS driver:vnwl,
version: 0x1001e, NDIS version: 0x500, vendor:'VIA Networking Solomon Wireless LAN Adapter',
1106:3253.5.confwlan0: encryption modes supported: WEP; TKIPwith WPA, WPA2, WPA2PSK;

Now you have a working wireless device in your box. You need to declare a new section in the /etc/network/interfaces file. First something like:

auto wlan0
iface wlan0 inet dhcp

Comment out the first line (auto wlan0) if you do not want the wireless interface to be brought up when you boot.

Now you can bring it up and scan wireless networks with:

# ifconfig wlan0 up
# iwlist wlan0 scanning

At that point you should be able to connect to your wireless network if it is unencrypted. Do not forget to put the correct settings on your access point for MAC address filtering if you use some, and temporarily deactivate encryption.

Now you want WPA, which is provided on Linux through wpa_supplicant. I juggled with a number of versions and compiling the beast from the sources is definitely not the easiest thing I have tried. Good news: the default Etch version works just fine (0.5.5-2). Install it:

# apt-get install wpasupplicant

An excellent point for the Debian package maintainer: wpa_supplicant has been integrated with the network scripts so that it can be controlled from the /etc/network/interfaces file. This is what my file looks like:

iface wlan0 inet dhcp
wpa-ssid MyAccessPoint
wpa-driver wext
wpa-psk 01234567890abcdef...
wpa-key-mgmt WPA-PSK
wpa-group TKIP

Several points:
– Replace MyAccessPoint by your access point’s name
IMPORTANT: specify wext for the driver to be used, not ndiswrapper.
– Replace the key by yours
– I used the most basic WPA settings here. Compare to the settings on your access point.
– You can also use anonymous access points, but I am not sure how they would be declared in this file.
– These settings are for a DHCP server. For static addresses, see the documentation.

All these options and more are described here:

That should be all. If your interface is still up, bring it down (ifconfig wlan0 down) and up again:

ifup wlan0

You should see some messages about the DHCP request and finally a success message showing the address you got.

I cannot thank enough the Norhtec guys for their incredible support in my search of the working driver. Junior has just gone one step beyond in terms of capabilities!

Written by nicolas314

Monday 25 June 2007 at 11:28 pm

Posted in junior

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: