PDA

View Full Version : D-link DWL-G122 USB wireless -- it works!



Jacky
08-03-2006, 08:00 AM
Dear friends, I am going to touch on the 2 taboo areas in this forum: usb and wireless. But don't worry, I am here to report good news: the Dlink DWL-G122 version B1 usb wireless adapter can be made to work at 802.11g with full 128 bit WEP encryption. Harry asked us to report results of success, so here's the steps I took to make it work.

Some background. The D-link G122 Ver B1 uses the Ralink RT2570 chipset. Source for the Linux drivers are available from the Ralink website. But, even better, there is a whole Linux project devoted to developing and updating drivers for the RT2x00 series of chipsets (rt2x00.serialmonkey.com). This linux project has frequent updates of their sources and the source I needed is also available as a deb at Debian packages as RT2570-source. There's also a nifty website listing wireless devices, what chipsets they use, and what linux drivers are available here: http://linux-wless.passys.nl/

What does NOT work. Knoppix comes with a module RT2500usb.ko. This is what it tries to load when the G122 is inserted, but this module is faulty. If you boot with the wireless device attached, you get the endless spinning green autoconfig bar and the boot hangs. If you insert the G122 device after boot up, any action to access the device eg with lsusb or ifconfig up etc will hang. At other times you may see a modprobe process consuming 95% of the CPU.

How I made it work

First, with the device unattached:

1) Get kernel source. Vanilla kernel sources downloaded from kernel.org do not work - leads to a compiled module with invalid format. Fortunately my 5.0.1 DVD arrived, and it contains kernel sources!
2) Get and install module-assistant. This is already on the DVD but not on the CD.
3) Get and install rt2570-source from Debian packages. I chose to use the source from the Linux rt2x00 project rather than the ones from the manufacturer Ralink because they were more up to date.
4) Used module-assistant to prepare, build and then install rt2570-source.
5) Checked to see that there was rt2570.ko in /lib/modules/2.6.17/kernel/drivers/net/wireless. Also modules.dep and modules.alias had been updated.
6) modprobe rt2570. lsmod to check it had been loaded.

Now,

7) insert device
8.) ifconfig -a shows it is detected, in my case, as eth2
9) ifconfig eth2 up, to bring the device up
10) Use Knoppix Wavelan configuration to insert wifi paramenters like SSID and encryption key.
11) Use Knoppix Network card configuration, select eth2 and get a DHCP IP from my access point.
12) That was it! I am writing to you now through the wireless device.

The module and settings can be made persistent later -- but that shouldn't be too difficult. Ok, now I am going to disconnect because I don't normally use wireless.

Moral of the story: some of the modules/drivers supplied with Knoppix for devices may not work, but the beauty of Linux is that somewhere someone may be working on a better driver.

Ah, life is good. If it could be done, I would send you guys a drink on the internet.