A Rasp Pi wireless access point
Wide Reach
Set up a wireless access point with a Raspberry Pi 3, Ubuntu Core, and snaps.
Router coverage gaps often have different causes, which repeaters and access points (APs) can remedy. A repeater usually connects to the router over WiFi and amplifies the signal into areas where the router alone is not sufficient, whereas an AP wired to the router by cable sets up a private WiFi network with its own network identifier (SSID). The AP therefore provides additional access to the local network.
A highly portable Raspberry Pi is ideal for setting up a small and cheap WiFi AP suitable for many applications. For example, you could stretch a network into the back garden or provide Internet to an awkwardly located conference room.
The easiest route is to use a Raspberry Pi 3 (RPi3), which already has a WiFi module. Previous models can be prepared for the new task with a dongle, available for just a few dollars. Even the Rasp Pi 3 could benefit from a WiFi stick, because the internal connections of the installed module do not deliver the performance of a good dongle.
In this article, you'll see how to set up a wireless AP, and then I will show you how to provide an additional entry into your local area network through the integration of Nextcloud on an external disk connected to the Rasp Pi.
Good Choice
Not all WiFi sticks work with the Rasp Pi, and those that do work often cannot be used without loading an additional driver. The Edimax and TP-LINK WN725N models are well known to be problem-free on a Pi. Whichever dongle you choose, make sure it supports AP mode. A detailed list of supported dongles, including their properties, can be found on the Embedded Linux wiki [1].
Many of the listed models are powered by the Rasp Pi USB socket. Because the dongle's power consumption depends on its load, among other things, you would be more secure when working with larger amounts of data or numerous accesses by connecting the WiFi stick to an active USB hub.
In the example here, the AP is based on Ubuntu Core. If you want to follow the steps here, you need an operational Rasp Pi connected to the router by Ethernet and reachable via WiFi.
An Account with an Advantage
If you don't already have an Ubuntu One account, you'll need to sign up [2]. This step is important for security, as demonstrated later. After logging in, select the SSH keys item and upload a public key, which you will need for an SSH connection to Ubuntu Core. If necessary, create a new SSH key as root with the command:
ssh-keygen -t rsa -b 4096
In the meantime, download the Ubuntu Core image [3]. After unpacking the archive, it expands from slightly more than 300MB to nearly 600MB of disk space.
Ubuntu Core was chosen because it is compact and doesn't have a graphical interface, which would be superfluous on an AP. The system includes the kernel and bootloader from Ubuntu's alternative Snap package system [4] and updates itself. If something goes wrong when updating, the system can be restored automatically or manually to a previous state [5].
Automatic Updates
Automatic updates, especially, are worth their weight in gold, because an AP works quietly in the background, and you could easily forget to update it. Therefore, take the safe and maintenance-free approach, which also allows integration of other Snap applications (e.g., a UPnP media server or openHAB home automation software).
Creating a WiFi hotspot is quick and easy. Start by moving the Ubuntu Core images onto an SD card:
$ xzcat <image file> | sudo dd of=<device file> bs=8M
Use the correct name for the image file and enter the identifier of the device file according to your local setup. To find the correct name of your block device, enter the
lsblk -l
command. Next, insert the SD card into the appropriate slot on the Rasp Pi and connect the Ethernet cable, monitor, keyboard, and power supply. Shortly after powering on, the computer will prompt you to press the Enter key to start the installation, which could take several minutes.
To continue, configure eth0
as the default device. Working over WiFi at this point is not possible, because of an error in the installer. The system then prompts you to enter the email address of your Ubuntu account. If you're using a keyboard with an AltGr key, note that it is not implemented correctly, so if you need to use it, type the Alt sequence for the required character with the Num Lock key activated [6] (e.g., Alt+6-4 for the @ symbol).
After the software has checked the account, you will receive an SSH address to connect to Ubuntu Core. From this point, you can do without the screen and keyboard on the Rasp Pi; just log in from a PC with the specified SSH address (Figure 1).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.