LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-16-2008, 12:16 AM   #1
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Rep: Reputation: 0
How do I compile a driver for my wireless network card.


I installed SUSE Linux 10 on my PC. How do I compile the following driver for my Ralink MIMO Wireless PCI LAN Card from Edimax:

This is the instructions from the CD. Except it assumes you already know what you are doing, which I do not. My kernel is 2.6, I believe. In Linux under the YAST control under Hardware and NetworkCard it displays my Ralink PCI Card. It just does not work because I cant figure out how to compile the driver and configure the device. I tried entering some commands into the terminal but I cant get anything to work. I am not new to computers but I am completely new to Linux.

* README
*
* Ralink Tech Inc.
*
*
*

=======================================================================
ModelName:
===========
rt61


=======================================================================
Supporting Kernel:
===================
linux kernel 2.4 and 2.6 series.
Tested in Redhat 7.3 or later.


=======================================================================
Description:
=============
This is a linux device driver for Ralink RT61 a/b/g WLAN Card.



=======================================================================
Contents:
=============
./2.4x : Makefile for kernel 2.4 series
./2.6x : Makefile for kernel 2.6 series
*.c : c files
*.h : header files
Makefile.RTL865x : Makefile for big endian platform



=======================================================================
Features:
==========
This driver implements basic IEEE802.11. Infrastructure and adhoc mode with open or shared or
WPA-PSK authentication method. NONE, WEP, TKIP and AES encryption.



=======================================================================
Build Instructions:
====================
For 2.4 series kernel:
a. $tar -xvzf RT61_Linux_STA_Drv_x.x.x.x.tar.gz
go to "./RT61_Linux_STA_Drv_x.x.x.x/Module" directory.

b. Use 'chmod' command to change access right of following script files :
'load', 'unload', 'Configure'

c. run 'cp ../2.4x/Makefile .'
d. $make config # config build linux os version

e. $make all # compile driver source code

f. $cp RT2561.bin /etc/Wireless/RT61STA/ # copy firmware
$cp RT2561S.bin /etc/Wireless/RT61STA/
$cp RT2661.bin /etc/Wireless/RT61STA/

g. $load # load/insmod module(rt61.o)

Note: Script functionality:
load load module to kernel
unload unload module from kernel
Configure retrieve linux version


For 2.6 series kernel:
a. run 'cd STA/Module'
'cp ../2.6x/Makefile .'

b. $make all

c. $cp RT2561.bin /etc/Wireless/RT61STA/ # copy firmware
$cp RT2561S.bin /etc/Wireless/RT61STA/
$cp RT2661.bin /etc/Wireless/RT61STA/

d. run '/sbin/insmod rt61.ko' (as root)
'/sbin/ifconfig ra0 inet YOUR_IP up'


For big endian platform:
a. replace Makefile with Makefile.RTL865x



=======================================================================
CONFIGURATION:
====================
RT61 driver can be configured via following interfaces,
i.e. (i)"iwconfig" command, (ii)"iwpriv" command, (iii) configuration file

i) iwconfig comes with kernel.
ii) iwpriv usage, please refer to file "iwpriv_usage.txt" for details.
iii)copy configuration file "RT61STA.dat" to /etc/Wireless/RT61STA/RT61STA.dat.


Configuration File : RT61STA.dat
---------------------------------------
# Copy this file to /etc/Wireless/RT61STA/RT61STA.dat
# This file is a binary file and will be read on loading rt.o module.
#
# Use "vi -b RT61STA.dat" to modify settings according to your need.
#
# 1.) set NetworkType to "Adhoc" for using Adhoc-mode, otherwise using Infrastructure
# 2.) set Channel to "0" for auto-select on Infrastructure mode
# 3.) set SSID for connecting to your Accss-point.
# 4.) AuthMode can be "WEPAUTO", "OPEN", "SHARED", "WPAPSK", "WPANONE"
# 5.) EncrypType can be "NONE", "WEP", "TKIP", "AES"
# for more information refer to the Readme file.
#
# The word of "Default" must not be removed
Default
CountryRegion=0
CountryRegionABand=7
WirelessMode=0
SSID=AP350
NetworkType=Infra
Channel=0
AuthMode=OPEN
EncrypType=NONE
DefaultKeyID=1
Key1Type=0
Key1Str=0123456789
Key2Type=0
Key2Str=
Key3Type=0
Key3Str=
Key4Type=0
Key4Str=
WpaPsk=abcdefghijklmnopqrstuvwxyz
TXBurst=0
PktAggregate=0
TurboRate=0
WmmCapable=0
AckPolicy1=0
AckPolicy2=0
AckPolicy3=0
AckPolicy4=0
BGProtection=0
ShortSlot=0
IEEE80211H=0
TxRate=0
RTSThreshold=2347
FragThreshold=2346
PSMode=CAM
TxPreamble=0

-----------------------------------------------
*NOTE:
WMM parameters
WmmCapable Set it as 1 to turn on WMM Qos support
AckPolicy1~4 Ack policy which support normal Ack or no Ack
(AC_BK, AC_BE, AC_VI, AC_VO)

All WMM parameters do not support iwpriv command but ¡¥WmmCapable¡¦¡¦,
please store all parameter to RT61STA.dat, and restart driver.

-----------------------------------------------
syntax is 'Param'='Value' and describes below.

1. CountryRegion=value
value
0: use 1 ~ 11 Channel
1: use 1 ~ 13 Channel
2: use 10, 11 Channel
3: use 10 ~ 13 Channel
4: use 14 Channel
5: use 1 ~ 14 Channel
6: use 3 ~ 9 Channel

2. CountryRegionForABand=value
value
0: use 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165 Channel
1: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140 Channel
2: use 36, 40, 44, 48, 52, 56, 60, 64 Channel
3: use 52, 56, 60, 64, 149, 153, 157, 161 Channel
4: use 149, 153, 157, 161, 165 Channel
5: use 149, 153, 157, 161 Channel
6: use 36, 40, 44, 48 Channel
7: use 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 Channel

3. SSID=value
value
0~z, 1~32 ascii characters.

4. WirelessMode=value
value
0: 11b/g mixed,
1: 11B only,
2: 11A only
3: 11a/b/g mixed
4: 11G only

5. TxRate=value
value
0: Auto //WirelessMode=0~4
1: 1 Mbps //WirelessMode=0 or 1 or 3
2: 2 Mbps //WirelessMode=0 or 1 or 3
3: 5.5 Mbps //WirelessMode=0 or 1 or 3
4: 11 Mbps //WirelessMode=0 or 1 or 3
5: 6 Mbps //WirelessMode=0 or 2 or 3 or 4
6: 9 Mbps //WirelessMode=0 or 2 or 3 or 4
7: 12 Mbps //WirelessMode=0 or 2 or 3 or 4
8: 18 Mbps //WirelessMode=0 or 2 or 3 or 4
9: 24 Mbps //WirelessMode=0 or 2 or 3 or 4
10: 36 Mbps //WirelessMode=0 or 2 or 3 or 4
11: 48 Mbps //WirelessMode=0 or 2 or 3 or 4
12: 54 Mbps //WirelessMode=0 or 2 or 3 or 4

6. Channel=value
value
1~14 depends on CountryRegion

7. BGProtection=value
value
0: Auto
1: Always on
2: Always off

8. TxPreamble=value
value
0:Preamble Long
1:Preamble Short
2:Auto

9. RTSThreshold=value
value
1~2347

10. FragThreshold=value
value
256~2346

11. TxBurst=value
value
0: Disable
1: Enable

12. NetworkType=value
value
Infra: infrastructure mode
Adhoc: adhoc mode

13. AdhocOfdm=value
value
0: Adhere WIFI spec, the Tx MAX rate will be 11Mbps in Adhoc mode
1: Violate WIFI spec, the Tx MAX rate will be 54Mbps in Adhoc mode(b/g mixed)
2: Violate WIFI spec, the Tx MAX rate will be 54Mbps in Adhoc mode(11g only)

14. AuthMode=value
value
OPEN For Open System
SHARED For Shared key System
WEPAUTO
WPAPSK
WPANONE For Adhoc Security System

15. EncrypType=value
value
NONE For AuthMode=OPEN
WEP For AuthMode=OPEN or AuthMode=SHARED
TKIP For AuthMode=WPAPSK
AES For AuthMode=WPAPSK

16. DefaultKeyID=value
value
1~4

17. Key1=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd

18. Key2=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd

19. Key3=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd

20. Key4=value
value
10 or 26 hexadecimal characters eg: 012345678
5 or 13 ascii characters eg: passd

21. WPAPSK=value
value
8~63 ASCII or
64 HEX characters

22. PktAggregate=value
value
0: Disable
1: Enable when the peer supports it

23. TurboRate=value
value
0: Disable
1: Enable 72/100 Mbps whenever applicable
(Not support yet!)

24. WmmCapable=value
value
0: Disable WMM
1: Enable WMM

25. PSMode=value
value
0: CAM Constantly Awake Mode
1: Max_PSP Max Power Savings
2: Fast_PSP Power Save Mode

26. IEEE80211H=value
value
0: Disable
1: Enable Spectrum management
(This field can be enable only in A band)


MORE INFORMATION
=================================================================================
If you want for rt61 driver to auto-load at boot time:
A) choose ra0 for first RT61 WLAN card, ra1 for second RT61 WLAN card, etc.

B) create(edit) 'ifcfg-ra0' file in /etc/sysconfig/network-scripts/,
edit( or add the line) in /etc/modules.conf:
alias ra0 rt61

C) edit(create) the file /etc/sysconfig/network-scripts/ifcfg-ra0
DEVICE='ra0'
ONBOOT='yes'


NOTE:
if you use dhcp, add this line too .
BOOTPROTO='dhcp'

*D) To ease the Default Gateway setting,
add the line
GATEWAY=x.x.x.x
in /etc/sysconfig/network
 
Old 06-16-2008, 12:18 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
You need to tell us exactly what you've done and what doesn't work. We aren't mind readers, you know..
 
Old 06-16-2008, 01:39 AM   #3
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
I just want to know how to build, compile, or install a driver and configure the device like it says in the instructions. The device was not detected during the installation and will not work and I cannot get online. Where do I enter the info that it is talking about in those instructions that I provided. I have not done anything because I might as well be reading frickin German. I have no experience with Linux, I cannot find any quality info that tells me how to go about entering the info from those instructions without somebody assuming that I already know this or that. I am completely new to Linux and know nothing.
 
Old 06-16-2008, 01:45 AM   #4
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The build instructions are to be done in a terminal. In your first post you said you entered some commands and said they didn't work..
 
Old 06-16-2008, 02:19 AM   #5
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
Yeah I entered some of the first part of the build instructions. I was not sure if what I was doing was supposed to give me some response or if I just enter it all and hope it works. I am completly new to the terminal, I do not even have experience with DOS, just GUI interfaces. Do I enter the whole thing word for word? Like where it says

a. run 'cd STA/Module'

Is that what I enter or only the items in between the ' ?

I know I do not enter the a. but what about the rest? After I get the driver build right will I be able to configure the device through YAST2 or do I have to follow their configure instructions?

I am sorry if I seemed cross to you I am just frustrated and its late.
 
Old 06-16-2008, 02:23 AM   #6
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
So if I follow their instructions and enter the info into a terminal I should be able to get the device working properly. Is this correct? Or are there further steps before I am done
 
Old 06-16-2008, 04:12 AM   #7
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Suse 10 is a modern distro. I would be surprised if the rt61pci module was not already compiled and present on your system. You should not need to compile it again.
To see if you already have it, in a terminal, type
locate rt61pci.ko
It should be somewhere like

/lib/modules/2.6.24-16-generic/kernel/drivers/net/wireless/rt2x00/rt61pci.ko

To see if it is loaded, in a terminal
lsmod | grep rt61pci
Is it listed?

If not, try loading it like this: in a terminal, become root and do:
modprobe rt61pci

Once it is loaded, to check if the card is working, again, in a terminal, as root:
iwlist scan
Does it see any networks?
 
Old 06-16-2008, 01:12 PM   #8
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
locate command came back as follows:

-bash: locate: command not found

to see if loaded:

lsmod | grep rt61pci returned: nothing but the prompt

try loading:

modprobe rt61pci returned: FATAL: Module rt61pci not found

iwlist scan returned: lo Interface does not support scanning
sit0 Interface does not support scanning
 
Old 06-16-2008, 01:55 PM   #9
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
locate command came back as follows:

-bash: locate: command not found
Then (to my great surprise) Suse hasn't installed this useful utility for you. So, "Null Points to Suse 10", or your install process.
Instead, try (as the root user) find / -name rt61pci.ko
Is it listed?

Quote:
to see if loaded:

lsmod | grep rt61pci returned: nothing but the prompt
Then it is not loaded.

Quote:
try loading:

modprobe rt61pci returned: FATAL: Module rt61pci not found
Then it is not on your system, so the "find" command above will probably return nothing.
All this is highly unusual, and I suspect your install went badly wrong somewhere.

You have (currently) 5 posts to your name, so I am assuming that you are new to linux. In the first place, I'd suggest a fresh install, and just accept the defaults, if they seem sensible. You are missing several vital things from your install: Something went wrong, and you don't say if you were offered any warnings or advisory notices when you installed.

If re-instalation of "Suse" doesn't solve your problems, then I suggest you try another distro.

Grabbing at straws: Are you perhaps trying to do an install in "unusual" circumstances Eg in a "virtual machine", or "Running linux from within windows" ?

What did you install from and exactly HOW?
 
Old 06-16-2008, 02:11 PM   #10
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
hwinfo returned:

32: PCI 106.0: 0280 Network Controller
[created at pci.277]
UDI: /org/freedesktop/hal/devices/pci_1814_401
Unique ID: zsAr.wzCzOqSTQq9
Parent ID: 8otl.Ao4TF0pWC38
SysFS ID: /devices/pci0000:00/0000:00:04/0000:01:06.0
SysFS BusID: 000:01:06.0
Hardware Class: Network
Model: "Ralink Network Controller"
Vendor: pci 0x1814 "Ralink"
Device: pci 0x0401
Subvendor: pci 0x1814 "Ralink"
SubDevice: pci 0x2661
Memory Range: 0xfdff8000-0xfdffffff (rw, non-prefetchable)
IRQ: 255 (no events)
Module Alias: "pci:v00001814d00000401sv00001814sd00002661bc02sc80i00"
Config Status: cfg=no, avail=yes, need=no, active=unknown
Attached to: #18 (PCI Bridge)

iwconfig returned:

lo no wireless extensions
sit0 no wireless extensions
 
Old 06-16-2008, 02:25 PM   #11
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
I have a Compaq Presario Desktop computer that came with Windows Vista. I partitioned 20 GB of my hard drive and installed SUSE Linux 10 on the partition. Well I took the recommendation and 1 GB went for a swap file, 19 GB for the Linux Kernel and the bootloader went on the windows partition. I took all the defaults and everything seems fine except that it did not detect some of my hardware eg. my sound (which is integrated into the motherboard) my network card (wireless) and it found my printer but it says that it is not configured.

Are there problems with dual booting. I mean will it mess up how Linux functions. Everything seems fine except that it did not detect the sound, or network cards.
 
Old 06-16-2008, 02:33 PM   #12
norm7b8
LQ Newbie
 
Registered: Jun 2008
Location: NC
Distribution: SUSE Linux 10
Posts: 8

Original Poster
Rep: Reputation: 0
I installed the SUSE Distro from a dvd that came with a book=SUSE Linux 10 Bible.
 
Old 06-16-2008, 11:40 PM   #13
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by norm7b8 View Post
Are there problems with dual booting. I mean will it mess up how Linux functions.
No, dual booting shouldn't cause any problems. You may also want to use the latest version of openSUSE.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile D-Link DFE530TX network card driver in RH Linux 7.3 zy101 Linux - Hardware 6 04-25-2008 08:16 AM
Wireless network card driver? Uteliggarn Linux - Wireless Networking 8 07-31-2007 07:48 PM
How to unistall wireless network card driver paolaccio Linux - Hardware 2 02-01-2007 05:16 AM
Wireless network keeps disconnecting on Intel(R) Pro/wireless 2200bg network card gregh Linux - Wireless Networking 1 09-16-2006 06:57 PM


All times are GMT -5. The time now is 12:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration