Installing RTL8153 Gigabit Ethernet Adapter on Vero 4K

Hi guys,
i need help to install the driver for this adapter on Vero 4K.
Its from here:
https://www.aliexpress.com/item/1005004719092566.html
And here is the driver:
https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software

osmc@osmc:~/Movies/r8152-2.16.3$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 0bda:8153 Realtek Semiconductor Corp. RTL8153 Gigabit Ethernet Adapter
Bus 001 Device 006: ID 2017:1688 OSMC Remote Controller USB Keyboard Mouse
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

i did this:>

osmc@osmc:~$ sudo apt-get install libelf-dev build-essential linux-headers-uname -r
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package linux-headers-4.9.269-26-osmc
E: Couldn’t find any package by glob ‘linux-headers-4.9.269-26-osmc’
E: Couldn’t find any package by regex ‘linux-headers-4.9.269-26-osmc’
osmc@osmc:~$ sudo apt-get install build-essential git
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
build-essential is already the newest version (12.9).
git is already the newest version (1:2.30.2-1+deb11u2).
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
osmc@osmc:~$ sudo apt-get install libelf-dev build-essential vero364-headers-uname -r
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
build-essential is already the newest version (12.9).
The following NEW packages will be installed:
libelf-dev vero364-headers-4.9.269-26-osmc:arm64 zlib1g-dev
0 upgraded, 3 newly installed, 0 to remove and 7 not upgraded.
Need to get 8625 kB of archives.
After this operation, 64.8 MB of additional disk space will be used.
Get:1 Index of /debian bullseye/main armhf zlib1g-dev armhf 1:1.2.11.dfsg-2+deb11u2 [185 kB]
Get:3 Index of /debian bullseye/main armhf libelf-dev armhf 0.183-1 [71.2 kB]
Get:2 Index of /osmc/osmc/apt bullseye/main arm64 vero364-headers-4.9.269-26-osmc arm64 4.9.269-26-osmc [8370 kB]
Fetched 8625 kB in 1s (6076 kB/s)
Selecting previously unselected package vero364-headers-4.9.269-26-osmc:arm64.
(Reading database … 50566 files and directories currently installed.)
Preparing to unpack …/vero364-headers-4.9.269-26-osmc_4.9.269-26-osmc_arm64.deb …
Unpacking vero364-headers-4.9.269-26-osmc:arm64 (4.9.269-26-osmc) …
Selecting previously unselected package zlib1g-dev:armhf.
Preparing to unpack …/zlib1g-dev_1%3a1.2.11.dfsg-2+deb11u2_armhf.deb …
Unpacking zlib1g-dev:armhf (1:1.2.11.dfsg-2+deb11u2) …
Selecting previously unselected package libelf-dev:armhf.
Preparing to unpack …/libelf-dev_0.183-1_armhf.deb …
Unpacking libelf-dev:armhf (0.183-1) …
Setting up vero364-headers-4.9.269-26-osmc:arm64 (4.9.269-26-osmc) …
Setting up zlib1g-dev:armhf (1:1.2.11.dfsg-2+deb11u2) …
Setting up libelf-dev:armhf (0.183-1) …

i get stuck here:

osmc@osmc:~/Movies/r8152-2.16.3$ make -j2
make -C /lib/modules/4.9.269-26-osmc/build M=/home/osmc/Movies/r8152-2.16.3 modules
make[1]: Entering directory ‘/usr/src/vero364-headers-4.9.269-26-osmc’
arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
CC [M] /home/osmc/Movies/r8152-2.16.3/r8152.o
gcc: error: unrecognized command-line option ‘-mcmodel=large’
make[2]: *** [scripts/Makefile.build:344: /home/osmc/Movies/r8152-2.16.3/r8152.o] Error 1
make[1]: *** [Makefile:1651: module/home/osmc/Movies/r8152-2.16.3] Error 2
make[1]: Leaving directory ‘/usr/src/vero364-headers-4.9.269-26-osmc’
make: *** [Makefile:24: modules] Error 2

Any suggestions?

You need to build with the aarch64 toolchain. The kernel is arm64.

I think i installed the aarch64 toolchain but i need help to compile, please Sam. I dont know how to do it.

You will need to chroot in to the aarch64 toolchain, install headers and compile under that environment.

Keep in mind that unless you have a DKMS driver you will need to do this after every update.

Unfortunately I don’t have this device or I’d look at including support for you

Sam

Thanks Sam for your reply.
Unfortunately I’m a beginner in Linux, or I can’t even call myself a beginner, because all my life I’ve been a Windows user. Therefore, I don’t know how to do what you just told me.
If I knew it was so complicated, I wouldn’t have bought this adapter :slight_smile:
I thought I would just plug it into Vero4K and it would work.
So, if you have time and if it’s somehow possible to include this driver in future updates, (even though you don’t have this adapter), it will be great. But if that’s not possible, that’s fine too.
I’ll just give up on the idea of using it with Vero4K and that’s it.

Thanks for all your hard work over the years to make OSMC what it is today.
I really appreciate it

I’ll look in to adding support for this device shortly.

1 Like

Thanks a lot, Sam!

Hi

This is not forgotten

I’ve looked in to this, and can see that the necessary modules are already enabled:

+CONFIG_USB_RTL8150=m
+CONFIG_USB_RTL8152=m

Hi Sam,
after your post I reconnected the gigabit adapter to test it again but unfortunately it doesn’t work.
Is there something specific I need to do to make it work? Do I have to disable the wired and wireless adapter? Now wireless is off and wired is ON.

Do you think it has something to do with this:

It’s well supported by the Linux kernel, but the default r8152 module is rarely used, the generic cdc_ether driver is loaded instead. There’s another problem, sometimes the r8152 module shipped with kernel can’t even detect newer varients of the RTL8153 chip.

I read here about this issue

You could check with connmanctl to see if it’s actually listed as an adapter.

Have you checked that the adapter works on another device?

Sam

on windows it works. Its possible for you to enter with teamviewer and see whats going on? I have putty on my PC.
Now i have lan cable inserted in Vero and the adapter is connected to usb. But if i connect the lan cable to the adapter, the internet goes down and i dont have access to Vero from my pc.

Do the lights on the switch / router illuminate when the adapter is connected to the Vero?

It will be hard to collect meaningful logs / information if WiFi cannot even be used temporarily.

connmanctl> services
*AO Wired ethernet_c44eac11e148_cable

This i get when i use this command.

I can connect the Vero with wifi to the router if needed.
The lights are green on Router(ONT) and yellow on adapter

L.E. I connected the WIFI and i used ”connmanctl services” (dont know what command exactly to use) and i got this:

osmc@osmc:~$ connmanctl
Error getting VPN connections: Rejected send message, 2 matched rules; type=“method_call”, sender=“:1.75” (uid=1000 pid=3594 comm=“connmanctl “) interface=“net.connman.vpn.Manager” member=“GetConnections” error name=”(unset)” requested_repl
connmanctl> services
*AO Skynet wifi_ac83f3c3a1a9_536b796e6574_managed_psk
wifi_ac83f3c3a1a9_hidden_managed_psk
TP-Link_84B0 wifi_ac83f3c3a1a9_54502d4c696e6b5f38344230_managed_psk
TP-Link_84B0_5G wifi_ac83f3c3a1a9_54502d4c696e6b5f383442305f3547_managed_psk

Try typing ‘technologies’

osmc@osmc:~$ connmanctl technologies
/net/connman/technology/p2p
Name = P2P
Type = p2p
Powered = False
Connected = False
Tethering = False
TetheringFreq = 0
/net/connman/technology/ethernet
Name = Wired
Type = ethernet
Powered = False
Connected = False
Tethering = False
TetheringFreq = 2412
/net/connman/technology/wifi
Name = WiFi
Type = wifi
Powered = True
Connected = True
Tethering = False
TetheringFreq = 2412
/net/connman/technology/bluetooth
Name = Bluetooth
Type = bluetooth
Powered = False
Connected = False
Tethering = False
TetheringFreq = 2412

lan cable is inserted in adapter and connected to USB. Wifi is ON

It looks like only the internal adapter is being detected.

Does lsmod show that the module is being loaded?

osmc@osmc:~$ lsmod
Module Size Used by
8021q 36864 0
aes_ce_blk 20480 0
ablk_helper 16384 1 aes_ce_blk
aes_ce_cipher 16384 2 aes_ce_blk
ghash_ce 16384 0
sha2_ce 16384 0
sha1_ce 16384 0
cdc_ether 16384 0
usbnet 45056 1 cdc_ether
r8152 49152 0
dhd 1368064 0
ir_lirc_codec 16384 3
lirc_dev 24576 1 ir_lirc_codec
mali 323584 1
meson_ir 16384 0
amvdec_ports 167936 0
amvdec_mmpeg4 49152 0
amvdec_mh264 176128 0
amvdec_h264mvc 81920 0
amvdec_mmpeg12 53248 0
amvdec_vp9 131072 0
amvdec_vc1 53248 0
amvdec_h265 167936 0
stream_input 208896 6 amvdec_h265,amvdec_mh264,amvdec_h264mvc,amvdec_ports,amvdec_vp9,amvdec_mmpeg12
decoder_common 258048 9 amvdec_h265,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_ports,stream_input,amvdec_vp9,amvdec_vc1,amvdec_mmpeg12
firmware 28672 9 amvdec_h265,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,decoder_common,stream_input,amvdec_vp9,amvdec_vc1,amvdec_mmpeg12
media_clock 49152 9 amvdec_h265,amvdec_mh264,amvdec_mmpeg4,decoder_common,amvdec_ports,firmware,stream_input,amvdec_vp9,amvdec_vc1
video_framerate_adapter 16384 1 decoder_common

U think here is the problem like in that link above? ”cdc_ether” instead of ”r8152 module”…

usbnet 45056 1 cdc_ether

I can see r8152 is being loaded – so the USB is being detected and the correct module is loading. I am not sure why it is not working however and don’t have one to test with myself.

Here everything is ok? Because lsmod shows

usbnet 45056 1 cdc_ether

Yes, I think it’s fine. You could try blacklist that module or rmmod it but I don’t think it will make a difference.

Can you upload some logs?