web-dev-qa-db-ja.com

Ralink USB RT2870用ドライバー-> 148f:7601

下記のRalink USBネットワークインターフェイスデバイスを購入しました

$lsusb
Bus 004 Device 002: ID 148f:7601 Ralink Technology, Corp.

そして、私はすべて同じチップセットドライバーを指す多くのスレッドを見てきました:mt7601u

だから私はGitHubに行きました: https://github.com/kuba-moo/mt7601

ブート中にカーネルクラッシュが発生し始める前の数日間は正常に機能したカスタムドライバーを使用しました(このドライバーは使用しないでください!!)

それで私は戻ってベンダーのドライバーをダウンロードしました( http://www.mediatek.com/en/downloads1/downloads/mt7601u-usb/

しかし、とにかくコンパイルできません。 「$ make」がクラッシュするのは、おそらくLinuxバージョン3.16を使用しているためです。少なくとも3.19が必要です。

$uname -r
3.16.0-4-AMD64

私はDebianを使用しており、最新の安定版リリースは現在持っているものであり、そのまま維持したいと考えています。プランBとは? 「firmware-ralink」パッケージがインストールされています。

次に何をすべきか本当にわからない。多分私は別のUSBネットワークインターフェースを購入する必要がありますか?もしそうなら、Debianで簡単にインストールするための提案を残してください。

この問題はすべて、コンピューターにバグのあるネットワークインターフェイスがあるために発生していることを述べておきます(REALTEKチップセットに注意してください!!)

$lspci -vnn | grep "Network"
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. 
RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]

*****編集*****

回答GAD3Rをありがとう

すべてが正しくインストールされていることを確認しました。それから私はすべてを確実にアップグレードしました。

$Sudo apt-get update
$Sudo apt-get upgrade

Config.mkファイルに変更を追加しました

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

コンパイル時にまだエラーが発生する:

$ Sudo make && make install
make -C tools
make[1]: Entering directory '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/3.16.0-4-AMD64/build SUBDIRS=/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-AMD64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-AMD64'
  CC [M]  /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o
In file included from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42:0,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘duplicate_pkt’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:477:18: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast
   NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
                  ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:450:61: note: in definition of macro ‘NdisMoveMemory’
 #define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
                                                             ^
In file included from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/string.h:4:0,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/string.h:17,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/bitmap.h:8,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/cpumask.h:11,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/cpumask.h:4,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/msr.h:10,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/processor.h:20,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/thread_info.h:23,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/thread_info.h:54,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/preempt.h:18,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/spinlock.h:50,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/seqlock.h:35,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/time.h:5,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/stat.h:18,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/module.h:10,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:40,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
 void *memmove(void *dest, const void *src, size_t count);
       ^
In file included from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42:0,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:479:18: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast
   NdisMoveMemory(skb->tail, pData, DataSize);
                  ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:450:61: note: in definition of macro ‘NdisMoveMemory’
 #define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
                                                             ^
In file included from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/string.h:4:0,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/string.h:17,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/bitmap.h:8,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/cpumask.h:11,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/cpumask.h:4,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/msr.h:10,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/processor.h:20,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/thread_info.h:23,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/thread_info.h:54,
                 from /usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/preempt.h:6,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/preempt.h:18,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/spinlock.h:50,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/seqlock.h:35,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/time.h:5,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/stat.h:18,
                 from /usr/src/linux-headers-3.16.0-4-common/include/linux/module.h:10,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:40,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
                 from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/usr/src/linux-headers-3.16.0-4-common/Arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
 void *memmove(void *dest, const void *src, size_t count);
       ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘ClonePacket’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:629:23: warning: assignment makes integer from pointer without a cast
      pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
                       ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘update_os_packet_info’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:651:15: warning: assignment makes integer from pointer without a cast
  pOSPkt->tail = pOSPkt->data + pOSPkt->len;
               ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘wlan_802_11_to_802_3_packet’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:672:15: warning: assignment makes integer from pointer without a cast
  pOSPkt->tail = pOSPkt->data + pOSPkt->len;
               ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘send_monitor_packets’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:945:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
         DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
         ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSFSInfoChange’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1228:20: error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’
   pOSFSInfo->fsuid = current_fsuid();
                    ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1229:20: error: incompatible types when assigning to type ‘int’ from type ‘kgid_t’
   pOSFSInfo->fsgid = current_fsgid();  
                    ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevDetach’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1694:38: warning: initialization discards ‘const’ qualifier from pointer target type
  struct net_device_ops *pNetDevOps = pNetDev->netdev_ops;
                                      ^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevAttach’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1731:38: warning: initialization discards ‘const’ qualifier from pointer target type
  struct net_device_ops *pNetDevOps = pNetDev->netdev_ops;
                                      ^
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o' failed
make[4]: *** [/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1352: recipe for target '_module_/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux' failed
make[3]: *** [_module_/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
Makefile:181: 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-3.16.0-4-AMD64'
Makefile:243: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
sugar@sugarraysam:~/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1$ 

動作しているドライバーが見つかりません。

私がウェブ上で見つけた「公式のRalinkソース」は http://www.ralinktech.com/ です。これはただの広告です...

MediaTek(親会社)からRalinkドライバーが見つかりました-> http://mediatek.com/en/downloads1/downloads/mt7612u/ 。しかし、コンパイル時にエラーが発生します。

助けてくれてありがとう。

2
sugarraysam

依存関係をインストールします。

apt-get install build-essential fakeroot dpkg-dev
apt-get install linux-headers-$(uname -r)

ダウンロードdriver 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2 from here

解凍してロードする

tar -jxvf 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2
cd 2010_0709_RT2870_Linux_STA_v2.4.0.1

Config.mkを編集nano os/linux/config.mk

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

コンパイル

make
make install
1
GAD3R

http://gentoo-en.vfose.ru/wiki/Ralink_RT287 が役立ちます。特に、デバイスのカーネルサポートは、rt2800usbドライバーの形ですでにカーネルに含まれているように見えることに注意してください。参照 https://wiki.debian.org/rt2800usb

そのページはファームウェアrt2870.binについて言及しています。 apt-fileは、これに対して2つのヒットを返します。

apt-file search rt2870.bin
firmware-misc-nonfree: /lib/firmware/rt2870.bin
firmware-ralink: /lib/firmware/rt2870.bin

firmware-ralinkはjessieで使用します。 firmware-misc-nonfreeは不安定版のみです。

0
Faheem Mitha