I’m looking to create a WiFi hotspot for when we travel. My current idea is to create a WiFi router using a Raspberry Pi as a bridge between our devices (Laptops, Phones, iPads, etc.) and the accomodation’s WiFi (especially where they have captive portals with number of device limitations).
I have a spare Raspberry Pi 2 V1.1 lying around at home, and looking to utilise that going forward. Clearly the RPi 2 does not have onboard WiFi, so a pair of USB dongles is required. However the number of dongles is broad and varied, and driver compatibility can be somewhat limited, finding suitable devices can be a challenge. Hence my search for a suitable dongle.
I have downloaded the latest version of Raspberry Pi OS, and updated with the following:
sudo apt update sudo apt upgrade
At the time of writing this article, RPi OS was reporting it was using version 6.1.24-v7+ of the Linux kernel.
The WiFi dongle that I purchased is a TP-Link TL-WN823N wireless USB adapter. I purchased it from Officeworks here in Australia.
The TL-WN823N wireless adapter is based on the RealTek rtl8192eu drivers. These are not present within the Linux kernel at present to my knowledge, and I had to compile them to get the dongle recognised by the operating system.
My first port of call was Google. There are clearly numerous sources, however they all point back to one main source of knowledge, a blog post from Junaid’s Blog.
My first attempt at the following the steps from Junaid’s Blog resulted in an install that was recognised, but I could not get a working connection. Junaid’s Blog points to a rtl8192eu linux driver that allegedly works with the kernel up to version 4.9.35. Clearly I am beyond that running version 6.1.24.
I thought I was shit out of luck at that point. However I did some further digging on a number of forums and found something a little more recent.
My searching directed me towards a Github repository containing a more recent rtl8192eu driver that works with the Linux Kernel up to version 6.4.
Now I followed the following steps to get the driver up and running, and actually working.
sudo apt install linux-headers-generic build-essential dkms git cd ~ mkdir drivers && cd drivers git clone https://github.com/clnhub/rtl8192eu-linux.git cd rtl8192eu-linux
Inside this folder is the file Makefile, we need to edit the contents of this for Raspberry Pi. We need to find the following line:
CONFIG_PLATFORM_I386_PC = y
and change it to
CONFIG_PLATFORM_I386_PC = n
Then find this line
CONFIG_PLATFORM_ARM_RPI = n
and change it to
CONFIG_PLATFORM_ARM_RPI = y
Now the easiest option from here is to run the included shell script file which does all the hard work for us. Run the following command:
Let the Raspberry Pi do its thing for a few minutes, and Hey Presto! you now have a working TL-WN823N USB dongle that can connect to any IEEE 802.11b/g/n network.
I am yet to test whether I can run a WiFi hotspot from it, and I am yet to install Pi-Hole as a local Domain Name Server to maintain some control over the kids and their devices, but they are the next steps in putting together a WiFi router for when we are travelling.