cubieplayer / Cubian

Debian for Cubieboard
http://cubian.org
269 stars 49 forks source link

Help! need to build driver for mt7601 Ralink wifi usb dongle! #229

Open danss70 opened 10 years ago

danss70 commented 10 years ago

Hi, Help compile driver for mt7601 wifi usb dongle! I am a new to linux & debian. I have bought a Cubieboard a10 and Mini 150M USB WiFi chipset :7601 Ralink , (http://www.ebay.co.uk/itm/320986973768?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649) I had installed xfce4 on cubian and running it headless through xtightvnc and ssh from win8 pc. It is working good enough able to start led , gpio programming.

I downloaded the newest wifi drivers : MT7601U USB , 09/13/2013, v3.0.0.4 , (http://www.mediatek.com/_en/07_downloads/01_windows.php?sn=501) and tried to follow the instructions but failed in these lines

  1. ‘define the linux kernel source include file path LINUX_SRC modify to meet your need.’ >> what ? how ? only 4.2 are found in synaptic?
  2. PLATFORM: Target platform >> what to select?

Other problem: I cannot find "iwpriv" command I tried to install precompiled drivers (https://docs.google.com/document/d/1-CIGQYdk8ZhU3D3UCNn70jc7C9HdXvEZAsiNW71fGIE/edit#heading=h.ouv29ly6yl74) It did not work.

Could anyone help me on this? Thank you.

tihom88 commented 10 years ago

Follow the following steps (no need to change in source if everything is in their default position)

  1. go to your driver folder.
  2. make clean
  3. make three modules ./NETIF/os/linux/mtnet7601Usta.ko, ./MODULE/os/linux/mt7601Usta.ko, ./UTIL/os/linux/mtutil7601Usta.ko will be created after this step.

i use the following commands to connect to wifi: sudo insmod ./DPA_MT7601U_LinuxSTA_3.0.0.3_20130313/UTIL/os/linux/mtutil7601Usta.ko sleep 2 sudo insmod ./DPA_MT7601U_LinuxSTA_3.0.0.3_20130313/MODULE/os/linux/mt7601Usta.ko sleep 2 sudo insmod ./DPA_MT7601U_LinuxSTA_3.0.0.3_20130313/NETIF/os/linux/mtnet7601Usta.ko sleep 1 sudo ifconfig ra0 up sudo iwpriv ra0 set NetworkType=Infra sleep 1 sudo iwpriv ra0 set AuthMode=WPA2PSK sleep 1 sudo iwpriv ra0 set EncrypType=TKIP sleep 1 sudo iwpriv ra0 set SSID="your wifi name" sleep 1 sudo iwpriv ra0 set WPAPSK="wifi password" sleep 1 sudo iwpriv ra0 set SSID="your wifi name" sleep 1 sudo dhclient ra0 -v

Checkout iwpriv_usage.txt in MODULE folder in your driver folder for more info about config info for various modes of wireless connection. I am using a little older version of drivers but config and building should be same.

Mehrdad-2019 commented 9 years ago

i need help Please Help ..... my os is is last version kali linux 2.0

Wireless driver is :

Bus 001 Device 008: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter

TP-LINK : TL-WN727N

i can't install wireless driver

this is my error driver

~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913# make make -C tools make[1]: Entering directory '/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory '/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools' /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools/bin2h cp -f os/linux/Makefile.6 /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile make -C /lib/modules/4.0.0-kali1-686-pae/build SUBDIRS=/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules make[1]: Entering directory '/usr/src/linux-headers-4.0.0-kali1-686-pae' Makefile:10: * mixed implicit and normal rules: deprecated syntax CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:331:16: warning: unused variable ‘pAd’ [-Wunused-variable] RTMP_ADAPTER _pAd = (RTMP_ADAPTER )pAdSrc; ^ CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/assoc.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/auth.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/auth_rsp.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.o /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c: In function ‘PeerBeacon’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c:2180:12: warning: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type ie_list, ^ In file included from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:59:0, from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c:28: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp.h:7892:9: note: expected ‘struct IE_LISTS ’ but argument is of type ‘struct BCN_IE_LIST ’ BOOLEAN StaAddMacTableEntry( ^ CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sanity.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.o /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c: In function ‘STAHandleRxDataFrame’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c:523:33: warning: passing argument 2 of ‘MacTableLookup’ from incompatible pointer type pEntry = MacTableLookup(pAd, &pHeader->Addr2); ^ In file included from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:59:0, from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c:28: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp.h:8429:18: note: expected ‘UCHAR ’ but argument is of type ‘UCHAR (_)[6]’ MAC_TABLE_ENTRY _MacTableLookup(RTMP_ADAPTER pAd, UCHAR pAddr); ^ CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/connect.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/wpa.o CC [M] /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlRF’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5306:7: warning: format ‘%X’ expects argument of type ‘unsigned int’, but argument 5 has type ‘LONG’ [-Wformat=] sprintf(msg+strlen(msg), "BANK%d_R%02d:%02X ", bank_Id, rfId, rfValue); ^ /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5359:27: warning: passing argument 2 of ‘RtmpDrvAllRFPrint’ from incompatible pointer type RtmpDrvAllRFPrint(NULL, msg, strlen(msg)); ^ In file included from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:64:0, from /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:28: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_os_util.h:668:6: note: expected ‘UINT32 ’ but argument is of type ‘PSTRING’ VOID RtmpDrvAllRFPrint( ^ /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5209:22: warning: unused variable ‘rf_bank’ [-Wunused-variable] UCHAR regRF = 0, rf_bank = 0; ^ /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function ‘RTMPIoctlShow’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5766:85: error: macro "DATE" might prevent reproducible builds [-Werror=date-time] snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, DATE, TIME ); ^ /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5766:95: error: macro "TIME" might prevent reproducible builds [-Werror=date-time] snprintf(extra, size, "Driver version-%s, %s %s\n", STA_DRIVER_VERSION, DATE, TIME ); ^ /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_ioctl_siwgenie’: /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:7610:13: warning: assignment from incompatible pointer type eid_ptr = pAd->StaCfg.pWpaAssocIe; ^ cc1: some warnings being treated as errors /usr/src/linux-headers-4.0.0-kali1-common/scripts/Makefile.build:263: recipe for target '/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o' failed make[4]: _* [/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o] Error 1 /usr/src/linux-headers-4.0.0-kali1-common/Makefile:1407: recipe for target 'module/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux' failed make[3]: * [module/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux] Error 2 Makefile:145: recipe for target 'sub-make' failed make[2]: * [sub-make] Error 2 Makefile:8: recipe for target 'all' failed make[1]: * [all] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.0.0-kali1-686-pae' Makefile:394: recipe for target 'LINUX' failed make: *\ [LINUX] Error 2

How can i install that ?????!!!!!!

Please help ..... !!!!!

also i downloaded this file .... i think my be can help

mt7601u-master.zip

and exteract

and again noting

error is :

make install make -C /lib/modules/uname -r/build M=$PWD modules_install make[1]: Entering directory '/usr/src/linux-headers-4.0.0-kali1-686-pae' Makefile:10: *\ mixed implicit and normal rules: deprecated syntax INSTALL /root/Desktop/mt7601u-master/mt7601u.ko DEPMOD 4.0.0-kali1-686-pae make[1]: Leaving directory '/usr/src/linux-headers-4.0.0-kali1-686-pae'

rolurq commented 9 years ago

Hi, a have the same problem with the driver. I'm using debian stretch, when i run make on the driver directory:

make

Mon Sep 14 17:26:28 EDT 2015 make -C tools make[1]: Entering directory '/var/lib/dkms/mt7601/3.0.0.4/build/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory '/var/lib/dkms/mt7601/3.0.0.4/build/tools' /var/lib/dkms/mt7601/3.0.0.4/build/tools/bin2h cp -f os/linux/Makefile.6 /var/lib/dkms/mt7601/3.0.0.4/build/os/linux/Makefile make -C /lib/modules/4.1.0-2-amd64/build SUBDIRS=/var/lib/dkms/mt7601/3.0.0.4/build/os/linux modules make[1]: Entering directory '/lib/modules/4.1.0-2-amd64/build'

WARNING: Symbol version dump ./Module.symvers is missing; modules will have no dependencies and modversions.

CC [M] /var/lib/dkms/mt7601/3.0.0.4/build/os/linux/../../os/linux/rt_profile.o /bin/sh: 1: ./scripts/recordmcount: not found scripts/Makefile.build:258: recipe for target '/var/lib/dkms/mt7601/3.0.0.4/build/os/linux/../../os/linux/rt_profile.o' failed make[2]: * [/var/lib/dkms/mt7601/3.0.0.4/build/os/linux/../../os/linux/rt_profile.o] Error 127 Makefile:1401: recipe for target 'module/var/lib/dkms/mt7601/3.0.0.4/build/os/linux' failed make[1]: * [module/var/lib/dkms/mt7601/3.0.0.4/build/os/linux] Error 2 make[1]: Leaving directory '/lib/modules/4.1.0-2-amd64/build' Makefile:394: recipe for target 'LINUX' failed make: *\ [LINUX] Error 2

annoonymous commented 9 years ago

Hey visit the link and check out the reply by Chill555 .... I've got the sollution there ....good luck http://askubuntu.com/questions/457061/ralink-148f7601-wifi-adapter-installation

Harikrishna583 commented 6 years ago

help me......

make -C tools make[1]: Entering directory '/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools' gcc -g bin2h.c -o bin2h make[1]: Leaving directory '/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools' /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools/bin2h cp -f os/linux/Makefile.6 /root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile make -C /lib/modules/4.15.0-kali2-amd64/build SUBDIRS=/root/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules make[1]: /lib/modules/4.15.0-kali2-amd64/build: No such file or directory. Stop. make: [Makefile:395: LINUX] Error 2