Back to Documentation

Hardware Setup

Configure your RAK3172 hardware and flash the Stratolink firmware.

Hardware Requirements

  • RAK3172-SIP development board or compatible LoRaWAN module
  • GNSS antenna (for GPS positioning)
  • LoRa antenna (for LoRaWAN communication)
  • USB cable for programming and power
  • Optional: External battery pack for field deployment

Installation

1. Install PlatformIO

PlatformIO is required to build and flash the firmware. You can install it as:

  • VS Code Extension - Recommended for beginners
  • CLI Tool - For command-line usage
  • Standalone IDE - Full-featured development environment

Download from platformio.org

2. Clone Repository

git clone https://github.com/ShepherdKruse/Stratolink.git cd Stratolink

3. Configure LoRaWAN Credentials

You'll need credentials from The Things Network:

  1. Create an account at The Things Network
  2. Create a new application
  3. Register your device and obtain:
    • DEV_EUI - Device EUI (unique identifier)
    • APP_EUI - Application EUI
    • APP_KEY - Application key (keep this secret)

4. Set Up Secrets File

The firmware uses a gitignored secrets file to store sensitive credentials:

  1. Copy firmware/include/config.h to firmware/include/secrets.h
  2. Edit secrets.h and replace placeholder values:
    #define LORAWAN_DEV_EUI "YOUR_DEV_EUI_HERE"
    #define LORAWAN_APP_EUI "YOUR_APP_EUI_HERE"
    #define LORAWAN_APP_KEY "YOUR_APP_KEY_HERE"
  3. Important: Never commit secrets.h to version control

5. Configure Region

Set your LoRaWAN region in config.h:

  • US915 - United States
  • EU868 - Europe
  • AS923 - Asia
  • AU915 - Australia

Building and Flashing

Build Firmware

cd firmware pio run

Flash to Device

Connect your RAK3172 via USB and flash the firmware:

pio run --target upload

Or use the provided script:

./flash_firmware.bat

Monitor Serial Output

View debug messages and telemetry:

pio device monitor

PCB and Circuit Design

For custom PCB designs and circuit schematics, see the hardware directory in the repository. Files are provided in KiCad format.

Troubleshooting

Device Not Detected

  • Check USB cable connection
  • Install USB drivers if needed (check RAK documentation)
  • Try a different USB port

Build Errors

  • Ensure PlatformIO is up to date: pio upgrade
  • Check that all required libraries are installed
  • Verify platformio.ini configuration

LoRaWAN Connection Issues

  • Verify credentials in secrets.h
  • Check that your region matches TTN configuration
  • Ensure antennas are properly connected
  • Check TTN console for device registration status

Next Steps

Once your hardware is configured, continue with the Getting Started guide to set up the web application.