Как получить Wi-Fi Mediatek MT 7601 USB, работающий над Ubuntu 18.04?

Первая вещь сказать состоит в том, что я исследовал и попробовал решения, предложенные в других подобных вопросах, но до сих пор ничто не работало. Я знаю, что Wi-Fi USB не является дефектным, поскольку он просто хорошо работает в Windows 10 на той же машине. Случайно это также не работает в Mac OS 10.13.6 (Это - MacBook Pro 2011 с поврежденным внутренним адаптером WiFi).

lsusb

дает следующее: Соедините шиной 002 Устройства 006: идентификатор 148f:7601 Беспроводной адаптер Ralink Technology, Corp. MT7601U

dmesg

сразу после включения устройства дает:

[ 2265.257271] usb 1-1.3: new high-speed USB device number 11 using ehci-pci
[ 2265.376911] usb 1-1.3: New USB device found, idVendor=148f, idProduct=7601
[ 2265.376915] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2265.376917] usb 1-1.3: Product: 802.11 n WLAN
[ 2265.376919] usb 1-1.3: Manufacturer: MediaTek
[ 2265.376921] usb 1-1.3: SerialNumber: 1.0

Если я пробую iwconfig:

$ iwconfig
lo        no wireless extensions.

enp2s0f0  no wireless extensions.

Я загрузил встроенное микропрограммное обеспечение с веб-сайта MediaTek и поместил его в правильную папку и также попытался скомпилировать или установить различные пакеты, которые или бросили ошибки компиляции или не сделали ничего для получения работы WiFi.

У кого-либо есть совет или до решения для даты для этого?

Я пытался следовать инструкциям, данным для ответа @chili555:

     $ make
    make -C tools
    make[1]: Entering directory '/home/baldwin/mt7601usta/src/tools'
    gcc -g bin2h.c -o bin2h
    make[1]: Leaving directory '/home/baldwin/mt7601usta/src/tools'
    /home/baldwin/mt7601usta/src/tools/bin2h
    cp -f os/linux/Makefile.6 /home/baldwin/mt7601usta/src/os/linux   /Makefile
    make -C /lib/modules/4.15.0-39-generic/build SUBDIRS=/home/baldwin  /mt7601usta/src/os/linux modules
    make[1]: Entering directory '/usr/src/linux-headers-4.15.0-39-generic'
     CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../os/linux /rt_profile.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/assoc.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/auth.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/auth_rsp.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/sync.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/sanity.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/rtmp_data.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/connect.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/wpa.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.o
     /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c: In           function ‘Set_EncrypType_Proc’:
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:1104:5: warning:   this ‘else’ clause does not guard... [-Wmisleading-indentation]
        else
         ^~~~
        /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:1107:2:    note: ...this statement, but the latter is misleadingly indented as if it were    guarded by the ‘else’
      if (pAd->StaCfg.BssType == BSS_ADHOC)
      ^~
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c: In function      ‘RtmpIoctl_rt_ioctl_siwfreq’:
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:6018:5:     warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
         else
         ^~~~
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:6021:2:   note: ...this statement, but the latter is misleadingly indented as if it were  guarded by the ‘else’
      return NDIS_STATUS_SUCCESS;
      ^~~~~~
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c: In function      ‘RtmpIoctl_rt_ioctl_giwrate’:
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:7928:5:  warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
          if (rate_index >= rate_count)
          ^~
    /home/baldwin/mt7601usta/src/os/linux/../../sta/sta_cfg.c:7931:2:  note: ...this statement, but the latter is misleadingly indented as if it were  guarded by the ‘if’
      *(ULONG *)pData = ralinkrate[rate_index] * 500000;
      ^
     CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common /crypt_md5.o
     CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/crypt_sha2.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/crypt_hmac.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/crypt_aes.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common   /crypt_arc4.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/mlme.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_wep.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/action.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_data.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/rtmp_init.o
    /home/baldwin/mt7601usta/src/os/linux/../../common/rtmp_init.c: In  function ‘NICInitializeAsic’:
    /home/baldwin/mt7601usta/src/os/linux/../../common/rtmp_init.c:1656:1:  warning: the frame size of 1048 bytes is larger than 1024 bytes [-Wframe- larger-than=]
     }
     ^
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common /rtmp_init_inf.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_tkip.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_aes.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_sync.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/eeprom.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_sanity.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common /cmm_info.o
     /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c: In    function ‘GetEncryptType’:
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1752:5:      warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
         if(enc == Ndis802_11Encryption3Enabled)
         ^~
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1754:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
       if(enc == Ndis802_11Encryption4Enabled)
       ^~
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c: In function ‘GetAuthMode’:
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1764:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
         if(auth == Ndis802_11AuthModeShared)
         ^~
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1766:2:    note: ...this statement, but the latter is misleadingly indented as if it were   guarded by the ‘if’
      if(auth == Ndis802_11AuthModeAutoSwitch)
      ^~
     /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1776:5:   warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
         if(auth == Ndis802_11AuthModeWPA2PSK)
         ^~
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:1778:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
       if(auth == Ndis802_11AuthModeWPA1WPA2)
      ^~
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c: In  function ‘Show_PMK_Proc’:
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:4198:5:  warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
 for (idx = 0; idx < 32; idx++)
 ^~~
   /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_info.c:4201:2:  note: ...this statement, but the latter is misleadingly indented as if it were  guarded by the ‘for’
      return 0;
      ^~~~~~
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_cfg.o
     CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_wpa.o
    /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_wpa.c: In    function ‘WPAStart2WayGroupHS’:
     /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_wpa.c:1257:5:      warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
        if ((!pEntry) || !IS_ENTRY_CLIENT(pEntry))
         ^~
     /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_wpa.c:1262:2:    note: ...this statement, but the latter is misleadingly indented as if it were  guarded by the ‘if’
       os_alloc_mem(NULL, (PUCHAR *)&mpool, TX_EAPOL_BUFFER);
      ^~~~~~~~~~~~
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_radar.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/spectrum.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/rtmp_timer.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/rt_channel.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_profile.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_asic.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/scan.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/cmm_cmd.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/uapsd.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/ps.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../rate_ctrl/ra_ctrl.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../rate_ctrl/alg_legacy.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../rate_ctrl/alg_ags.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../chips/rtmp_chip.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/txpower.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../mac/rtmp_mac.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../mgmt/mgmt_hw.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../..       /mgmt/mgmt_entrytb.o
   /home/baldwin/mt7601usta/src/os/linux/../../mgmt/mgmt_entrytb.c: In    function ‘MacTableInsertEntry’:
     /home/baldwin/mt7601usta/src/os/linux/../../mgmt/mgmt_entrytb.c:103:2: warning: this ‘if’ clause does not guard...  [-Wmisleading-indentation]
      if (pAd->MacTab.Size >= MAX_LEN_OF_MAC_TABLE)
      ^~
    /home/baldwin/mt7601usta/src/os/linux/../../mgmt/mgmt_entrytb.c:106:3:   note: ...this statement, but the latter is misleadingly indented as if it were   guarded by the ‘if’
      FirstWcid = 1;
       ^~~~~~~~~
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../phy/rtmp_phy.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../phy/rlt_phy.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../phy/rlt_rf.o
      CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/ba_action.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../mgmt/mgmt_ht.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../common/rt_os_util.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../os/linux/sta_ioctl.o
       CC [M]  /home/baldwin/mt7601usta/src/os/linux/../../os/linux  /rt_linux.o
    /home/baldwin/mt7601usta/src/os/linux/../../os/linux/rt_linux.c: In function ‘__RTMP_OS_Init_Timer’:
    /home/baldwin/mt7601usta/src/os/linux/../../os/linux/rt_linux.c:120:3: error: implicit declaration of function ‘init_timer’; did you mean  ‘init_timers’? [-Werror=implicit-function-declaration]
       init_timer(pTimer);
       ^~~~~~~~~~
        init_timers
    /home/baldwin/mt7601usta/src/os/linux/../../os/linux/rt_linux.c:121:9: error: ‘OS_NDIS_MINIPORT_TIMER {aka struct timer_list}’ has no member named  ‘data’
        pTimer->data = (unsigned long)data;
             ^~
     /home/baldwin/mt7601usta/src/os/linux/../../os/linux       /rt_linux.c:122:20: error: assignment from incompatible pointer type    [-Werror=incompatible-pointer-types]
      pTimer->function = function;
                ^
     cc1: some warnings being treated as errors
     scripts/Makefile.build:332: recipe for target '/home/baldwin/mt7601usta/src/os/linux/../../os/linux/rt_linux.o' failed
     make[2]: *** [/home/baldwin/mt7601usta/src/os/linux/../../os/linux/rt_linux.o] Error 1
      Makefile:1551: recipe for target '_module_/home/baldwin/mt7601usta /src/os/linux' failed
      make[1]: *** [_module_/home/baldwin/mt7601usta/src/os/linux] Error 2
       make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-39-   generic'
     Makefile:418: recipe for target 'LINUX' failed
     make: *** [LINUX] Error 2

Затем на всякий случай это так или иначе работало так или иначе:

$ sudo modprobe mt7601Usta

    modprobe: FATAL: Module mt7601Usta not found in directory /lib/modules  /4.15.0-39-generic

Информация из последнего комментария: $ sudo updatedb && определяют местоположение mt7601u.ko

/lib/modules/4.15.0-38-generic/kernel/drivers/net/wireless/mediatek  /mt7601u/mt7601u.ko
/lib/modules/4.15.0-39-generic/kernel/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko

    $ sudo modprobe mt7601u && dmesg | grep mt76
[ 1102.391048] mt7601u 1-1.3:1.0: ASIC revision: 76010001 MAC revision:     76010500
[ 1102.432663] mt7601u 1-1.3:1.0: EEPROM ver:0c fae:00
[ 1102.610548] mt7601u 1-1.3:1.0: Error: RX urb failed:-71
[ 1102.610690] mt7601u 1-1.3:1.0: Error: MCU resp urb failed:-71
[ 1102.610703] mt7601u 1-1.3:1.0: Error: MCU resp evt:0 seq:5-4!
[ 1102.614793] mt7601u 1-1.3:1.0: Error: RX urb failed:-71
[ 1102.615055] mt7601u 1-1.3:1.0: Error: MCU resp urb failed:-71
[ 1102.615063] mt7601u 1-1.3:1.0: Error: MCU resp evt:0 seq:5-4!
[ 1102.619034] mt7601u 1-1.3:1.0: Error: RX urb failed:-71
[ 1102.619356] mt7601u 1-1.3:1.0: Error: MCU resp urb failed:-71
[ 1102.619375] mt7601u 1-1.3:1.0: Error: MCU resp evt:0 seq:5-4!
[ 1102.623360] mt7601u 1-1.3:1.0: Error: RX urb failed:-71
[ 1102.623598] mt7601u 1-1.3:1.0: Error: MCU resp urb failed:-71
[ 1102.623619] mt7601u 1-1.3:1.0: Error: MCU resp evt:0 seq:5-4!
[ 1102.627523] mt7601u 1-1.3:1.0: Error: RX urb failed:-71
[ 1102.627782] mt7601u 1-1.3:1.0: Error: MCU resp urb failed:-71
[ 1102.627785] mt7601u 1-1.3:1.0: Error: MCU resp evt:0 seq:5-4!
[ 1102.627787] mt7601u 1-1.3:1.0: Error: mt7601u_mcu_wait_resp timed out
[ 1102.795071] mt7601u: probe of 1-1.3:1.0 failed with error -110
[ 1102.795178] usbcore: registered new interface driver mt7601u

Теперь я попробовал:

$ md5sum /lib/firmware/mt7610u.bin
696cedb8e76ecc0cda9f9b0d3972c64d  /lib/firmware/mt7610u.bin

Затем:

$ sudo dpkg -s linux-firmware | grep Version
Version: 1.173.2

Последовав совету ниже и устанавливающий последнюю версию встроенного микропрограммного обеспечения:

$ dmesg | grep ath
$ md5sum /lib/firmware/mt7610u.bin
696cedb8e76ecc0cda9f9b0d3972c64d  /lib/firmware/mt7610u.bin

Это - все еще то же как прежде.

1
задан 30 November 2018 в 12:19

1 ответ

Ваш микропрограммный файл, mt7610u.bin, имеет другой md5sum и по-видимому отличается, который последнее включало во встроенное микропрограммное обеспечение Linux. Давайте установим более поздний пакет и посмотрим, исчезают ли таинственные ошибки.

С рабочим интернет-соединением Ethernet, ограничиванием или безотносительно возможных средств, откройте терминал и сделайте:

cd /tmp
wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.175.1_all.deb
sudo dpkg -i linux-firmware*.deb

Перезагрузка и проверка:

dmesg | grep ath
1
ответ дан 7 December 2019 в 15:10

Другие вопросы по тегам:

Похожие вопросы: