You are not logged in.

#1 2019-10-26 03:00:34

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

[SOLVED]mt76x2u driver does not work properly

Hi everyone!
I bought a new wireless card and it is based on mt7612u chipset.When I run

$ lsusb

it showed:

Bus 001 Device 002: ID 0e8d:2870 MediaTek Inc. Љ

As this device did not work properly,I looked for a solution in wiki and found this.However,when I tried building the driver,it returned error:

/home/liu/Downloads/DPO/include/cfg80211.h:39:49: Error:‘IEEE80211_NUM_BANDS’ undeclared here (not in a function); did you mean ‘IEEE80211_NUM_ACS’?
 39 |  struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
    |                                                 ^~~~~~~~~~~~~~~~~~~
    |                                                 IEEE80211_NUM_ACS

I did not know how this driver work so I gave up.
And I looked for AUR and there is no solution for this chipset,too.What should I do?
Thank you!
Edit:According to seth's advice,I checked about the mt76x2u driver on my device.
Here is the result of

$ lsmod | grep mt
mt76x2u                24576  1
mt76x2_common          24576  1 mt76x2u
mt76x02_usb            20480  1 mt76x2u
mt76_usb               36864  2 mt76x02_usb,mt76x2u
mt76x02_lib            81920  3 mt76x02_usb,mt76x2u,mt76x2_common
mt76                   57344  5 mt76_usb,mt76x02_lib,mt76x02_usb,mt76x2u,mt76x2_common
mac80211              999424  5 mt76,mt76_usb,mt76x02_lib,mt76x02_usb,mt76x2u
cfg80211              856064  5 mt76,mt76x02_lib,mac80211,mt76x02_usb,r8188eu

It seems that the driver modules are loaded correctly.However,the result of

$ dmesg | grep usbcore

is

[    0.694088] usbcore: registered new interface driver usbfs
[    0.694094] usbcore: registered new interface driver hub
[    0.694124] usbcore: registered new device driver usb
[    1.722972] usbcore: registered new interface driver usbserial_generic
[    2.564058] usbcore: registered new interface driver usbhid
[    9.154334] usbcore: registered new interface driver btusb
[    9.516554] usbcore: registered new interface driver uvcvideo
[   39.349440] usbcore: registered new interface driver r8188eu
[ 1123.242246] usbcore: registered new interface driver usb-storage
[ 1123.255030] usbcore: registered new interface driver uas

As you can see,the card was not detected (properly).What should I do?

Last edited by ThomasBurns (2019-11-09 15:32:32)

Offline

#2 2019-10-26 06:57:59

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED]mt76x2u driver does not work properly

The out-of-tree driver is terribly dated, afaics you should be using  mt76x2u  (check lsmod) and focus on "did not work properly" (see https://bbs.archlinux.org/viewtopic.php?id=57855 and http://www.catb.org/~esr/faqs/smart-questions.html )

Offline

#3 2019-10-26 17:14:05

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

Re: [SOLVED]mt76x2u driver does not work properly

seth wrote:

The out-of-tree driver is terribly dated, afaics you should be using  mt76x2u  (check lsmod) and focus on "did not work properly" (see https://bbs.archlinux.org/viewtopic.php?id=57855 and http://www.catb.org/~esr/faqs/smart-questions.html )

Yes,I have checked the Readme file ,which said the driver is for 2.x kernels.Sorry to be careless,and thank you for your advice.I'm now changing the topic.

Offline

#4 2019-10-26 19:17:56

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED]mt76x2u driver does not work properly

Please post a complete journal and the output of "ip a", ensure you've linux-firmware installed.

Offline

#5 2019-10-27 04:08:24

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

Re: [SOLVED]mt76x2u driver does not work properly

seth wrote:

Please post a complete journal and the output of "ip a", ensure you've linux-firmware installed.

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
    link/ether 08:57:00:f0:70:8e brd ff:ff:ff:ff:ff:ff
3: wlp0s22f2u4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:5a:39:ef:89:d7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp0s22f2u4
       valid_lft 86298sec preferred_lft 86298sec
    inet6 fe80::6bc2:cf65:58d0:aed5/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever

Please note that wlp0s22f2u4 is my old wireless card.

$ pacman -Q | grep linux-firmware
linux-firmware 20191022.2b016af-1

Last edited by ThomasBurns (2019-10-27 04:08:58)

Offline

#6 2019-10-27 06:53:25

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED]mt76x2u driver does not work properly

seth wrote:

post a complete journal

The absence of what you'd expect will not explain why what you expect is no present…

Offline

#7 2019-11-02 03:22:35

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

Re: [SOLVED]mt76x2u driver does not work properly

seth wrote:
seth wrote:

post a complete journal

The absence of what you'd expect will not explain why what you expect is no present…

I am really sorry for my delay and mistake.:(
Does 'a complete journal' mean the complete output of

$ journalctl 

?
When I finally got home just now, I found my network connection is broken.So I'm sorry that I can't upgrade my system now.

Offline

#8 2019-11-02 03:35:24

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [SOLVED]mt76x2u driver does not work properly

I believe seth meant the journal output for one boot.
If the current boot has the issue then:

journalctl -b

Last edited by loqs (2019-11-02 03:35:43)

Offline

#9 2019-11-02 04:05:25

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

Re: [SOLVED]mt76x2u driver does not work properly

loqs wrote:

I believe seth meant the journal output for one boot.
If the current boot has the issue then:

journalctl -b

It have 30000+ lines.Is it OK to put it here?

Offline

#10 2019-11-02 07:25:11

progandy
Member
Registered: 2012-05-17
Posts: 5,193

Re: [SOLVED]mt76x2u driver does not work properly

It looks like your wireless card isn't recognized by the driver yet. The USB ID is not in the list of known devices:
https://github.com/torvalds/linux/blob/ … /usb.c#L12
If that is the case, then you could try to add it with /sys/bus/usb/drivers/mt76x2u/new_id. https://www.kernel.org/doc/Documentatio … fs-bus-usb

Edit: You probably need an usb_modeswitch rule to eject the cd drive and show the "0e8d:7612" wifi interface. You can try it with

usb_modeswitch -K -W -v 0e8d -p 2870

http://www.draisberghof.de/usb_modeswit … &view=next

This post claims that the in-kernel driver crashes the system with this card, though. I have no idea if this has changed with v5.3, so you might have to try the driver linked there.

Last edited by progandy (2019-11-02 07:45:53)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#11 2019-11-09 15:31:45

ThomasBurns
Member
Registered: 2019-10-26
Posts: 6

Re: [SOLVED]mt76x2u driver does not work properly

progandy wrote:

It looks like your wireless card isn't recognized by the driver yet. The USB ID is not in the list of known devices:
https://github.com/torvalds/linux/blob/ … /usb.c#L12
If that is the case, then you could try to add it with /sys/bus/usb/drivers/mt76x2u/new_id. https://www.kernel.org/doc/Documentatio … fs-bus-usb

Edit: You probably need an usb_modeswitch rule to eject the cd drive and show the "0e8d:7612" wifi interface. You can try it with

usb_modeswitch -K -W -v 0e8d -p 2870

http://www.draisberghof.de/usb_modeswit … &view=next

This post claims that the in-kernel driver crashes the system with this card, though. I have no idea if this has changed with v5.3, so you might have to try the driver linked there.

The command does work!Thanks a lot! smile

Last edited by ThomasBurns (2019-11-09 15:35:43)

Offline

Board footer

Powered by FluxBB