Philipp Conen

Engineering meets hobby.

Setting up a Raspberry Pi Access-Point with RaspAP

Introduction

Connections via Wifi are great. The benefits are no wires, a simple connection via SSH and an easy data transfer via SCP.

Sadly not everywere a network is available so that a wifi connection via home-network is no option. Due to this problem an alternativ is to build a standalone network, also called access point (AP).

1. Preparation of the Raspberry Pi

First, one should start with a clean Raspberry Pi. For this, you can have a look at my corresponding tutorial.

2. Installation of RaspAP

After the preparation, the installation process of RaspAP can be started using

wget -q https://git.io/voEUQ -O /tmp/raspap && bash /tmp/raspap

Detailed information can be found in this tutorial. In my case, I confirmed all default settings.

3. Configuration of RaspAP

After the installation is finished, open the browser and look up the IP-address 10.3.141.1, as this is the default IP-address of the RaspAP Access-Point.

This requires a login. The default username is admin and the default password is secret. Because of this, these parameters should be changed as soon as possible.

On this site, you can find several settings. The three important changes we need to make now are

  • the hotspot-,
  • the authentication- and
  • the system settings.

3.1. Hotspot settings

To enable the hotspot, go to hotspot settings (Basic) and change the SSID to a suitable name (e.g. MyAccessPoint). Also, change the network password (Security). Afterward, save the settings and start the hotspot.

Now, one should be kicked off the website, because the Raspberry Pi is not in the current network anymore. Instead, it is now in its own network. Start connecting to the AP-network with the SSID and the password you recently set up. Afterward, try to reach the IP-address 10.3.141.1 again.

3.2. Authentication settings

Here one can change the username (recently admin) as well as the password (recently secret) to log in to the domain.

3.3. System settings

Lastly, switch to system settings and make a reboot of the Raspberry Pi.

4. Connect to the Raspberry Pi

Make sure you are connected to the network of the access point. Once the connection is enabled, one can log in to the Pi via SSH in a common way. For this demand, use the default network IP-address 10.3.141.1 of the access point.

ssh pi@10.3.141.1

Now you should be able to work with the Raspberry Pi in a private network. Sharing data should be possible via SCP. Have in mind that using the internet is not possible, as you are connected to the Pi.

The temporary deactivation of the access point will be discussed in the next section.

5. Temporary deactivation of the access point

If one wants to connect the Raspberry Pi back to the home network, a specific script should be used, since the access point will be activated after each reboot. This script can be found in the attachments.

Before calling the script some preparations need to be done. In my case, I build a new directory

mkdir Settings

In this directory I stored

  • the script,
  • an ssh file, and
  • a network file (wpa_supplicant.conf).

First, switch to the new directory

cd Settings/

Then create the ssh file

touch ssh

Finally, create the wpa_supplicant.conf file

nano wpa_supplicant.conf

and fill it with the following content

country=DE
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
       ssid="SSID_Name"
       psk="SSID_Password"
       key_mgmt=WPA-PSK
}

Change the SSID and the password regarding the access point parameters. Further information can be found in my corresponding tutorial.

After this preparation, the script can be run (see Attachments). This script contains the aspects to

  • stop RaspAP,
  • copy the network files to the system, and
  • start the network settings.

Have in mind that these changes can take two or three minutes.

6. Reactivate the access point

After temporary deactivating the access point, one can reactivate it by a reboot

sudo reboot

Conclusion

In this tutorial the Raspberry Pi was used as an access point. With a clean installed Raspberry Pi OS, we also installed the RaspAP software and configured it. As this could be necessary, the access point could be deactivated temporarily with some preparation and a corresponding script (see Attachments). The temporary deactivation can then be canceled with a reboot.


Sources

Links Latest Access
RaspAp installation 23.05.2021
Headless Raspberry Pi OS setup 23.05.2021

Attachments

Click here to open.

Last updated on 23 May 2021
Published on 23 May 2021
 Edit on GitHub