Stage 3: Building Your Gateway

Connect the Gateway to the Internet

You can use either Ethernet or Wi-Fi to connect your Raspberry Pi to the internet.


Connect the Gateway to the Internet using Ethernet

  1. Plug one end of an Ethernet cable into the Raspberry Pi’s Ethernet port.

    Plug the other end into an Ethernet port on your home network router, hub, or Powerline adapter.

  2. Turn on the Raspberry Pi. The network LEDs should light up.

  3. Go to the section Find the Gateway's IP Address.


Connect the Gateway to the Internet Using Wi-Fi

To connect the gateway to the internet using Wi-Fi, you need an SSH tool. Linux and macOS machines have SSH preinstalled, and the Windows 10 April 2018 update and later versions of Windows include SSH enabled by default. If you have an earlier version of Windows, use the third-party client PuTTY.

To connect:

  1. Turn on the Raspberry Pi.

  2. Wait until you see the access point ChirpStackAP listed among the available Wi-Fi networks on your machine. It may take a short while for the Pi to boot up and the access point to appear.

  3. Connect your machine to the Wi-Fi access point ChirpStackAP.

  4. Enter the password:

    ChirpStackAP
    

    If you are on a Windows machine, the Wi-Fi connection wizard may prompt you for a PIN before it allows you to join the gateway access point. Click Connect using a security key instead to enter the password.

  5. Once you are connected to the ChirpStack access point, the tool you use to connect to the gateway depends on your operating system.

    If you are using Linux or macOS, you can use SSH; move to the next step.

    If you are using Windows:

    1. Open PowerShell.

      Note

      To open PowerShell: enter the text PowerShell into the Windows Search bar and select Windows PowerShell.

    2. Enter the following at the command prompt:

      ssh
      

      If you do not see an error message, SSH is installed. Proceed to the next step.

      If an error displays, download PuTTY, install it, and then proceed to the next step.

  6. The next step depends on whether you are using SSH or PuTTY.

    If you are using SSH:

    If you are asked whether you are sure you wish to connect, enter yes

    1. If you are using Linux or macOS, open Terminal; if you are using Windows, open PowerShell.

    2. Enter the following command:

      ssh admin@192.168.0.1
      
    3. Enter the default password: admin

    If you are using PuTTY:

    1. Open PuTTY.

    2. Enter 192.168.0.1 in the Host Name (or IP address) field and click Open.

      PuTTY Prompt

      Figure 7: Host Name (or IP address) Field in the PuTTY Configuration Window

      Warning

      A warning that the host key is not cached may display. This is normal. You can safely click Yes to continue.

    3. At the login prompt enter: admin

    4. At the password prompt, enter: admin

  7. The welcome screen displays.

    ChirpStack Welcome Screen

    Figure 8: ChirpStack Welcome Screen

  8. Enter the following command:

    sudo gateway-config
    
  9. Enter the admin password at the prompt:

    admin
    
  10. The menu screen displays.

    Chirpstack OS v4 Menu

    Figure 9: ChirpStack Menu Screen

  11. Using the arrow keys, press the down arrow to select Configure WIFI, and press Enter to select OK.

  12. Enter your network’s SSID. Press Enter to select Ok.

    Warning

    The SSID is case-sensitive. If you mistype your SSID, you must re-flash the SD card and try again.

  13. Enter your network password and press Enter to select Ok.

    Warning

    The password is case-sensitive. If you mistype your password, you must re-flash the SD card and try again.

  14. The reboot confirmation screen displays. Press Enter to select OK.

    Note

    On reboot, the access point is no longer exposed. This disconnects your Raspberry Pi from SSH / PuTTY.

  15. After around two minutes, the Pi should have restarted and connected to the Wi-Fi network. Connect your computer’s Wi-Fi back to the Wi-Fi access point you just connected the Raspberry Pi to if it does not automatically reconnect.