Cant compile driver

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

oberon

16-10-2007 10:32:48

Hi

I downloaded the latest CVS driver and I get some errors while trying to compile it

# make
CC [M] /usr/src/rt2x00-cvs-2007101517/rt2x00dev.o
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c In function ‘rt2x00lib_stop_link_tuner’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c97 warning implicit declaration of function ‘cancel_delayed_work_sync’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c In function ‘rt2x00lib_packetfilter_scheduled’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c434 error ‘struct ieee80211_ops’ has no member named ‘configure_filter’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c In function ‘rt2x00lib_configuration_scheduled’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c445 error ‘IEEE80211_ERP_CHANGE_PREAMBLE’ undeclared (first use in this function)
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c445 error (Each undeclared identifier is reported only once
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c445 error for each function it appears in.)
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c In function ‘rt2x00lib_probe_dev’
/usr/src/rt2x00-cvs-2007101517/rt2x00dev.c1158 error ‘IEEE80211_IF_TYPE_INVALID’ undeclared (first use in this function)
make[2] *** [/usr/src/rt2x00-cvs-2007101517/rt2x00dev.o] Error 1
make[1] *** [_module_/usr/src/rt2x00-cvs-2007101517] Error 2
make *** [default] Error 2

According to the README file I've what it takes to use it
# uname -r
2.6.22.6

(same gcc I used to compile the kernel)
# gcc -v
Using built-in specs.
Target i686-pc-linux-gnu
Configured with ../gcc-4.0.1/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
Thread model posix
gcc version 4.0.1

What am I missing ?

oopepe

16-10-2007 18:36:18

hello everyone,

i have exactly the same problem with slightly different premises.

i have kernel 2.6.22.9-0.4 on opensuse 10.3 32bit.

i also have no idea why the compile fails.
although to me this looks like there is an include missing or something like this. or maybe i have the wrong kernel version.

tia
oopepe

AdamBaker

16-10-2007 19:09:36

Current CVS depends on API changes in mac80211 which occurred after the release of 2.6.22. There are a number of forum posts describing attempts to fit the necessary bits together but most people seem to have ended up just opting to use the git kernel. You might have more luck with 2.6.23 if you want to use a vanilla kernel.

IvD

17-10-2007 18:00:30

Nope, not even 2.6.23 is sufficient anymore. Currently you need rt2x00.git or at least the very latest git snapshot of the linux-2.6 repository.

rockerboom

03-03-2010 12:02:17

Dear All,

Please help me! I am new to Linux and Ubuntu, I just installed Ubuntu 9.10, and my PCI RT2500 wifi card seems not work, although it woks fine under Windows XP. I searched Google and applied whatever solution that I found, ex windows wireless driver, wicd, edit interfaces and wpa_supplicant,..., but I got no luck!

I download rt2500-cvs-2009041204 and try to compile it, but I face this error and dont know how to solve it, please help!!

rockerboom@rockerboom-desktop~/MyWorkSpace/RT2500/rt2500-cvs-2009041204/Module$ sudo apt-get install build-essential linux-headers-$(uname -r)
[sudo] password for rockerboom
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version.
linux-headers-2.6.31-14-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
rockerboom@rockerboom-desktop~/MyWorkSpace/RT2500/rt2500-cvs-2009041204/Module$ make
make[1] Entering directory `/usr/src/linux-headers-2.6.31-14-generic'
Building modules, stage 2.
MODPOST 0 modules
make[1] Leaving directory `/usr/src/linux-headers-2.6.31-14-generic'
rt2500.ko failed to build!
make *** [module] Error 1

Thanks for your time!

Spy84464

04-03-2010 18:10:06

Hello,
the legacy driver you're trying to compile is no longer supported, and may not even compile with recent kernels.
Your card should, however, work out of the box under Ubuntu 9.10. What did not work exactly?

Regards,
Romain

rockerboom

07-03-2010 01:38:19

Dear Spy84464/Romain,

Thanks alot for your reply!

The symtom is with a fresh installation of ubuntu 9.10, when I click on the network-manager applet, the drop down menu displays "device not managed" under wireless section. Then I install network-admin, go to system->admin->network, I fill in the infomation of my wireless network(essid, wpa mode, password..), then activate it, but the network-manager applet announces "disconnect/you are offline..".

I try to identify what the problem is, I run
rockerboom@rockerboom~$ lshw -C network
WARNING you should run this program as super-user.
*-network0
description Wireless interface
product RT2500 802.11g Cardbus/mini-PCI
vendor RaLink
physical id 0
bus info pci@00000100.0
logical name wlan0
version 01
serial 0006f40a8a64
width 32 bits
clock 33MHz
capabilities bus_master cap_list ethernet physical wireless
configuration broadcast=yes driver=rt2500pci latency=64 multicast=yes wireless=IEEE 802.11bg
resources irq19 memoryfe9fc000-fe9fdfff

Then
rockerboom@rockerboom~$ sudo iwpriv wlan0 set AuthMode=WPAPSK
wlan0 no private ioctls.

Here is the iwconfig
rockerboom@rockerboom~$ sudo iwconfig
wlan0 IEEE 802.11bg ESSID"diemdang"
ModeManaged Frequency2.437 GHz Access Point Not-Associated
Tx-Power=20 dBm
Retry long limit7 RTS throff Fragment throff
Encryption keyoff
Power Managementon

Here is iwlist scan
rockerboom@rockerboom~$ sudo iwlist scan
wlan0 Scan completed
Cell 01 - Address 00904C7E0067
Channel6
Frequency2.437 GHz (Channel 6)
Quality=35/70 Signal level=-75 dBm
Encryption keyon
ESSID"diemdang"
Bit Rates1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
ModeMaster
Extratsf=000002253fc52f84
Extra Last beacon 776ms ago
IE Unknown 00086469656D64616E67
IE Unknown 010882848B962430486C
IE Unknown 030106
IE Unknown 2A0100
IE Unknown 2F0100
IE Unknown 32040C121860
IE Unknown DD06001018010000
IE WPA Version 1
Group Cipher TKIP
Pairwise Ciphers (1) TKIP
Authentication Suites (1) PSK

I also checked the lsmod command and saw the rt2500pci driver loaded. This driver is available in a fresh installation of ubuntu 9.10.

Because the "iwpriv wlan0" command gives me the error "no private ioctls", so I think the rt2500pci drive has problem. Then i tried to compile a new driver from Serialmonkey, but still got no luck!

Please give me your advice!
Thanks for your time!
Tuong Nguyen

IvD

07-03-2010 08:03:43


Because the "iwpriv wlan0" command gives me the error "no private ioctls", so I think the rt2500pci drive has problem. [/quotetsjo73zw]

No, that doesn't mean there is a problem. The rt2x00 drivers don't work with private IOCTLS, you must either use iwconfig, iw, wpa-supplicant or networkmanager to configure your card.

rockerboom

09-03-2010 06:21:50

Dear IVD, Romain,

Thanks for your guidance! ... And sorry if I post in a wrong place! But I still can not config my wifi card, please help me!!!

My card is Ralink RT2500 PCI, running ubuntu 9.10, I can connect to a non-secured wireless network, but I cant connect to a WPA-PSK one.

I did read WifiDocs/Driver/RalinkRT2500 and followed the guidance in WPA section, but my system announces error for "iwpriv ... set.." command, so I try another way to edit the /etc/network/interfaces
iface wlan0 inet dhcp
wpa-driver wext
wpa-ssid diemdang
wpa-proto WPA
wpa-pairwise TKIP
wpa-group TKIP
wpa-key-mgmt WPA-PSK
wpa-psk the-passphrase-key
Where the-passphrase-key I got from
$wpa_passphrase diemdang my-share-key
Then I restart the networking
rockerboom@rockerboom~$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... There is already a pid file /var/run/dhclient.wlan0.pid with pid 3473
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http//www.isc.org/sw/dhcp/

Listening on LPF/wlan0/0006f40a8a64
Sending on LPF/wlan0/0006f40a8a64
Sending on Socket/fallback
DHCPRELEASE on wlan0 to 192.168.3.1 port 67
send_packet Network is unreachable
send_packet please consult README file regarding broadcast address.
Internet Systems Consortium DHCP Client V3.1.2
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http//www.isc.org/sw/dhcp/

Listening on LPF/wlan0/0006f40a8a64
Sending on LPF/wlan0/0006f40a8a64
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ OK ]

Please give me some advices!
Tuong Nguyen

Spy84464

17-03-2010 19:09:15

The doc on the site does not apply to rt2x00 (the driver you're using).
Can't you connect at all using NetworkManager? It is accessible through he network applet, usually located on the top right of the desktop. If you still cannot connect, try to run wpa_supplicant from the command line, if something goes wrong, it might produce a useful message.

rockerboom

10-04-2010 00:58:52

Dear Romain,

So sorry for my late reply!

Yes, I can not connect using networkmanager, the small applet at the right conner doesn't show any wireless network in range, enventhough my PC is near to the access point?! But if I configure the access point to be non-secure, then network manager help!

Here is the result for the scan command
rockerboom@rockerboom~$ sudo iwlist wlan0 scan
wlan0 Scan completed
Cell 01 - Address 00904C7E0067
ESSID"diemdang"
ProtocolIEEE 802.11g
ModeManaged
Frequency2.437 GHz (Channel 6)
Quality14/100 Signal level-87 dBm Noise level-96 dBm
Encryption keyon
Bit Rates1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s; 6 Mb/s; 9 Mb/s
12 Mb/s; 48 Mb/s
Extrabcn_int=100
Extraatim=0
IE WPA Version 1
Group Cipher TKIP
Pairwise Ciphers (1) TKIP
Authentication Suites (1) PSK

And here is the wpa_supplicant result as you requested
rockerboom@rockerboom~$ wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
Line 3 unknown global field 'network = {'.
Line 3 Invalid configuration line 'network = {'.
Line 4 unknown global field 'ssid = "diemdang"'.
Line 4 Invalid configuration line 'ssid = "diemdang"'.
Line 5 unknown global field 'proto=WPA'.
Line 5 Invalid configuration line 'proto=WPA'.
Line 6 unknown global field 'key_mgmt = WPA-PSK'.
Line 6 Invalid configuration line 'key_mgmt = WPA-PSK'.
Line 7 unknown global field 'pairwise=TKIP'.
Line 7 Invalid configuration line 'pairwise=TKIP'.
Line 8 unknown global field 'group=TKIP'.
Line 8 Invalid configuration line 'group=TKIP'.
Line 9 unknown global field 'psk=7e63434eb63cb44730e8bc1763914872810f375f5e454121925674f58963540a'.
Line 9 Invalid configuration line 'psk=7e63434eb63cb44730e8bc1763914872810f375f5e454121925674f58963540a'.
Line 10 unknown global field '}'.
Line 10 Invalid configuration line '}'.
Failed to read or parse configuration '/etc/wpa_supplicant.conf'.

As you can see, the wpa_supplicant failed, but the wpa_supplicant.conf is correct, isn't it?

Please give me some advices or show me some correct driver for this card! I've been troubled with it for 2 months!?!?

Thanks for your time,
Tuong Nguyen

Spy84464

13-04-2010 19:23:40


As you can see, the wpa_supplicant failed, but the wpa_supplicant.conf is correct, isn't it?[/quoteffrpgogj]
Actually, your wpa_supplicant.conf file seems invalid, as reported in wpa_supplicant output.
Here's mine, if it can help
[codeffrpgogj]network={
ssid="MyAPEssid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="XXXXXXXXXXXXXXXXXX"
}[/codeffrpgogj]