Compile and install driver for TP-Link TL-WN725N version 2 in Raspbian

NOTICE!

This module is now deprecated as for kernel >= 3.10.0. If you update with rpi-update the module will stop working. Linux kernel 3.12 now has built-in support for this wifi dongle.

Compiling the kernel module for this wifi device takes quite long (30 minutes more or less). If you don’t want to wait follow the instructions in how to install TP-Link TL-WN725N version 2.

git clone https://github.com/liwei/rpi-rtl8188eu.git
git clone --depth 1 git://github.com/raspberrypi/linux.git rpi-linux
git clone --depth 1 git://github.com/raspberrypi/firmware.git rpi-firmware
cd rpi-linux
make mrproper
zcat /proc/config.gz > .config
make modules_prepare
cp ../rpi-firmware/extra/Module.symvers .
cd ../rpi-rtl8188eu
CONFIG_RTL8188EU=m make -C ../rpi-linux M=`pwd`
sudo rmmod 8188eu
sudo install -p -m 644 8188eu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
sudo depmod -a
sudo modprobe 8188eu

This wifi dongle comes with a small LED that blinks when it is active. By default this driver doesn’t use it. If you want it to be active edit the rpi-rtl8188eu/include/autoconf.h file and uncomment this line:

#define CONFIG_LED

This module also is very verbose at boot time because it has a debug flag defined. To get rid of those messages comment this line:

#define CONFIG_DEBUG_RTL819X

This is the 8188eu.ko I compiled myself from liwei repo for 2013-02-09-wheezy-raspbian with kernel Linux 3.6.11+.
This is the 8188eu.ko I compiled myself from liwei repo for 2013-09-25-wheezy-raspbian with kernel Linux 3.6.11+.

Source: https://github.com/liwei/rpi-rtl8188eu
http://bitacora.eniac2000.com/?p=3439

You might also like

TP-Link TL-WN725N version 2 in Raspberry Pi
Version 2 of TP-Link TL-WN725N driver doesn't come by default in Raspbian so it won't work by just plug-ining...
Clean caches with a drush command in Drupal 7
/Users/user/Applications/drush/drush -y -r /Users/user/Sites/drupal -l http://localhost cache-clear all You...
Update composer and all packages installed with it
php composer.phar self-update php composer.phar updatephp composer.phar self-update php composer.phar...
“AttributeError: ‘module’ object has no attribute ‘MongoClient’” error with Pymongo in Ubuntu 12.04
I'm currently doing the M101P: MongoDB for Developers online course. I had this error while running...
Leave a comment ?

31 Comments.

  1. Can you help us by specifing how should a noob behave in front of the hundreds of options when running “make modules_prepare” ?

  2. I’ve got this wifi dongle, I’ve the intention to use it in a prototype I am working on (http://traffic.integreen-life.bz.it/wiki/prototype),
    Do you know the difference between the two repositories github.com/lwfinger/rtl8188eu and github.com/liwei/rpi-rtl8188eu; I successfully compiled and used both.

    • I read somewhere that one of them used the blue led to show status of connection and such. I don’t know the internal differences.

  3. Hi there,

    i can’t use the precompiled driver. Therefore i tried it on my own and got stugged here:

    sudo zcat /proc/config.gz > .config
    -bash: .config: Permission denied

    How shall i get over this?

  4. Hey thx for reply,

    long story short, i made it. I had to create the emtpy file first, then chmod rights on it and that made the trick.
    Now i got my Pi running the TL-WN725N V2 on Soft-float Debian “wheezy” (2013-05-29-wheezy-armel).
    Therefore i would like to e-mail the file one of u to share it under github. Any volunteers?

    Greets

  5. when I send:

    zcat /proc/config.gz > .config

    I get:

    gzip: /proc/config.gz: No such file or directory

    • Are you using Raspbian?

      • No, I’m sorry… I was trying with xbian

      • anyway, xbian is based on raspbian, is there anything else I can do?

        • Google for “xbian /proc/config.gz”. Second result:

          check kernel .config setup (under /proc/config.gz – if missing, do a “sudo modprobe configs”).

          • just found it, now I’m trying to finish, I will post if it works, thank you

          • when I give:

            make modules_prepare

            I get:

            scripts/kconfig/conf –silentoldconfig Kconfig
            warning: (DRM) selects DMA_SHARED_BUFFER which has unmet direct dependencies (EXPERIMENTAL)
            *
            * Restart config…
            *
            *
            * General setup
            *
            Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [N/y/?] (NEW)

  6. Hi,
    thanks for this info!
    I built the module, but I get the following error with my and yours .ko
    “root ~/tplink/rpi-rtl8188eu # modprobe 8188eu
    ERROR: could not insert ’8188eu’: Exec format error”
    Do you have an idea of what is going wrong here?

    Thanks
    Dennis

  7. It asks for a usernamen and password!?

  8. I tried these instructions on my RPi model A, raspberrypi 3.6.11+ #541 PREEMPT, based on the original Wheezy images and all the updates.
    But it seems the last update breaks the driver.
    I followed all the steps, not an single error until last step “sudo modprobe 8188eu”, ERROR: could not insert ’8188eu’: Exec format error.

    Please help, I tried so many other webpages and this one looked promising.

  9. With the last rpi update #577 the compiler run in an error:

    Linux raspberrypi 3.10.18+ #577 Tue Nov 5 12:33:36 GMT 2013 armv6l GNU/Linux

    make: Entering directory `/home/pi/rpi-linux’
    LD /home/pi/rpi-rtl8188eu/built-in.o
    CC [M] /home/pi/rpi-rtl8188eu/core/rtw_cmd.o
    In file included from /home/pi/rpi-rtl8188eu/core/rtw_cmd.c:23:0:
    /home/pi/rpi-rtl8188eu/include/osdep_service.h: In function ‘thread_enter’:
    /home/pi/rpi-rtl8188eu/include/osdep_service.h:1397:2: error: implicit declaration of function ‘daemonize’ [-Werror=implicit-function-declaration]
    cc1: some warnings being treated as errors
    make[1]: *** [/home/pi/rpi-rtl8188eu/core/rtw_cmd.o] Fehler 1
    make: *** [_module_/home/pi/rpi-rtl8188eu] Fehler 2
    make: Leaving directory `/home/pi/rpi-linux’

    Can you help with this problem?

    Reply
    • Remark: The update was made with rpi-update:

      https://github.com/Hexxeh/rpi-update/blob/master/rpi-update

      https://github.com/Hexxeh/rpi-firmware
      – the new kernel 3.10.18

      Reply
      • This module drive looks like it’s not compatible with Linux Kernel >= 3.10.0. I’ve tried deleting that “daemonize” function call and compilation continued but then crashed with:

        error: implicit declaration of function 'create_proc_entry' [-Werror=implicit-function-declaration]

        The driver should be patched for Linux >= 3.10.0 so it doesn’t use deprecated/not supported function calls.

        Other way arround would be not using the “-Werror=implicit-function-declaration” flag. This way the warning wouldn’t be cosidered as an error. I don’t know about that but google said it’s not very good to do so.

        Edit: I also removed the use of “-Werror-implicit-function-declaration” flag (at line 374 of rpi-linux/Makefile file) and although it continued the compilation process it stoped with those errors:

        /home/pi/rpi-rtl8188eu/os_dep/linux/os_intfs.c:374:7: error: dereferencing pointer to incomplete type
        /home/pi/rpi-rtl8188eu/os_dep/linux/os_intfs.c:382:7: error: dereferencing pointer to incomplete type
        /home/pi/rpi-rtl8188eu/os_dep/linux/os_intfs.c:558:7: error: dereferencing pointer to incomplete type
        /home/pi/rpi-rtl8188eu/os_dep/linux/os_intfs.c:567:7: error: dereferencing pointer to incomplete type

        The code that causes that error in those 4 errors is something like this this:

        entry = create_proc_read_entry("write_reg", S_IFREG | S_IRUGO,
                                   dir_dev, proc_get_write_reg, dev);            
        if (!entry) {
                DBG_871X("Unable to create_proc_read_entry!\n");
                return;
        }
        entry->write_proc = proc_set_write_reg;

        This module needs to adapt create_proc_read_entry and replace it with proc_create() and proc_create_data() and the use of seq_file facilities.

        Reply
  10. Thanks,
    Finally I got it work.
    >This is the 8188eu.ko I compiled myself from liwei repo for 2013-09-25-wheezy-raspbian with kernel Linux 3.6.11+.
    TP-LINK Ver2.0
    Raspbian 3.6.11+

    Reply
    • : Could you please upload the kernel with all modules? I accidentally upgraded mine and want to switch back to 3.6.11+

      Thanks

      Reply
  11. I run the rpi-upgrade and lost the Wlan card.
    Bad luck! New kernel new driver!
    I could download the driver from:
    http://worrajak.blogspot.hu/2013/12/driver-wireless-lan-tp-link-tl-wn723n.html
    I think all driver versions downloadable from this site.
    Now I download the source to compile my own.
    I need the wireless for internet access.
    the link is above^.
    http://tech.enekochan.com/wp-content/uploads/2013/rtl8188eu/liwei/2013-09-25-wheezy-raspbian-3-6-11/8188eu.ko
    Imi

    Reply

Leave a Comment

Trackbacks and Pingbacks: