Compiling TP-LINK WN725N V2 driver in Raspbmc with 3.6.11 kernel

Assalamualaikum, Hi,



After June Raspbmc's update, my TP-LINK WN725N V2 which I manage to make it work on my Pi previously failed to work even though it's claimed to be supported by this update. So in order to fix that, I've recompile the module by myself this time. Here are few notes on how to compile driver for TP-LINK WN725N V2 in case the next update still fail to support this device.

Edit: After September update, Raspbmc no longer use kernel 3.6.11, so check out the latest guide to compile for kernel 3.10.13 by Stm labs forum user Rodi here. The .ko file also provided. I've mirrored it in my other post.

TLDR;
Grab the compiled kernel module from here  (check my other post for latest .ko file), put it in wireless modules folder, depmod -a, modprobe 8188eu


Long version:
Pre-requisite
Since your Wifi adapter not working right now, plug-in your Ethernet cable. The compiling process doesn't require internet connection, but since most of the items is grabbed over the Internet, it would save you a few steps.

Install gcc and make program in your Pi:
pi@raspbmc:~$ sudo apt-get -y install gcc make

Since I don't want to install Git in my Pi, I fetch the files required below to my desktop before transferring it to the Pi.

1. Get linux source code from Github
haziq@haziq-desktop:~$ git clone --depth 1 git://github.com/raspberrypi/linux.git rpi-linux

2. Get the rtl8188eu driver from Github
haziq@haziq-desktop:~$ git clone --depth 1 git://github.com/liwei/rpi-rtl8188eu.git rtl8188eu

3. Get the Module.symvers from my dropbox
haziq@haziq-desktop:~$ wget --no-check-certificate https://dl.dropboxusercontent.com/u/99979776/Module.symvers

4. File placement
If you're not directly download the files above to your Pi, move those file into your Pi, since we're not doing cross compiling this time.

All command is relative to '~' (/home/pi) directory, so please make sure your '~' contains rpi-linux and rtl8188eu folders, and Module.symvers.

5. From the kernel clone location, clean the kernel source
pi@raspbmc:~$ cd ~/rpi-linux  
pi@raspbmc:~$ make mrproper
pi@raspbmc:~$ zcat /proc/config.gz > .config
pi@raspbmc:~$ vi .config
Clear the CONFIG_CROSS_COMPILE assignment in the copied .config file with your favorite editor (CONFIG_CROSS_COMPILE="") and save.

6. Prepare the modules
pi@raspbmc:~$ make modules_prepare
pi@raspbmc:~$ cp ~/Module.symvers .
pi@raspbmc:~$ cd ~/rtl8188eu
pi@raspbmc:~$ CONFIG_RTL8188EU=m make -C ~/rpi-linux M=`pwd`
After 8188eu.ko successful build, copy it into the wireless module folder, and probe the module
pi@raspbmc:~$ sudo cp 8188eu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
pi@raspbmc:~$ sudo depmod -a
pi@raspbmc:~$ sudo modprobe 8188eu

7. ifconfig, and you should see the wlan interface :-)


Reference:

Linux driver for tplink-wn725n nano wireless adapter
https://github.com/liwei/rpi-rtl8188eu

Module.symvers file used for kernel 3.6.11
http://forum.stmlabs.com/showthread.php?tid=6866&pid=61498#pid61498


Comments

  1. Thanks a lot!

    I think hundreds of people used this tutorial!! :)

    ReplyDelete
    Replies
    1. No problem. Glad to find it help others!
      Unfortunately latest Raspbmc using kernel 3.10.
      Still haven't found working solution for that..

      Delete
  2. http://forum.stmlabs.com/showthread.php?tid=10805

    ReplyDelete
    Replies
    1. thanks, i've linked it up on my latest entry- http://smhaziq.blogspot.com/2013/10/compiling-tp-link-wn725n-v2-driver-in.html

      Delete

Post a Comment