Industrial manufacturing
Industrial Internet of Things | Industrial materials | Equipment Maintenance and Repair | Industrial programming |
home  MfgRobots >> Industrial manufacturing >  >> Manufacturing Technology >> Manufacturing process

Build a Low‑Cost LoRa Single‑Channel Gateway with Raspberry Pi

Create a single‑channel LoRaWAN gateway for under $15 using a Raspberry Pi and a HopeRF LoRa module. Follow this detailed guide to wire, configure, and register your gateway on The Things Network.

Story

Description

If you’re eager to experiment with LoRaWAN but lack a nearby gateway, this tutorial turns a $10 LoRa module and a Raspberry Pi into a fully functional single‑channel gateway.

Prepare Your RFM95W

The RFM95W is a low‑cost, high‑performance LoRa transceiver. Follow these steps to wire it up to the Pi.

  • Cut four female‑to‑female jumper wires in half to create eight 4‑inch strands. Strip 1/8 inch of insulation from each exposed end.
  • Solder each wire to the corresponding pin on the RFM95W:
    • DI00
    • 3.3V
    • MISO
    • MOSI
    • SCK
    • RESET
    • NSS
    • GND (adjacent to MISO)
  • Create a simple dipole antenna: cut two 18 ga solid‑core wires to 83 mm, strip 2 mm of insulation on one end of each, and solder one to the ANT pin and the other to the GND pin next to ANT.

Connect the RFM95W to the Raspberry Pi

Use the Pi’s 40‑pin header (see official pinout guide) to connect the module’s SPI pins to the Pi. The exact pin mapping is provided in the original tutorial image.

Set Up Raspberry Pi Software

These steps assume Raspbian (now Raspberry Pi OS) is installed.

  1. Log in as the pi user.
  2. Clone the gateway code:
    git clone https://github.com/tftelkamp/single_chan_pkt_fwd
  3. Enable SPI via raspi-config:
    sudo raspi-config
    # Navigate to Interfacing Options → SPI → Enable
    sudo shutdown -r now
  4. Install WiringPi:
    sudo apt-get install wiringpi
  5. Configure the gateway code:
    cd ~/single_chan_pkt_fwd
    nano main.cpp

    Adjust server and frequency settings for your region. For example, in the US:

    #define SERVER1 "13.66.213.36" // router.us.thethings.network
    uint32_t freq = 902300000; // 902.3 MHz
    
  6. Compile:
    make
  7. Run to view the gateway ID:
    sudo ./single_chan_pkt_fwd

    Copy the displayed Gateway EUI.

  8. Register the gateway on The Things Network (TTN):
    1. Sign in at console.thethingsnetwork.org.
    2. Navigate to Gateways+ Register gateway → choose Bridge.
    3. Paste the Gateway EUI you captured earlier.
    4. Finish registration.

    Congratulations – your gateway is now live on TTN!

  9. Start the gateway for real operation:
    sudo ./single_chan_pkt_fwd

    Monitor status messages and verify connectivity on the TTN console.

What Can You Connect?

  • Pycom LoPy modules – see official guide.
  • Other LoRa end‑nodes (e.g., sensors, microcontrollers) – just tune them to the same channel.
  • Future expansions: add more channels or upgrade to a multi‑channel gateway.

Manufacturing process

  1. Build a Professional Raspberry Pi Universal Remote with LIRC
  2. Converting RF to DC with a Raspberry Pi: Building and Troubleshooting an Envelope Detector
  3. Cycle Chaser: Transform Your Bike into a Nighttime Light Show with Raspberry Pi
  4. Build a ThingSpeak Temperature Monitor with Raspberry Pi & BrickPi
  5. Build a Raspberry Pi‑Based Thief Detector – Step‑by‑Step Guide
  6. Build a Raspberry Pi Home Temperature Monitor with MCP9808, InfluxDB & Grafana
  7. Build a Raspberry Pi‑Powered Home Automation System for Remote Control
  8. Step-by-Step Guide to Deploy a RAK 831 LoRa Gateway on Raspberry Pi 3
  9. Build a LoRa Gateway with the RAK831 Module on Raspberry Pi 3 – Step‑by‑Step Guide
  10. DIY Wall‑E Inspired Raspberry Pi CD‑Box Robot