DWL-G122 how to

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=4728

soulnafein

12-04-2008 22:14:02

Hello everyone, I hope this is the correct forum.
I used for a couple on months the rt73 legacy driver to make my D-LINK USB STICK DWL-G122 H/W ver.c1 F/W ver. 3 work.

It's all right but I wonder if there is another way to make it work... a way that doesn't need to recompile drivers any time I change kernel.

Thanks.

IvD

13-04-2008 10:18:40

The module is compiled against the kernel sources.
So that always means you need to recompile the driver against a new kernel to make it work.
Another option is to use rt2x00 which is provided in the kernel tree so it will automatically be compiled and installed when you update your kernel.

soulnafein

13-04-2008 14:11:35

How can I use the rt2x00 driver?

IvD

13-04-2008 15:32:18

Read manual pages for ifconfig about bringing up a interface, manual page for iwconfig for configuring wireless interfaces, or the manual page for wpa_supplicant if you want automated scripts. Using NetworkManager is also an option.

soulnafein

13-04-2008 17:47:40

I use already a bash script created to connect to internet. I created it following the instructions contained in the rt73 legacy driver's readme file.
The same script doesn't work with a fresh installation of the operating system. It works only after I blacklisted the rt2x00 drivers and compiled the legacy drivers.
This is the script I use.

#!/bin/sh
sudo /sbin/dhclient -r
sudo /sbin/ifconfig wlan0 up
sudo /sbin/iwconfig wlan0 mode managed
sudo /sbin/iwconfig wlan0 essid GoAway
sudo /sbin/iwpriv wlan0 set AuthMode=WPAPSK
sudo /sbin/iwpriv wlan0 set WPAPSK=*************
sudo /sbin/iwpriv wlan0 set EncrypType=TKIP
sudo /sbin/dhclient wlan0

IvD

13-04-2008 18:15:14

As you would undoubtly have found out by looking into the rt2x00 howtos on the website and on this forum The iwpriv commands don't work for rt2x00.

I have already pointed you to the tools you should be using...

soulnafein

13-04-2008 18:29:52

Sorry mate ) I'm a linux newbie.

soulnafein

13-04-2008 20:24:30

I played a bit with the tools above.
I removed from the blacklist the following modules

rt2x00usb
rt2x00lib
rt73usb

and I added

rt73

I loaded this modules using modprobe.
Then I create a configuration file for wpa_supplicant and I created a script like this

sudo ifconfig wlan0 up
sudo iwconfig wlan0 mode managed
sudo iwconfig wlan0 essid GoAway
sudo wpa_supplicant -Bw -Dwext -i wlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
sudo dhclient wlan0

It worked!
But... after rebooting it stopped working and when I execute sudo ifconfig wlan0 up, ifconfig says that there is wmaster0 and wlan0

What have I done? Am I close to the solution?

IvD

13-04-2008 20:29:13

You should use your distro bootscript tools to have the networking started during boot time. That all depends on your distro on how that should be done, so I can't say that much about it.

soulnafein

13-04-2008 20:39:49

Sorry, I wasn't talking about starting networking automatically. I said that after rebooting, I did exactly what I did before (executing commands one bye one) and it didn't worked. Is there something that I can check to be sure that all is loaded?