RaLink Wireless card mini how-to

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

RaLink Wireless card mini how-to

Postby Raqua » Wed Oct 03, 2007 22:08

I recently bought Edimax Ew-7318USg usb wireless network card. I searched internet before to check if it will work with Linux systems. It is rt73 chipset based and this should be supported.
I tried to use it with Sabayon 3.3 installed version and it did not worked. I tried it on 3.3 live and it worked and on 3.4 live where it did not worked.
Finally I managed to make it work. There seems to be a fair share of users which have troubles setting their RaLink based wireless so I decided to write a mini how-to. I hope it helps someone.

This one is for rt73 chipset based device, but I suppose it might work also for rt2400, rt2500, rt2570 and rt61 chipsets. Try it and let me know here please.
I did it like 2 months ago, so I do not remember all the steps I did exactly, please someone correct me when I am wrong.

First of all I compilled a new kernel. 2.6.22 to be exact. I am not sure if this is really nescessary step, but I planned to do it before so this was a good reason to finally do it. I checked all that seemed to have to do something with my wireless card or wireless network in general and unchecked all the other cards support. You might try to do it without compiling new kernel first.

I unloaded all the wireless drivers modules from kernel using rmmod. I don't remember exactly but I might even deleted the driver files (rt73.ko and the other wireles cards related *.ko) from kernel directories. Be carefull with this and backup or just rename the files!
There is a file where you can edit a list of these modules, but I can't find it or remeber it's name so hopefully someone will add it here later.

Afte I did all of this I tried to emerge the latest rt73 driver.

Code: Select all
>>> Emerging (1 of 1) net-wireless/rt73-1.0.3.6-r1 to /
>>> Downloading 'http://distfiles.gentoo.org/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
--21:25:35--  http://distfiles.gentoo.org/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz
           => `/usr/portage/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
Resolving distfiles.gentoo.org... 216.165.129.135, 156.56.247.195, 64.50.238.52, ...
Connecting to distfiles.gentoo.org|216.165.129.135|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
21:25:35 ERROR 404: Not Found.

>>> Downloading 'http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
--21:25:35--  http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz
           => `/usr/portage/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
Resolving distro.ibiblio.org... 152.46.7.109
Connecting to distro.ibiblio.org|152.46.7.109|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
21:25:37 ERROR 404: Not Found.

>>> Downloading 'http://www.ralinktech.com/ralink/data/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
--21:25:37--  http://www.ralinktech.com/ralink/data/RT73_Linux_STA_Drv1.0.3.6.tar.gz
           => `/usr/portage/distfiles/RT73_Linux_STA_Drv1.0.3.6.tar.gz'
Resolving www.ralinktech.com... 65.36.233.111
Connecting to www.ralinktech.com|65.36.233.111|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
21:25:38 ERROR 404: Not Found.

!!! Couldn't download 'RT73_Linux_STA_Drv1.0.3.6.tar.gz'. Aborting.
 * Fetch failed for 'net-wireless/rt73-1.0.3.6-r1'

 * Messages for package net-wireless/rt73-1.0.3.6-r1:

 * Fetch failed for 'net-wireless/rt73-1.0.3.6-r1'



It is not working, because portage tries to pull 1.0.3.6-r1 version of drivers, but they changed it recently to 1.0.4.0 version so the correct file is not found. I filled a bug on Sabayon bugzilla, so hopefully they will fix it sometimes.

I downloaded the newer driver from RaLing web then [ http://www.ralinktech.com/ralink/Home/S ... Linux.html ] and tried to compile it manually. There is easy step by step guide how to compile the driver so no problems there, but it did not seemed to work properly. For some reason Sabayon thought it is a wired network adapter. I could use it, but in KNetworkManager it showed among wired networks, so I could not search for networks etc. But I could switch to it and use it, it worked. It was also impossible to set WPA encryption as system does not know this thing on wired networks.

I searched more and come to http://rt2x00.serialmonkey.com where I downloaded latest cvs build of the drivers.
[ http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz ].
Installed them according to text guide in the packed file and I had correct module working.

I turned off all security stuff on my router to get this thing going first and then adding the security later.

Now when rt73 module is loaded ifconfig should show some wlan0. if not, type
Code: Select all
ifconfig wlan0 up

and check again.

To check for available networks type
Code: Select all
iwlist wlan0 scan

I do not know why, but even if you do not want to see available networks you need to do this command otherwise it will not work.

In my case, 3 wireless networks were found - mine was unsecure and 2 secured networks.

After typing
Code: Select all
dhclient wlan0

I got response from my router and I was connected.

So to make you connected to the nearest not secured network you need to do this:
Code: Select all
ifconfig wlan0 up
iwlist wlan0 scan
dhclient wlan0


I could not try this with more networks as I do not own a notebook and there is no unsecured network around here.

This solution did not worked with KNetworkManager so I removed it and removed also NetworkManager from rc scripts. I could see KNetworkManager being connected to my network and it showed the other networks but I could not switch using it (between wired and wireless) and it did not showed signal strength at all.
I emerged KWifiManager which is able to show signal strength, but I am unable try if it can be used to switch networks. Someone try it please and let me know. I will add it here.

After a bit more searching I come up with a little script which checks if my USB wireless card is connected. If it finds wireless, wlan0 connects to the wireless network and it sets up security stuff, otherwise it connects using my wired interface eth0.

Here it is:
Code: Select all
#!/bin/bash
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
#     Ralink rt73 wifi startup script for Sabayon Linux
#

# Author:
#       Martin Dratva <raquacontact at gmail dot com>
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY. YOU USE AT YOUR OWN RISK. THE AUTHOR
# WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY
# OTHER  KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.
# See the GNU General Public License for more details.

echo ""
echo " * Starting RaLink Wifi ..."
ifconfig wlan0 up

essid_local="my network essid comes here"     # set this !!!!

wlan0present=`ifconfig | grep wlan0 | wc -l`
eth0present=`ifconfig | grep eth0 | wc -l`

if [[ $wlan0present>0 ]]; then
        echo '          wlan0 found ... '

        if [[ $eth0present>0 ]]; then
                echo '          stopping eth0 ...'
                /etc/init.d/net.eth0 stop
        fi

        echo '          starting wlan0 ... '

        iwlist wlan0 scanning
        iwconfig wlan0 mode managed
        iwconfig wlan0 channel 6
        iwconfig wlan0 ap any  # or you may put MAC of your router here like 00:10:E0:A2:06:60
                # you can see it in output of 'iwlist wlan0 scanning' as most of these settings here
        iwconfig wlan0 essid $essid_local
        iwpriv wlan0 set AuthMode=WPAPSK
        iwpriv wlan0 set EncrypType=TKIP
        iwpriv wlan0 set essid $essid_local
        iwpriv wlan0 set WPAPSK="here is my WPA password"
        dhclient wlan0

else
        echo '          wlan0 not found ... '
        /etc/init.d/net.eth0 start
fi
echo ""

You need to edit this script to reflect your settings.

Please take this script with a gain of salt, I do not know bash, it is my first try here. I am sure it can be improved, but it works for me and does all I need to. I will be glad if someone more knowlegeable would want to rewrite it and post it here.

If you have other network interfaces than me (eth0, wlan0) you will need to adjust it for your needs. I am sure this might be script detected but I can not do it at this point.

If you want to start your wireless network automatically, you can put it in your /etc/conf.d/local.start. I tried to add it to rc scripts using rc-update, but for some reason it started twice during the boot, so I rather put it in local.start which wors great for me.
Last edited by Raqua on Thu Aug 14, 2008 19:58, edited 2 times in total.
Raqua
Growing Hen
 
Posts: 175
Joined: Sun Apr 22, 2007 10:17

Re: RaLink Wireless card mini how-to

Postby mikey0000 » Thu Oct 04, 2007 1:42

that has clarified a few things, like how to use it when knetworkmanager doesnt see it.
I was wondering if installing sabayon without the wireless card attached then attaching and installing the ralink driver and utility would work,
also i should go look up a guide on how to use dniswrapper.
ill try the rx200 version with the whole scanning thing too. Did you see the GUI interface for using the driver on the serialmonkey page? do you know if it works no hassles?
i was going to try the ralink driver from source forge but i dont know where the source code is for the kernel for isntalling(or compiling im not sure) will post more on the issue when i come back with my flash drive and the install file.

my big problem is i do not have the internet to this computer so its useless trying to emerge anything. Hence why im trying to get the wireless to work.

i guess more relievant info to getting my situation fixed is im on a uni network which takes a username and password for authentication for the internet as well as proxy:port
triple Booting Mac-osx 10.6, Sabayon Linux and Windows 7

2.5 athlon dual core
DFI infinity mobo
2 gb of DDR2 800 G skill ram 3.3.3.12
nvidia 9600gt
housed in a thermaltake taser III case with 7 fans - all turned off lol
mikey0000
Growing Hen
 
Posts: 159
Joined: Fri Aug 10, 2007 0:33
Location: Dunedin New Zealand

Re: RaLink Wireless card mini how-to

Postby random guy » Thu Oct 04, 2007 2:50

sweet i was about to ask for help with ralink (i might still make a new thred later if my topic doesnt really tie in here)

i got the Gigabyte GN-WP01GS PCI WLAN Card and it actually sometimes works with sabayon miniedition and sometimes doesnt.

when i start up the system it either does or doesnt see my network. if not i tell network manager to connect manually to my network and give it my 16bit hex encrytion key. now hte weird thing is sometimes it does work and sometimes it doesnt. it has never worked on first try yet but after trying to connect multiple times one after another it usually eventually connects.

i wanted to verify the results so i booted up another live disk (pclinuxos 2007) and it also seemed to have the same problem. i would set up hte network selecting ralink blah blah blah as my divice and it would fail. then i would try again and the second time there would be a new entry ra0 which if i try to connect with that it works. so pclinuxos always works on the second try.

was really hoping that someone knew what what going on or some diagnotic things i could try. i know my report is kinda weird since it should work but this is what is happening.
<:~-- That random guy from nowhere has made another statement and vanished --~:>
random guy
Advanced Hen
 
Posts: 244
Joined: Fri Sep 15, 2006 1:58
Location: New York

Re: RaLink Wireless card mini how-to ralink2500

Postby mikey0000 » Thu Oct 04, 2007 3:14

I F*****g finally got something to work in linux, im so over the moon

i used the serialmonkey driver and rmmoded the existing ones, and installed the beta utility on serial monkeys website WOOOT!!!

now can someone tell me how to autostart it. thank you people who put effort into linux and quality software im so happy, now for the password stuff (and i though the teething pains were over damn)

cheers
triple Booting Mac-osx 10.6, Sabayon Linux and Windows 7

2.5 athlon dual core
DFI infinity mobo
2 gb of DDR2 800 G skill ram 3.3.3.12
nvidia 9600gt
housed in a thermaltake taser III case with 7 fans - all turned off lol
mikey0000
Growing Hen
 
Posts: 159
Joined: Fri Aug 10, 2007 0:33
Location: Dunedin New Zealand

Re: RaLink Wireless card mini how-to

Postby WarraWarra » Thu Oct 04, 2007 5:27

Permanent see either the "before 3.4e ipw3945 ...." sticky on top of networking as it has the link / info there , got it from gentoo install handbook x86 networking part.

rc-update and kernel-2.6 is the magic parts.
Also after rmmod check in /lib/....there is a subfolder that contains the kernel modules used at boot and remove the ones you rmmoded or in the blacklist but not sure about blacklist I likely did mine wrong and it kept on loading so del the /lib/.... ones .

Not sure if or how update-modules would affect it as this should fix it automatically but might load something else , new to this or not enough experience here.

Check the wiki top of the page here or gentoo forums / wiki for correct info.

Hope this helps.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: RaLink Wireless card mini how-to

Postby mikey0000 » Thu Oct 04, 2007 9:08

hey do you know much about the inet and inetv6 (i think i got it right?)

basicly ipv4 and ipv6 as on my wireless card the last time i checked it only had ipv6 and that will not work here in New Zealand and i will need to disable it, im sure i can find a how to on that its just getting the wireless using ipv4 thats my worry.

thanks
triple Booting Mac-osx 10.6, Sabayon Linux and Windows 7

2.5 athlon dual core
DFI infinity mobo
2 gb of DDR2 800 G skill ram 3.3.3.12
nvidia 9600gt
housed in a thermaltake taser III case with 7 fans - all turned off lol
mikey0000
Growing Hen
 
Posts: 159
Joined: Fri Aug 10, 2007 0:33
Location: Dunedin New Zealand

Re: RaLink Wireless card mini how-to

Postby WarraWarra » Thu Oct 04, 2007 16:26

http://www.v6.co.nz/doku.php

Will look and see where is the stuff I read about it and post.
Seems you might be able to get it in NZ , not sure how much performance difference it makes or if traveling you would have to switch back to ipv4 for hotels / wifi hotspots or similar.
Also check the kernel it might be compiled in there not sure if active or have to load module or something , not ontop of this at the moment.
Think it might be off by default or only ipv4 active.

Had to switch the ipv6 off for the last 3 years on Apple pc's as it did slow the connection down / downconverting to ipv4 for local connection , you might be able to get full ipv6 lan / router / isp and this could make a difference.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: RaLink Wireless card mini how-to

Postby cyrwyn » Sun Oct 14, 2007 21:33

I need to share my experience getting a rt61 built-in chipset to work. The rt61pci drivers from Ralink, compiled into the 2.6.22-sabayon kernel, don't always work with some Ralink chipsets. I use as my main distro PCLOS 2007, which has the rt61 module from serialmonkey.com in its kernels, which works with my card. I also run Sabayon 3.4 from the mini edition. The beta rt61 failed on emerge, but downloading the latest CVS version from serialmonkey and compiling by hand worked flawlessly with the chipset in my Averatec 7155 (Turion 64) laptop. I'm submitting this post now by wireless. If you have a rt61 card that doesn't work, try my approach. BTW Knetworkmanager doesn't work with this configuration. I set it up using "net-setup" in root.
cyrwyn
Young Hen
 
Posts: 31
Joined: Fri Apr 13, 2007 17:57
Location: NM


Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 2 guests