BitShares Forum

Main => 中文 (Chinese) => Topic started by: crazybit on August 01, 2014, 12:47:16 pm

Title: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 12:47:16 pm
100个btsx现在虽然不值多少钱,但待到btsxs500刀时,弄个网卡驱动值得5w刀就会变成1w比特币买一块披萨一样的传说呀。

小度wifi usb无线网卡,在win下正常上网。但是在ubuntu下没有官方驱动,搜了一轮,是MT7601的芯片,说要编译内核,搞了一通没搞定,100btsx求大神帮忙。
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 01:04:26 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 01:29:16 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
我按这个教程弄过了,make的时候过不了。

Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 01:33:06 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
我按这个教程弄过了,make的时候过不了。

可以提供你的錯誤訊息嗎?
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 01:39:58 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
我按这个教程弄过了,make的时候过不了。

可以提供你的錯誤訊息嗎?

/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2052:4: note: expected ‘const char *’ but argument is of type ‘UINT32 *’
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:22: warning: unused variable ‘macValue’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:9: warning: unused variable ‘macAddr’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
^
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSIRQRelease’:
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2173:21: warning: unused variable ‘net_dev’ [-Wunused-variable]
struct net_device *net_dev = (struct net_device *)pNetDev;
make[2]: *** [/home/crazybit/driver/os/linux/../../os/linux/rt_linux.o] Error 1
make[1]: *** [_module_/home/crazybit/driver/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'
make: *** [LINUX] Error 2
Title: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: yyh2o on August 01, 2014, 01:55:29 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
我按这个教程弄过了,make的时候过不了。

可以提供你的錯誤訊息嗎?

/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2052:4: note: expected ‘const char *’ but argument is of type ‘UINT32 *’
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:22: warning: unused variable ‘macValue’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:9: warning: unused variable ‘macAddr’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
^
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSIRQRelease’:
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2173:21: warning: unused variable ‘net_dev’ [-Wunused-variable]
struct net_device *net_dev = (struct net_device *)pNetDev;
make[2]: *** [/home/crazybit/driver/os/linux/../../os/linux/rt_linux.o] Error 1
make[1]: *** [_module_/home/crazybit/driver/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'
make: *** [LINUX] Error 2

第一步,下载linux上的驱动,可以去官网下载


第二步:没有gcc的,安装gcc。。。 解压下载得到的驱动的压缩包,修改里面的/os/linux/rt_linux.c 的1211行和1222行的

                pOSFSInfo->fsuid = current_fsuid();
                pOSFSInfo->fsuid = current_fsuid();

                把他们两个改为

                pOSFSInfo->fsuid = *(int *)&current_fsuid();
                pOSFSInfo->fsuid = *(int *)&current_fsuid();

               在common/rtusb_dev_id.c中找到#ifdef MT7601U

                在其下面添加

                {USB_DEVICE(0x148f,0x760b)}, /* 360 Wifi Gen 2*/
                {USB_DEVICE(0x2955,0x1001)}, /* Xiao Du Wifi*/

                {USB_DEVICE(0x2717,0x4106)}, /* XiaoMi wifi */

第三步:

make
make install
modprobe mt7601Usta

Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 02:35:21 pm
有人寫了教學在這裡:
http://ubuntuforums.org/showthread.php?t=2210930

你可以採用他的方法:

到這裡下載:
http://www.mediatek.com/en/downloads/mt7601u-usb/

然後解壓進去編譯模組
Code: [Select]
sudo apt-get install linux-headers-generic build-essential
cd ~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
make clean
make
sudo make install
sudo modprobe mt7601Usta

不知道可不可以?
我按这个教程弄过了,make的时候过不了。

可以提供你的錯誤訊息嗎?

/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2052:4: note: expected ‘const char *’ but argument is of type ‘UINT32 *’
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:22: warning: unused variable ‘macValue’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2037:9: warning: unused variable ‘macAddr’ [-Wunused-variable]
UINT32 macAddr = 0, macValue = 0;
^
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSIRQRelease’:
/home/crazybit/driver/os/linux/../../os/linux/rt_linux.c:2173:21: warning: unused variable ‘net_dev’ [-Wunused-variable]
struct net_device *net_dev = (struct net_device *)pNetDev;
make[2]: *** [/home/crazybit/driver/os/linux/../../os/linux/rt_linux.o] Error 1
make[1]: *** [_module_/home/crazybit/driver/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'
make: *** [LINUX] Error 2


我下載了也碰到一樣的狀況
我是了yyh2o的方法還是一樣


我後來是採用下列連結提到的方法才成功的:
http://www.arnelborja.com/compiling-rt2870-wifi-driver-in-fedora/


也就是說
重新解壓縮一份驅動檔案
修改目錄底下include/os/rt_linux.h
這一個檔案

裡面開頭有一段原本是:
Code: [Select]
typedef struct _OS_FS_INFO_
 {
int fsuid;
int fsgid;



把中間那兩個改成:


Code: [Select]
typedef struct _OS_FS_INFO_
 {
kuid_t fsuid;
kgid_t fsgid;

重新編譯
我這邊是成功, 不會有錯誤訊息
make完你可以用
Code: [Select]
echo $?看是不是0, 0就是成功

然後再接著作make install等等
如果模組認不到你的裝置
我想你需要作像是yyh2o在common/rtusb_dev_id.c的事情
你可以插入你的無線網卡
用lsusb得知它的ID
搜尋common/rtusb_dev_id.c裡面看有沒有你的ID
沒有的話就用yyh2o的方法插入
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: Musewhale on August 01, 2014, 02:44:23 pm
走错门了  :P
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 当年很厉害 on August 01, 2014, 03:04:52 pm
居然在一个帖子里见到麦可猫踩了这么多楼.不容易呀.
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 03:42:30 pm
居然在一个帖子里见到麦可猫踩了这么多楼.不容易呀.

真是不好意思 :-[
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 03:52:34 pm
i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 04:08:21 pm
i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2


你得先裝dkms:
Code: [Select]
sudo apt-get install dkms
然後
把$sudo make install
改成這樣:

Code: [Select]
$sudo su
$make install
$echo $?

我這邊成功了
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 04:12:50 pm
same error encountered.

root@crazybit:/etc# su
root@crazybit:/etc# ls Wireless
Wireless
root@crazybit:/etc# cd Wireless
bash: cd: Wireless: Not a directory

i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2


你得先裝dkms:
Code: [Select]
sudo apt-get install dkms
然後
把$sudo make install
改成這樣:

Code: [Select]
$sudo su
$make install
$echo $?

我這邊成功了
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 04:22:51 pm
same error encountered.

root@crazybit:/etc# su
root@crazybit:/etc# ls Wireless
Wireless
root@crazybit:/etc# cd Wireless
bash: cd: Wireless: Not a directory

i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2


你得先裝dkms:
Code: [Select]
sudo apt-get install dkms
然後
把$sudo make install
改成這樣:

Code: [Select]
$sudo su
$make install
$echo $?

我這邊成功了

我這邊本來就有這個資料夾
或許是內建的某個套件安裝時建立的
但是我的目錄裡面又只有你這個驅動程式

或許你可以先試試看安裝wireless的套件:
Code: [Select]
sudo apt-get install wireless-tools iw

看看這個資料夾有沒有出現
如果沒有

乾脆先自己建立:
Code: [Select]
sudo su
mkdir /etc/Wireless

然後再make install
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 01, 2014, 04:30:09 pm
oh yeah, we make it, thanks for your kindly help, please give me your BTSX account.

same error encountered.

root@crazybit:/etc# su
root@crazybit:/etc# ls Wireless
Wireless
root@crazybit:/etc# cd Wireless
bash: cd: Wireless: Not a directory

i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2


你得先裝dkms:
Code: [Select]
sudo apt-get install dkms
然後
把$sudo make install
改成這樣:

Code: [Select]
$sudo su
$make install
$echo $?

我這邊成功了

我這邊本來就有這個資料夾
或許是內建的某個套件安裝時建立的
但是我的目錄裡面又只有你這個驅動程式

或許你可以先試試看安裝wireless的套件:
Code: [Select]
sudo apt-get install wireless-tools iw

看看這個資料夾有沒有出現
如果沒有

乾脆先自己建立:
Code: [Select]
sudo su
mkdir /etc/Wireless

然後再make install
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 01, 2014, 05:07:25 pm
oh yeah, we make it, thanks for your kindly help, please give me your BTSX account.

same error encountered.

root@crazybit:/etc# su
root@crazybit:/etc# ls Wireless
Wireless
root@crazybit:/etc# cd Wireless
bash: cd: Wireless: Not a directory

i think we will make it soon, it is a bit wired that the root account can not create the required folder to install the driver.any idea? i even can not "cd" to the existing folder 'etc/Wireless'

sudo make install
make[1]: Entering directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
mkdir: cannot create directory ‘/etc/Wireless/RT2870STA’: Not a directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/crazybit/driver/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux'
make: *** [install] Error 2


你得先裝dkms:
Code: [Select]
sudo apt-get install dkms
然後
把$sudo make install
改成這樣:

Code: [Select]
$sudo su
$make install
$echo $?

我這邊成功了

我這邊本來就有這個資料夾
或許是內建的某個套件安裝時建立的
但是我的目錄裡面又只有你這個驅動程式

或許你可以先試試看安裝wireless的套件:
Code: [Select]
sudo apt-get install wireless-tools iw

看看這個資料夾有沒有出現
如果沒有

乾脆先自己建立:
Code: [Select]
sudo su
mkdir /etc/Wireless

然後再make install

我的帳號是michaelcat

此外, 可以請你總結一下你是怎麼解決的嗎?
我覺得這會對有類似需求的人幫助很大
因為如你所見, 網絡上的討論有很多版本

謝謝
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 02, 2014, 12:28:09 am
等我完全搞定了,在整理一下,现在还有问题,虽然可以识别网卡,但是一上网就死机。
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 02, 2014, 03:50:29 am
等我完全搞定了,在整理一下,现在还有问题,虽然可以识别网卡,但是一上网就死机。

如果你的問題是kernel panic的話
這裡有相關討論:
http://www.freemindworld.com/blog/2013/131010_360_wifi_in_linux.shtml

總的來說是內核的相容性問題

我猜你可以多裝幾個核心版本試試看
而同一個模組在不同核心版本都必須要重新編譯和安裝
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: crazybit on August 02, 2014, 01:42:02 pm
@麥可貓 100 BTSX has been sent. pls check ,thanks.

@yyh2o please provide your account as well, i will tip you 10 BTSX for your research.
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: 麥可貓 on August 02, 2014, 02:01:15 pm
@麥可貓 100 BTSX has been sent. pls check ,thanks.

@yyh2o please provide your account as well, i will tip you 10 BTSX for your research.

確認收到了. 多謝你
Title: Re: 悬赏100btsx弄个ubuntu USB无线网卡驱动
Post by: yyh2o on August 02, 2014, 03:59:30 pm

@麥可貓 100 BTSX has been sent. pls check ,thanks.

@yyh2o please provide your account as well, i will tip you 10 BTSX for your research.
Thanks, forget it