Today I rebuilt my second Raspberry Pi for home. The first one is currently being used as a media server permanently connected to the TV in the living room. At home we use it daily to watch movies or tv shows through genesis.
This second Raspberry Pi will be used as an in-house server for backup or NAS. Despite not being the most efficient for that purpose, the R-PI will be connected to our wireless network as well, for that I purchased a TP-LINK WN725N adaptor.
Unlike other adaptors, the WN725N is not plug & play on the different GNU/Linux distros that we can install in the Raspberry Pi. Hence you need to install the drivers and make sure that they load every time that you boot your device. After reading a few forums, blogs and tutorials I made it work stable in the mini-server.
Firstly we need to install our favorite distro for our Raspberry Pi, I decided to go with Raspbian. Follow this tutorial to install a base image in your Raspberry Pi. Once the OS is installed you need go know your kernel version so type:
root@raspberrypi:~# uname -a
Linux raspberrypi 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
The important bit is the 3.18.7+ #755 (numbers may change depending on the kernel version).
With the kernel version, we download the correct driver as mentioned in the following tutorial. This download you can do it directly from the raspberry pi if you have wired connection or on a different computer storing the file in a pendrive. Then copy the file in the raspberry pi as follows.
pi@raspberrypi:~# mount /dev/sda1 /mnt
pi@raspberrypi:~# cp /mnt/8188eu-v7-20150212.tar.gz .
pi@raspberrypi:~# mkdir tplink && cd tplink
pi@raspberrypi:~# tar -zxvf 8188eu-v7-20150212.tar.gz
pi@raspberrypi:~# umount /mnt/
pi@raspberrypi:~# ls tplink/
8188eu.conf 8188eu.ko install.sh
Now we will have 3 files in our folder. Executing install.sh will copy 8188.conf and 8818eu.ko to their folders but if something fials it won’t tell you the error. So, my recommendation is to open the install.sh
pi@raspberrypi:~# cat install.sh
and execute command by command
pi@raspberrypi:~# sudo cp 8188eu.conf /etc/modprobe.d/
pi@raspberrypi:~# sudo install -p -m 644 8188eu.ko /lib/modules/3.18.7+/kernel/drivers/net/wireless
pi@raspberrypi:~# sudo depmod -a
Then edit /etc/modules file to load the driver during the linux booting.
pi@raspberry:~# sudo vi /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
# Parameters can be specified after the module name.snd-bcm2835
8188eu #add this line
Now edit the wireless configuration
pi@raspberrypi:~# sudo vi /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=”YOUR SSID”
psk=”YOUR WIFI PASSWORD”
}
Reboot your raspberry pi for your configuration to take effect.
pi@raspberrypi:~# sudo reboot
If everything went ok your TP-LINK TP-WN725N should now be connected to your network. If it didn’t work yet, you may need to load another kernel module.
pi@raspberrypi:~# sudo insmod /lib/modules/3.18.7+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
pi@raspberrypi:~# sudo depmod -a
pi@raspberrypi:~# sudo vi /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
# Parameters can be specified after the module name.snd-bcm2835
8188eu8192cu #add this line
Reboot your Raspberry Pi
pi@raspberrypi:~# sudo reboot