Project

General

Profile

Support #408

Installing Drivers for TL-WN725N v2 on Raspberry Pi

Added by Daniel Curtis over 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Wireless Support
Target version:
-
Start date:
06/20/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

Description

Precompiled method

Driver files available for the TP-LINK TL-WN725N V2 and similar wifi dongles using the 8188eu driver module for systems using the Raspbian image.

IMPORTANT: First check the version of Linux you have. Use the command uname -a to find the version of Linux.

uname -a

Linux raspberrypi 3.10.24+ #614 PREEMPT Thu Dec 19 20:38:42 GMT 2013 armv6l GNU/Linux

The important part is 3.10.24+ #614. This is just an example and your version may be different. Select the right driver for the version you have from the list below.

rtl8188eu drivers for 3.6.11+

  • 3.6.11+ #371 up to #520 inclusive - 8188eu-20130209.tar.gz
  • 3.6.11+ #524, #528, #532 - 8188eu-20130815.tar.gz
  • 3.6.11+ #538, #541, #545, #551, #557 - 8188eu-20130830.tar.gz

rtl8188eu drivers for 3.10.18+ to 3.10.38+

  • 3.10.18+ #577 - 8188eu-20131105.tar.gz
  • 3.10.18+ #579, #585 - 8188eu-20131106.tar.gz
  • 3.10.18+ #587 - 8188eu-20131110.tar.gz
  • 3.10.18+ #590, #592 - 8188eu-20131111.tar.gz
  • 3.10.18+ #594, #596 - 8188eu-20131113.tar.gz
  • 3.10.19+ #600 - 8188eu-20131113.tar.gz
  • 3.10.21+ #602, #604 - 8188eu-20131113.tar.gz
  • 3.10.22+ #606 - 8188eu-20131206.tar.gz
  • 3.10.23+ #608 - 8188eu-20131209.tar.gz
  • 3.10.24+ #610 - 8188eu-20131209.tar.gz
  • 3.10.24+ #614 - 8188eu-20131219.tar.gz
  • 3.10.25+ #616, #618 - 8188eu-20131219.tar.gz
  • 3.10.25+ #622, #624 - 8188eu-20131219.tar.gz
  • 3.10.26+ #628 - 8188eu-20140110.tar.gz
  • 3.10.27+ #630 - 8188eu-20140117.tar.gz
  • 3.10.28+ #632, #634 - 8188eu-20140117.tar.gz
  • 3.10.29+ #636, #638 - 8188eu-20140117.tar.gz
  • 3.10.30+ #640, #642 - 8188eu-20140117.tar.gz
  • 3.10.32+ #646, #648 - 8188eu-20140117.tar.gz
  • 3.10.33+ #654, #656 - 8188eu-20140117.tar.gz
  • 3.10.33+ #658 - 8188eu-20140117.tar.gz
  • 3.10.34+ #660, #661 - 8188eu-20140117.tar.gz
  • 3.10.36+ #662, #664 - 8188eu-20140117.tar.gz
  • 3.10.36+ #665, #666 - 8188eu-20140117.tar.gz
  • 3.10.37+ #667, #669 - 8188eu-20140117.tar.gz
  • 3.10.38+ #675 - 8188eu-20140117.tar.gz

rtl8188eu drivers for 3.12.18+ to 3.12.22+

  • 3.12.18+ #673, #677 - 8188eu-20140425.tar.gz
  • 3.12.18+ #679, #680 - 8188eu-20140501.tar.gz
  • 3.12.19+ #681, #682 - 8188eu-20140509.tar.gz
  • 3.12.19+ #684 - 8188eu-20140509.tar.gz
  • 3.12.20+ #685, #686 - 8188eu-20140509.tar.gz
  • 3.12.20+ #687 - 8188eu-20140509.tar.gz
  • 3.12.21+ #688, #689 - 8188eu-20140509.tar.gz
  • 3.12.22+ #690, #691 - 8188eu-20140616.tar.gz

Link to driver files - use date code from list above to download required driver
https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz

NOTE: If updating firmware revisions, say from 3.10.23+ to 3.10.24+, and they use the same driver, in this case 8188eu-20131209.tar.gz, you will still need to reinstall the driver on the newer version of Linux, even though the driver has not changed as it will be loaded from a different directory by the new Linux revision and you need to install it in the new directory.

The driver installation instructions expect you to be using Raspbian, either installed from a basic rasbian image or installed using NOOBS. The instructions are based on running from a Command Line Terminal, not a GUI (Graphical User Interface). If you are running using the GUI you will need to open a terminal window and run the commands from the terminal window but I can't guarantee they will work.

If you have a wired internet connection install the driver with the following commands

wget https://dl.dropboxusercontent.com/u/80256631/8188eu-201xyyzz.tar.gz <--set data code for driver version above
tar -zxvf 8188eu-201xyyzz.tar.gz                                         <--set data code for driver version above
sudo install -p -m 644 8188eu.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless
sudo insmod /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko
sudo depmod -a

If you do not have an internet connection the driver file will need to be downloaded on another computer and copied to the SD card. I use a Windows laptop and will use that as an example of how to copy and install the wifi driver.

Open a web browser on your Windows computer and download the driver. Check the name of the driver file before saving it and correct it if necessary. I have sometimes found Windows tries to save the driver file as 8188eu-201xyyzz.tar.tar when it should be 8188eu-201xyyzz.tar.gz. Substitute the correct file name for "xyyzz".

Take the SD card and load it into an SD card reader on your Windows computer. Copy the driver file, 8188eu-201xyyzz.tar.gz, from your Windows computer to the SD card. Safely remove the SD card from the card reader by clicking the safe removal icon in the task bar and install the SD card in your Raspberry Pi and power on and login.

Compiling from Source

Compiling with DKMS on Raspbian (recommended)

  • Install dkms:
    apt-get install dkms
    
  • Get the current raspberry pi linux source:
    cd /usr/src
    git clone --depth 1 https://github.com/raspberrypi/linux.git linux-`uname -r`
    cd linux
    zcat /proc/config.gz > .config
    
    • In the next step you may be prompted questions about the configuration if your /proc/config.gz does not answer them (new features for example)
      sudo make oldconfig
      sudo make modules_prepare
      sudo wget https://github.com/raspberrypi/firmware/blob/53d1ae311226b5cd7ea1277832139b74b2bb0f90/extra/Module.symvers
      sudo ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/source
      sudo ln -s /usr/src/linux-`uname -r` /lib/modules/`uname -r`/build
      

      NOTE: I needed to use the History feature on GitHub to locate the exact version I was using, in this case it was 3.12.28+
  • Get driver source
    cd /usr/src
    git clone https://github.com/lwfinger/rtl8188eu.git
    
  • Build and install the rtl8188eu driver using dkms:
    dkms add ./rt8188eu
    dkms build 8188eu/1.0
    dkms install 8188eu/1.0
    

NOTE: I have had more trouble compiling on Raspbian than Arch, since their packages are kept more up to date.

Compiling with DKMS on Arch (recommended)

  • Install DKMS and Linux headers
    pacman -S dkms linux-raspberrypi-headers git
    
  • Get driver source, compile, install and load it
    cd /usr/src
    git clone https://github.com/lwfinger/rtl8188eu.git
    
  • Build, install, and load the rtl8188eu driver:
    dkms add ./rt8188eu
    dkms build 8188eu/1.0
    dkms install 8188eu/1.0
    
  • Check that the driver was installed correctly by looking for a new network interface:
    ip link
    

Install from AUR on Arch

  • Install the dkms-8188eu package from the AUR:
    yaourt dkms-8188eu
    
    • NOTE: Yes, that is the whole process. Isn't the AUR wonderful?

Manual compilation (not recommended)

  • Get linux source code, prepare config files and create symlinks
    cd /usr/src
    git clone https://github.com/raspberrypi/linux.git
    cd linux
    zcat /proc/config.gz > .config
    
    • In the next step you may be prompted questions about the configuration if your /proc/config.gz does not answer them (new features for example)
      sudo make oldconfig
      sudo make modules_prepare
      sudo wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
      sudo ln -s /usr/src/linux /lib/modules/`uname -r`/source
      sudo ln -s /usr/src/linux /lib/modules/`uname -r`/build
      
  • Get driver source, compile, install and load it
    cd /usr/src
    git clone https://github.com/lwfinger/rtl8188eu.git
    cd rtl8188eu
    make all
    sudo make install
    
After this step you should have those new files installed:
  1. /lib/modules/`uname -r`/kernel/drivers/net/wireless/8188eu.ko
  2. /lib/firmware/rtlwifi/rtl8188eufw.bin
  • Load the module
    sudo modprobe 8188eu
    
  • Remove driver and linux source code to recover some space (around 700MB); do not run if you want to keep the code for future compilations
    cd /usr/src
    rm /lib/modules/`uname -r`/source
    rm /lib/modules/`uname -r`/build
    rm /usr/src/linux-`uname -r`
    rm /usr/src/linux
    rm -R rtl8188eu
    

Automagic compilation

  • Script form:
    vi compile_rtl8188eu.sh
    
    • And add the followingL
      #!/bin/bash
      
      # Get linux source code, prepare config files and create symlinks
      VERSION=`uname -r | awk -F'.' '{print $1"."$2}'`
      cd ~
      wget https://codeload.github.com/raspberrypi/linux/tar.gz/rpi-${VERSION}.y -O rpi-${VERSION}.y.tar.gz
      sudo tar zxf rpi-${VERSION}.y.tar.gz -C /usr/src/
      cd /usr/src/linux-rpi-${VERSION}.y/
      sudo bash -c "zcat /proc/config.gz > /usr/src/linux-rpi-${VERSION}.y/.config" 
      # In the next step you may be prompted questions about the configuration
      # if your /proc/config.gz does not answer them (new features for example)
      sudo make oldconfig
      sudo make modules_prepare
      sudo wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
      sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/source
      sudo ln -s /usr/src/linux-rpi-${VERSION}.y /lib/modules/`uname -r`/build
      # Optional
      #sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/linux-`uname -r`
      #sudo ln -s /usr/src/linux-rpi-${VERSION}.y /usr/src/linux
      
      # Get driver source, compile, install and load it
      cd ~
      git clone https://github.com/lwfinger/rtl8188eu.git
      cd rtl8188eu
      # This will take around 20 minutes
      make all
      sudo make install
      # After this step you should have those new files installed:
      # /lib/modules/`uname -r`/kernel/drivers/net/wireless/8188eu.ko
      # /lib/firmware/rtlwifi/rtl8188eufw.bin
      sudo modprobe 8188eu
      
      # Remove driver and linux source code to recover some space (around 700MB)
      # Leave those lines commented if you want to keep the code for future compilations
      #sudo rm /lib/modules/`uname -r`/source
      #sudo rm /lib/modules/`uname -r`/build
      #sudo rm /usr/src/linux-`uname -r`
      #sudo rm /usr/src/linux
      #sudo rm -R /usr/src/linux-rpi-${VERSION}.y
      #cd ~
      #rm rpi-${VERSION}.y.tar.gz
      #rm -R rtl8188eu
      
  • Make the script executable:
    chmod +x compile_rtl8188eu.sh
    
  • Run the script:
    ./compile_rtl8188eu.sh
    

Resources


Files

8188eu-20131219.tar.gz (294 KB) 8188eu-20131219.tar.gz #622 - Drivers for the version of Raspbian I downloaded Daniel Curtis, 06/20/2014 12:01 PM
8188eu-20140616.tar.gz (293 KB) 8188eu-20140616.tar.gz #691 - Drivers for the current (6/20/14) Raspbian Daniel Curtis, 06/20/2014 12:02 PM
#1

Updated by Daniel Curtis over 10 years ago

#2

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#3

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#4

Updated by Daniel Curtis about 10 years ago

    # Compile driver for 3.10.y version of kernel. To compile for an older version you will need
    # to set up the correct commits of linux and firmware to comply with the version of linux you
    # need the driver for.

    # Compiles 8188eu driver for 3.10.y without needing to compile the whole linux kernel. Requires
    # driver firmware, rtl8188eufw.bin, which can be found in the driver source tree.

    # Initialise kernel and driver source code for the first time for compiling drivers
    -----------------------------------------------------------------------------------

    # jump to home directory - /home/pi
    cd

    # make directory to hold source data
    mkdir src

    # enter source directory - /home/pi/src
    cd src

    # clone rtl8188eu source code repository - this will automatically generate a
    # directory "rtl8188eu" at /home/pi/src/rtl8188eu.
    git clone git://github.com/lwfinger/rtl8188eu.git

    # clone Raspberry Pi firmware repository - this will automatically generate a
    # directory "firmware" at /home/pi/src/firmware - setting depth avoids downloading
    # the whole repository but allows reverting to some previous revisions if necessary.
    # Do not use git clone if it has already been used - use git pull to update the code.
    git clone --depth 10 git://github.com/raspberrypi/firmware.git

    # clone Raspberry Pi linux source code - this will automatically generate a
    # directory "linux" at /home/pi/src/linux -  setting depth avoids downloading
    # the whole repository but allows reverting to some previous revisions if
    # necessary. Do not use git clone if it has already been used - use git pull
    # to update the code.
    git clone --depth 235 git:github.com/raspberrypi/linux.git

    # Updating source code for compiling drivers if code is already installed and
    # newer code is available
    -----------------------------------------------------------------------------

    # if rtl8188eu directory has already been generated it can be update with the
    # latest code using git pull. enter rtl8188eu directory, run command then revert
    # back to src directory
    cd rtl8188eu
    git pull
    cd ../

    # if firmware directory has already been generated it can be update with the
    # latest code using git pull enter firmware directory, run command then revert
    # back to src directory. Use depth option or git pull may load the whole of
    # the repository from way back 2011 or whenever
    cd firmware
    git pull --depth 2
    cd ../

    # if linux directory has already been generated it can be update with the latest
    # code using git pull. enter linux directory, run command then revert back to
    # src directory. Use depth option or git pull may load the whole of the repository
    # from way back 2011 or whenever ~ 3 Million+ files
    cd linux
    git pull --depth 2
    cd ../

    # Select a specific version of linux/firmware to compile driver for if required
    -------------------------------------------------------------------------------

    # adjust firmware version required for kernel version driver is to be used with
    # view commit ID's at https://github.com/raspberrypi/firmware/commits/master
    # not required if driver is being compiled for most recent version kernel
    # unless it has previously been set to use an older version of code
    cd firmware
    git checkout "branch" 
    git checkout "commit ID" 
    cd ../

    # enter linux source directory and adjust linux code version to use
    # adjust to version required for kernel version driver is to be used with
    # view commit ID's at https://github.com/raspberrypi/linux/commits/
    # not required if driver being compiled for most recent version kernel
    cd linux
    git checkout "branch" 
    git checkout "commit ID" 
    cd ../

    # To compile for latest code I use the following commands
    ---------------------------------------------------------

    # enter linux source directory
    cd linux

    # clean linux source directory tree
    make mrproper

    # generate .config using bcmrpi_defconfig which can be used to make .config for any
    # version of linux without requiring to copying .config from a working version of code
    # as suggested in many tutorials making life a little easier.
    make bcmrpi_defconfig

    # prepare source for module compile
    make modules_prepare

    # copy Module.symvers file from firmware tree to linux directory
    cp ../firmware/extra/Module.symvers .

    # enter 8188eu driver source directory
    cd ../rtl8188eu

    # clean rtl8188eu source directory tree
    make clean

    # compile driver file 8188eu.ko
    CONFIG_RTL8188EU=m make -C /home/pi/src/linux M=`pwd`

    # Install the driver
    --------------------

    # install driver firmware if not already installed, install driver and reboot
    sudo cp rtl8188eufw.bin /lib/firmware/rtlwifi
    sudo install -p -m 644 8188eu.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless

    # insmod command should run without any error response if driver module is compiled OK
    sudo insmod /lib/modules/$(uname -r)/kernel/drivers/net/wireless/8188eu.ko
    sudo depmod -a
    sudo reboot

    Hope this makes sense
#5

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
  • Priority changed from Normal to High
#6

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#7

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#8

Updated by Daniel Curtis about 10 years ago

  • Description updated (diff)
#9

Updated by Daniel Curtis almost 10 years ago

  • Subject changed from Installing Drivers for TL-WN725N V2 on Raspbian to Installing Drivers for TL-WN725N v2 on Raspberry Pi
  • Description updated (diff)
#10

Updated by Daniel Curtis almost 10 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100
#11

Updated by Daniel Curtis over 9 years ago

  • Description updated (diff)
  • Category set to Wireless Support
#12

Updated by Daniel Curtis over 9 years ago

  • Description updated (diff)
#13

Updated by Daniel Curtis over 9 years ago

  • Status changed from Resolved to Closed
#14

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)

Also available in: Atom PDF