Troubleshooting tp-link UE200 a USB 2.0 Ethernet adapters.

My laptop does not have a RJ-45 or Ethernet port, not because it is one of those slim ultrabooks but because it is cheap, very very cheap. So what I do when i need to use lan, I use a USB-Ethernet adapter and recently I bought a new one. TP-Link UE200 a usb 2.0 ethernet adapter with rtl8152b chipset.

TP651l_1

It was working fine on windows but on my Kali (kernel: 4.18.0-kali2) it was extremely unreliable, dropped packets and worked rarely that too for short durations. I was really confused as the kernel had r8152 module pre-installed and loaded, modinfo r8152 indicated that it was all fine, all my proxy parameters were right and the static IP setup too was fine. I searched around and didn’t find much.

Just when I was starting to feel too sleepy to continue, I thought of reinstalling the module. This is how I did it.

  1. Visit realtek’s site (which for no reason defaults to Chinese) and download the required rtl8152b driver source package for Linux.
  2. Extract the archive contents and in that directory right click and select Open in Terminal.
  3. In terminal enter make and wait for it to finish successfully. Before doing this make sure you have build-essentials and linux kernel headers installed.
  4. make will create a file named r8152.ko in that folder.
  5. Then cp /lib/modules/(kernel being used uname -r)/kernel/drivers/net/usb/r8152.ko /root/r8152.ko.bak this will copy the existing module and save it in your home folder.
  6. Now cp /root/directory/to_the_newly_compiled_module/r8152.ko /lib/modules/(kernel being used uname -r)/kernel/drivers/net/usb/r8152.ko  copies the newly compiled module to kernel/drivers/net/usb/ folder.
  7. File size difference in those two modules (Version 1.something and 2.something) was almost a megabyte.
  8. Now modprob r8152 just to make sure the new one is loaded, modinfo r8152 will show you a newer version, in my case it jumped from 1.something to 2.something.
  9. Now you’ll have to update-initramfs and it may not be necessary but you should also update-grub.
  10. After all this go for a reboot to settle things down.

This fixed my problem and now the Ethernet adapter works as it should. I loved troubleshooting it and the final result was even more rewarding, a peak download speed of 12.46MBps.

 

Content in Bold Italics corresponds to commands, some directly usable others need a little bit tinkering like replacing “(kernel being used uname -r)” with output of uname -r.

I Use Kali Linux and I am guilty of using root account for most of what I do, you may need to use sudo when running some of these commands on a different distribution.

 

 

 

 

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Website Powered by WordPress.com.

Up ↑

Cyberbabble? Not on my watch ;)

Demystifying Cybersecurity without the Babble

limbioliong

.NET/COM Interop