Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
B

basicstation

> 编程语言
Open source

LoRa Basics™ Station - The LoRaWAN Gateway Software

400 stars0 likes0 views
WebsiteGitHub

About

LoRa Basics™ Station - The LoRaWAN Gateway Software

LoRa Basics™ Station

Basic Station is a LoRaWAN Gateway implementation, including features like

  • Ready for LoRaWAN Classes A, B, and C

  • Unified Radio Abstraction Layer supporting Concentrator Reference Designs v1.5, v2 and Corecell

  • Powerful Backend Protocols (read here and here)

    • Centralized update and configuration management
    • Centralized channel-plan management
    • Centralized time synchronization and transfer
    • Various authentication schemes (client certificate, auth tokens)
    • Remote interactive shell
  • Lean Design

    • No external software dependencies (except mbedTLS and libloragw/-v2)
    • Portable C code, no C++, dependent only on GNU libc
    • Easily portable to Linux-based gateways and embedded systems
    • No dependency on local time keeping
    • No need for incoming connections

Documentation

The full documentation is available at https://doc.sm.tc/station.

High Level Architecture

Prerequisites

Building the Station binary from source, requires

  • gcc (C11 with GNU extensions)
  • GNU make
  • git
  • bash

First Steps

The following is a three-step quick start guide on how to build and run Station. It uses a Raspberry Pi as host platform and assumes a Concentrator Reference Design 1.5 compatible radio board connected via SPI, and assumes that SPI port is enabled using the raspi-config tool. In this example the build process is done on the target platform itself (the make environment also supports cross compilation in which case the toolchain is expected in ~/toolchain-$platform - see setup.gmk).

Step 1: Cloning the Station Repository

sourcecode
git clone https://github.com/lorabasics/basicstation.git

Step 2: Compiling the Station Binary

sourcecode
cd basicstation
make platform=rpi variant=std

The build process consists of the following steps:

  • Fetch and build dependencies, namely mbedTLS and libloragw
  • Setup build environment within subdirectory build-$platform-$variant/
  • Compile station source files into executable build-$platform-$variant/bin/station

Step 3: Running the Example Configuration on a Raspberry Pi

sourcecode
cd examples/live-s2.sm.tc
RADIODEV=/dev/spidev0.0 ../../build-rpi-std/bin/station

Note: The SPI device for the radio MAY be passed as an environment variable using RADIODEV.

The example configuration connects to a public test server s2.sm.tc through which Station fetches all required credentials and a channel plan matching the region as determined from the IP address of the gateway. Provided there are active LoRa devices in proximity, received LoRa frames are printed in the log output on stderr.

Instruction for Supported Platfroms

Corecell Platform (Raspberry Pi as HOST + SX1302CxxxxGW Concentrator)

Compile and Running the Example
sourcecode
cd basicstation
make platform=corecell variant=std
cd examples/corecell
./start-station.sh -l ./lns-ttn

This example configuration for Corecell connects to The Things Network public LNS. The example station.conf file holds the required radio configurations and station fetches the channel plan from the configured LNS url (tc.uri).

Note: SPI port requires to be activated on Raspberry Pi thanks to raspi-config tool.

PicoCell Gateway (Linux OS as HOST + SX1308 USB Reference design)

Compile and Running the Example
sourcecode
cd basicstation
make platform=linuxpico variant=std
cd examples/live-s2.sm.tc
RADIODEV=/dev/ttyACM0 ../../build-linuxpico-std/bin/station

Note: The serial device for the PicoCell MAY be passed as an environment variable using RADIODEV.

Next Steps

Next,

  • consult the help menu of Station via station --help,
  • inspect the station.conf and cups-boot.* example configuration files,
  • tune your local configuration,
  • learn how to compile Station for your target platform.

Check out the other examples:

  • Simulation Example - An introduction to the simulation environment.
  • CUPS Example - Demonstration of the CUPS protocol within the simulation environment.
  • Station to Pkfwd Protocol Bridge Example - Connect Basic Station to LNS supporting the legacy protocol.

Usage

The Station binary accepts the following command-line options:

…

Issues· 72 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言