Mt76 external wifi with kernel 4.470 on CentOS help


(azteca1998) #1

Hi,

I’m using CentOS (not because I want to, but because it is the only one I’ve managed to make ethernet work as intended so far :/). I’ve bought the mt76 pcie wifi (with the antennas and cables) and I’ve followed the instructions on @frank-w 's website (link).

The problem is, after following the instructions I still can’t use or even see the new interface, as if the driver didn’t exist. Am I missing something? Any tips? Do those instructions only apply for Debian-based linuxes?

Thx, azteca1998


(Frank W.) #2

the official kernel does not have driver included…try my 4.4 or 4.14

Have you found and enabled the driver in menuconfig (option 4) recompiled and installed your new kernel?


(azteca1998) #3

Yes, I’ve followed the instructions in your webpage. I’ve linked the page on the first post.

The instructions were to clone a ~70MB repository, clone the mt76 driver repository in the mediatek drivers folder, patch and add some lines into 2 configuration files, do ./build, select configure (4), enable the mediatek driver and another option which I can’t remember; then ./build, select build all (1). Once the new kernel has been built, your instructions told me to upload the kernel to the boot partition, the firmware and the kernel modules folder.

After that, I booted my bpi, logged in, typed ifconfig -a | grep wlan, but only wlan0 (the integrated wireless card) is shown.


(Frank W.) #4

Have you enabled internal wifi-card via wmt-tools? If you want. Ap-mode on internal you should see ap0 and wlan0 is your external…does a mt76*.ko exists in /lib/modules/$(uname -r) ?

Also newer linux-systems have different namings (wlpx or similar)


(azteca1998) #5

On CentOS, apparently there’s no need to enable wlan0 using wmt-tools. I tried enabling ap0 and typed ifconfig -a (without grep). As you said, there is a wlp1s0 present. I’m almost 100% sure that wlp1s0 is the mt76’s interface.

Could you add the wlpx note on your instruction page?

Thx for your help.


(Frank W.) #6

On all linux you need wmt-tools for r2’s internal wifi…on official images there may be an init-script run automaticly

I add note with wifi-dev-name…


(azteca1998) #7

Ok I’ve managed to get both ethernet (wan, lan) and wireless ap (with the mt7612e) working. I can connect to the wifi network using both my smartphone and my laptop.

However, the connection is truly horrible. It takes several tens of seconds to load a <10kb text-only page. I’ve also tried to ping the bpi from my laptop, and only 1 ping came back… after 24 seconds.


(Frank W.) #8

i have no ping failures in distance of ~10 m + 1 wall avg ping-time 12ms

if i add another wall (and i have overlapping wifis here) i got 8% packet-loss on ping and roundtriptime goes up…

this behaviour is normally in my eyes for wifi…every wall/additional wifi and increased distance brings more disorders


(azteca1998) #9

The distance to the antennas was less than 1 meter and the wifi was tested in 2.4 mode on a channel where there are no other wireless networks, and in 5 ghz mode that is completely empty where I live. It can’t possibly be interference unless the bpi is interfering itself.


(Frank W.) #10

how about the power of signal ist it like other wifis?

Maybe you have connected the wrong jack…on my card there are more connectors


#11

You can try to run mt7612e on other platforms to clarify it.


(azteca1998) #12

About the power signal, if you mean the signal strength, it is at max. The mt7612e that you linked on aliexpress has 2 antenna connectors and both of them have an antenna.

I may try that, but it won’t help me because for some reason I can’'t manage to make the ethernet work on those OSes. Not even dhcp on the wan port.

Just in case I’ve checked all the connections to the bpi just now without any improvement on the signal quality.

EDIT: Actually, the connection has improved a bit, but I still have 500ms+ of ping within lan at <1m from the antenna, and (also still) takes more than 1 minute to completely load duckduckgo.


(azteca1998) #13

The power (as of aircrack-ng) oscillates between -20 and -30, whilst other wireless networks are at -70 to -80.

It also can’t be a “packet loop” as there is no packet transfer if I don’t load any page over wifi, and when a page is begin loaded, there are too few packets to be a loop.

I’ve just tested to create an AP with the internal wireless card… I can’t even connect to it. I’m starting to suspect it’s hostapd’s fault. Do I need to compile it using special flags for the bpi? (there is no hostapd on the repos)


#14

Where did you get your mt76 driver? I see lots of patches which are related to mt76x2 recently, so I think you can find some improvements here:


(azteca1998) #15

There’s a link to the exact instructions I’ve followed on my first post on the thread. It clones a github repo (dfiloni/mt76 I think) into the kernel source.

I’ll chech the one you linked later when I have time. Thx.


(Frank W.) #16

You can try my 4.14 kernel there is also mt76-driver included which i’m currently using


(azteca1998) #17

I’ve just tried 2 different 4.14 kernels and neither of them has worked.

The first one I’ve tried is 4.14.73 (I think it was 73). I built it from the source code in your repo, after checking it had the driver code enabled. After that I’ve copied it to the sd card and booted the bpi. The wlp1s0 interface was still there, which means the driver was loaded correctly, and my laptop connected the wireless network without problems, so I assume that hostapd works as expected with this kernel.

The second is the latest 4.14 from your precompiled kernels. Same as above, but this time in a new installation (reasons below). It showed the interface as expected, but the wireless connection was not tested (reasons below).

The problem is that for some reason, the entire networking system breaks with those kernels. I can still see the interfaces, however there are no packets in or out, no DHCP, no pinging from my laptop (via ethernet) to the bpi even when setting a static ip address. The same problem occurs when I try to use other distros like debian or ubuntu.


(Frank W.) #18

In 4.14 (4.9+) eth0/eth1 are the cpu-ports which only need to be set to up. Ip-configuration has to be done on dsa-interfaces (lan0-3,wan)


(azteca1998) #19

I’ve managed to get the ethernet working thanks to your help. Unfortunately the problem persists.

The ping is still over 1 second (or never returns) when I try to load anything. Strangely, when I’m not loading anything it goes down to about 30ms (with some spikes). If I open an http server (python3 -m http.server) on my laptop (ethernet) and try to load a page, it takes about 10 seconds for the request to reach the server, in LAN.

I’m going to try the kernel I compiled previously (the one I could connect my laptop to the wireless network with no problem but I couldn’t test the quality) to see if it’ll make a difference.


(azteca1998) #20

Ok, now my ethernet (lan ports only) keep resetting themselves with the 4.14 kernel. It happened earlier but it fixed itself after a few resets, this time (with the kernel I compiled) it won’t fix itself.

The following lines are printed on the serial port when this happens.