SenseCAP M2: LoRaWAN Mesh Networking with ChirpStack
Mesh Networking Basics
The SenseCAP M2 can run ChirpStack Gateway OS - an OpenWrt-based embedded operating system for LoRa gateways. The gateway ships with SenseCAP's factory firmware by default, but you can flash ChirpStack Gateway OS to enable mesh networking capabilities through the included ChirpStack Gateway Mesh component. This allows you to deploy relay gateways that extend LoRaWAN coverage without requiring internet connectivity at every gateway location.
What makes this useful: Solar-powered relay gateways in remote locations forward packets to internet-connected border gateways. No cellular backhaul needed. No monthly connectivity fees. Just LoRa-to-LoRa relaying.
Hardware: SenseCAP M2 Multi-Platform Gateway
Core specs:
- MT7628 processor
- Semtech SX1302 baseband chip (latest generation concentrator)
- 3dBi antenna (upgradeable to higher gain)
- PoE support (Power over Ethernet - single cable for power and data, simplifies installations)
- Optional 4G cellular backhaul
- Ethernet + WiFi connectivity
Perfect as border gateway: The SenseCAP M2 excels as a border gateway (internet-connected hub) in mesh networks. PoE support means clean installations with a single Ethernet cable providing both network connectivity and power - no separate power supply needed. Mount it anywhere with Ethernet access and it handles all the mesh coordination.
Frequency support:
- EU868, US915, AS923, IN865
- All standard LoRaWAN frequency plans
Why this gateway: ChirpStack Gateway OS v4.7.0+ officially supports the SenseCAP M2. Flashing is straightforward through the web interface. Hardware is affordable (compared to industrial gateways) while maintaining decent build quality.
ChirpStack Gateway Mesh: How It Works
ChirpStack Gateway Mesh extends LoRaWAN coverage by adding relay gateways without internet connections. These relays forward uplink and downlink packets between end-devices and border gateways.
Network Architecture
Border Gateway:
- Internet-connected gateway running ChirpStack Gateway OS
- Handles mesh protocol encapsulation/de-encapsulation
- Forwards LoRaWAN packets to network server (ChirpStack)
- Acts as mesh network termination point
- SenseCAP M2 is ideal for this role: PoE-powered, easy installation, reliable backhaul
Relay Gateway:
- No internet connection required
- Solar-powered or battery-powered
- Relays packets between end-devices and border gateway (or other relays)
- Runs ChirpStack Gateway Mesh component
Multi-hop support: Up to 8 hops between end-device and border gateway. Each relay increments hop count and recalculates message integrity code (MIC).
How Packets Flow
Uplink path:
- End-device transmits LoRaWAN packet
- Relay gateway receives packet
- Relay encapsulates packet with mesh protocol (adds 14-byte overhead)
- Relay forwards to next hop (another relay or border gateway)
- Border gateway de-encapsulates and forwards to ChirpStack network server
Downlink path: Reverse of uplink. Network server sends downlink to border gateway, which encapsulates and forwards through relay chain to end-device.
Security
AES128 key shared across all mesh gateways. Each packet includes message integrity code (MIC) for validation. Relays and border gateways must be configured with same key to participate in mesh.
No End-Device Changes Required
ChirpStack Gateway Mesh operates at gateway level. End-devices use standard LoRaWAN protocol - they don't know relays exist. This means existing LoRaWAN devices work without firmware changes.
ChirpStack Gateway OS on SenseCAP M2
ChirpStack Gateway OS v4.7.0+ includes:
- ChirpStack v4.11.1
- ChirpStack Concentratord v4.4.7
- ChirpStack Gateway Mesh v4.0.1
- OpenWrt v24.10.0
- LuCI web interface for configuration
Installation Process
1. Download firmware: Get ChirpStack Gateway OS image for SenseCAP M2 from chirpstack.io downloads page.
2. Flash via web interface:
- Access SenseCAP M2 web interface (default IP via DHCP or 192.168.168.1)
- Navigate to System > Backup/Flash Firmware
- Upload ChirpStack Gateway OS image
- Important: Deselect "Keep settings and retain current configuration"
- Click Continue and wait for reboot (takes 5-10 minutes)
3. Initial configuration:
- Access gateway via SSH or web interface
- Configure as Border Gateway (internet-connected) or Relay Gateway (no backhaul)
- Set mesh AES128 key (same across all gateways in mesh)
- Configure frequency plan and region
- Set network server details (for border gateways)
Note: Once flashed with ChirpStack Gateway OS, you cannot revert to original SenseCAP firmware. Backup configuration if needed before flashing.
Use Cases
Remote Agricultural Monitoring
Deploy border gateway at main building with internet. Place relay gateways across fields powered by solar panels. End-devices (soil moisture, weather stations) connect to nearest relay. Packets hop back to border gateway.
Why this works: Running Ethernet or cellular to every gateway location is expensive. Solar-powered relays cost less and eliminate monthly connectivity fees.
Industrial Sites with Coverage Gaps
Metal buildings block LoRa signals. Place relay gateways inside buildings to forward packets from indoor sensors to outdoor border gateway.
Range improvement: Instead of trying to penetrate metal walls at SF12 (slow data rate, high battery drain), devices use SF7 to nearby relay. Relay-to-border gateway link uses SF12 for long range.
Urban Network Extensions
Border gateway on building rooftop covers downtown area. Add relay gateways in coverage gaps (underground parking, subway stations, dense urban canyons).
Benefits: Relay gateways don't need network connectivity. Mount wherever signal is weak, power via PoE or solar.
Configuration Examples
Border Gateway (Internet-Connected)
[mesh]
enabled=true
signing_key="your-aes128-key-here"
[mesh.border_gateway]
enabled=true
Network server address configured to point at ChirpStack instance (self-hosted or cloud).
Relay Gateway (No Internet)
[mesh]
enabled=true
signing_key="your-aes128-key-here"
[mesh.relay]
enabled=true
No network server configuration needed. Relay only forwards packets between LoRa interfaces.
Multi-Region Support
ChirpStack Gateway Mesh supports AS923 and IN865 regions as of v4.7.0, in addition to EU868, US915, and other standard LoRaWAN bands.
Performance Considerations
Latency: Each relay hop adds latency (typically 1-2 seconds per hop due to LoRa air time). For applications requiring fast response times, limit hops.
Packet Overhead: Mesh encapsulation adds 14 bytes per uplink packet. Consider payload size limits (LoRaWAN max payload varies by spreading factor and region).
Relay Placement: Relay gateways need line-of-sight or near-line-of-sight to next hop. Test coverage before permanent installation.
Power Consumption: Relay gateways use 5-8W typical. Solar panel sizing: 20-30W panel with 50-100Ah battery for 24/7 operation in most climates.
Comparison to Alternatives
Cellular backhaul:
- Cost: Monthly data fees per gateway vs one-time relay gateway cost
- Coverage: Requires cellular signal vs LoRa-only relay
- Power: Higher power consumption (15-25W with 4G modem) vs 5-8W relay
LoRaWAN repeaters (proprietary):
- Vendor lock-in vs open-source ChirpStack
- Limited multi-hop support vs 8-hop ChirpStack capability
- Higher cost vs commodity hardware with open firmware
Point-to-point backhaul (WiFi, microwave):
- Complex setup vs simple LoRa relay
- Aiming requirements vs omnidirectional LoRa
- Higher cost vs $200-300 relay gateway
Limitations
Not a replacement for internet gateways: Border gateways still need internet connectivity. Mesh extends coverage, doesn't eliminate need for backhaul entirely.
Hop limit: 8 hops maximum. For very large deployments, plan multiple border gateways instead of long relay chains.
No traffic prioritization: All packets treated equally. High-traffic deployments may see congestion at relay gateways.
Regional frequency regulations: Duty cycle limits still apply. EU868 has 1% duty cycle on most channels. Heavy relay traffic can hit limits.
What We Provide
Services:
- Gateway mesh network design and topology planning
- ChirpStack Gateway OS installation and configuration
- Relay gateway placement optimization based on terrain and coverage requirements
- Solar power system sizing for relay gateways
- Network performance testing and troubleshooting
- ChirpStack server setup and integration
- Security configuration (mesh keys, network server authentication)
You own everything:
- Complete source code for any custom integrations
- Self-hosted ChirpStack infrastructure (or cloud if preferred)
- All configuration files and documentation
- Gateway hardware (you source directly from Seeed or distributors)
- No monthly fees beyond internet connectivity
Hardware recommendations:
- SenseCAP M2 gateways (border and relay roles)
- Solar panels and battery systems for relay gateways
- Outdoor enclosures and mounting hardware
- Higher-gain antennas if needed for specific links
We don't sell hardware. We specify what you need, help you source it, and configure the open-source software to build a reliable mesh LoRaWAN network.
Open Source Advantages
ChirpStack Gateway OS is fully open source. You can:
- Inspect all code running on gateways
- Modify firmware for specific requirements
- No vendor lock-in or forced upgrades
- Community-supported with active development
- No per-gateway licensing fees
SenseCAP M2 hardware supports open-source firmware officially. Seeed maintains compatibility with ChirpStack Gateway OS releases.
This combination gives you full control: open hardware platform running open-source software, deployed in mesh topology that eliminates recurring backhaul costs.
Ready to Get Started?
Get expert guidance on implementing LoRaWAN solutions for your organization.
Contact Us