I’m trying to install a Wireless Controller on a desktop PC. But I’ve been having problems, so if some of You can help me, I’ll be grateful.
First of all, excuse me for the extensive post and some parts of the redaction. The details about hardware, OS and the NIC are:
Hardware:
Motherboard: ASUS P8Z77-V LX
LAN: Realtek 8111 E Gigabit LAN Controller
Processor: Intel(R) Core(TM) i5-3550 CPU 3.30 GHz
RAM: 16.0 GB
HDD: 2 X 500GB. Dual Boot (1. Linux, 2. Windows 8) “The NIC works fine on W8”
O.S.: Distribution Oracle Linux 6.3. 64 bits (As far as I know is based on redhat Enterprise Linux)
NIC:
Brand: D-Link
Code: DWA-140
Description: Wireless N 802.11n Wireless USB Dongle
Revision: B3
I have to say that I’m a newbie in Linux, So I started by submitting a question to
www.dlink.eu in order to learn about the appropriate driver to install, and although I have not received a response yet, I read in some sources on the internet that the rt5370sta driver is the right one.
I downloaded from (
http://www.ralinktech.com/en/04_supp...ort.php?sn=501) the 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO file. Then I opened a root session and under $HOME, I copied and unzipped the file which created a directory with the same name.
After reading the README_STA_usb file (
https://github.com/YuLaw/rt5370sta/b...README_STA_usb) I followed the instructions.
1. In Makefile I set the entries for "MODE = STA" and "TARGET = LINUX". Since the LINUX_SRC entries seemed to be configured through system variables I left them unchanged.
2. In os/linux/config.mk I set set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n'. I did it so because of this comment on the point 3 of the README_STA_usb file “** Build for being controlled by WpaSupplicant with Ralink Driver”
3. When I executed the command make, the following error occurred:
[root@localhost 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO]# make
make -C tools
make[1]: Entering directory `/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools'
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/tools/bin2h
cp -f os/linux/Makefile.6 /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/Makefile
make -C /lib/modules/2.6.39-200.24.1.el6uek.x86_64/build SUBDIRS=/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux modules
make: *** /lib/modules/2.6.39-200.24.1.el6uek.x86_64/build: No such file or directory. Stop.
make: *** [LINUX] Error 2
4. To solve this problem, I checked the path (/lib/modules/2.6.39-200.24.1.el6uek.x86_64/build) and I saw that “build” was sort of a soft link pointing to a directory that didn’t even exist.
Under (/lib/modules/2.6.39-200.24.1.el6uek.x86_64) I did the following:
[root@localhost 2.6.39-200.24.1.el6uek.x86_64]# ls -l
total 3428
lrwxrwxrwx. 1 root root 5 Dec 8 21:43 source -> build
lrwxrwxrwx. 1 root root 54 Dec 8 21:43 build -> ../../../usr/src/kernels/2.6.39-200.24.1.el6uek.x86_64
drwxr-xr-x. 2 root root 4096 Jun 23 2012 extra
drwxr-xr-x. 11 root root 4096 Dec 8 21:43 kernel
-rw-r--r--. 1 root root 558902 Dec 8 21:45 modules.alias
......
.....
..
Since “build” was pointing to (../../../usr/src/kernels/2.6.39-200.24.1.el6uek.x86_64) I checked under (/usr/src/kernels) and because there was not such sub-directory (2.6.39-200.24.1.el6uek.x86_64)
[root@localhost kernels]# pwd
/usr/src/kernels
[root@localhost kernels]# ls -l
total 8
drwxr-xr-x. 23 root root 4096 Dec 22 12:24 2.6.32-279.el6.x86_64
drwxr-xr-x. 22 root root 4096 Dec 22 12:00 2.6.32-279.el6.x86_64.debug
-rw-r--r--. 1 root root 0 Dec 29 17:21 2.6.39-200.24.1.el6uek.x86_64
[root@localhost kernels]# cd 2.6.32-279.el6.x86_64
[root@localhost 2.6.32-279.el6.x86_64]# ls
arch drivers include kernel Makefile.common Module.symvers scripts System.map virt
block firmware init lib mm net security tools
crypto fs ipc Makefile modules.order samples sound usr
I ended up going back to step no. 1, re-editing Makefile, adding a new line with the definition to LINUX_SRC and adding a remark to the rest of the definitions for the same variable as follows:
LINUX_SRC = /usr/src/kernels/2.6.32-279.el6.x86_64
ifeq ($(PLATFORM),5VT)
#LINUX_SRC = /home/ralink-2860-sdk-5vt-distribution/linux-2.6.17
CROSS_COMPILE = /opt/crosstool/uClibc_v5te_le_gcc_4_1_1/bin/arm-linux-
endif
ifeq ($(PLATFORM),IKANOS_V160)
#LINUX_SRC = /home/sample/projects/LX_2618_RG_5_3_00r4_SRC/linux-2.6.18
CROSS_COMPILE = mips-linux-
endif
......
.....
..
5. I executed the command “make” again and this time it looked like everything was fine, some warnings but no errors whatsoever (
see log at the end). Then checking under the current directory there were new files as shown here:
[root@localhost 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO]# ls -l
total 112
drwxr-xr-x. 2 root root 4096 Dec 29 17:31 chips
drwxr-xr-x. 2 root root 4096 Dec 29 17:31 common
drwxr-xr-x. 5 root root 4096 Jul 19 2011 include
-rw-r--r--. 1 root root 14819 Jul 19 2011 iwpriv_usage.txt
-rw-r--r--. 1 root root 13718 Dec 29 17:28 Makefile
-rw-r--r--. 1 root root 13726 Dec 29 17:17 Makefile~
drwxr-xr-x. 3 root root 4096 Jul 19 2011 os
-rw-r--r--. 1 root root 13527 Jul 19 2011 README_STA_usb
-rw-r--r--. 1 root root 613 Jul 19 2011 RT2870STACard.dat
-rw-r--r--. 1 root root 1118 Jul 19 2011 RT2870STA.dat
drwxr-xr-x. 2 root root 4096 Dec 29 17:31 sta
-rw-r--r--. 1 root root 13808 Jul 19 2011 sta_ate_iwpriv_usage.txt
drwxr-xr-x. 2 root root 4096 Dec 29 17:31 tools
6. After that, I came back to the step 5 of the README_STA_usb file. I was surprised that step 5 referred to RT2870STA.dat file instead of rt5370sta.dat. However I did as instructed, I made the directory (/etc/Wireless/RT2870STA/) and copied the file RT2870STA.dat under it.
7. Following with the instructions I went to step 6 of the README_STA_usb file. Under os/linux/ I tried to load the driver for kernel 2.6. But there wasn’t a rt2870sta.ko file. There was a rt5370sta.ko file instead. So I tried loading it and the insmod command raised the following error:
[root@localhost linux]# insmod rt5370sta.ko
insmod: error inserting 'rt5370sta.ko': -1 Invalid module format
At this point I don't know what to do, I've been looking for similar cases on the internet and trying whatever I could to solve the problem unsuccessfully.
Here is the last part of the make command.
LOG OF MAKE COMMAND
===================
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/frq_cal.c:136: warning: unused variable ‘bUpdateRFR’
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt3070.o
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt30xx.o
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt30xx.c: In function ‘RT30xx_ChipSwitchChannel’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt30xx.c:619: warning: unused variable ‘BbpR109’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt30xx.c:618: warning: unused variable ‘Tx1FinePowerCtrl’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt30xx.c:618: warning: unused variable ‘Tx0FinePowerCtrl’
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt33xx.o
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt33xx.c: In function ‘RT33xxSetRxAnt’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt33xx.c:164: warning: unused variable ‘x’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt33xx.c: In function ‘RT33xx_ChipSwitchChannel’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt33xx.c:409: warning: unused variable ‘BbpR109’
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt3370.o
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt3370.c: In function ‘NICInitRT3370RFRegisters’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt3370.c:51: warning: unused variable ‘bbpreg’
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.o
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390_Init’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:490: warning: assignment makes integer from pointer without a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390SetRxAnt’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:756: warning: unused variable ‘Value’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390LoadRFSleepModeSetup’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:915: warning: unused variable ‘RFValue’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390ReverseRFSleepModeSetup’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:991: warning: unused variable ‘RFValue’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390_ChipSwitchChannel’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:1609: warning: comparison of distinct pointer types lacks a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:1620: warning: comparison of distinct pointer types lacks a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:1634: warning: comparison of distinct pointer types lacks a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:1498: warning: unused variable ‘BbpR110’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:1497: warning: unused variable ‘BbpR109’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘GetDesiredTssiAndCurrentTssi’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3085: warning: missing braces around initializer
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3085: warning: (near initialization for ‘htTssiInfo.PartA.field’)
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘RT5390_ATETssiCalibration’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3364: warning: ISO C90 forbids mixed declarations and code
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3453: warning: passing argument 3 of ‘eFuseWrite’ from incompatible pointer type
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/include/rtmp.h:5774: note: expected ‘PUSHORT’ but argument is of type ‘UCHAR *’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3365: warning: unused variable ‘ChannelPower’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c: In function ‘GetPowerDeltaFromTssiRatio’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3595: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘LONG’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../chips/rt5390.c:3624: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘LONG’
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rtusb_dev_id.o
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../os/linux/rt_usb_util.o
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../os/linux/usb_main_dev.o
CC [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.o
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c: In function ‘DefaultATEAsicSwitchChannel’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:1276: warning: comparison of distinct pointer types lacks a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:1044: warning: unused variable ‘RFValue2’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c: In function ‘ATETxPwrHandler’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:5358: warning: unused variable ‘CfgOfTxPwrCtrlOverMAC’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c: In function ‘Set_ATE_TX_FREQOFFSET_Proc’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:7770: warning: comparison of distinct pointer types lacks a cast
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c: In function ‘Set_ATE_TSSI_CALIBRATION_EX_Proc’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9496: warning: unused variable ‘CurrentChannel’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9495: warning: unused variable ‘BSSID_ADDR’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9494: warning: unused variable ‘ChannelPower’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9493: warning: unused variable ‘EEPData’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9492: warning: unused variable ‘TssiDeltaPerChannel’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9492: warning: unused variable ‘TssiRefPerChannel’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9491: warning: unused variable ‘BBP49Value’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9491: warning: unused variable ‘RF28Value’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9491: warning: unused variable ‘RF27Value’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9491: warning: unused variable ‘RFValue’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9491: warning: unused variable ‘BbpData’
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9499: warning: control reaches end of non-void function
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c: In function ‘Set_ATE_TSSI_CALIBRATION_Proc’:
/root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/../../common/rt_ate.c:9483: warning: control reaches end of non-void function
LD [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/rt5370sta.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/rt5370sta.mod.o
LD [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/rt5370sta.ko.unsigned
NO SIGN [M] /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/rt5370sta.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.32-279.el6.x86_64'
cp -f /root/2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/os/linux/rt5370sta.ko /tftpboot