Getting TP-LINK TL-WN725N RTL8188EU WiFi dongle running on Raspberry Pi with Arch Linux

13:51 07.04.2014

To make my Raspberry Pi fit and portable for upcoming hardware experiments I had to get a TP-LINK TL-WN725N WiFi dongle up and running. As far as I knew from my first Raspberry that is set up as a primitive media center running RaspBMC - that dongle wasn't working out-of-the-box even on this n00bish distribution. As I wanted some raw Linux power here this time, a plain, out-of-the-NOOBS-box, Arch Linux was now running, and I predicted very well that there will be no WiFi without some manual work, so as a first-time Arch user I said "challenge accepted!" and started googling.

Soon it appeared - at least on the first page of search results - that my darkest fears were pretty much true - there was no simple solution. By "simple" I usually mean something you download having an ".exe" for it's extension and then repeatedly pressing [Next] button until you get a [Finish] button and then it's done and working well.

To get your dongle working you have to compile a new kernel module from a huge pile of source files, then install it and hope it works. On the bright side, by this time I had found out that at least you don't have to write all the sources yourself.

So, I quickly found that the chipset inside this TL-WN725N was called RTL8188EU, the sources for kernel driver are on GitHub and there is only one set of installation instructions on Earth that actually makes sense and gives a hope that I will have a WiFi available on my Raspberry sometime soon. Or maybe a bit later.

Getting TP-LINK TL-WN725N RTL8188EU WiFi dongle running on Raspberry Pi with Arch Linux

Before this tutorial I already had gained some knowledge from other no so state-of-the-art tutorials that let me assure my dongle was at least recognized by Arch as an USB device:

[root@alarmpi ~]# lsusb
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And to make sure that no wireless network devices were operational:

[root@alarmpi ~]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 79  bytes 8925 (8.7 KiB)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 115  bytes 17597 (17.1 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Also had some wireless tools installed as they were mentioned in yet another not-so-working tutorial:

[root@alarmpi ~]# pacman -S wireless_tools
resolving dependencies...
looking for inter-conflicts...

Packages (1): wireless_tools-30.pre9-1

Total Download Size:    0.12 MiB
Total Installed Size:   0.36 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
So I was now left with the only tutorial that, by the first look at it, made some sense.

The first thing to do was to get Linux kernel header files in order to compile driver's sources, however, there was a small problem: the header package mentioned in tutorial was, as pacman was saying, "not found".

And what do we know about tutorials that fail at the first step? Well, they probably fail all the others too.

But, as there was no others available, I had to stick to this one. Let's see what happens, maybe, by the will of some unknown forces, compiler will compile and the driver will drive or... well, I decided to go on and complete as much steps as I can.

Next - installing GIT was pretty straightforward and successful:

[root@alarmpi ~]# pacman -S git

But, to redeem me from my hopes, cloning the sources was not so:

[root@alarmpi ~]# git clone https://github.com/lwfinger/rtl8188eu
Cloning into 'rtl8188eu'...
remote: Reusing existing pack: 5323, done.
remote: Total 5323 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (5323/5323), 8.35 MiB | 38.00 KiB/s, done.
Resolving deltas: 100% (3129/3129), done.
Checking connectivity... done.
error: git-remote-https died of signal 13

Googling this error was really fast and easy - basically, there was only a single answer that consisted of these two extremely useful tips:

So try to:
clone it in a new folder to check if that works better
make sure to use the latest git version possible

As I had only installed GIT just a few seconds ago it should have been the latest version, so I moved to the tip #1.

While my second attempt to clone the repository was in progress, I suddenly had an idea: the error appeared only after GIT had completed all the cloning work and was now doing some unimportant finalization, so all the files should be where they belong.

The second cloning ended up just like the first, "died of signal 13", whatever that actually means, but everything else was in fact fine:

[root@alarmpi ~]# ls rtl8188eu/
COPYING  Makefile  README.md  control_ap  core  hal  hostapd-0.8  include  os_dep  rtl8188eufw.bin  rtl_hostapd.conf

At this point I thought probably it is the time to install VIM:

[root@alarmpi rtl8188eu]# pacman -S vim
resolving dependencies...
looking for inter-conflicts...

Packages (3): gpm-1.20.7-4  vim-runtime-7.4.135-2  vim-7.4.135-2

Total Download Size:    5.69 MiB
Total Installed Size:   26.83 MiB

:: Proceed with installation? [Y/n] Y

Looking for that "CONFIG_POWER_SAVING = y":

[root@alarmpi ~]# cd rtl8188eu/
[root@alarmpi ~]# vim Makefile
... but found nothing. What to do now? As I had already done, ignore this shit again.

The tutorial was quickly moving to an end, it was now the time to Make, but... arch y u do dis:

[root@alarmpi rtl8188eu]# make
-bash: make: command not found
[root@alarmpi rtl8188eu]# pacman -S make

Ok, time to Make things real:

[root@alarmpi rtl8188eu]# CONFIG_RTL8188EU=m make -C /usr/src/linux-`uname -r` M=`pwd`
make: *** /usr/src/linux-3.10.25-1-ARCH: No such file or directory.  Stop.

As it appears, maybe I won't get through this without those headers. By googling the package name from tutorial, only the words separated, I got this. The same package, that was "not found" by Pacman and another one: "linux-raspberrypi-latest-headers".

[root@alarmpi rtl8188eu]# pacman -S linux-raspberrypi-latest-headers
resolving dependencies...
looking for inter-conflicts...

Packages (1): linux-raspberrypi-latest-headers-3.13.6-1

Total Download Size:    5.64 MiB
Total Installed Size:   36.71 MiB

:: Proceed with installation? [Y/n] Y

Now I had something here:

[root@alarmpi rtl8188eu]# ls /usr/src/
linux-3.13.6-1-ARCH

Trying again to Make:

[root@alarmpi rtl8188eu]# CONFIG_RTL8188EU=m make -C /usr/src/linux-`uname -r` M=`pwd`
make: *** /usr/src/linux-3.10.25-1-ARCH: No such file or directory.  Stop.

But now I knew the actual name of the header's directory, so I manually wrote that command:

[root@alarmpi rtl8188eu]# CONFIG_RTL8188EU=m make -C /usr/src/linux-3.13.6-1-ARCH/ M=`pwd`
make: Entering directory '/usr/src/linux-3.13.6-1-ARCH'
make: gcc: Command not found

Looking a bit better, only forgot the GCC. Oh. :D

[root@alarmpi rtl8188eu]# pacman -S gcc
resolving dependencies...
looking for inter-conflicts...

Packages (5): binutils-2.24-1  cloog-0.18.1-2  isl-0.12.2-1  libmpc-1.0.2-2  gcc-4.8.2-7

Total Download Size:    20.44 MiB
Total Installed Size:   84.29 MiB

:: Proceed with installation? [Y/n] Y

Trying again:

[root@alarmpi rtl8188eu]# CONFIG_RTL8188EU=m make -C /usr/src/linux-3.13.6-1-ARCH/ M=`pwd`
make: Entering directory '/usr/src/linux-3.13.6-1-ARCH'
  LD      /root/rtl8188eu/built-in.o
  CC [M]  /root/rtl8188eu/core/rtw_ap.o
  CC [M]  /root/rtl8188eu/core/rtw_br_ext.o
  CC [M]  /root/rtl8188eu/core/rtw_cmd.o
  CC [M]  /root/rtl8188eu/core/rtw_debug.o
  CC [M]  /root/rtl8188eu/core/rtw_efuse.o
  CC [M]  /root/rtl8188eu/core/rtw_ieee80211.o
  CC [M]  /root/rtl8188eu/core/rtw_io.o
  CC [M]  /root/rtl8188eu/core/rtw_ioctl_set.o
  CC [M]  /root/rtl8188eu/core/rtw_iol.o
  CC [M]  /root/rtl8188eu/core/rtw_led.o
  CC [M]  /root/rtl8188eu/core/rtw_mlme.o
  CC [M]  /root/rtl8188eu/core/rtw_mlme_ext.o
  CC [M]  /root/rtl8188eu/core/rtw_mp.o
  CC [M]  /root/rtl8188eu/core/rtw_mp_ioctl.o
  CC [M]  /root/rtl8188eu/core/rtw_pwrctrl.o
  CC [M]  /root/rtl8188eu/core/rtw_p2p.o
  CC [M]  /root/rtl8188eu/core/rtw_recv.o
  CC [M]  /root/rtl8188eu/core/rtw_rf.o
  CC [M]  /root/rtl8188eu/core/rtw_security.o
  CC [M]  /root/rtl8188eu/core/rtw_sreset.o
  CC [M]  /root/rtl8188eu/core/rtw_sta_mgt.o
  CC [M]  /root/rtl8188eu/core/rtw_wlan_util.o
  CC [M]  /root/rtl8188eu/core/rtw_xmit.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_MAC.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_BB.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_RF.o
  CC [M]  /root/rtl8188eu/hal/HalPhyRf.o
  CC [M]  /root/rtl8188eu/hal/HalPhyRf_8188e.o
  CC [M]  /root/rtl8188eu/hal/HalPwrSeqCmd.o
  CC [M]  /root/rtl8188eu/hal/Hal8188EPwrSeq.o
  CC [M]  /root/rtl8188eu/hal/Hal8188ERateAdaptive.o
  CC [M]  /root/rtl8188eu/hal/hal_intf.o
  CC [M]  /root/rtl8188eu/hal/hal_com.o
  CC [M]  /root/rtl8188eu/hal/odm.o
  CC [M]  /root/rtl8188eu/hal/odm_debug.o
  CC [M]  /root/rtl8188eu/hal/odm_interface.o
  CC [M]  /root/rtl8188eu/hal/odm_HWConfig.o
  CC [M]  /root/rtl8188eu/hal/odm_RegConfig8188E.o
  CC [M]  /root/rtl8188eu/hal/odm_RTL8188E.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_cmd.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_dm.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_hal_init.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_mp.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_phycfg.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_rf6052.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_rxdesc.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_sreset.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_xmit.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_led.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_recv.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_xmit.o
  CC [M]  /root/rtl8188eu/hal/usb_halinit.o
  CC [M]  /root/rtl8188eu/hal/usb_ops_linux.o
  CC [M]  /root/rtl8188eu/os_dep/ioctl_linux.o
  CC [M]  /root/rtl8188eu/os_dep/mlme_linux.o
  CC [M]  /root/rtl8188eu/os_dep/os_intfs.o
/root/rtl8188eu/os_dep/os_intfs.c:701:2: warning: initialization from incompatible pointer type [enabled by default]
  .ndo_select_queue = rtw_select_queue,
  ^
/root/rtl8188eu/os_dep/os_intfs.c:701:2: warning: (near initialization for 'rtw_netdev_ops.ndo_select_queue') [enabled by default]
  CC [M]  /root/rtl8188eu/os_dep/osdep_service.o
  CC [M]  /root/rtl8188eu/os_dep/recv_linux.o
  CC [M]  /root/rtl8188eu/os_dep/rtw_android.o
  CC [M]  /root/rtl8188eu/os_dep/usb_intf.o
  CC [M]  /root/rtl8188eu/os_dep/usb_ops_linux.o
  CC [M]  /root/rtl8188eu/os_dep/xmit_linux.o
  LD [M]  /root/rtl8188eu/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/rtl8188eu/8188eu.mod.o
  LD [M]  /root/rtl8188eu/8188eu.ko
make: Leaving directory '/usr/src/linux-3.13.6-1-ARCH'

After all this waiting and no critical errors, I couldn't event believe that module was compiled. So I checked:

[root@alarmpi rtl8188eu]# ls
8188eu.ko     8188eu.mod.o  COPYING   Module.symvers  built-in.o  core  hostapd-0.8  modules.order  rtl8188eufw.bin
8188eu.mod.c  8188eu.o      Makefile  README.md       control_ap  hal   include      os_dep         rtl_hostapd.conf

And it's there, AWWW YEAH!

As said in GitHub repo: "Make sure you copied the firmware (rtl8188eufw.bin) to /lib/firmware/rtlwifi/". Obviously, no module there yet:

[root@alarmpi rtl8188eu]# ls /lib/firmware/rtlwifi/
rtl8188efw.bin   rtl8192cfwU_B.bin  rtl8192cufw_TMSC.bin  rtl8712u.bin            rtl8723fw.bin
rtl8188eufw.bin  rtl8192cufw.bin    rtl8192defw.bin       rtl8723aufw_A.bin       rtl8723fw_B.bin
rtl8192cfw.bin   rtl8192cufw_A.bin  rtl8192eefw.bin       rtl8723aufw_B.bin       rtl8821aefw.bin
rtl8192cfwU.bin  rtl8192cufw_B.bin  rtl8192sefw.bin       rtl8723aufw_B_NoBT.bin

So...

[root@alarmpi rtl8188eu]# cp rtl8188eufw.bin /lib/firmware/rtlwifi/rtl8188eufw.bin

Tried modprobing now, but nothing happens. Nothing at all, even no error, so I rebooted:

[root@alarmpi rtl8188eu]# modprobe 8188eu
[root@alarmpi rtl8188eu]# reboot

Last step now - installing:

[root@alarmpi rtl8188eu]# install -p -m 644 8188eu.ko /lib/modules/3.10.33-1-ARCH/kernel/drivers/net/wireless/
[root@alarmpi rtl8188eu]# depmod -a
[root@alarmpi rtl8188eu]# modprobe 8188eu
modprobe: ERROR: could not insert '8188eu': Exec format error

At this point I realized that having that latest kernel headers was not a good idea, because what I got was "3.13.6-1", while I was having a lesser version:

[root@alarmpi rtl8188eu]# uname -r
3.10.33-1-ARCH

But there was no other header package... or was there.

The tutorial said "linux-headers-raspberrypi", but Arch's package list said a bit different: "linux-raspberrypi-headers". And at the first glance I didn't even notice. Shite.

So now it was clear what to do:

[root@alarmpi rtl8188eu]# pacman -S  linux-raspberrypi-headers
resolving dependencies...
looking for inter-conflicts...
:: linux-raspberrypi-headers and linux-raspberrypi-latest-headers are in conflict (kernel26-headers). Remove linux-raspberrypi-latest-headers? [y/N] Y

Packages (2): linux-raspberrypi-latest-headers-3.13.6-1 [removal]  linux-raspberrypi-headers-3.10.33-1

Total Download Size:    5.46 MiB
Total Installed Size:   35.30 MiB
Net Upgrade Size:       -1.41 MiB

:: Proceed with installation? [Y/n] Y
[root@alarmpi rtl8188eu]# ls /lib/modules
3.10.33-1-ARCH  extramodules-3.10.33--raspberrypi

Rebuild:

[root@alarmpi rtl8188eu]# CONFIG_RTL8188EU=m make -C /usr/src/linux-`uname -r` M=`pwd`
make: Entering directory '/usr/src/linux-3.10.33-1-ARCH'
  CC [M]  /root/rtl8188eu/core/rtw_ap.o
  CC [M]  /root/rtl8188eu/core/rtw_br_ext.o
  CC [M]  /root/rtl8188eu/core/rtw_cmd.o
  CC [M]  /root/rtl8188eu/core/rtw_debug.o
  CC [M]  /root/rtl8188eu/core/rtw_efuse.o
  CC [M]  /root/rtl8188eu/core/rtw_ieee80211.o
  CC [M]  /root/rtl8188eu/core/rtw_io.o
  CC [M]  /root/rtl8188eu/core/rtw_ioctl_set.o
  CC [M]  /root/rtl8188eu/core/rtw_iol.o
  CC [M]  /root/rtl8188eu/core/rtw_led.o
  CC [M]  /root/rtl8188eu/core/rtw_mlme.o
  CC [M]  /root/rtl8188eu/core/rtw_mlme_ext.o
  CC [M]  /root/rtl8188eu/core/rtw_mp.o
  CC [M]  /root/rtl8188eu/core/rtw_mp_ioctl.o
  CC [M]  /root/rtl8188eu/core/rtw_pwrctrl.o
  CC [M]  /root/rtl8188eu/core/rtw_p2p.o
  CC [M]  /root/rtl8188eu/core/rtw_recv.o
  CC [M]  /root/rtl8188eu/core/rtw_rf.o
  CC [M]  /root/rtl8188eu/core/rtw_security.o
  CC [M]  /root/rtl8188eu/core/rtw_sreset.o
  CC [M]  /root/rtl8188eu/core/rtw_sta_mgt.o
  CC [M]  /root/rtl8188eu/core/rtw_wlan_util.o
  CC [M]  /root/rtl8188eu/core/rtw_xmit.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_MAC.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_BB.o
  CC [M]  /root/rtl8188eu/hal/HalHWImg8188E_RF.o
  CC [M]  /root/rtl8188eu/hal/HalPhyRf.o
  CC [M]  /root/rtl8188eu/hal/HalPhyRf_8188e.o
  CC [M]  /root/rtl8188eu/hal/HalPwrSeqCmd.o
  CC [M]  /root/rtl8188eu/hal/Hal8188EPwrSeq.o
  CC [M]  /root/rtl8188eu/hal/Hal8188ERateAdaptive.o
  CC [M]  /root/rtl8188eu/hal/hal_intf.o
  CC [M]  /root/rtl8188eu/hal/hal_com.o
  CC [M]  /root/rtl8188eu/hal/odm.o
  CC [M]  /root/rtl8188eu/hal/odm_debug.o
  CC [M]  /root/rtl8188eu/hal/odm_interface.o
  CC [M]  /root/rtl8188eu/hal/odm_HWConfig.o
  CC [M]  /root/rtl8188eu/hal/odm_RegConfig8188E.o
  CC [M]  /root/rtl8188eu/hal/odm_RTL8188E.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_cmd.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_dm.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_hal_init.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_mp.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_phycfg.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_rf6052.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_rxdesc.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_sreset.o
  CC [M]  /root/rtl8188eu/hal/rtl8188e_xmit.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_led.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_recv.o
  CC [M]  /root/rtl8188eu/hal/rtl8188eu_xmit.o
  CC [M]  /root/rtl8188eu/hal/usb_halinit.o
  CC [M]  /root/rtl8188eu/hal/usb_ops_linux.o
  CC [M]  /root/rtl8188eu/os_dep/ioctl_linux.o
  CC [M]  /root/rtl8188eu/os_dep/mlme_linux.o
  CC [M]  /root/rtl8188eu/os_dep/os_intfs.o
  CC [M]  /root/rtl8188eu/os_dep/osdep_service.o
  CC [M]  /root/rtl8188eu/os_dep/recv_linux.o
  CC [M]  /root/rtl8188eu/os_dep/rtw_android.o
  CC [M]  /root/rtl8188eu/os_dep/usb_intf.o
  CC [M]  /root/rtl8188eu/os_dep/usb_ops_linux.o
  CC [M]  /root/rtl8188eu/os_dep/xmit_linux.o
  LD [M]  /root/rtl8188eu/8188eu.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /root/rtl8188eu/8188eu.mod.o
  LD [M]  /root/rtl8188eu/8188eu.ko
make: Leaving directory '/usr/src/linux-3.10.33-1-ARCH'

... and finally install:

[root@alarmpi rtl8188eu]# install -p -m 644 8188eu.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless/
[root@alarmpi rtl8188eu]# depmod -a
[root@alarmpi rtl8188eu]# modprobe 8188eu

And in a few seconds the newly compiled 8188eu module was there, up and running:

[root@alarmpi rtl8188eu]# lsmod
Module                  Size  Used by
8188eu                790352  0
snd_soc_wm8804          7896  0
snd_soc_bcm2708_i2s     5653  0
regmap_mmio             2826  1 snd_soc_bcm2708_i2s
snd_soc_core          160676  2 snd_soc_wm8804,snd_soc_bcm2708_i2s
leds_gpio               2146  0
led_class               3731  1 leds_gpio
snd_compress            8167  1 snd_soc_core
regmap_spi              1925  2 snd_soc_wm8804,snd_soc_core
bcm2708_dmaengine       5108  0
spi_bcm2708             4764  0
regmap_i2c              1673  2 snd_soc_wm8804,snd_soc_core
virt_dma                2281  1 bcm2708_dmaengine
i2c_bcm2708             4173  0
snd_bcm2835            16293  0
snd_pcm                81885  2 snd_bcm2835,snd_soc_core
snd_page_alloc          5180  1 snd_pcm
snd_timer              20150  1 snd_pcm
snd                    61384  5 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
bcm2708_rng             1032  0
rng_core                4147  1 bcm2708_rng
ipv6                  303188  0

All that was left was to actually configure the network, as wlan0 inteface stood up as I commanded:

[root@alarmpi rtl8188eu]# ip link set wlan0 up
[root@alarmpi rtl8188eu]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 5269  bytes 6020568 (5.7 MiB)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 3568  bytes 392766 (383.5 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099  mtu 1500
		ether 64:66:b3:0f:a0:33  txqueuelen 1000  (Ethernet)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Theoretically, the TL-WN725N dongle was working, but to be sure I checked if it could find my router. And it could very well:

[root@alarmpi rtl8188eu]# iwlist wlan0 scan
wlan0     Scan completed :
		  Cell 07 - Address: F8:1A:67:DE:59:00
					ESSID:"1337 Router"
					Protocol:IEEE 802.11bgn
					Mode:Master
					Frequency:2.462 GHz (Channel 11)
					Encryption key:on
					Bit Rates:108 Mb/s
					Extra:rsn_ie =30140100000fac040100000fac040100000fac020000
					IE: IEEE 802.11i/WPA2 Version 1
						Group Cipher : CCMP
						Pairwise Ciphers (1) : CCMP
						Authentication Suites (1) : PSK
					IE: Unknown: DD990050F204104A0001101044000102103B0001031047001000000000000010000000F81A67DE59101021000754502D4C494E4B10230009544C2D57523734304E10240003342E3010420003312E301054000800060050F204000110110019576972656C65737320526F7574657220544C2D57523734304E100800020086103C000101104900140024E26002000101600000020001600100020001
					Quality:0  Signal level:0  Noise level:0

Now, according to this article, establish a connection. I assume this is where the wireless tools that I had already installed finally became handy:

[root@alarmpi rtl8188eu]# wifi-menu -o

A simple ASCII-art window popped up, asking to select one of available networks and for my WiFi's password. All that provided, I got connection, according to DHCP clients' list in my router's control panel:

2	alarmpi	B8-27-EB-6E-18-BB	192.168.0.103	01:19:09 # eth0
4	alarmpi	64-66-B3-0F-A0-33	192.168.0.102	01:59:52 # wlan0

Rebooted to see if it started automatically...

[root@alarmpi rtl8188eu]# reboot

No, wlan0 was again missing:

[root@alarmpi ~]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 106  bytes 10387 (10.1 KiB)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 134  bytes 20230 (19.7 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

According to that networking article, it should be easy:

[root@alarmpi ~]# netctl enable wlan0-1337-Router
ln -s '/etc/systemd/system/netctl@wlan0\x2d1337\x2dRouter.service' '/etc/systemd/system/multi-user.target.wants/netctl@wlan0\x2d1337\x2dRouter.service'
[root@alarmpi ~]# reboot

After anxiously waiting a while, I deduced that it worked. Not only because:

[root@alarmpi ~]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 89  bytes 11778 (11.5 KiB)
		RX errors 0  dropped 1  overruns 0  frame 0
		TX packets 96  bytes 15142 (14.7 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163  mtu 1500
		inet 192.168.0.102  netmask 255.255.255.0  broadcast 192.168.0.255
		ether 64:66:b3:0f:a0:33  txqueuelen 1000  (Ethernet)
		RX packets 118  bytes 34410 (33.6 KiB)
		RX errors 0  dropped 27  overruns 0  frame 0
		TX packets 29  bytes 5903 (5.7 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

But also because of the fact that I had connected to Raspberry via an IP address assigned to WiFi dongle's MAC, not that of the eth0.

Spent only a few hours to do all of this I felt pretty happy that the WiFi was now running. So I scrolled down to that tutorial's comment section, only to found a link to Arch's forum saying that for some time there has been a package available that provides the driver needed for 8188eu chipset used in my TP-LINK TL-WN725N.

With. A. Single. Fucking. Command.

Being curious if this really works, unloaded the module:

[root@alarmpi ~]# modprobe -r 8188eu

By doing that, lost the connection, plugged back in the ethernet cable, checked that wlan0 is gone for good and deleted all what I could:

[root@alarmpi ~]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 59  bytes 7329 (7.1 KiB)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 81  bytes 13504 (13.1 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
		
[root@alarmpi ~]# lsmod
Module                  Size  Used by
snd_soc_wm8804          7896  0
snd_soc_bcm2708_i2s     5653  0
regmap_mmio             2826  1 snd_soc_bcm2708_i2s
snd_soc_core          160676  2 snd_soc_wm8804,snd_soc_bcm2708_i2s
leds_gpio               2146  0
led_class               3731  1 leds_gpio
snd_compress            8167  1 snd_soc_core
regmap_spi              1925  2 snd_soc_wm8804,snd_soc_core
spi_bcm2708             4764  0
bcm2708_dmaengine       5108  0
regmap_i2c              1673  2 snd_soc_wm8804,snd_soc_core
virt_dma                2281  1 bcm2708_dmaengine
i2c_bcm2708             4173  0
snd_bcm2835            16293  0
snd_pcm                81885  2 snd_bcm2835,snd_soc_core
snd_page_alloc          5180  1 snd_pcm
snd_timer              20150  1 snd_pcm
snd                    61384  5 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_c
bcm2708_rng             1032  0
rng_core                4147  1 bcm2708_rng
ipv6                  303188  0

[root@alarmpi ~]# rm /lib/modules/3.10.33-1-ARCH/kernel/drivers/net/wireless/8188eu.ko

All my extensive work removed, now it should be easy as Pi:

[root@alarmpi ~]# pacman -S dkms-8188eu
resolving dependencies...
looking for inter-conflicts...

Packages (3): dkms-2.2.0.3-14  patch-2.7.1-2  dkms-8188eu-v4.1.4_6773-2

Total Download Size:    1.41 MiB
Total Installed Size:   8.82 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages ...
 patch-2.7.1-2-armv6h                    67.6 KiB   290K/s 00:00 [####################################] 100%
 dkms-2.2.0.3-14-any                     48.2 KiB   277K/s 00:00 [####################################] 100%
 dkms-8188eu-v4.1.4_6773-2-armv6h      1324.6 KiB   836K/s 00:02 [####################################] 100%
(3/3) checking keys in keyring                                   [####################################] 100%
(3/3) checking package integrity                                 [####################################] 100%
(3/3) loading package files                                      [####################################] 100%
(3/3) checking for file conflicts                                [####################################] 100%
(3/3) checking available disk space                              [####################################] 100%
(1/3) installing patch                                           [####################################] 100%
Optional dependencies for patch
	ed: for patch -e functionality
(2/3) installing dkms                                            [####################################] 100%
Optional dependencies for dkms
	linux-headers: build modules against Arch kernel
	linux-lts-headers: build modules against LTS Arch kernel
(3/3) installing dkms-8188eu                                     [####################################] 100%

If your kernel is >= 3.12 and comes with
rtlwifi driver you will have to blacklist
rtlwifi for this driver to work

Creating symlink /var/lib/dkms/8188eu/v4.1.4_6773/source ->
				 /usr/src/8188eu-v4.1.4_6773

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area..............................






CONFIG_RTL8188EU=m make ARCH=arm CROSS_COMPILE= -C /usr/lib/modules/3.10.33-1-ARCH/build M=/var/lib/dkms/8188eu/v4.1.4_6773/build modules.............................................................................................................................................................................................................................................................................................................................................................................................
cleaning build area.......

DKMS: build completed.

8188eu:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/3.10.33-1-ARCH/kernel/drivers/net/wireless/

depmod......

DKMS: install completed.

And it's back:

[root@alarmpi ~]# lsmod
Module                  Size  Used by
8188eu                790376  0
snd_soc_wm8804          7896  0
snd_soc_bcm2708_i2s     5653  0
regmap_mmio             2826  1 snd_soc_bcm2708_i2s
snd_soc_core          160676  2 snd_soc_wm8804,snd_soc_bcm2708_i2s
leds_gpio               2146  0
led_class               3731  1 leds_gpio
snd_compress            8167  1 snd_soc_core
regmap_spi              1925  2 snd_soc_wm8804,snd_soc_core
spi_bcm2708             4764  0
bcm2708_dmaengine       5108  0
regmap_i2c              1673  2 snd_soc_wm8804,snd_soc_core
virt_dma                2281  1 bcm2708_dmaengine
i2c_bcm2708             4173  0
snd_bcm2835            16293  0
snd_pcm                81885  2 snd_bcm2835,snd_soc_core
snd_page_alloc          5180  1 snd_pcm
snd_timer              20150  1 snd_pcm
snd                    61384  5 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_compress
bcm2708_rng             1032  0
rng_core                4147  1 bcm2708_rng
ipv6                  303188  0

[root@alarmpi ~]# ip link set wlan0 up
[root@alarmpi ~]# ifconfig
eth0: flags=4163  mtu 1500
		inet 192.168.0.103  netmask 255.255.255.0  broadcast 192.168.0.255
		ether b8:27:eb:6e:18:bb  txqueuelen 1000  (Ethernet)
		RX packets 1691  bytes 1579130 (1.5 MiB)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 1144  bytes 138295 (135.0 KiB)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73  mtu 65536
		inet 127.0.0.1  netmask 255.0.0.0
		loop  txqueuelen 0  (Local Loopback)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099  mtu 1500
		ether 64:66:b3:0f:a0:33  txqueuelen 1000  (Ethernet)
		RX packets 0  bytes 0 (0.0 B)
		RX errors 0  dropped 0  overruns 0  frame 0
		TX packets 0  bytes 0 (0.0 B)
		TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

It was actually fun to go the hard way, not just get shit done with a single command. As I was doing all this just for a hobby, then it was fine. Doing that much of a crap just to get something going on everyday basis still would suck a lot.

comments powered by Disqus