Quantcast
Channel: FunWithLinux.net » Mike
Viewing all articles
Browse latest Browse all 38

Modifying TP-Link TL-WN722N v2 driver

0
0

I recently purchased a TP-Link wifi dongle for my desktop.  I have previously purchased TP-Link products and have enjoyed out of the box support.  Unfortunately for me, the latest version (v2.1 or v2.0) updated the chipset to Realtek 8188eus aka rtl8188eu.  Additionally, this product ships with the VendorID: 0×2357, ProductID: 0x010c.  These ID’s are what inform the kernel which driver to load to interface with the device.  Unfortunately, this Vendor and Product ID combination is not found in any of the existing kernel drivers.

UPDATE:  Are you just looking for a working driver?  Give https://github.com/lwfinger/rtl8188eu a try.  LW Finger is a kernel maintainer, the software should be much better than mine below.

My first step in the journey to getting this dongle to work was to download the driver’s from TP link’s site directly:  http://www.tp-link.com/us/download/TL-WN722N.html#Driver

The drivers are labeled as “Linux Kernel 2.6.18~3.19.3.” on that site.  Wow, that’s old.  I’m running Ubuntu 16.04 LTS with kernel 4.4.0.  This might not work out.  Well, as it happens, I download the tarball, which is actually just a tar of C source files.  Score.  On the plus side, the folder is labeled for kernel 4.3.  I make a few modifications and now it compiles and I can use my dongle: https://github.com/michaelgugino/rtl8188EUS

Now that I know that the device actually works on Linux, and the driver code seems to be a somewhat old, I start browsing the linux kernel source looking for any compatible drivers.  I first discovered drivers/net/wireless/realtek/rtl8xxxu.  This claims to have some support for 8188eu devices, but I don’t see any devices with that chipset being used in that driver code, but the preliminary support is there for adding devices in the future (which is outside of my skill level and time commitment for this project).  After trying to force the Vendor and Product ID into that driver, I get an error in dmesg stating the eFUSE offset is wrong.  So, the existing devices that I tried in that driver weren’t 100% compatible.

After a little more grep’ing, I stumbled along drivers/staging/rtl8188eu.  Bingo.  This supports USB devices and looks like exactly what I need.  I chop a quick patch and recompile that driver module against my kernel, load it, and it’s working.  Perfect.  Only problem is performance doesn’t seem to be on par with the vendor supplied driver.  This might be due to the fact I’m using a much older kernel, 4.4.0, and performance may be fixed upstream.  In any case, modifying the source for either 4.4.0 or a newer kernel should be the same one-line change.  Patch here: http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2017-July/108601.html


Viewing all articles
Browse latest Browse all 38

Latest Images

Trending Articles





Latest Images