It seems RTL8152B - TP-Link UE200 USB Ethernet Adapter support is missing.
2.17.1 Driver Support List;
The RTL8152 driver supports the following USB Ethernet chipsets.
RTL8156 / RTL8156B(S)(G): 2.5 GbE (USB 3.0)
RTL8153 / RTL8153B: 10/100/1000 MbE (USB 3.0)
RTL8154 / RTL8154B: 10/100/1000 MbE (USB 2.0)
RTL8152B: 10/100M (USB2.0)
TP-Link UE200 USB Ethernet Adapter - RTL8152B
lsusb "Bus 001 Device 011: ID 2357:0602 TP-Link USB 10/100 LAN"
TP-Link UE300 USB Ethernet Adapter - RTL8153
lsusb "Bus 001 Device 011: ID 2357:0601 TP-Link USB 10/100/1000 LAN"
Driver only has TP-Link UE300 support -->
|
ATTR{idVendor}=="2357", ATTR{idProduct}=="0601", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}" |
|
REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0601), |
Add support on TP-Link UE200 USB Ethernet Adapter
Update files accordingly.
realtek-r8152-dkms/udev/rules.d/50-usb-realtek-net.rules
# TP-LINK
ATTR{idVendor}=="2357", ATTR{idProduct}=="0601", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
ATTR{idVendor}=="2357", ATTR{idProduct}=="0602", ATTR{bConfigurationValue}!="$env{REALTEK_MODE1}", ATTR{bConfigurationValue}="$env{REALTEK_MODE1}"
realtek-r8152-dkms/src/r8152.c
/* TP-LINK */
REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0601),
REALTEK_USB_DEVICE(VENDOR_ID_TPLINK, 0x0602),
Tested on Raspi - Linux raspberrypi 6.1.69-v7+ armhf
You need proper kernel-headers to build/install dkms module. If you relly on raspi current kernel just install header package and dkms.
apt-get install dkms raspberrypi-kernel-headers
If you used rpi-update before ( like me ) and running on bleeding edge kernel, you need to get kernel headers for your current kernel version. You cannot find bleeding edge kernel headers on raspi repo. Don't try to symbolic link old kernel headers for newer kernel just use this handy tool rpi-source.
rpi-source --nomake
cd /root/linux
make modules_prepare
apt-get install dkms
Build and install driver via dkms-install.sh on this repo.
Blacklist the default kernel module cdc_ether. Check /etc/modprobe.d/ for any pre-blacklisted realtek module by raspi, they have some.
echo "blacklist cdc_ether" >> /etc/modprobe.d/blacklist-cdc_ether.conf
Enable loading r8152 module on boot.
echo "r8152" >> /etc/modules-load.d/modules.conf
You need initramfs on raspi.
cat /etc/default/raspberrypi-kernel
First uncomment INITRD=Yes
# Defaults for raspberrypi-kernel
# Uncomment the following line to enable generation of
# /boot/initrd.img-KVER files (requires initramfs-tools)
#INITRD=Yes
# Uncomment the following line to enable generation of
# /boot/initrd(7).img files (requires rpi-initramfs-tools)
#RPI_INITRD=Yes
Install package.
apt-get install initramfs-tools
Then create an initramfs and check the full name on /boot
update-initramfs -c -k $(uname -r)
Edit /boot/confix.txt
accordingly to load initramfs on boot.
initramfs initrd.img-6.1.69-v7+ followkernel
(without equal sign)
reboot
Check initramfs loaded.
dmesg
Trying to unpack rootfs image as initramfs...
Check kernel module r8152 loaded.
dmesg | grep r8152
r8152: loading out-of-tree module taints kernel.
usbcore: registered new device driver r8152-cfgselector
r8152-cfgselector 1-1.3: reset high-speed USB device number 4 using dwc_otg
r8152 1-1.3:1.0 eth0: v2.17.1 (2023/06/13)
r8152 1-1.3:1.0 eth0: This product is covered by one or more of the following patents:
usbcore: registered new interface driver r8152
r8152-cfgselector 1-1.3: reset high-speed USB device number 4 using dwc_otg
r8152 1-1.3:1.0 eth0: v2.17.1 (2023/06/13)
r8152 1-1.3:1.0 eth0: This product is covered by one or more of the following patents:
modinfo r8152
filename: /lib/modules/6.1.69-v7+/updates/r8152.ko.xz
version: v2.17.1 (2023/06/13)
license: GPL
description: Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
ethtool -i eth0
driver: r8152
version: v2.17.1 (2023/06/13)
firmware-version:
expansion-rom-version:
bus-info: usb-3f980000.usb-1.3
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
Optimise TP-Link UE200 USB Ethernet Adapter for rpi
You may face some disconnect and reconnect issues cause autoneg and power management.
## [ 3822.102586] r8152 1-1.3:1.0 eth0: carrier off
## [ 3824.045115] r8152 1-1.3:1.0 eth0: carrier on
Disable autoneg and power saving via systemd service + set 100 full duplex
apt-get install ethtool
r8152-rpi.sh --> Modify your interface name
#!/bin/bash
# Optimise Raspberry Pi for TP-LINK UE200 USB 2.0 100Mbps Ethernet Adapter
# 2023-12-24 for r8152b driver version: v2.17.1
# Modify your interface name
int="eth0"
# Disable auto negotation that cause disconnects
## [ 3822.102586] r8152 1-1.3:1.0 eth0: carrier off
## [ 3824.045115] r8152 1-1.3:1.0 eth0: carrier on
ethtool -s "${int}" speed 100 duplex full autoneg off
# Disable power management
echo "on" > /sys/class/net/"${int}"/power/control
r8152-rpi.service
[Unit]
Description=Optimise Raspberry Pi for TP-LINK UE200 USB 2.0 100Mbps Ethernet Adapter
Requires=network.target
After=network.target
[Service]
Type=oneshot
ExecStart=/path/r8152-rpi.sh
[Install]
WantedBy=multi-user.target
P.S: Both sides of a link must have auto-negotiation off, and full duplex. Don't forget the re-configure other sides of links which interacts with rpi.
Happy christmas.