OpenWrt-based LoRaWAN gateway firmware for Seeed Studio's Recomputer Gateway device
Recomputer Gateway is a full-featured LoRaWAN gateway firmware built on OpenWrt 24.10 and deployed via LXC containers. The firmware integrates multiple LoRaWAN protocol stacks including ChirpStack, Semtech packet_forwarder, and Basic Station, along with 4G/LTE mobile network access, MQTT services, and serial communication (UART/RS485) capabilities.
- Base System: OpenWrt 24.10 (ARMv8/aarch64)
- LoRaWAN Support:
- ChirpStack Concentrator
- Semtech Packet Forwarder
- Basic Station
- Networking:
- 4G/LTE dial-up networking
- Multi-WAN support (load balancing/failover)
- Routing configuration management
- Peripherals:
- RS485 serial configuration
- UPS power management
- Web Management:
- LuCI interface (SenseCap theme)
- Web terminal
- LoRa status monitoring
- LTE status display
- OTA upgrade support
System overview page displaying LoRa status, network connections, and packet statistics.
| Item | Value |
|---|---|
| Target Platform | ARMv8 (aarch64_generic) |
| OpenWrt Version | openwrt-24.10 |
| Container | LXC |
| Default User | root (no password) |
recomputer-gateway/
├── .config # OpenWrt build configuration
├── .github/
│ └── workflows/
│ └── build.yml # GitHub Actions build workflow
├── feeds.conf.default # Feeds configuration
├── feeds/
│ ├── chirpstack/ # ChirpStack related packages
│ ├── lorawan-gateway/ # LoRaWAN Gateway backend services
│ └── luci-lorawan-gateway/ # LuCI Web interface extensions
│ ├── luci-app-gateway/ # Main gateway configuration app
│ ├── luci-app-lora/ # LoRa status display
│ ├── luci-app-lte/ # LTE configuration
│ ├── luci-app-ups/ # UPS power management
│ ├── luci-app-rs485/ # RS485 configuration
│ ├── luci-app-terminal/ # Web terminal
│ ├── luci-app-ota/ # OTA upgrade
│ ├── luci-app-multiwan/ # Multi WAN configuration
│ ├── luci-app-routing/ # Routing configuration
│ └── luci-theme-sensecap/ # SenseCap theme
├── openwrt/ # OpenWrt source (downloaded during build)
└── README.md # This document
- OS: Ubuntu/Debian Linux
- Disk Space: > 50GB recommended
- Memory: > 8GB recommended
sudo apt-get update
sudo apt-get install build-essential clang flex bison g++ gawk \
gcc-multilib g++-multilib gettext git libncurses5-dev \
libssl-dev rsync unzip zlib1g-dev file wgetgit submodule update --init --recursivegit clone https://github.com/openwrt/openwrt.git -b openwrt-24.10
cd openwrt
rm -r feeds.conf.default
cp ../feeds.conf.default feeds.conf.default./scripts/feeds update -a
./scripts/feeds install -acp ../.config .config
make defconfigsed -i 's/--set=llvm.download-ci-llvm=true/--set=llvm.download-ci-llvm=false/' \
feeds/packages/lang/rust/Makefileunset CI GITHUB_ACTIONS CONTINUOUS_INTEGRATION
make -j$(nproc)After completion, the firmware is located at:
openwrt/bin/targets/armsr/armv8/openwrt-armsr-armv8-generic-rootfs.tar.gz
To customize the firmware (e.g., add packages, modify kernel settings), run menuconfig in the openwrt directory:
cd openwrt
make menuconfigThe firmware is deployed to the device via LXC container:
sudo lxc-stop -n SenseCAPsudo rm -rf /var/lib/lxc/SenseCAP/rootfs
sudo mkdir -p /var/lib/lxc/SenseCAP/rootfssudo tar -xzf /path/to/openwrt-armsr-armv8-generic-rootfs.tar.gz \
-C /var/lib/lxc/SenseCAP/rootfssudo lxc-start -n SenseCAPsudo lxc-attach -n SenseCAP- Config File:
/etc/config/lora_pkt_fwd - Service:
lorawan_gateway - UI: LuCI Gateway app
- Target: seeed-gateway
- Service:
chirpstack-concentratord
- Config:
/etc/config/network - Firewall: LTE and WWAN networks have firewall rules added
- Supports multiple WAN configurations including LTE and Ethernet
- Load balancing and failover capabilities
From host machine:
sudo lxc-attach -n SenseCAP# LoRa packet forwarder logs
logread | grep lora
# System logs
logreadAccess http://[IP_ADDRESS]/cgi-bin/luci for:
- Status Overview: LoRa status, network connections, packet statistics
- Services: LoRa, network and other configurations
| Feed | Description |
|---|---|
| packages | OpenWrt official packages (openwrt-24.10) |
| luci | OpenWrt LuCI Web interface (openwrt-24.10) |
| routing | Routing related packages (openwrt-24.10) |
| chirpstack | Local link - ChirpStack integration |
| lorawan_gateway | Local link - LoRaWAN gateway services |
| luci_lorawan_gateway | Local link - Gateway LuCI interface |
Problem: Errors during compilation Solution:
- Check disk space (recommend > 50GB)
- Ensure submodules are updated:
git submodule update --init --recursive - Rust compilation is slow, disable CI LLVM download to speed up
Problem: Cannot access web interface after container starts Solution:
- Check LXC container status:
sudo lxc-ls -f - View container logs:
sudo lxc-info -n SenseCAP - Verify network configuration is correct
Problem: No data on LoRa status page Solution:
- Check concentrator service status
- View logs:
logread | grep -i lora - Verify gateway configuration is correct
This project follows the OpenWrt project license requirements.
Issues and Pull Requests are welcome!
