SenseCAP Gateway OS is a multi-protocol IoT gateway operating system designed for industrial indoor scenarios. It is based on OpenWrt and provides a standardized software foundation, covering three key capabilities: LoRaWAN gateway, industrial bus data acquisition, and building compliance reporting.
The system adopts an innovative lightweight architecture combining a Debian host with a single LXC container (OpenWrt). All business logic is encapsulated and runs within a single OpenWrt container, while the host system is responsible only for hardware abstraction and container management. This design achieves optimal resource utilization, strong security isolation, and operational flexibility.
English | 中文 | 日本語 | Français | Português | Español
- Features
- Recommended Hardware
- Capabilities & Roadmap
- Directory Structure
- Getting Started
- Deployment
- Function Modules
- Feeds Description
- FAQ
- Related Links
- License
- Contributing
- Minimal Host System: The Debian host retains only the kernel, LXC toolchain, hardware drivers, and UPS monitoring, without running any application-level services.
- Single-Container Architecture: All services (LoRaWAN services, networking, peripheral management, and web services) run within a single LXC container as native OpenWrt packages.
- Simplified Operations: The single-container design simplifies configuration management, upgrade rollback, and troubleshooting, reducing operational complexity.
Note: The diagram above only illustrates the software components running inside the LXC container (OpenWrt). The host system (Debian) layer — including the Linux kernel, hardware drivers, LXC runtime, UPS monitor, and user data storage — is shown separately at the top and is not part of the container image.
| Device | Link |
|---|---|
| reComputer R1225 LoRaWAN Gateway & Industrial Controller (US915-4G) | Get one |
| reComputer R1225 LoRaWAN Gateway & Industrial Controller (US915) | Get one |
| reComputer R1225 LoRaWAN Gateway & Industrial Controller (EU868-4G) | Get one |
| reComputer R1225 LoRaWAN Gateway & Industrial Controller (EU868) | Get one |
Wiki of reComputer R1225: https://wiki.seeedstudio.com/r1225_introduction/
SenseCAP Gateway OS is not only the dedicated system for R1225, but also a portable gateway software solution. It can be adapted to different hardware platforms, enabling partners to rapidly customize and extend the system.
🔜 What's next:
- Add BACnet protocol support for Web configuration
- Optimize Web configuration logic for serial ports and Modbus
- Add a 4G network watchdog service
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# 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
- 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, with load balancing and failover capabilities.
The reComputer R1225 is equipped with two physical Ethernet ports (ETH0 and ETH1). These two ports serve different roles based on the host-container architecture:
| Port | Role | Description |
|---|---|---|
| ETH0 | Container (LXC) interface | This interface is directly mapped (passthrough) from the hardware into the LXC container via the host's LXC network configuration. The OpenWrt container has full control over this interface, managing it as a standard WAN or LAN port. All application-level traffic (LoRaWAN uplink, MQTT, Web UI access, etc.) flows through this port. |
| ETH1 | Host (Debian) interface | This interface is managed by the Debian host system. It is used for host-level management tasks such as SSH access to the host, container management operations, firmware updates, and UPS monitoring communication. It remains isolated from the container network stack. |
This separation ensures that even if the container network is misconfigured or unreachable, the host management interface remains accessible for recovery and maintenance.
- Config Files:
/etc/config/rs485-module(serial, mqtt, protocol) - Services:
rs485-module,rs485-modbus - UI: LuCI RS485 app (Serial Settings, Protocol Settings, MQTT Settings, MQTT Log)
The RS485 module supports industrial protocols including Modbus RTU and BACnet MS/TP:
- Modbus RTU: Polling and parsing of Modbus registers via the RS485 serial interface, with data forwarded through MQTT uplink/downlink.
- BACnet MS/TP: BACnet protocol support over RS485 for building automation integration (Web configuration in progress).
This project uses three custom OpenWrt feeds. They are defined in feeds.conf.default and installed into the OpenWrt build system via ./scripts/feeds update && ./scripts/feeds install.
ChirpStack LoRaWAN ecosystem integration, including the network server, concentrator daemon, packet forwarders, and their LuCI frontends.
| Package | Description |
|---|---|
chirpstack |
ChirpStack LoRaWAN network server |
chirpstack-concentratord |
Concentrator packet-forwarder daemon (with per-hardware target builds) |
chirpstack-mqtt-forwarder |
MQTT-based packet forwarder (single / slot1 / slot2 / mesh variants) |
chirpstack-udp-forwarder |
UDP-based packet forwarder (single / slot1 / slot2 variants) |
chirpstack-gateway-mesh |
LoRaWAN mesh networking extension |
chirpstack-rest-api |
REST API service for ChirpStack |
lorawan-devices |
LoRaWAN device profiles and codec definitions |
node-red |
Node-RED visual automation platform |
libloragw-sx1301 / sx1302 / 2g4 |
Semtech LoRa HAL libraries |
luci-app-chirpstack-* |
LuCI web interfaces for all ChirpStack components |
luci-theme-argon |
Argon theme for LuCI |
Gateway hardware integration and backend system services.
| Package | Description |
|---|---|
lora |
LoRa radio stack service (Rust) |
packetforwarder |
LoRa packet forwarder |
chirpstack-concentratord-target-seeed-gateway |
Seeed gateway-specific concentrator build |
chirpstack-gateway-bridge |
ChirpStack gateway bridge (MQTT/UDP backend) |
basicstation_ubus |
Basic Station protocol with ubus RPC service |
lte-serve |
LTE cellular module management service |
rs485-module |
RS485 serial communication service (Rust) |
rs485-modbus |
RS485 Modbus protocol implementation (Rust) |
bacnet-stack |
BACnet protocol stack for building automation |
ups-module |
UPS power management service (Rust) |
hardware-info |
EEPROM reader for gateway SN, EUI, and hardware info |
ubus-serve |
ubus RPC service for system management |
wifi-module |
Auto WiFi configuration via USB drive detection |
LuCI web interface applications and theme for gateway management.
| Package | Description |
|---|---|
luci-app-gateway |
Main gateway system configuration |
luci-app-lora |
LoRa radio status and configuration |
luci-app-chirpstack-concentratord-target-seeed-gateway |
Seeed gateway concentrator configuration |
luci-app-lte |
LTE/4G cellular configuration |
luci-app-multiwan |
Multi-WAN failover and load balancing |
luci-app-routing |
Network routing configuration |
luci-app-rs485 |
RS485/Modbus interface configuration |
luci-app-bacnet |
BACnet protocol configuration |
luci-app-ups |
UPS power management |
luci-app-ota |
OTA firmware upgrade |
luci-app-terminal |
Web-based terminal console |
luci-theme-sensecap |
SenseCAP custom theme |
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!





