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:
# lsusb | grep Link
Bus 005 Device 003: ID 07d1:3c03 D-Link System
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:
# wget http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz
# tar zxvf rt73-cvs-daily.tar.gz
# cd rt73-cvs-*/Module
# make
# make install
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:
# dmesg | tail -n5
usb 5-2: new high speed USB device using ehci_hcd and address 3
usb 5-2: configuration #1 chosen from 1 choice
rtusb init ====>
idVendor = 0x7d1, idProduct = 0x3c03
usbcore: registered new driver rt73
Also with iwconfig, you should see the interface rausb0:
# iwconfig
...
rausb0 RT73 WLAN
Link Quality:0 Signal level:0 Noise level:113
Rx invalid nwid:0 invalid crypt:0 invalid misc:0
...
At this point, you can try the dongle functionality: bring up the interface and scan for available networks:
# ifconfig rausb0 up
# iwlist rausb0 scanning
rausb0 Scan completed :
Cell 01 - Address: 00:00:00:00:00:AA
ESSID:"******"
Mode:Managed
Channel:1
Encryption key:off
Bit Rates:1 Mb/s
Cell 02 - Address: 00:00:00:00:AA:00
ESSID:"********"
Mode:Managed
Channel:6
Encryption key:on
Bit Rates:148 Mb/s
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!
23 Comments
Fabio Varesano · February 22, 2007 at 23:42
Thank you Paolo for this wonderful HOWTO.
It worked perfectly!
Fabio Varesano
pirus · March 17, 2007 at 18:06
Thanks for this entry. You made my day 🙂
-pirus.
keonne · March 25, 2007 at 17:23
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
David Mansfield · April 14, 2007 at 14:17
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.
Kim Guldberg · April 30, 2007 at 21:32
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
Scorpion · May 3, 2007 at 15:57
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?
Chuck Bala (BRAZIL) · June 5, 2007 at 07:35
Hi !!!
Finaly my usb wireless was found.
Thank you !!!!!
Peter McDonald · June 17, 2007 at 17:51
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?
kevin · July 17, 2007 at 15:23
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
Gordon · July 22, 2007 at 18:06
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
Dimas · September 2, 2007 at 07:10
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.
Rob · October 9, 2007 at 09:07
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
piper · January 22, 2008 at 16:13
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 -> rt2x00usb_vendor_request: Error – Vendor Request 0x0c failed for offset 0x0000 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 -> rt2x00usb_vendor_request: Error – Vendor Request 0x0c failed for offset 0x0000 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$
Joe · March 27, 2008 at 19:24
real nice howto – i love it…
Steven Meglitsch · July 10, 2008 at 10:41
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 rt230322700.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.
Paolo · July 11, 2008 at 12:47
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 🙂
Kaj Rasmussen · July 20, 2008 at 09:20
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
Paolo · July 21, 2008 at 16:19
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.
ogrizzly · July 28, 2008 at 17:05
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.
Marco Antônio · February 16, 2009 at 22:06
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
de2 · October 19, 2009 at 16:27
Thanks for the quick and to-the-point tutorial 🙂 works flawlessly (Yes, I needed this for the old ubuntu 7.04)
green69 · January 9, 2010 at 12:54
Hi Paolo! Thank you so much! You solved me a big problem in just 3 minutes! Thanks again.
Linux driver help for newbie · February 18, 2008 at 12:34
[…] 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? […]