Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MediaTek MT7601U not working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Sat Oct 19, 2019 11:20 am    Post subject: MediaTek MT7601U not working Reply with quote

i have a usb wifi adapter, "lsusb" shows:
Code:

Bus 001 Device 005: ID 2717:4106 Xiaomi Inc. MediaTek MT7601U [MI WiFi]
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 8087:0a2b Intel Corp.
Bus 001 Device 003: ID 04f2:b59a Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


so i choose in kernel:
Code:

Device Drivers --->
  [*] Network device support --->
    [*] wireless lan --->
      [*] MediaTek devices --->
        <M> MediaTek MT7601U (USB) support


after rebooting, "ifconfig" shows:
Code:

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 624  bytes 51872 (50.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 624  bytes 51872 (50.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f0u2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether f0:b4:29:37:3c:be  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.188  netmask 255.255.254.0  broadcast 192.168.1.255
        inet6 fe80::53b5:6bc2:1298:aa19  prefixlen 64  scopeid 0x20<link>
        ether a0:c5:89:17:aa:98  txqueuelen 1000  (Ethernet)
        RX packets 17483  bytes 9033383 (8.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12240  bytes 2089491 (1.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


but when i run "wpa_supplicant -i wlp0s20f0u2 -B -c /etc/wpa_supplicant/wpa_supplicant.conf", it can not connect to internet

"lsmod" shows:
Code:

Module                  Size  Used by
mt7601u               110592  0
iwlmvm                331776  0
btusb                  49152  0
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
btintel                20480  1 btusb
bluetooth             421888  5 btrtl,btintel,btbcm,btusb
x86_pkg_temp_thermal    16384  0
iwlwifi               278528  1 iwlmvm
ecdh_generic           24576  1 bluetooth
efivarfs               16384  1


that means "mt7601u" did not work ? i found in kernel:
Code:

Device Drivers --->
  [*] network device support --->
    <*> USB Network Adapters --->

should i choose some options in that?

what can i do to get my usb wifi working?
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 876
Location: Italy

PostPosted: Sat Oct 19, 2019 3:34 pm    Post subject: Reply with quote

According to https://github.com/kuba-moo/mt7601u you need to install a firmware.

What's the output of:
Code:
dmesg | grep mt7601u

?
Back to top
View user's profile Send private message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Sun Oct 20, 2019 4:33 pm    Post subject: Reply with quote

fturco, thank you for replying!

"dmesg | grep mt7601u" shows,
Code:

[ 1493.297106] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500
[ 1493.301016] mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[ 1493.663695] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
[ 1493.663902] mt7601u 1-2:1.0: EEPROM country region 01 (channels 1-13)
[ 1493.860550] usbcore: registered new interface driver mt7601u
[ 1493.863585] mt7601u 1-2:1.0 wlp0s20f0u2: renamed from wlan0


tomorrow i will try the code from github, hope it's usefull
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Sun Oct 20, 2019 4:38 pm    Post subject: Reply with quote

Sllyth,

So far there is nothing wrong but it appears that your Wifi has not started.

After you have tried to start Wifi, please put all of dmesg onto a pastebin site.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Mon Oct 21, 2019 1:04 am    Post subject: Reply with quote

NeddySeagoon, thanks for replying.
here is pastebin, https://pastebin.com/in2dwpmN
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 876
Location: Italy

PostPosted: Mon Oct 21, 2019 6:40 am    Post subject: Reply with quote

As far as I remember, running wpa_supplicant is not enough for connecting to the internet. You also probably need to get an IP address with DHCP in some way...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Mon Oct 21, 2019 10:30 am    Post subject: Reply with quote

Sllyth,

dmesg shows that there has been no attempt to start your WiFi.
Code:
[  245.504036] IPv6: ADDRCONF(NETDEV_UP): wlp0s20f0u2: link is not ready


There are no authenticating or associated entries.

Getting Wifi running is a two step process. The first step is authenticating and associated with the Access Point.
Once that's done, the ordinary tools used with wired network work to establish the network setup.

Its unusual to try to do in all with wpa_supplicant, or even run wpa_supplicant with a command, except for debugging.
It more usual to use a tool that does it all, including running wpa_supplicant.

There are no errors, what you have done so far is correct, you just haven't done all the steps yet.
Maybe this Wiki page helps?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Mon Oct 21, 2019 5:20 pm    Post subject: Reply with quote

NeddySeagoon, i now know there are two steps. but i still not know how to finish the first step.
should i use some tools to authenticate the access point?

fturco, i think you are right. maybe what you said is the same thing that NeddySeagoon said. so i need to use dhcpcd to get ip?

For another adapter in my laptop, i only use dhcpcd and wpa_supplicant to connect to internet, dhcpcd even not be configured by myself, i just emerge it...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44900
Location: 56N 3W

PostPosted: Mon Oct 21, 2019 5:31 pm    Post subject: Reply with quote

Sllyth,

There are several ways to manage your network interfaces in Gentoo.
Which one do you intend to use?

That it is a two step process will be invisible once you choose and configure the tool you want to use.

You must choose at most, one, as the various tools are unaware of each other and with two or more running, none can get control of the interface.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Tue Oct 22, 2019 1:58 am    Post subject: Reply with quote

i saw the wiki "Network management" (https://wiki.gentoo.org/wiki/Network_management#Available_software) , it mentions dhcpcd. and i emerge dhcpcd in my laptop, so is that possible to use it to authenticate the network interface? for the wifi adapter in my laptop, i did not configure dhcpcd, it works after emerge. therefore i thought if i run wpa_supplicant, it can connect to internet.... :oops:
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 876
Location: Italy

PostPosted: Tue Oct 22, 2019 6:31 am    Post subject: Reply with quote

For testing purposes, you can simply run:
Code:
dhcpcd wlp0s20f0u2

There are several wiki articles about dhcpcd:
Back to top
View user's profile Send private message
Sllyth
n00b
n00b


Joined: 17 May 2019
Posts: 19
Location: China

PostPosted: Tue Oct 22, 2019 4:30 pm    Post subject: Reply with quote

Code:
rc-update del wpa_supplicant

then reboot, two interfaces are not authenticated

if i run
Code:
wpa_supplicant -i wlp1s0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B

the interface in my laptop will be authenticated

but if i run
Code:
wpa_supplicant -i wlp0s20f0u2 -c /etc/wpa_supplicant/wpa_supplicant.conf -B

the usb interface will not be authenticated

although both outputs are
Code:
Successfully initialized wpa_supplicant


So, maybe my usb interface is damaged...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum