Skip to content

Releases: cnbhl/basicstation-rpi64

Release 2.0.6-cnbhl.1.6

04 Feb 09:15
076afc0

Choose a tag to compare

Docker Support

This release adds Docker as an alternative deployment method alongside setup-gateway.sh.

New Features

  • Docker support — Multi-stage Dockerfile builds and runs the station in a minimal container (~32MB)
  • EUI detection modeEUI_ONLY=1 detects Gateway EUI for TTN registration before starting
  • docker-compose.yml — Ready-to-use compose file with all env vars documented

Quick Start (Docker)

# Build
docker build -t basicstation .

# Detect EUI (new board)
docker run --rm --privileged -e BOARD=WM1302 -e EUI_ONLY=1 basicstation

# Run
docker run -d --privileged --network host \
  --name basicstation --restart unless-stopped \
  -e BOARD=WM1302 -e REGION=eu1 \
  -e GATEWAY_EUI=auto \
  -e CUPS_KEY="NNSXS.xxx..." \
  basicstation

Also included (previously unreleased)

  • Sliding window duty cycle enforcement (ETSI EN 300 220 compliant)
  • GPS/PPS recovery and GPSD support
  • mbedtls 3.6.0 with TLS 1.3 support
  • Fine timestamp support for SX1302/SX1303
  • SF5/SF6 spreading factor support
  • IN865 region support
  • Stuck concentrator exit handling
  • SX1302 LBT error handling fix

See CHANGELOG.md for full details.

What's Changed

  • feat: Docker support for containerized deployment by @cnbhl in #38

Full Changelog: 2.0.6-cnbhl.1.5...2.0.6-cnbhl.1.6

Release 2.0.6-cnbhl.1.5

01 Feb 20:43
148dca4

Choose a tag to compare

PG1302 (Dragino) Pi 4/5 Compatibility Fix

This release documents and resolves the SPI communication failure when using Dragino PG1302 concentrator on Raspberry Pi 4 and Pi 5.

Root Cause

The PG1302's level shifters need time to stabilize when powered from 5V. Pi 4/5's faster SPI controller starts transactions before they're ready, causing MISO to return all zeros.

Fix

Set the PG1302 power jumper to 3.3V (not 5V). No software changes required.

Changes

  • Comprehensive investigation documentation (docs/SX1250_INIT_INVESTIGATION.md)
  • GPIO brute-force test plan and script for debugging similar issues
  • MCU_NRESET support added to reset_lgw.sh for future board compatibility
  • Board template updated with 3.3V requirement note for PG1302

Test Matrix

Concentrator Pi Zero W Pi 4 Pi 5
WM1302 (Seeed)
PG1302 (Dragino) ✅* ✅*

*Requires 3.3V power jumper

Full Changelog

2.0.6-cnbhl.1.4...2.0.6-cnbhl.1.5

What's Changed

  • Update issue templates by @cnbhl in #32
  • fix(pg1302): Resolve SPI failure on Pi 4/5 with 3.3V jumper documentation by @cnbhl in #34
  • docs: Update version to 2.0.6-cnbhl.1.5 by @cnbhl in #35

Full Changelog: 2.0.6-cnbhl.1.4...2.0.6-cnbhl.1.5

Release 2.0.6-cnbhl.1.4

30 Jan 21:37
727552e

Choose a tag to compare

What's New

Features

  • Antenna gain configuration - Setup wizard now prompts for antenna gain (dBi) to ensure ETSI TX power compliance. The station subtracts the configured gain from TX power so radiated power stays within regulatory limits.

New CLI Option

./setup-gateway.sh --antenna-gain <dBi>  # Range: 0-15, default: 0

How it works

If LNS requests 16 dBm EIRP and antenna gain is configured as 3 dBi:

  • Conducted power to radio: 16 - 3 = 13 dBm
  • Radiated power (EIRP): 13 + 3 = 16 dBm

Common antenna gains:

Antenna Type Typical Gain
Stock whip 2-3 dBi
Fiberglass omni 5-6 dBi
High-gain omni 8-9 dBi
Directional/panel 10-14 dBi

Full Changelog

2.0.6-cnbhl.1.3...2.0.6-cnbhl.1.4

What's Changed

  • feat: Add antenna gain configuration to setup wizard by @cnbhl in #31

Full Changelog: 2.0.6-cnbhl.1.3...2.0.6-cnbhl.1.4

Release 2.0.6-cnbhl.1.3

30 Jan 18:03
a1ebeb0

Choose a tag to compare

What's New

Features

  • Fine timestamp support - Nanosecond-precision timestamps for SX1303 concentrators (opt-in via "ftime": true in station.conf)
  • GPS/PPS recovery - Auto-reset when PPS signal lost >90s, restart after 6 failures
  • GPSD support - Use gpsd daemon instead of direct serial (compile with CFG_usegpsd)
  • GPS control - LNS can enable/disable GPS via router_config
  • Duty cycle sliding window - ETSI EN 300 220 compliant tracking for EU868, AS923, KR920
  • IN865 region - India 865 MHz band support
  • mbedtls 3.6.0 default - TLS 1.3 support with PSA crypto (2.x compatibility retained)
  • SF5/SF6 spreading factors - Support for LoRaWAN RP2 1.0.5 datarates

Fixes

  • Fix fine timestamp rxtime - send fts as separate field per upstream lorabasics#177
  • Fix nocca TX command when checking response with LBT disabled
  • Fix SX1302 LBT error handling to use correct HAL constant
  • Zero-initialize ifconf struct before JSON channel config parsing
  • Exit on stuck concentrator after excessive clock drift
  • Fix GPS/PPS configuration (use "fuzzy" mode when GPS disabled)
  • Fix test framework crash in test4-cups handle_dntxed
  • Use correct 0.1% duty cycle frequency (864 MHz) in TLS/CUPS tests

CI/Build

  • Default to mbedtls 3.6.0, drop 2.x from CI (halves test matrix)
  • Add shell-tests job for unit and integration tests (37 tests)
  • Add 8 file operations security tests
  • Fix coverage report genhtml source errors

Documentation

  • Add CI status badge to README
  • Add FEATURES.md listing all changes vs upstream
  • Document EU868 ETSI-compliant 6-band mapping
  • Update MULTITECH_CHERRY_PICKS.md with all merged items
  • Mark Duty-Cycle-Sliding-Window-Plan.md as implemented

Upgrade Notes

  • mbedtls: Default changed from 2.28.0 to 3.6.0. To use legacy 2.x:
    MBEDTLS_VERSION=2.28.8 make platform=corecell variant=std
  • Fine timestamps: Requires SX1303 or newer SX1302 hardware. Enable with "ftime": true in SX1302_conf section.

Full Changelog

2.0.6-cnbhl.1.2...2.0.6-cnbhl.1.3

What's Changed

  • docs: Update repository URLs for rename to basicstation-rpi64 by @cnbhl in #16
  • Fix GPS/PPS configuration for station.conf by @cnbhl in #17
  • Fix: Zero-initialize ifconf struct before JSON parsing by @cnbhl in #18
  • Feature: mbedtls 3.x compatibility by @cnbhl in #19
  • Feature: IN865 region support by @cnbhl in #20
  • Add sliding window duty cycle enforcement by @cnbhl in #21
  • Add GPS/PPS improvements and GPSD support by @cnbhl in #22
  • Add fine timestamp support for SX1303 concentrators by @cnbhl in #23
  • docs: Add FEATURES.md listing all changes vs upstream by @cnbhl in #24
  • fix: Prevent IndexError crash in test4-cups handle_dntxed by @cnbhl in #25
  • docs: Document EU868 ETSI-compliant band mapping by @cnbhl in #26
  • test/ci: Add setup tests, default to mbedtls 3.6.0 by @cnbhl in #27
  • docs: Update feature documentation and cherry-pick status by @cnbhl in #28
  • docs: Update CLAUDE.md with current version by @cnbhl in #29
  • docs: Add CI badge to README by @cnbhl in #30

Full Changelog: 2.0.6-cnbhl.1.2...2.0.6-cnbhl.1.3

Release 2.0.6-cnbhl.1.2

25 Jan 21:32
a0d6a82

Choose a tag to compare

Changes

Bug Fix

Documentation

  • Add Tested Platforms section with verified hardware matrix
  • Add Pi Zero W to supported devices
  • Document xoseperez fork features for future reference (multi-arch builds, NetID/OUI whitelist)

Tested Platforms

Device OS Userspace Kernel
Pi Zero W Raspbian 13 (trixie) armv6l armv6l
Pi 4 (32-bit) Raspbian 13 (trixie) armhf aarch64
Pi 4 (64-bit) Raspbian 12 (bookworm) aarch64 aarch64
Pi 5 Debian 12 (bookworm) aarch64 aarch64

Full Changelog: 2.0.6-cnbhl.1.1...2.0.6-cnbhl.1.2

What's Changed

  • Add tested platforms, bug fix, and xoseperez fork notes by @cnbhl in #15

Full Changelog: 2.0.6-cnbhl.1.1...2.0.6-cnbhl.1.2

Release 2.0.6-cnbhl.1.1

25 Jan 14:03
6cd3b61

Choose a tag to compare

What's New

Non-Interactive Mode for Automated Deployments

Full CLI support for scripted/CI-CD gateway setup:

./setup-gateway.sh -y --board PG1302 --region eu1 --eui auto --cups-key "NNSXS.xxx..." --service

New Options

  • -y, --non-interactive - Enable non-interactive mode
  • --board <type> - Board type (WM1302, PG1302, LR1302, SX1302_WS, SEMTECH)
  • --region <code> - TTN region (eu1, nam1, au1)
  • --eui <hex|auto> - Gateway EUI or auto-detect
  • --cups-key / --cups-key-file - CUPS API key
  • --gps <device|none> - GPS device or disable
  • --service / --no-service - Systemd service setup
  • --force - Overwrite existing credentials
  • --skip-build - Skip build if binary exists

Bug Fixes

  • Fix GPS config: remove line when disabled (Basic Station requires string, not boolean)
  • Fix PPS mode: set to "fuzzy" when GPS disabled

Test Suite

  • 29 tests (15 unit + 14 integration)
  • Mock environment for CI/CD without hardware

Full Changelog: 2.0.6-cnbhl.1.0...2.0.6-cnbhl.1.1

What's Changed

  • feat: Add non-interactive mode for automated deployments by @cnbhl in #14

Full Changelog: 2.0.6-cnbhl.1.0...2.0.6-cnbhl.1.1

Release 2.0.6-cnbhl.1.0

25 Jan 07:28
678c366

Choose a tag to compare

What's New

  • Multi-board support with board selection wizard
  • Support for WM1302, PG1302, LR1302, SX1302_WS, and SEMTECH reference boards
  • Custom GPIO pin configuration option
  • Runtime board.conf for GPIO settings (no rebuild required)
  • Added SUPPORTED_BOARDS.md with GPIO pinout reference
  • New X.Y version format (major.minor)

See SUPPORTED_BOARDS.md for GPIO pinout details.

What's Changed

  • Document release title convention by @cnbhl in #11
  • Fix --skip-gps option not recognized by @cnbhl in #12
  • Multi-board support and Dragino PG1302 compatibility by @cnbhl in #13

Full Changelog: 2.0.6-cnbhl.5...2.0.6-cnbhl.1.0

Release 2.0.6-cnbhl.5

24 Jan 10:20
a3333b6

Choose a tag to compare

What's New

Extended Dependency Checks

  • Validates all required commands at startup: gcc, make, curl, sed, grep, tr, cat, cp, mv, chmod, mktemp, tee, stty, timeout, sudo, systemctl

Security Improvements

  • Atomic temp file writes with restrictive umask (077)
  • Cleanup trap on EXIT for orphaned temp files

GPS Detection

  • New --skip-gps flag to bypass auto-detection
  • Avoids duplicate scans via symlink tracking

Privilege Detection

  • is_root(), check_sudo_available(), run_privileged(), require_privilege() functions
  • Helpful error messages when privileges are missing

Documentation

  • Refactored all README files for clarity and brevity
  • README.md reduced by 64%
  • Added versioning convention to CLAUDE.md

Full Changelog: 2.0.6-cnbhl.4...2.0.6-cnbhl.5

Release 2.0.6-cnbhl.4 - Modular Setup Script

23 Jan 21:09
85fa314

Choose a tag to compare

What's New

This release refactors the setup script into a modular library structure for better maintainability and adds new features.

Modular Library Structure

The monolithic setup-gateway.sh has been refactored into modular libraries under lib/:

  • common.sh - Output, input, logging, system checks, dependency validation
  • validation.sh - Input validation (EUI, sanitization)
  • file_ops.sh - Secure file operations, template processing
  • service.sh - Systemd service management
  • gps.sh - GPS serial port auto-detection
  • setup.sh - Setup wizard steps
  • uninstall.sh - Uninstall wizard

New Features

  • Uninstall option: ./setup-gateway.sh --uninstall - cleanly remove installation
  • Verbose logging: ./setup-gateway.sh -v - enable debug logging
  • Skip dependency checks: ./setup-gateway.sh --skip-deps
  • I2C availability check: Validates /dev/i2c-1 with fix instructions
  • Centralized logging: All operations logged to setup.log

Improvements

  • Better error messages with specific fix instructions for SPI/I2C
  • Comprehensive dependency validation before setup
  • Atomic file writes for credential security
  • GPS detection with diagnostic output for each port/baud combination

Full Changelog

2.0.6-cnbhl.3a...2.0.6-cnbhl.4

Release 2.0.6-cnbhl.3a - GPS Auto-Detection Hotfix

21 Jan 22:23
2046d9a

Choose a tag to compare

Hotfix: GPS Serial Port Auto-Detection for Raspberry Pi 5

Problem

On Raspberry Pi 5, the GPS module (e.g., L76K on Seeed Studio concentrator hats) uses /dev/ttyAMA0 instead of /dev/ttyS0 (used on Pi 4/3). This caused GPS initialization to fail with "No such file or directory" error.

Solution

Added automatic GPS serial port detection to setup-gateway.sh:

  • Auto-detection: Scans serial ports for NMEA data to find the GPS module
  • Multiple ports: Checks /dev/ttyAMA0, /dev/ttyS0, /dev/serial0, /dev/ttyAMA10
  • Multiple baud rates: Tests 9600, 4800, 19200, 38400, 57600, 115200
  • Fallback options: Manual entry or disable GPS if detection fails

Changes

  • setup-gateway.sh: New GPS detection step (Step 7)
  • station.conf.template: Uses {{GPS_DEVICE}} variable instead of hardcoded path
  • Documentation updated in README.md and CLAUDE.md

Upgrade Notes

If you have an existing installation on Pi 5 with GPS issues, you can either:

  1. Re-run ./setup-gateway.sh to auto-detect GPS
  2. Manually edit station.conf: change "gps": "/dev/ttyS0" to "gps": "/dev/ttyAMA0"

Based on lorabasics/basicstation Release 2.0.6

What's Changed

  • Consolidate reset_lgw.sh to single location by @cnbhl in #1
  • Update docs for reset_lgw.sh consolidation by @cnbhl in #2
  • Hotfix: GPS serial port auto-detection for Pi 5 by @cnbhl in #3

New Contributors

  • @cnbhl made their first contribution in #1

Full Changelog: 2.0.6-cnbhl.3...2.0.6-cnbhl.3a