UPDATE (2013-01-25): I’ve updated RPi firmware today and it seems that the latest kernel (3.6.11+) includes working driver for TL-WN725N. Instructions below are now obsolete/educational 😉
I’ve decided to replace TL-WN721N adapters with something smaller. After some research and tests with my old Debian laptop, I’ve bought two TP-LINK TL-WN725N 802.11n USB adapters.
In contrast to 721’s, they are smaller and are built on different chipset – Realtek RTL8188CUS.
Installation is not as easy as with Atheros-based adapters, because no kernel driver supports this chipset. Fortunately, Realtek provides open-source Linux drivers on their website.
So, let’s get started 🙂
First, we have to download current Linux drivers from Realtek’s website. As of December 14th latest version is 220.127.116.11.20120403.
Unzip downloaded file:
$ unzip ./RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip
Move to extracted folder and enter “driver” directory. There’s a tar.gz archive with driver sources – uncompress it.
$ cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/driver/ $ tar -xvf ./rtl8188C_8192C_usb_linux_v3.4.4_4749.20121105.tar.gz
I’ve recommend renaming the extracted dir to some shorter name and moving it to some handy place.
Default driver configuration, enables a lot of debug info being output to dmesg.
To fix this, edit include/autoconf.h file and comment out defines in “Debug Related Config” section, leaving only “DBG”.
To properly build our driver, we have to modify Makefile and add config options for RasPi platform.
Find CONFIG_PLATFORM_ block and add:
CONFIG_PLATFORM_ARM_BCM2708 = y
Now, find platform flags block and add:
ifeq ($(CONFIG_PLATFORM_ARM_BCM2708), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE := KVER := $(shell uname -r) KSRC := /lib/modules/$(KVER)/build MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ INSTALL_PREFIX := endif
Once we have driver sources ready, prepare for build.
Get build environment:
# apt-get install build-essential
We’ll also need current kernel headers – use kernel sources from github, see this post on Grendelman’s blog.
# cd /usr/src # wget -O rpi-3.2.27.tar.gz https://github.com/raspberrypi/linux/tarball/rpi-3.2.27 # tar xzf ./rpi-3.2.27.tar.gz # KVER=`uname -r` # mv raspberrypi-linux-* linux-$KVER # cd linux-$KVER/ # sed -i 's/EXTRAVERSION =.*/EXTRAVERSION = +/' Makefile # zcat /proc/config.gz > .config # wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers # make oldconfig # make modules_prepare # ln -s /usr/src/linux-$KVER /usr/src/linux # ln -s /usr/src/linux-$KVER /lib/modules/$KVER/source # ln -s /usr/src/linux-$KVER /lib/modules/$KVER/build
Build and install, meanwhile make yourself a coffee 😉
# make && make install
If you want to install driver on other Raspberry running the same kernel, just copy 8192cu.ko file to /lib/modules/3.2.27+/kernel/drivers/net/wireless/ and reboot.