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
-
Systemd Fixes Bug While Facing New Challenger in GNU Shepherd
The systemd developers have fixed a really nasty bug amid the release of the new GNU Shepherd init system.
-
AlmaLinux 10.0 Beta Released
The AlmaLinux OS Foundation has announced the availability of AlmaLinux 10.0 Beta ("Purple Lion") for all supported devices with significant changes.
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.