OSMC wifi dongle not recognized by Vero 4K

Hi, I recently bought a Vero 4K and the wifi dongle from the osmc store. Today I connected the dongle to the Vero 4K but it does not work. The device appears as 0e8d:7610 MediaTek Inc.

Shouldn’t the driver/firmware for this device (MT7610U) be included by default in osmc?

Why would you use the dongle when the Vero4k has built in AC wifi adapter?

Hi,

Have you tried the onboard ac wifi that comes with the vero4k, you should not need the osmc wifi dongle.

I know on the pi3, you need to disable the onboard wifi before the dongle works correctly; its probably the same for the vero4k.

I would try the onboard ac first through.

Thanks Tom.

The onboard wifi works fine but I’d like to try the dongle too, to see if I can get a better signal with a usb extension, also maybe connect to two wifi networks simultaneously in the future.

If you haven’t done so already, you need to copy the file /lib/firmware/mt7610u_sta.template.dat to /lib/firmware/mt7610u_sta.dat and edit it (it’s a config file) for your applicable situation.

A description of all the paramters can be found at https://github.com/ulli-kroll/mt7610u/blob/master/README_STA_usb

The internal adapter will give a better signal than the external adapter.

Thanks, I have done that now, but is there a precompiled driver for Vero 4K (kernel 3.14.29-61-osmc) that I can load?

Currently, the MT7610U driver isn’t included for Vero 4K.
I could look at adding it in the future.

I see, well in the store it is stated that there is “Guaranteed compatibility and easy setup with OSMC”, which is quite misleading, potential buyers should be made aware of the fact that currently the Vero 4K is not supported.

I can certainly add support for you, but I’d like to make it clear that the built-in WiFi will definitely perform better.

Thank you but there is no need for that, I just wanted to test it, it’s not worth the effort :slight_smile:

Hi Sam,

I have a similar chip (idVendor=0e8d, idProduct=7612) in an external USB WiFi adapter[1]. The adapter has two rather large external antennas and I hope to get better connectivity for my Vero 4K+. Would it be possible to include the mt76[2] driver for the MediaTek 7612U chip?

[1] https://www.amazon.com/AUKEY-Adapter-1200Mbps-Wireless-Antenna/dp/B01IRASRJ0
[2] en:users:drivers:mediatek [Linux Wireless]

Greetings,
Alex

That looks like an upstream kernel driver. Do you know if there is a vendor specific one which we can use on our current kernel?

Yes, I think with this upstream driver I have tested the adapter successfully on recent releases of OpenWRT and Ubuntu 19.10/20.04.

Thanks for the hint regarding a vendor-specific driver. I had not checked this before. I can only find the driver linked here: https://www.mediatek.com/products/broadbandWifi/mt7612u

It seems to me that the driver is not compatible to the Linux kernel v3.x of the Vero 4k+. (At least the README says it’s for v2.4/v2.6.)

But I wanted to give it a try to compile it on my Ubuntu 20.04 workstation. I was able to:
– download the kernel source for the Vero,

http://www.mirrorservice.org/sites/edge.samnazarko.co.uk/osmc/apt/pool/main/v/vero364-source-3.14.29-157-osmc/vero364-source-3.14.29-157-osmc_157_all.deb

– pull the current kernel config from my Vero 4k+,

/boot/config-3.14.29-157-osmc

– initialize the kernel source,

ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make oldconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make prepapre

– and start the cross-compilation.

set LINUX_SRC in Makefile
ARCH=arm64 TARGET=LINUX CHIPSET=mt7612u MODE=STA make

But the build immediately errors on compiling the first C file of the driver as follows:

make -C tools
make[1]: Entering directory ‘DRIVER-DIR/tools’
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory ‘DRIVER-DIR/tools’
DRIVER-DIR/tools/bin2h
chipset = mt7612u
cp -f os/linux/Makefile.6 DRIVER-DIR/os/linux/Makefile
make -C KERNEL-DIR/vero364-source-3.14.29-157-osmc SUBDIRS=DRIVER-DIR/os/linux modules
make[1]: Entering directory ‘KERNEL-DIR/vero364-source-3.14.29-157-osmc’
KBUILD_CFLAGS_MODULE:-DMODULE -mfix-cortex-a53-843419 -mfix-cortex-a53-835769

WARNING: Symbol version dump KERNEL-DIR/vero364-source-3.14.29-157-osmc/Module.symvers
is missing; modules will have no dependencies and modversions.

CC [M] DRIVER-DIR/os/linux/…/…/sta/assoc.o
In file included from DRIVER-DIR/include/rt_config.h:54,
from DRIVER-DIR/os/linux/…/…/sta/assoc.c:28:
DRIVER-DIR/include/rtmp.h:606:18: error: ‘TX_RING_SIZE’ undeclared here (not in a function); did you mean ‘TXINFO_SIZE’?
606 | RTMP_DMACB Cell[TX_RING_SIZE];
| ^~~~~~~~~~~~
| TXINFO_SIZE
DRIVER-DIR/include/rtmp.h:617:18: error: ‘RX_RING_SIZE’ undeclared here (not in a function); did you mean ‘RXINFO_SIZE’?
617 | RTMP_DMACB Cell[RX_RING_SIZE];
| ^~~~~~~~~~~~
| RXINFO_SIZE
DRIVER-DIR/include/rtmp.h:628:18: error: ‘MGMT_RING_SIZE’ undeclared here (not in a function)
628 | RTMP_DMACB Cell[MGMT_RING_SIZE];
| ^~~~~~~~~~~~~~
DRIVER-DIR/os/linux/…/…/sta/assoc.c: In function ‘AssocTimeout’:
DRIVER-DIR/os/linux/…/…/sta/assoc.c:81:2: warning: implicit declaration of function ‘RTMP_MLME_HANDLER’; did you mean ‘RTMP_TIME_AFTER’? [-Wimplicit-function-declaration]
81 | RTMP_MLME_HANDLER(pAd);
| ^~~~~~~~~~~~~~~~~
| RTMP_TIME_AFTER
make[2]: *** [scripts/Makefile.build:309: DRIVER-DIR/os/linux/…/…/sta/assoc.o] Error 1
make[1]: *** [Makefile:1291: _module_DRIVER-DIR/os/linux] Error 2
make[1]: Leaving directory ‘KERNEL-DIR/vero364-source-3.14.29-157-osmc’
make: *** [Makefile:391: LINUX] Error 2

I took a quick stab at this using the OSMC aarch64 toolchain on the Vero4K (package: aarch64-toolchain-osmc). Unfortunately, it fails with what seems to be an incorrect header:

root@osmc-4k:/home/DPO# CHIPSET=mt7612u make
make -C tools
make[1]: Entering directory '/home/DPO/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/DPO/tools'
/home/DPO/tools/bin2h
chipset = mt7612u
cp -f os/linux/Makefile.6 /home/DPO/os/linux/Makefile
make -C /lib/modules/3.14.29-158-osmc/build SUBDIRS=/home/DPO/os/linux modules
make[1]: Entering directory '/usr/src/vero364-headers-3.14.29-158-osmc'
KBUILD_CFLAGS_MODULE:-DMODULE -mfix-cortex-a53-843419 -mfix-cortex-a53-835769
  CC [M]  /home/DPO/os/linux/../../sta/assoc.o
In file included from /usr/src/vero364-headers-3.14.29-158-osmc/arch/arm64/include/asm/dma-mapping.h:27:0,
                 from include/linux/dma-mapping.h:76,
                 from include/linux/skbuff.h:33,
                 from include/linux/if_ether.h:23,
                 from include/uapi/linux/ethtool.h:17,
                 from include/linux/ethtool.h:16,
                 from include/linux/netdevice.h:42,
                 from /home/DPO/include/os/rt_linux.h:29,
                 from /home/DPO/include/rtmp_os.h:46,
                 from /home/DPO/include/rtmp_comm.h:76,
                 from /home/DPO/include/rt_config.h:35,
                 from /home/DPO/os/linux/../../sta/assoc.c:28:
/usr/src/vero364-headers-3.14.29-158-osmc/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>
                                                  ^
compilation terminated.
scripts/Makefile.build:308: recipe for target '/home/DPO/os/linux/../../sta/assoc.o' failed
make[2]: *** [/home/DPO/os/linux/../../sta/assoc.o] Error 1
Makefile:1291: recipe for target '_module_/home/DPO/os/linux' failed
make[1]: *** [_module_/home/DPO/os/linux] Error 2
make[1]: Leaving directory '/usr/src/vero364-headers-3.14.29-158-osmc'
Makefile:390: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

This error is real:

/usr/src/vero364-headers-3.14.29-158-osmc/arch/arm64/include/asm/xen/hypervisor.h:1:50: fatal error: ../../arm/include/asm/xen/hypervisor.h: No such file or directory
 #include <../../arm/include/asm/xen/hypervisor.h>

The first header contains a single line #include pointing to ../../arm/include/asm/xen/hypervisor.h that doesn’t exist. In fact ../../arm doesn’t have an include directory. There are only two hypervisor.h files in the headers package and they’re both under arm64:

root@osmc-4k:/home/DPO# find /usr/src/vero364-headers-3.14.29-158-osmc -name hypervisor.h
/usr/src/vero364-headers-3.14.29-158-osmc/arch/arm64/include/asm/hypervisor.h
/usr/src/vero364-headers-3.14.29-158-osmc/arch/arm64/include/asm/xen/hypervisor.h

Update. After pulling down the kernel source tree and extracting the missing arm/include directory, I’ve now reached the same error as you:

root@osmc-4k:/home/DPO# CHIPSET=mt7612u make
make -C tools
make[1]: Entering directory '/home/DPO/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/DPO/tools'
/home/DPO/tools/bin2h
chipset = mt7612u
cp -f os/linux/Makefile.6 /home/DPO/os/linux/Makefile
make -C /lib/modules/3.14.29-158-osmc/build SUBDIRS=/home/DPO/os/linux modules
make[1]: Entering directory '/usr/src/vero364-headers-3.14.29-158-osmc'
KBUILD_CFLAGS_MODULE:-DMODULE -mfix-cortex-a53-843419 -mfix-cortex-a53-835769
  CC [M]  /home/DPO/os/linux/../../sta/assoc.o
In file included from /home/DPO/include/rt_config.h:54:0,
                 from /home/DPO/os/linux/../../sta/assoc.c:28:
/home/DPO/include/rtmp.h:606:18: error: ‘TX_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[TX_RING_SIZE];
                  ^~~~~~~~~~~~
/home/DPO/include/rtmp.h:617:18: error: ‘RX_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[RX_RING_SIZE];
                  ^~~~~~~~~~~~
/home/DPO/include/rtmp.h:628:18: error: ‘MGMT_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[MGMT_RING_SIZE];
                  ^~~~~~~~~~~~~~
/home/DPO/os/linux/../../sta/assoc.c: In function ‘AssocTimeout’:
/home/DPO/os/linux/../../sta/assoc.c:81:2: warning: implicit declaration of function ‘RTMP_MLME_HANDLER’ [-Wimplicit-function-declaration]
  RTMP_MLME_HANDLER(pAd);
  ^~~~~~~~~~~~~~~~~
scripts/Makefile.build:308: recipe for target '/home/DPO/os/linux/../../sta/assoc.o' failed
make[2]: *** [/home/DPO/os/linux/../../sta/assoc.o] Error 1
Makefile:1291: recipe for target '_module_/home/DPO/os/linux' failed
make[1]: *** [_module_/home/DPO/os/linux] Error 2
make[1]: Leaving directory '/usr/src/vero364-headers-3.14.29-158-osmc'
Makefile:390: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

Note to @sam_nazarko: Looks like the 3.14 Vero4K headers also have a few problems.

I don’t think those errors are a problem with the headers though (once you used the source package).

I wasn’t suggesting they were.

Anyway, exactly almost the same error occurs on a Pi 3 (4.19.122 kernel with fixed headers).

root@osmc:/home/DPO# CHIPSET=mt7612u make
make -C tools
make[1]: Entering directory '/home/DPO/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/DPO/tools'
/home/DPO/tools/bin2h
chipset = mt7612u
cp -f os/linux/Makefile.6 /home/DPO/os/linux/Makefile
make -C /lib/modules/4.19.122-1-osmc/build SUBDIRS=/home/DPO/os/linux modules
make[1]: Entering directory '/usr/src/rbp2-headers-4.19.122-1-osmc'
  CC [M]  /home/DPO/os/linux/../../sta/assoc.o
In file included from /home/DPO/include/os/rt_linux.h:85:0,
                 from /home/DPO/include/rtmp_os.h:46,
                 from /home/DPO/include/rtmp_comm.h:76,
                 from /home/DPO/include/rt_config.h:35,
                 from /home/DPO/os/linux/../../sta/assoc.c:28:
/home/DPO/include/cfg80211.h:39:49: error: ‘IEEE80211_NUM_BANDS’ undeclared here (not in a function)
  struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
                                                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/DPO/include/rt_config.h:54:0,
                 from /home/DPO/os/linux/../../sta/assoc.c:28:
/home/DPO/include/rtmp.h:606:18: error: ‘TX_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[TX_RING_SIZE];
                  ^~~~~~~~~~~~
/home/DPO/include/rtmp.h:617:18: error: ‘RX_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[RX_RING_SIZE];
                  ^~~~~~~~~~~~
/home/DPO/include/rtmp.h:628:18: error: ‘MGMT_RING_SIZE’ undeclared here (not in a function)
  RTMP_DMACB Cell[MGMT_RING_SIZE];
                  ^~~~~~~~~~~~~~
/home/DPO/os/linux/../../sta/assoc.c: In function ‘AssocTimeout’:
/home/DPO/os/linux/../../sta/assoc.c:81:2: error: implicit declaration of function ‘RTMP_MLME_HANDLER’ [-Werror=implicit-function-declaration]
  RTMP_MLME_HANDLER(pAd);
  ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target '/home/DPO/os/linux/../../sta/assoc.o' failed
make[2]: *** [/home/DPO/os/linux/../../sta/assoc.o] Error 1
Makefile:1522: recipe for target '_module_/home/DPO/os/linux' failed
make[1]: *** [_module_/home/DPO/os/linux] Error 2
make[1]: Leaving directory '/usr/src/rbp2-headers-4.19.122-1-osmc'
Makefile:390: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

If I understand the wiki page [1] correctly, the mt76 driver package should be included in the mainline Linux kernel from version 4.19 onward.

While the OSMC package for the Raspberry Pi is already on Linux kernel 4.19.x [3], I guess we have to wait until the OSMC package for the Vero 4K+ moves from Linux kernel 3.x to 4.x, to get MediaTek chips going, right?

(Note: Seems like somebody has already tried (and failed) to compile the mt76 driver [1] on Linux kernel 3.x, see [2]).

[1] en:users:drivers:mediatek [Linux Wireless]
[2] Compile Issue with openwrt linux version 3.10.14 · Issue #43 · openwrt/mt76 · GitHub
[3] osmc/build.sh at master · osmc/osmc · GitHub

There is already a testing thread for Kernel 4.9 on Vero