2.5G RTL8156B USB adapter on Omnia

My provider have a router with a 2.5G ethernet port. I’m trying to play with an USB 2.5G ethernet adpapter without success.
Adapter is based on RTL8156B.
With kmod-usb-net-cdc-ncm i have an usb0 network interface. I added it to the br-lan bridge to test before replace wan eth2 interface. But didn’t get an IP adresss on a laptop.
With kmod-usb-net-rtl8152 I didn’t get an usb0 interface maybe because not up to date as I read in the openwrt forum on RTL8156 topics.
I read in the openwrt forum that driver is very old
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/usb/r8152.c?h=linux-4.14.y&id=v4.14.222
Actual realtek driver is 2.13 so need to complie it. I’ll try to check how to do on Omnia.

I’ll be able to provide some outputs when at home with adapter connected (lsusb etc…)
But that the same problem explained here:

Some outputs.
With no kmod-usb-net-rtl8152:
cat /sys/kernel/debug/usb/devices show:
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 3
P: Vendor=0bda ProdID=8156 Rev=31.00
S: Manufacturer=Realtek
S: Product=USB 10/100/1G/2.5G LAN
S: SerialNumber=001000001
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=128ms
C:* #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=(none)
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
I:* If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=(none)
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=(none)
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
C: #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=256mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

Driver is not uptodate. So nothing happen.
With kmod-usb-net-cdc-ncm it show:
T: Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=5000 MxCh= 0
D: Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 3
P: Vendor=0bda ProdID=8156 Rev=31.00
S: Manufacturer=Realtek
S: Product=USB 10/100/1G/2.5G LAN
S: SerialNumber=001000001
C: #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=256mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=83(I) Atr=03(Int.) MxPS= 2 Ivl=128ms
C:* #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=256mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
C: #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=256mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
I: If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms

Driver seem ok. There is usb0 interface. But link down. Nothing happen.
14: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel master br-lan state DOWN group default qlen 1000
link/ether 00:e0:4c:zz:zz:zz brd ff:ff:ff:ff:ff:ff

I don’t have the same behavior than in the forum for cdc-ncm.
I tried change bConfigurationValue to 3 but no change.
But anyway in the openwrt forum solution was to update kmod-usb-net-rtl8152.
Didn’t checked yet if I can do it easely on my omnia. I don’t have another Omnia to play and don’t want to break confguration on my main one.

You can ask @Pepe to include patch from OpenWrt forum in next release.

I am myself interested in Aquantia AQC111U-Chip which is capable of delivering 5 GBE. This one should be available for 5.4.x kernel (openwrt Master snapshot package kmod-usb-net-aqc111) therefore I need to wait for Openwrt 21.02 and the equivalent TOS version to be released

Should be the same then…wait for 21.02 nad kernel 5.4.

Plugable 2.5G USB C and USB to Ethernet Adapter, 2-in-1 Adapter Compatible with USB C/Thunderbolt 3 or USB 3.0, USB-C to RJ45 2.5 Gigabit LAN Compatible with Mac and Windows

Supposedly Linux Compatible since kernel 3.2.x

1 Like

It IS compatible - but the driver (which comes as kmod-packages) is totally outdated which is why you either need to install a self-compiled package or wait for next major OpenWrt (and TurrisOS) version which will bring updated driver.

1 Like

21.02 is here… any updates? ( i’m told the issues are not solved )

I’m sorry I cannot give an answer yet - I planned to test this on my WRT32x, but unfortunately that device is totally unstable with 21.02.0 in my environment (which is pretty simple but it seems there are lot of other users experiencing the same according to the OpenWrt forum).
But I will switch branches and try with my second TO and QNA-UC5G1t in a few days and report here.

1 Like

Btw there seem to be 8156 and 8156B chipsets - which are the differences between those? Reading the specs the 8156 advertise VLAN where the 8156B don’t. Is this correct?

1 Like

apparently B is smaller / less power hungry… not too sure re:vlans

i don’t own one of these myself… but a user of my build has been having issues even on master/5.10 so proxy troubleshooting
( ugreen usb-c amazon product link )

perhaps we’ll need to wait for another bump (5.14 or whatever) before it’s reliable… might have to get me an aquantia…

user stated:

currently using CDC NCM with the the firmware's built-in drivers

[root@OpenWRT-RPi /]# ls -l /lib/firmware/rtl_nic/ | grep rtl8156
-rw-r--r--    1 root     root          3816 Sep 30 04:33 rtl8156a-2.fw
-rw-r--r--    1 root     root          5448 Sep 30 04:33 rtl8156b-2.fw

Seems the aquantia doesn’t work out of the box.

root@TO:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux 5.4.150 xhci-hcd xHCI Host Controller
Bus 004 Device 002: ID 1c04:0015 QNAP QNAP QNA-UC5G1T USB to 5GbE Adapter
Bus 004 Device 001: ID 1d6b:0002 Linux 5.4.150 xhci-hcd xHCI Host Controller
Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.150 ehci_hcd EHCI Host Controller
Bus 003 Device 001: ID 1d6b:0003 Linux 5.4.150 xhci-hcd xHCI Host Controller
Bus 005 Device 001: ID 1d6b:0003 Linux 5.4.150 xhci-hcd xHCI Host Controller

syslog:

Oct 27 23:33:11 TO kernel: [ 9.606570] aqc111 4-1:1.0 eth3: register 'aqc111' at usb-f10f8000.usb3-1, QNAP QNA-UC5G1T USB to 5GbE Adapter, 24:5e:be:4e:0d:34
Oct 27 23:33:11 TO kernel: [ 23.076452] br-lan: port 6(eth3) entered blocking state
Oct 27 23:33:11 TO kernel: [ 23.081691] br-lan: port 6(eth3) entered disabled state
Oct 27 23:33:11 TO kernel: [ 23.087053] device eth3 entered promiscuous mode
Oct 27 23:33:16 TO kernel: [ 37.843442] aqc111 4-1:1.0 eth3: Link Speed 1000, USB 2
Oct 27 23:33:16 TO kernel: [ 37.864727] br-lan: port 6(eth3) entered blocking state
Oct 27 23:33:16 TO kernel: [ 37.869971] br-lan: port 6(eth3) entered forwarding state
Oct 27 21:33:16 TO netifd: Network device 'eth3' link is up
[...withdrawing the RJ45-jack...]
Oct 27 23:36:07 TO kernel: [  208.596079] br-lan: port 6(eth3) entered disabled state
Oct 27 21:36:07 TO netifd: Network device 'eth3' link is down

Unfortunately the link shows no connectivity at all even though the LEDs are blinking.

I don’t think it makes much sense comparing the RTL8156(B) with the AQC111U - different chipsets + different firmware (in my case it seems to be some mediatek files) → very different drivers.

2 Likes

@wulfy23: did you make any progress on that topic?
I right now switched to TOS 7.0-future / OpenWrt snapshots and have still the very same situation with the QNAP QNA-UC5G1T (just like descriped above).
I did test it with a Windows 10 laptop connected to a Netgear GS110EMX where it met my requirements. I know the next step would be to test it under Debian or Ubuntu to make sure the mainstream kmod works before reaching out to OpenWrt-devices. Yet I do not have a physical linux machine available (only server VMs), so that is right now not possible.
I finally ordered a RTL8156 device that should be arriving in the next days so I’ll report on that as soon as I got hold off it.

2 Likes

thanks for the update… short answer no… have come across a few more reports of various 2.5+G not working (or at least not reliably functional or efficient)…

the general (rumored) bottom line seems to be ~5.15 - 5.17 for reliable linux use for most of these ( or custom driver backport )…

we may see initial 5.15 within the next month/s so path of least resistance seems to be to wait for that…

interesting stats

2 Likes

related @ master : Rpi4 < $(community_build) - #1902 by jrambo99 - Community Builds, Projects & Packages - OpenWrt Forum

that baby looks like the one we’ve been waiting for :love_you_gesture:

1 Like

I’m no expert in building from source therefore some questions to your linked thread:
If I understood correctly, the necessary patches are available and you were able to apply it on master? If so - can it be backported to 21.02.x? Or is it really dependent on Linux kernel 5.13?

patches have been pushed/committed to current master (5.10) so backported from 5.13
(i’m using imagebuilder from there, so technically not building but using standard master/snapshot branch)

21.02 is on 5.4 … I would need to take another look at the code but a quick answer is low probability someone could/would backport it to 5.4

1 Like

OK, that means TOSv7 should by now enable my device. I’ll test it in a couple of days (when family is not dependent on it) and report if it works.

1 Like

I think @wulfy23 is so eager to see 2.5 Gbps USB adapter in OpenWrt, but it still not there. :slight_smile:

Driver for R8152 is included in kernel 5.4, 5.10, but what are you looking for is for this commit, which is mentioned in the linked commit message:

And that’s not included in LTS kernels. Sorry for letting you down in such short time.

1 Like

What about current 5.15.x kernel?