D-link DWL-G122 with WPA under Linux

The D-Link DWL-G122 USB 802.11g (revision B1) wifi adaptor works great for open or WEP encrypted networks and is supported by Ubuntu out of the box. Unfortunately, the open source driver doesn't support WPA2 (and only supports WPA via non-standard iwpriv settings, and even then, the support is flaky).

I was able to get it to connect to a WPA network once, following Jermey's instructions. But the network connection was not reliable (as in, I never got it to connect again).

To make it work with the standard wpa_supplicant package, I had to break down and use ndiswrapper to wrap the windows XP drivers. (I also had to blacklist the default rt2570 kernel module). Hopefully the Open Source rt2x00 kernel module will start to support this device (and others based on this chipset) in the future for WPA/WPA2 security.

Even after I used the ndiswrapper, it would only connect to a WPA Personal / TKIP access point. (I could not get it to work with the AES or AES+TKIP settings on WPA or to work with WPA2 at all.)

To make the ubuntu system auto-load wpa_supplicant on boot, I had to make changes to my /etc/network/interfaces file as follows:

 iface rausb0 inet dhcp
        pre-up  modprobe ndiswrapper
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

(Note that the network interfaces are apparently started before the modules listed in /etc/modules modules are modprobed hence the use of a pre-up script to load the nidswrapper module.)

One thought on “D-link DWL-G122 with WPA under Linux

Leave a Reply

Your email address will not be published. Required fields are marked *