This is how you turn your Raspberry Pi into a Wi-Fi point


Wifi

If you need WiFi in the attic or in the garden and you happen to have a Raspberry Pi, you no longer have to buy a wireless access point: you simply make it yourself. You simply install the RaspAP software on your Raspberry Pi and then easily configure it via the built-in web interface. RaspAP can also be combined with an adblocker, vpn server, Tor or a captive portal.

01 Raspberry Pi with wifi

If you have a Raspberry Pi, you can use it to set up a wireless network that you can connect to. In addition, it doesn’t matter much which Pi model it is about, although the newest model, the Raspberry Pi 4, achieves the highest performance. Of course you need a WiFi chip, so you use either at least a Raspberry Pi 3 or an older model that you can expand with a WiFi adapter such as the Edimax EW-7811Un via one of the USB ports. For simplicity, we assume that you connect the Pi to your home network via an Ethernet cable.

Raspberry Pi

02 Installing Raspbian

Then you need to install Raspbian Buster Lite on your Pi. In short: download Raspbian Buster Lite, write the image with balenaEtcher to a micro-sd card, switch on ssh, start the Pi and log in to your Pi via the network with an ssh client. Then change the default password and update all packages. Then your Pi is ready to turn it into a wireless access point.

Raspbian

Wi-Fi performance of the Pi

There are important differences in WiFi performance between the different Pi models. The Raspberry Pi Zero W (H) and Raspberry Pi 3 support 802.11n in the 2.4 GHz band. Benchmarks from the Raspberry Pi Foundation show that the first reaches a transfer speed of 25 Mbit / s and the second 50 Mbit / s. The Raspberry Pi 3B +, 3A + and 4B support 802.11 b / g / n / ac in both the 2.4 GHz and 5 GHz bands. In that first band the transfer speed of those models is around 60 Mbit / s and in the second around 100 Mbit / s, with an outlier for the Raspberry Pi 4B to 114 Mbit / s.

WiFi performance

03 Extra configuration

Start the Raspbian configuration program with the command in the terminal sudo raspi-config, use the arrow keys to 4 Localization Options and press Enter. Then choose I4 Change Wi-fi Country and then confirm your country. If you want the RaspAP web interface to automatically recognize the language of your web browser if it is set to Dutch, you must also open I1 Change Locale and with the space bar check the utf-8 version of your language in the list, for example nl_NL.UTF-8 for Dutch. Then use the tab key to OK and confirm with Enter. You can use the default language in the next step and_GB.UTF-8 leave. Finally exit the program with Finish.

Extra configuration

04 Installing RaspAP

First download the RaspAP installation program with the command wget -q https://git.io/voEUQ -O / tmp / raspap and then run the program with bash / tmp / raspap. Confirm with y and press Enter to install RaspAP. You will then see which packages are installed: confirm again with y and Enter. After the installation you will get a few questions about the configuration: confirm each time with Enter to choose the recommended configuration. At the very end you will be asked to restart your Pi: ​​choose y and Enter to do that.

RaspAP

05 Web interface

From now on you no longer need the command line. After the restart your wireless access point is active with raspi webgui as ssid and ChangeMe as a password. Connect to this wireless network: you will then be assigned an IP address and access to the internet via the Pi’s Ethernet interface. Then visit the IP address 10.3.141.1 in your web browser. Log in to the web interface with admin as username and secret as a password. You will now see the dashboard with some statistics about the access point, including a list of connected devices with their IP address and MAC address.

Web interface

06 Set the language

If your language is unexpectedly not in Dutch, click on the left System and then on the tab Language. You can set your language manually there. Save your change and reload the page. You may need to restart your Pi (you can in the tab) System). If you still get to see the interface in English, check whether you are really in step 3 nl_NL.UTF-8 as a language: that is how we noticed that RaspAP is the language nl_BE.UTF-8 not recognized as Dutch. When you have solved this, you will see everything in Dutch.

Set the language

07 Hotspot settings

First view the hotspot settings. To do this, click on the left Configure hotspot. In the first tab you can change the ssid, the wireless mode and the channel (see also the box “Which WiFi channel to choose?”). Also look in the tab Advanced check whether the country code is correct there. In the tab Security There is usually no reason to make the default choices WPA and TKIP to accept: choose the safer options WPA2 and CCMP. Also change the password ChangeMe. Save your settings and then restart your Pi or click (if you do not visit the web interface via the RaspAP WiFi network) on Stop hotspot and after that Start hotspot.

Hotspot settings

08 Change password

In addition to the password for your ssid, you also need to change the password for the RaspAP web interface. You put that in Configure authentication. You can also change the default username admin change. But the most important thing is that you have the default password secret (that you at Old password fill in) is replaced by a more secure password. Enter your new password twice and click Save settings. The web interface then asks for the new password. It is important that both the ssid password and the password of your web interface are strong enough so that unauthorized persons do not have access to your network and the configuration of your hotspot.

Change Password

Which WiFi channel to choose?

Which WiFi channel you set up for RaspAP mainly depends on which channels are already being used in your area. If several wireless networks use the same channel, this is often at the expense of the connection speed. On the 2.4 GHz band, these channels also overlap, which makes it even more problematic. So the first step is to see which channels are already in use. That is possible under Android with an app such as Wifi Analyzer, in which you also get to see the overlapping of the channels. For RaspAP, choose a channel that overlaps as little as possible with the other networks.

09 Troubleshooting connection problems

If you are unable to connect to your WiFi access point, go to Configure hotspot / Advanced and switch the option Log output in. click on Save settings and restart the hotspot with Stop hotspot and after that Start hotspot. Then you get in the tab Log file to see logs that can point you to the cause of your problems. For a solution, search for the error message that you see in Google or on the GitHub page of RaspAP.

Solve connection problems

10 Setting up the DHCP server

RaspAP runs a dhcp server on the wireless interface, which you access through the menu Configure DHCP server can set. By default, those IP addresses are distributed from 10.3.141.50 to 10.3.141.255, but you can change that. In the tab Client list you will see which dhpc leases are configured. In Static Leases configure your fixed IP addresses. You then enter the mac address of a device and the ip address that it must be assigned. Then click add and then Save settings. This is especially useful if you want to run a server on one of the devices connected via Wi-Fi or if you want to allow specific network traffic with or without a firewall based on the IP address.

Set up a DHCP server

11 Wireless instead of ethernet

With RaspAP you can also set up a wireless access point in a place where you do not have an Ethernet connection. You then need to connect a second WiFi interface via USB to your Raspberry Pi, which you then use to connect to your router instead of an Ethernet cable. First open the RaspAP configuration file with sudo nano /var/www/html/includes/config.php and change as a rule define (‘RASPI_WIFI_CLIENT_INTERFACE’, ‘wlan0’); wlan0 through wlan1. Save your change with Ctrl + O and close nano with Ctrl + X. Then open the file with nano /etc/dhcpcd.conf and add the line at the very end nohook wpa_supplicant and place a hassle (#) in front of the line static routers = 10.3.141.1. Then enter the command sudo systemctl restart hostapd.service from.

Wireless instead of ethernet

Https

By default, the RaspAP web interface runs on http, not on encrypted https. On the wiki of the project find out how to activate https support. In short, it comes down to this: you run your own local certificate authority (CA), create a certificate for RaspAP and sign it. Then you configure lighttpd, the web server used by RaspAP, so that it uses your certificate for encrypted communication with the web interface. Finally, you must also download the root certificate (from your own certificate authority) on each device with which you want to visit the web interface, so that the RaspAP certificate is trusted and a green lock appears in your web browser.

https

12 Configuring the WiFi client

Then click in the RaspAP web interface on the left Configure WiFi device and right up Rescan. Choose the wireless network that serves as your home network for RaspAP. Enter the password for the correct network and click Add and then on Connect. Then switch on Configure hotspot / Advanced the WiFi client AP mode in, click Save settings and restart the hotspot. Incidentally, this is a step in which you may encounter some problems. If something fails, take a look at the issues on the GitHub page of RaspAP to see if someone has had a similar problem and resolved it.

Configure client

13 Upgrading RaspAP

RaspAP is still in full development. Regular upgrading to the latest version is therefore recommended. Unfortunately, that does not (yet) go through the web interface and you have to type in a few commands for this. Search first what the latest version is, and whether it is newer than the version number that you see in the upper left of the RaspAP web interface. Then execute the following commands on your Pi: ​​go to the correct directory with cd / var / www / html, download the latest source code with sudo git fetch – tags and then install the desired version with (for example for version 1.6.1) sudo git checkout tags / 1.6.1.

Upgrade RaspAP

14 Removing raspAP

If you have used RaspAP as a temporary solution, you may want to remove the program afterwards. Fortunately, RaspAP provides a uninstall script that not only removes all traces of the program itself, but also restores your system configuration files to the versions that RaspAP made a copy during its installation. This includes the configuration of your network interfaces, dns and dhcp. To do this, go to the correct folder with cd / var / www / html / installers and execute the script with ./uninstall.sh.

Delete raspAP

Integrate additional services

You can expand RaspAP with extra services. Unfortunately, the integration of this is not yet complete, so you still have to do some configuration work in this area. But on the wiki and in the issues of the GitHub page you will find extra information about this. This way you can integrate an OpenVPN client, so that all clients that connect to your access point surf via a specific VPN server. You can install Tor on your Pi, so that all Wi-Fi clients automatically surf anonymously via the Tor network. And also the adblocker Pi hole allows you to collaborate with RaspAP to automatically block ads on all connected WiFi clients.

Pi hole

.

Recent Articles

Related Stories