Page 3 of 5

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 11:03 am
by gor9
oops my output contains another dongle so ignore r8188eu
edit
sorry bed time for me

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 11:47 am
by Huckleberry Finn
When it's attached: What does this show?

Code: Select all

rfkill

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 12:01 pm
by j2mcgreg
This probably should have been done at the outset.

Wireless throughput is generally slower than Ethernet, but 300 Mbps dropping to 40 is a major concern, and your existing internal wifi card is certainly capable of much higher speeds. Could you temporarily move your desktop closer to the signal source to see if you get a substantial increase in bandwidth?

The reasons for doing this are twofold:

1) you need to verify that that your ISP's equipment is outputting the signal speed that they claim

- and -

2) If doing the step above yields positive results, you need to identify the interference source that is causing your available bandwidth to drop by 85%.

FWIW I too have fibre internet and my new Win 11 desktop with a wired connection gets 494 Mbps (download) while my Probook running MX 21 and 25 feet away from the router gets 400 Mbps over wifi which represents a roughly 20% bandwidth drop.

It would also help if you could give us the make and model(s) of your ISP's equipment. There may be adjustments that a user can make in the router that will increase bandwidth output.

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 12:14 pm
by PIP436
$ rfkill
ID TYPE DEVICE SOFT HARD
0 wlan phy0 unblocked unblocked
1 bluetooth hci0 unblocked unblocked
2 wlan phy1 unblocked unblocked

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 12:46 pm
by Huckleberry Finn

Code: Select all

git clone https://github.com/jeremyb31/mt7612u.git ; cd mt7612u ; make ; sudo make installfw

Code: Select all

sudo cp mt7612u.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless ; sudo depmod -a
Reboot.

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 1:05 pm
by PIP436
wasn't sure what "uname" was. First I put in my user name shalom, then I just tried it as uname. Neither worked...

shalom@desktop:~
$ git clone https://github.com/jeremyb31/mt7612u.git ; cd mt7612u ; make ; sudo make installfw
Cloning into 'mt7612u'...
remote: Enumerating objects: 11518, done.
remote: Total 11518 (delta 0), reused 0 (delta 0), pack-reused 11518
Receiving objects: 100% (11518/11518), 6.25 MiB | 4.13 MiB/s, done.
Resolving deltas: 100% (9117/9117), done.
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.10.0-18-amd64/build M=/home/shalom/mt7612u modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-18-amd64'
CC [M] /home/shalom/mt7612u/ap/ap_mbss.o
CC [M] /home/shalom/mt7612u/ap/ap.o
/home/shalom/mt7612u/ap/ap.c: In function ‘DOT1X_InternalCmdAction’:
/home/shalom/mt7612u/ap/ap.c:1893:2: warning: ISO C90 forbids variable length array ‘FrameBuf’ [-Wvla]
1893 | u8 FrameBuf[frame_len];
| ^~
/home/shalom/mt7612u/ap/ap.c: In function ‘DOT1X_EapTriggerAction’:
/home/shalom/mt7612u/ap/ap.c:1954:2: warning: ISO C90 forbids variable length array ‘FrameBuf’ [-Wvla]
1954 | u8 FrameBuf[frame_len];
| ^~
CC [M] /home/shalom/mt7612u/ap/ap_assoc.o
CC [M] /home/shalom/mt7612u/ap/ap_auth.o
CC [M] /home/shalom/mt7612u/ap/ap_connect.o
CC [M] /home/shalom/mt7612u/ap/ap_mlme.o
CC [M] /home/shalom/mt7612u/ap/ap_sanity.o
/home/shalom/mt7612u/ap/ap_sanity.c: In function ‘PeerAssocReqCmmSanity’:
/home/shalom/mt7612u/ap/ap_sanity.c:298:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
298 | if (eid_ptr->Len == sizeof(VHT_CAP_IE))
| ^
/home/shalom/mt7612u/ap/ap_sanity.c:310:3: note: here
310 | case IE_VHT_OP:
| ^~~~
/home/shalom/mt7612u/ap/ap_sanity.c:311:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
311 | if (eid_ptr->Len == sizeof(VHT_OP_IE))
| ^
/home/shalom/mt7612u/ap/ap_sanity.c:318:3: note: here
318 | case IE_OPERATING_MODE_NOTIFY:
| ^~~~
CC [M] /home/shalom/mt7612u/ap/ap_sync.o
CC [M] /home/shalom/mt7612u/ap/ap_wpa.o
CC [M] /home/shalom/mt7612u/ap/ap_data.o
CC [M] /home/shalom/mt7612u/ap/ap_autoChSel.o
CC [M] /home/shalom/mt7612u/ap/ap_qload.o
CC [M] /home/shalom/mt7612u/ap/ap_cfg.o
CC [M] /home/shalom/mt7612u/ap/ap_mbss_inf.o
CC [M] /home/shalom/mt7612u/os/linux/ap_ioctl.o
CC [M] /home/shalom/mt7612u/sta/assoc.o
CC [M] /home/shalom/mt7612u/sta/auth.o
CC [M] /home/shalom/mt7612u/sta/auth_rsp.o
CC [M] /home/shalom/mt7612u/sta/sync.o
CC [M] /home/shalom/mt7612u/sta/sanity.o
CC [M] /home/shalom/mt7612u/sta/rtmp_data.o
CC [M] /home/shalom/mt7612u/sta/connect.o
CC [M] /home/shalom/mt7612u/sta/wpa.o
CC [M] /home/shalom/mt7612u/sta/sta_cfg.o
CC [M] /home/shalom/mt7612u/sta/sta.o
CC [M] /home/shalom/mt7612u/os/linux/sta_ioctl.o
CC [M] /home/shalom/mt7612u/mgmt/mgmt_vht.o
CC [M] /home/shalom/mt7612u/common/vht.o
/home/shalom/mt7612u/common/vht.c: In function ‘build_vht_op_ie’:
/home/shalom/mt7612u/common/vht.c:378:33: warning: this statement may fall through [-Wimplicit-fallthrough=]
378 | vht_op.basic_mcs_set.mcs_ss2 = VHT_MCS_CAP_7;
/home/shalom/mt7612u/common/vht.c:379:2: note: here
379 | case 1:
| ^~~~
CC [M] /home/shalom/mt7612u/common/crypt_md5.o
CC [M] /home/shalom/mt7612u/common/crypt_sha2.o
CC [M] /home/shalom/mt7612u/common/crypt_hmac.o
CC [M] /home/shalom/mt7612u/common/crypt_aes.o
CC [M] /home/shalom/mt7612u/common/crypt_arc4.o
CC [M] /home/shalom/mt7612u/common/mlme.o
/home/shalom/mt7612u/common/mlme.c: In function ‘RTMPCheckHt’:
/home/shalom/mt7612u/common/mlme.c:5105:39: warning: this statement may fall through [-Wimplicit-fallthrough=]
5105 | pAd->MlmeAux.HtCapability.MCSSet[2] = 0xff;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/shalom/mt7612u/common/mlme.c:5106:2: note: here
5106 | case 2:
| ^~~~
/home/shalom/mt7612u/common/mlme.c:5107:39: warning: this statement may fall through [-Wimplicit-fallthrough=]
5107 | pAd->MlmeAux.HtCapability.MCSSet[1] = 0xff;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/home/shalom/mt7612u/common/mlme.c:5108:2: note: here
5108 | case 1:
| ^~~~
CC [M] /home/shalom/mt7612u/common/cmm_wep.o
CC [M] /home/shalom/mt7612u/common/action.o
CC [M] /home/shalom/mt7612u/common/cmm_data.o
CC [M] /home/shalom/mt7612u/common/rtmp_init.o
CC [M] /home/shalom/mt7612u/common/rtmp_init_inf.o
CC [M] /home/shalom/mt7612u/common/cmm_tkip.o
CC [M] /home/shalom/mt7612u/common/cmm_aes.o
CC [M] /home/shalom/mt7612u/common/cmm_sync.o
CC [M] /home/shalom/mt7612u/common/cmm_sanity.o
CC [M] /home/shalom/mt7612u/common/cmm_info.o
CC [M] /home/shalom/mt7612u/common/cmm_cfg.o
/home/shalom/mt7612u/common/cmm_cfg.c: In function ‘RT_CfgSetFixedTxPhyMode’:
/home/shalom/mt7612u/common/cmm_cfg.c:621:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
621 | fix_tx_mode = value;
| ~~~~~~~~~~~~^~~~~~~
/home/shalom/mt7612u/common/cmm_cfg.c:622:4: note: here
622 | default:
| ^~~~~~~
CC [M] /home/shalom/mt7612u/common/cmm_wpa.o
CC [M] /home/shalom/mt7612u/common/cmm_radar.o
CC [M] /home/shalom/mt7612u/common/spectrum.o
CC [M] /home/shalom/mt7612u/common/rtmp_timer.o
CC [M] /home/shalom/mt7612u/common/rt_channel.o
CC [M] /home/shalom/mt7612u/common/cmm_profile.o
CC [M] /home/shalom/mt7612u/common/cmm_asic.o
CC [M] /home/shalom/mt7612u/common/scan.o
CC [M] /home/shalom/mt7612u/common/cmm_cmd.o
CC [M] /home/shalom/mt7612u/common/uapsd.o
CC [M] /home/shalom/mt7612u/common/ps.o
CC [M] /home/shalom/mt7612u/common/sys_log.o
CC [M] /home/shalom/mt7612u/common/txpower.o
CC [M] /home/shalom/mt7612u/rate_ctrl/ra_ctrl.o
/home/shalom/mt7612u/rate_ctrl/ra_ctrl.c: In function ‘RTMPSetSupportMCS’:
/home/shalom/mt7612u/rate_ctrl/ra_ctrl.c:2493:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
2493 | if (vht_cap->mcs_set.rx_mcs_map.mcs_ss2 < VHT_MCS_CAP_NA)
| ^
/home/shalom/mt7612u/rate_ctrl/ra_ctrl.c:2507:5: note: here
2507 | case 1:
| ^~~~
CC [M] /home/shalom/mt7612u/rate_ctrl/alg_legacy.o
CC [M] /home/shalom/mt7612u/chips/rtmp_chip.o
CC [M] /home/shalom/mt7612u/mgmt/mgmt_entrytb.o
CC [M] /home/shalom/mt7612u/tx_rx/wdev_tx.o
CC [M] /home/shalom/mt7612u/os/linux/rt_profile.o
CC [M] /home/shalom/mt7612u/phy/phy.o
CC [M] /home/shalom/mt7612u/phy/rf.o
CC [M] /home/shalom/mt7612u/phy/rlt_phy.o
CC [M] /home/shalom/mt7612u/mac/rtmp_mac.o
CC [M] /home/shalom/mt7612u/mac/ral_nmac.o
CC [M] /home/shalom/mt7612u/rate_ctrl/alg_grp.o
CC [M] /home/shalom/mt7612u/common/ba_action.o
CC [M] /home/shalom/mt7612u/mgmt/mgmt_ht.o
/home/shalom/mt7612u/mgmt/mgmt_ht.c: In function ‘RTMPSetHT’:
/home/shalom/mt7612u/mgmt/mgmt_ht.c:276:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
276 | ht_cap->MCSSet[2] = 0xff;
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/home/shalom/mt7612u/mgmt/mgmt_ht.c:277:3: note: here
277 | case 2:
| ^~~~
/home/shalom/mt7612u/mgmt/mgmt_ht.c:278:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
278 | ht_cap->MCSSet[1] = 0xff;
| ~~~~~~~~~~~~~~~~~~^~~~~~~
/home/shalom/mt7612u/mgmt/mgmt_ht.c:279:3: note: here
279 | case 1:
| ^~~~
CC [M] /home/shalom/mt7612u/common/cmm_txbf.o
CC [M] /home/shalom/mt7612u/common/cmm_txbf_cal.o
CC [M] /home/shalom/mt7612u/common/rt_os_util.o
CC [M] /home/shalom/mt7612u/os/linux/rt_linux.o
/home/shalom/mt7612u/os/linux/rt_linux.c: In function ‘RtmpDrvAllMacPrint’:
/home/shalom/mt7612u/os/linux/rt_linux.c:1393:12: error: implicit declaration of function ‘get_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
1393 | orig_fs = get_fs();
| ^~~~~~
| sget_fc
/home/shalom/mt7612u/os/linux/rt_linux.c:1393:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
/home/shalom/mt7612u/os/linux/rt_linux.c:1394:2: error: implicit declaration of function ‘set_fs’; did you mean ‘sget_fc’? [-Werror=implicit-function-declaration]
1394 | set_fs(KERNEL_DS);
| ^~~~~~
| sget_fc
/home/shalom/mt7612u/os/linux/rt_linux.c:1394:9: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
1394 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/shalom/mt7612u/os/linux/rt_linux.c:1394:9: note: each undeclared identifier is reported only once for each function it appears in
/home/shalom/mt7612u/os/linux/rt_linux.c: In function ‘RtmpDrvAllE2PPrint’:
/home/shalom/mt7612u/os/linux/rt_linux.c:1444:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
1444 | orig_fs = get_fs();
| ^~~~~~
/home/shalom/mt7612u/os/linux/rt_linux.c:1445:9: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
1445 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
/home/shalom/mt7612u/os/linux/rt_linux.c: In function ‘RtmpDrvAllRFPrint’:
/home/shalom/mt7612u/os/linux/rt_linux.c:1488:12: error: incompatible types when assigning to type ‘mm_segment_t’ from type ‘int’
1488 | orig_fs = get_fs();
| ^~~~~~
/home/shalom/mt7612u/os/linux/rt_linux.c:1489:9: error: ‘KERNEL_DS’ undeclared (first use in this function); did you mean ‘KERNFS_NS’?
1489 | set_fs(KERNEL_DS);
| ^~~~~~~~~
| KERNFS_NS
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-18-common/scripts/Makefile.build:291: /home/shalom/mt7612u/os/linux/rt_linux.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-18-common/Makefile:1856: /home/shalom/mt7612u] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-18-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-18-amd64'
make: *** [Makefile:615: modules] Error 2
[sudo] password for shalom:
cp -n firmware/* /lib/firmware
shalom@desktop:~/mt7612u
$ sudo cp mt7612u.ko /lib/modules/$(shalom -r)/kernal/drivers/net/wireless ; sudo depmod -a
shalom: command not found
cp: cannot stat 'mt7612u.ko': No such file or directory
shalom@desktop:~/mt7612u
$ sudo cp mt7612u.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless ; sudo depmod -a
cp: cannot stat 'mt7612u.ko': No such file or directory
shalom@desktop:~/mt7612u
$

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 1:18 pm
by Huckleberry Finn
It's not installed for this or that reason: cp: cannot stat 'mt7612u.ko': No such file or directory

What happens if you just:

Code: Select all

sudo usb_modeswitch -KW -v 0e8d -p 7612
or

Code: Select all

sudo usb_modeswitch -KW -v 0e8d -p 2870
?

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 1:26 pm
by Huckleberry Finn
In the meantime we are using the code tags for outputs, especially long ones, like this:

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 2:25 pm
by Stevo
That driver code failed to build on the 5.10 kernel. Maybe it had not been updated for it. A look at the actual page on github for it usually answers some questions like that.

Code: Select all

c1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-5.10.0-18-common/scripts/Makefile.build:291: /home/shalom/mt7612u/os/linux/rt_linux.o] Error 1
Edit: yeah, pretty old.
MT7612U for Linux

Tested with latest -stable, v4.15.6

Re: How to install Mediatek MT7612U driver for Wifi Adapter

Posted: Wed Sep 21, 2022 2:37 pm
by Stevo
Please plug it in and run "dmesg" in a terminal. We should see some messages about what the regular mt76 kernel driver is trying to do with the thing. Please copy and paste into a message in this thread, highlight it, and then hit the code button </> above the message box.

And it's also a USB 3.0 device, so make sure to plug it into a USB 3 port for full performance.

https://wikidevi.wi-cat.ru/ALFA_Network_AWUS036ACM