Raspberry Pi Hotspot Configuration - Automated Setup

This guide explains how to set up your BirdNET Pi with automatic hotspot capabilities. When away from home, your Pi will create its own WiFi hotspot, allowing you to connect directly to it with your phone or tablet in the field.

How This Hotspot Setup Works

Simple operation: When your Raspberry Pi boots up, it:

  1. First tries to connect to your home WiFi
  2. If home WiFi isn't available (like when you're in the field), it automatically creates a hotspot
  3. You can then connect directly to your Pi using your phone, tablet, or laptop

Perfect for field use: This setup is ideal for BirdNET Pi users who need to:

When you return home, simply reboot your Pi and it will automatically reconnect to your home WiFi.

Prerequisites

Getting Started

Step 1: Open this guide on your Raspberry Pi by entering this URL in the desktop browser:

https://www.littleofinterest.com/George/simplified-hotspot-guide.html

Step 2: When you download the scripts using the buttons below, the files will be saved to your Downloads folder.

Step 3: To access the terminal:

Step 4: In the terminal, navigate to your Downloads folder:

cd ~/Downloads

Automated Setup Options

To set up your Pi's hotspot capabilities, follow these steps:

Step 1: Download the Core Script (Required)

This is the main script that configures your hotspot

Download setup-hotspot.sh

Step 2: Download the GUI Wrapper (Recommended)

Makes setup easier with a graphical interface

Download hotspot-setup-gui.sh

Important: You must download the core script (setup-hotspot.sh) regardless of which method you choose. If you want the easier GUI setup, download both scripts.

Using the GUI-Based Setup (Recommended)

The GUI-based setup script provides an easy way to configure your hotspot without typing complex commands. It uses Zenity to create simple dialog boxes for entering your hotspot information.

Getting Started with GUI Setup

  1. Download both scripts using the buttons above (both files are required)
  2. Open the terminal (if not already open):
    • Click the terminal icon in the taskbar, or
    • Press Ctrl+Alt+T, or
    • Click the Raspberry Pi menu → Accessories → Terminal
  3. Navigate to your Downloads folder:
    cd ~/Downloads
  4. Make both scripts executable:
    chmod +x hotspot-setup-gui.sh setup-hotspot.sh
  5. Run the GUI setup script:
    sudo ./hotspot-setup-gui.sh

Step-by-Step GUI Setup Process

Step 1: Enter SSID

First, you'll be prompted to enter the SSID (network name) for your hotspot. The default is "BirdNET-Hotspot".

Recommendation: Use "BirdNET-Hotspot" to easily identify your device in the field.

Step 2: Enter WiFi Interface

Next, enter the WiFi interface to use. The default is "wlan0", which is correct for most Raspberry Pi devices.

Note: If you're not sure about your WiFi interface, you can check it with ip a in terminal before running the script.

Step 3: Enter Password

Enter a secure password for your hotspot. It must be at least 8 characters long.

Important: Choose a strong password that's easy for you to remember but hard for others to guess.

Step 4: Confirm Settings

A confirmation dialog will show all your settings. Review them carefully, then click "Yes" to proceed or "No" to cancel.

Step 5: Installation Process

The script will notify you that it's starting the hotspot setup and then execute the main setup script with your chosen parameters.

This process may take a few minutes. The script will handle all the technical details, including:

Step 6: Completion

When the setup is complete, you'll see a confirmation dialog showing your hotspot SSID and interface.

Note: If you don't already have Zenity installed (required for the GUI dialogs), the script will automatically install it for you. This requires an internet connection during the initial setup.

Script Options

The command-line setup script supports several options:

Usage: ./setup-hotspot.sh [OPTIONS]

Options:
  -s, --ssid SSID       Hotspot SSID name (default: RaspberryPi-Hotspot)
  -p, --password PASS   Hotspot password (min 8 chars, default: raspberry)
  -i, --interface IFACE WiFi interface (default: wlan0)
  -h, --help            Show this help message

Example:
  ./setup-hotspot.sh --ssid "BirdNET-Hotspot" --password "mypassword123"

Using Your Hotspot

Automatic Operation

Once set up, the automatic network management works as follows:

This means if you take your Pi somewhere without WiFi (activating hotspot mode) and then bring it back home, simply reboot it to reconnect to your home network.

Important: The Pi cannot automatically detect when it returns to home WiFi range while already in hotspot mode. A reboot is required to trigger the network selection process again.

Enhanced Priority Settings: These scripts include robust network priority settings that ensure your Pi always tries home WiFi first on boot, even if it was previously in hotspot mode. These settings fix common issues where devices might stay in hotspot mode after reboot.

Accessing Your Pi in Hotspot Mode

When your Pi is in hotspot mode:

  1. Connect to the hotspot WiFi network from your device (e.g., "BirdNET-Hotspot")
  2. The Pi's IP address in hotspot mode is typically 10.42.0.1
  3. Access services by using this IP address (e.g., http://10.42.0.1)

The .local domain (e.g., birdnet.local) might not work in hotspot mode. Use the IP address instead.

Finding Your Hotspot IP Address

If 10.42.0.1 doesn't work, you can find the exact IP address by SSHing into the Pi and running:

ip addr show wlan0

Backup and Recovery

Automatic Backups

Both setup scripts automatically create a backup of your network configurations before making changes. The backup location will be shown during script execution.

Manual Backups

For Windows users, we recommend using WinSCP:

  1. Download and install WinSCP
  2. Connect to your Raspberry Pi
  3. Navigate to important configuration files and download them:

Recovery

If anything goes wrong, you can reboot your Pi to return to the home WiFi network, or restore from your backups.

Troubleshooting