OpenWrt Forum Archive

Topic: realtek usb to ethernet connection issue

The content of this topic has been archived on 17 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all,

We are working on openwrt tl-mr3420 platform, version 2.0. Our requirement is to set up the board to support lan (internet) connetivity using USB to LAN adapter.

When we plug the device to the USB port, it is detecting as a USB device and not registering to the cdc-ether.

These are the packages I have installed for net configuration:

  • kmod-usb-net

  • kmod-usb-net-cdc-ether

  • kmod-usb-serial

  • kmod-usb-serial-option

  • kmod-usb-serial-wwan

  • kmod-cdc-acm

Still the device is not getting detected.
We have googled it but in no result.

We followed these links: … dc_ether.c

And also we tried to get the kernel source from git by follows this page.

cdc_ether.c is for broadcom platform and realtek is blacklisted in that file.
But the same file we tried to check in AR71xx but ther is no ar71xx platform folder containing drivers.

Please help us in fixing this iisue as this is critical in our requirement.


(Last edited by sowmyabr on 9 Jun 2015, 08:07)

cdc_ether.c is for broadcom platform and realtek is blacklisted in that file.

from that cdc_ether file there is a comment

 * First blacklist any products that are egregiously nonconformant
 * with the CDC Ethernet specs.  Minor braindamage we cope with; when
 * they're not even trying, needing a separate driver is only the first
 * of the differences to show up.

The following lines should add the 2 realtek USB-Ethernet modules to OpenWrt:
(in packages/linux/modules/

define KernelPackage/usb-net-rtl8150
  TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
  AUTOLOAD:=$(call AutoProbe,rtl8150)
  $(call AddDepends/usb-net)

define KernelPackage/usb-net-rtl8150/description
 Kernel module for USB-to-Ethernet Realtek 8150 convertors

$(eval $(call KernelPackage,usb-net-rtl8150))

define KernelPackage/usb-net-rtl8152
  TITLE:=Kernel module for USB-to-Ethernet Realtek convertors
  AUTOLOAD:=$(call AutoProbe,r8152)
  $(call AddDepends/usb-net)

define KernelPackage/usb-net-rtl8152/description
 Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors

$(eval $(call KernelPackage,usb-net-rtl8152))

Pls test if this works for you and I can send a patch to the mailing list to add this feature.

V2: corrected KCONFIG symbols

(Last edited by zloop on 9 Jun 2015, 11:09)

Hi Zloop,

Thanks for the reply.
But there is no linux folder under openwrt/packages

We have openwrt/package/linux-atm  sad

Do I have to update the firmware?


Update: file is located in openwrt/package/kernel/modules/ .
Do I have to add the mentioned lines in this file and recompile?


Yes - add that to the file in openwrt/package/kernel/modules

After that you should be able to select the 2 modules in make menuconfig

I corrected an error in the post above

(Last edited by zloop on 9 Jun 2015, 11:13)

Hi zloop,

I did as you told, but I am not getting the options to select the modules.
Do I have to compile?

are you sure you are looking in the correct sub menu ?

I prepared a screenshot of my environment that has this module after I added it and then ran "make menuconfig":

Edit: you can search for these modules too

Edit2: building for x86 target works
are created

(Last edited by zloop on 9 Jun 2015, 12:57)

Yes I am searching in the usb support sub menu. But I am not getting the option for realtek modules.

post the complete to a pastebin and link it here

- You seem to use an older version of : are you using BB ?
The patch/added lines work fine in Trunk (CC)

- your file seem to be broken
DOS line endings - might be an issue with the pastebin

Maybe you forgot to select kmod-usb-net first?
Since all usb-net packages depend on that

I see those modules with:
- I replaced my with your file.
- I changed the line endings to UNIX
- make menuconfig
- select kmod-usb-net
- "kmod-usb-net-rtl8152" + the other one are selectable in my buildroot (trunk)

Now I selected kmod-usb-net package and I am able to select rtl8152 device.
Before I used to install packages through commands.

Okay now I will compile the kernel and get back to you.
Thanks a lot.


I'm also trying to setup an RTL8153 USB to LAN adapter but for the Raspi1B+ with CC.

Can someone help me to compile the driver or does someone got a link?
I can login with ssh but never build a driver before and only used precompiled packages.

The discussion might have continued from here.