RT61 WLAN for Caros Medion Notebook with openSuse 10.3

From JoBaPedia
Jump to navigation Jump to search

HOW I made the RT61 WLAN Chip work on openSuse 10.3

This is obsolete! Works with openSUSE 11.3 out of the box :)

The luminance keys in X also work now!

The problem

The first impression, when installing openSuse on the new Medion notebook (mid november 2007) was: Great! Everything works just fine! But as soon as I unplugged the wired network (it is 1GBit not 100Mbit as advertised!), I realized, the WLAN is not working :-(

Firmware needed

I discovered, that the Chip used is an RT61 from RaLink and that openSuse has automatically installed the open source driver for this chip. This driver needs a firmware in /lib/firmware that I downloaded from the RaLink page. Later I discovered, that the tarballs from the open source driver project page come with firmware files, too. I did not check, if they are the same.

WLAN config not stable

After installing the firmware, I could setup the WLAN for WEP access with yast for NetworkManager as usual. Unfortunately it did not work. The card was set up, it found the access point, had the WEP key set, but could not contact the dhcp server.

After much fiddling, I discovered, that it helps, if I set the key again with iwconfig, after NetworkManager has done its setup. But this was not for long. The settings get lost quite often for no obvious reason.

Newest suse kernel and module dont help

I then did an online update and got a new kernel with a new RT61 module. Nothing changed :-(

Open source driver 2x00 does not compile

Then I tried to install the newest tarball of the 2x00 open source driver (after uninstalling the suse rt61 rpm). It did not compile, which was no big surprise, since it claims to need at least kernel 2.6.24. OpenSuse 10.3 has 2.6.22 - too bad.

Newest open source legacy rt61 driver has same symptom as suse provided driver

Next I tried the legacy RT61 open source driver tarball. Installing was a smooth ride. You need the kernel sources and kernel development packages installed (which I have always installed, anyways). Apart from that it was just the usual untar, make, sudo make install. But it was still not working. Same symptoms. I could set up the card with iwconfig, ip addr and ip route and it sometimes worked for a short period of time - so I can be sure that it is not a configuration problem.

Google did not help here

Of course, I had googled quite a lot about this until now but found only unresolved threads in the mailing list of the open source driver and some forums. So I nearly gave up and was ready to try an USB stick. At least I knew, I am not alone with this problem.

Use old RALink driver

As a last shot, I then downloaded the driver directly provided by RaLink. It has an unusual, nonstandard way of getting configured and from what I read until then, I got the impression that it is even more legacy than the legacy open source driver. So I did not try earlier. Maybe I should have: In the end it did work quite well!

I downloaded the tar, untared, did a make and got a compiler error. Fortunately it was easy enough to fix: just a text replacement for a deprecated module init function. After that, I did set it up, like described in the RaLink README, which involved copying the firmware to /etc/Wireless/... and setting all the parameters in the coniguration file there (Ssid, WEP key, ....). Konfiguration with yast was not possible, since this method is not standard at all! At last, I created the network config file in /etc/sysconfig/network (ifcfg-ra0) to tell suses startup script to get me an ip and disabled the network manager (use old style ipup instead) so it cannot interfere (precaution, since I dont know how NetworkManager works internally).

That was it!

Now the notebook can connect via WLAN - fully automatic.

Next steps

Next step will be enabling WPA and better cooperation with the wired lan. But this has quite low priority and will probably never happen...

Some config data

Hardware description

# lspci
00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)
00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:06.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:07.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge
00:12.0 IDE interface: ATI Technologies Inc 4379 Serial ATA Controller (rev 80)
00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80)
00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80)
00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 83)
00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller (rev 80)
00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)
00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)
00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:05.0 VGA compatible controller: ATI Technologies Inc RS485 [Radeon Xpress 1100 IGP]
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)
05:04.0 FireWire (IEEE 1394): O2 Micro, Inc. Firewire (IEEE 1394) (rev 02)
05:04.2 Generic system peripheral [Class 0805]: O2 Micro, Inc. Integrated MMC/SD Controller (rev 01)
05:04.3 Mass storage controller: O2 Micro, Inc. Integrated MS/xD Controller (rev 01)
05:09.0 Network controller: RaLink RT2561/RT61 rev B 802.11g

WLAN config

You probably need to change SSID, EncrypType, Key1Type and Key1Str (more for non WEP, other country, ...)

# cat /etc/Wireless/RT61STA/rt61sta.dat
[Default]
CountryRegion=5
CountryRegionABand=7
WirelessMode=0
SSID=PUT_YOUR_SSID_HERE
NetworkType=Infra
Channel=0
AuthMode=OPEN
EncrypType=WEP
DefaultKeyID=1
Key1Type=1
Key1Str=PUT_YOUR_ASCII_WEP_KEY_HERE
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
WPAPSK=
TxBurst=0
PktAggregate=0
WmmCapable=0
APSDCapable=0
APSDAC=0;0;0;0
BGProtection=0
IEEE80211H=0
TxRate=0
RTSThreshold=2347
FragThreshold=2346
RoamThreshold=75
PSMode=CAM
TxPreamble=0
FastRoaming=0

Interface config

All that probably needs to be changed is the IPADDR (I use static IP, no DHCP yet). Default gateway and DNS server are setup by yast as usual.

# cat /etc/sysconfig/network/ifcfg-ra0
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IFPLUGD_PRIORITY='20'
IPADDR='192.168.1.7/24'
MTU=''
NAME='RALink RT61 WLAN (configure WLAN in /etc/Wireless)'
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='ifplugd'
USERCONTROL='yes'
PREFIXLEN=''

The source code modification

Just change pci_module_init to pci_register_driver in line 900 of file rtmp_main.c

# diff -U0 old/2007_1003_RT61_Linux_STA_v1.1.1.0/Module/rtmp_main.c 2007_1003_RT61_Linux_STA_v1.1.1.0/Module/rtmp_main.c
--- old/2007_1003_RT61_Linux_STA_v1.1.1.0/Module/rtmp_main.c    2007-10-03 08:05:50.000000000 +0200
+++ 2007_1003_RT61_Linux_STA_v1.1.1.0/Module/rtmp_main.c        2007-11-17 16:25:06.000000000 +0100
@@ -900 +900 @@
-    return pci_module_init(&rt61_driver);
+    return pci_register_driver(&rt61_driver);