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:

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?