D-LINK DWL G122 and Linux
Today everything is wireless (recently I was also in trouble getting a consumer ethernet HUB - I can easily found only access point…). So, to fill the gap
a quite inexpensive USB key can put a little of “wireless” into our “old” computers.
The D-Link DWL G122 is a compact USB key, cheap and 802.11b/g compliant. BUT, also with the last 2.6 kernel (tested with PCLinuxOS and Ubuntu) is not recognized. You can try using ndiswrapper but I have found a better solution: native drivers under Linux (easy to get working, too!). I’m writing this simple how-to because I have found many docs about installing this dongle under Linux, but many proposed solutions are just not working (at least with my dongle).
So, before following these instructions, make sure to have my same USB key. I own a D-Link DWL G122 H/W Ver C1 F/W Ver 3.00. To make the check you can also plug the key into your Linux system, then run from a terminal:
The same key will have the same ID (07d1:3c03). If you have the same dongle, remove it from the USB port, then go to the drivers site. Download the rt73 branch (I have used the CVS package).
From a terminal, with the root user:
Now, if no errors, you can try to plug your USB key into the computer. If you run this command, you should see somthing like this:
Also with iwconfig, you should see the interface rausb0:
At this point, you can try the dongle functionality: bring up the interface and scan for available networks:
If you can see something like this, your dongle USB is working fine and you can easily use your preferred GUI to join your wireless network.Ciao!


February 22nd, 2007 at 11:42 pm
Thank you Paolo for this wonderful HOWTO.
It worked perfectly!
Fabio Varesano
March 17th, 2007 at 6:06 pm
Thanks for this entry. You made my day
-pirus.
March 25th, 2007 at 5:23 pm
Thank you for a fantastic tutorial
just a quick question…
when i do
iwlist rausb0 scanning
evertything comes out like you said it should except the Bit Rates which remains at 0 kb/s
I’ve tried resetting the router and modem but no luck
Any ideas?
Keonne
April 14th, 2007 at 2:17 pm
Great step by step. Have been struggling to find the right way to install these drivers and this is the best description I have seen. Thank you.
April 30th, 2007 at 9:32 pm
Hi Paolo
I am trying to get my DWL-G122 to work under Backtrack Linux running as a virtual machine under VMWare. I am using your HOWTO and hope it will run smoothly. I might get back to you if I run into problems and if I don’t I’ll certainly be back with a thumbs up
Regards
May 3rd, 2007 at 3:57 pm
Hi
finaly my usb wireless was found thanx very much, but i have a problem
when i make ifconfig rausb0 up. Error is: SIOCSIFFLAGS: input/output error.
Someone can help me?
June 5th, 2007 at 7:35 am
Hi !!!
Finaly my usb wireless was found.
Thank you !!!!!
June 17th, 2007 at 5:51 pm
when i try the dmesg | tail -n5 line I get the following output:-
usb 3-5: configuration #1 chosen from 1 choice
rtusb init ====>
usbcore: registered new interface driver rt73
wmaster0: Selected rate control algorithm ’simple’
ADDRCONF(NETDEV_UP): wlan0: link is not ready
if I simply do dmesg I get (sample only that seems to relate):-
usb 3-5: USB disconnect, address 2
usb 3-5: new high speed USB device using ehci_hcd and address 3
usb 3-5: configuration #1 chosen from 1 choice
rtusb init ====>
usbcore: registered new interface driver rt73
wmaster0: Selected rate control algorithm ’simple’
ADDRCONF(NETDEV_UP): wlan0: link is not ready
with iwconfig i get:-
lo no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:”"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
any idea what might be wrong?
July 17th, 2007 at 3:23 pm
Hi
i the same D link wireless adapter, and i am not able to to detect when i install the proper drivers for it. By mistake i installed a diffrent driver and it detected the card but i was not able to configure that .
could anyone help me on that .
one more thing how can one upgrade a kernal
thanks for the help in advance
July 22nd, 2007 at 6:06 pm
Hi, I got mine working with FC6 using the instructions that came with the driver which are obviously similar to yours. there are some interesting extra commands you list which is great thanks. would you have any idea why i get to about 80meg of downloaded ’stuff’, then device stops working. when i look at ifconfig, all my packets are lost!! cheers. there are lots of cofig values in the .dat file that i haven’t got a clue what to use. i guess most should be default, but it doesn’t say very intuitively (for me anyway).
nice blog,
Gordon
September 2nd, 2007 at 7:10 am
Thank you, your how-to helps me with my DWL-G122. I did not exactly followed it step by step. Instead i am using README’s steps. But yours show me the start.
October 9th, 2007 at 9:07 am
Ok so when I found this site I was SO happy it seemed the solution to my problem. I followed the steps exactly but for some reason the laptop freezes/hangs after the ifconfig rausb0 up. Please note that i am a COMPLETE noob at linux and so I’m using pclinuxos 2007.
Is the system meant to be connected to the ethernet cable the whole time? or do u unplug it after the wget, or does it matter??
I’ve tried this time and time again and sometimes when using iwconfig… rausb0 doesnt even appear. I’ve tried typing modprobe rt73 (found on another thread) after make install and before plugging in the dongle but it doesnt seem to do anything.
Please advise if u possibly can. cheers
rob
January 22nd, 2008 at 4:13 pm
this did not work for me im using ubuntu distro - i bought the g122 c1 because it has a linux compatability tag on the box - however each and every distri i try this with fails, the only way i can establish a secure and stable wireless link is through a live cd - not a good solution to a recuring problem, can anyone suggest a fix ? here is the output i get after running this fix on this page - what am i doing wrong ?
pete@pete-desktop:~/rt73-cvs-2008012207/Module$ dmesg | tail -n5
[ 7466.716000] phy1 -> rt2×00usb_vendor_request: Error - Vendor Request 0×0c failed for offset 0×0000 with error -19.
[ 7579.956000] usb 5-3: new high speed USB device using ehci_hcd and address 4
[ 7580.224000] usb 5-3: configuration #1 chosen from 1 choice
[ 7580.488000] wmaster0: Selected rate control algorithm ’simple’
[ 7583.092000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
pete@pete-desktop:~/rt73-cvs-2008012207/Module$ lsusb | grep Link
Bus 005 Device 004: ID 07d1:3c03 D-Link System
pete@pete-desktop:~/rt73-cvs-2008012207/Module$ iwlist scan
lo Interface doesn’t support scanning.
eth0 Interface doesn’t support scanning.
wmaster0 Interface doesn’t support scanning.
wlan0 No scan results
pete@pete-desktop:~/rt73-cvs-2008012207/Module$ dmesg | tail -n5
[ 7466.716000] phy1 -> rt2×00usb_vendor_request: Error - Vendor Request 0×0c failed for offset 0×0000 with error -19.
[ 7579.956000] usb 5-3: new high speed USB device using ehci_hcd and address 4
[ 7580.224000] usb 5-3: configuration #1 chosen from 1 choice
[ 7580.488000] wmaster0: Selected rate control algorithm ’simple’
[ 7583.092000] ADDRCONF(NETDEV_UP): wlan0: link is not ready
pete@pete-desktop:~/rt73-cvs-2008012207/Module$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:”"
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
pete@pete-desktop:~/rt73-cvs-2008012207/Module$
February 18th, 2008 at 12:34 pm
[…] I found someone’s guide to installing this same device at http://www.atlink.it/~conti/articles/d-link-dwl-g122-and-linux/ and I have given it a go. I get the drivers unzipped, but when I try the ‘make’ command, it comes back to me with an Error 1 saying “No rule to make target ‘modules’. Stop.” It then fails to build. I notice that the guide says tested with PCLinuxOS and Ubuntu - do my problems stem from differences between them and Suse? […]
March 27th, 2008 at 7:24 pm
real nice howto - i love it…
July 10th, 2008 at 10:41 am
Thank the wireless gods for your little guide! After windows and my broadcom wifi card died on my old Dell ispiron 630m I installed Ubuntu 2.6 but have had a lot of trouble getting a wireless connection to work. I chose the DWL G122 dongle simply because it was cheap and said on the box that it supported LINUX. After three days of frustration, I contacted the D-link support and they said: “we do not have linux drivers to dwl-122 product” so I tried a number of other approaches to installing my dwl g122 c1 3.10 and they just didn’t work..
It’s been 20 years since I worked from a UNIX terminal, so I was skeptical at first to trying your recipe. But I did and it worked.
One hitch was thet the
# wget http://rt2×00.serialmonkey.com/rt73-cvs-daily.tar.gz
line came back with the message:
Resolving rt2\303\22700.serialmonkey.com… feilet: Name or service not known.
But this was easily solved by going there and downloading it manually.
BASH gave me a mild warning that the Module file was much too big when I used the
# make
command, but worked fine anyway and the
# make install
line went off without a hitch)
However, yesterday when I turned off the machine and went to bed, It had not yet worked, and I thought grumpily … “just another damned blind alley..”
This morning, I turned on the machine and … zing … the dongle was working perfectly.
Thanks for the help, Paolo.
July 11th, 2008 at 12:47 pm
You are welcome Steven!
It’s nice to be useful to someone, ehehehhe!
When I will have more time, I’ll update this guide with more recent links/stuff, I promise
July 20th, 2008 at 9:20 am
Hi Paolo.
Thank you for a fine guide. Unfortunately I ran into the problem, that I can’t compile the driver. As you can see, it looks for a directory named build, but there no such directory.
root@mepis1:/home/kaj/rt73-cvs-2008072001/Module# make
make[1]: Entering directory `/lib/modules/2.6.22-1-mepis-smp/build’
make[1]: *** No rule to make target `modules’. Stop.
make[1]: Leaving directory `/lib/modules/2.6.22-1-mepis-smp/build’
rt73.ko failed to build!
make: *** [module] Error 1
root@mepis1:/home/kaj/rt73-cvs-2008072001/Module#
I then tried to create an empty directory /lib/modules//build, but then it complain about missing instructions and stops. I then tried to delete the /build in the makefile, but again it complains about missing instructions.
Do you have any idea to what I can do to compile the driver and finish the installation?
Kaj Rasmussen
Denmark
July 21st, 2008 at 4:19 pm
Hi Kaj,
I’m not familiar with Mepis Linux (I presume you are using Mepis from your hostname…) but your problem may be the missing kernel sources package…
Check on the Mepis forum (or where you get help with Mepis) how to install the kernel sources before trying to build the driver.
I hope this will help
Bye.
July 28th, 2008 at 5:05 pm
to:Kaj Rasmussen
1)you should have linux-headers for your kernel installed
2)a symbolic link should be in /lib/modules/2.6.x/ to linux-headers made
then all should work ok.
February 16th, 2009 at 10:06 pm
I get the following error messages after the make command:
root@user-desktop:~/rt73-cvs-2009021614/Module# make
/usr/src/linux-headers-2.6.24-19-generic/scripts/gcc-version.sh: line 22: gcc-4.1: comando não encontrado
/usr/src/linux-headers-2.6.24-19-generic/scripts/gcc-version.sh: line 23: gcc-4.1: comando não encontrado
make[1]: gcc-4.1: Comando não encontrado
make[1]: Entrando no diretório `/usr/src/linux-headers-2.6.24-19-generic’
WARNING: Symbol version dump /usr/src/linux-headers-2.6.24-19-generic/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/user/rt73-cvs-2009021614/Module/rtmp_main.o
/bin/sh: gcc-4.1: not found
make[2]: ** [/home/user/rt73-cvs-2009021614/Module/rtmp_main.o] Erro 127
make[1]: ** [_module_/home/user/rt73-cvs-2009021614/Module] Erro 2
make[1]: Saindo do diretório `/usr/src/linux-headers-2.6.24-19-generic’
rt73.ko failed to build!
make: ** [module] Erro 1
I’m using Ubuntu 8.04, the d-link is the c1 3.00 version (confirmed via lsusb). I’ve also upgraded to the latest gcc and all.
It seems to not to go with my gcc-version.sh. I don’t really know what to make of it.
Thanks for the attention
October 19th, 2009 at 4:27 pm
Thanks for the quick and to-the-point tutorial
works flawlessly (Yes, I needed this for the old ubuntu 7.04)
January 9th, 2010 at 12:54 pm
Hi Paolo! Thank you so much! You solved me a big problem in just 3 minutes! Thanks again.