Overview
The lora_sx1276 node interfaces with Semtech SX1276/SX1278 LoRa transceivers
via the SPI bus for long-range, low-power wireless communication. Ideal for remote sensor networks, agricultural
monitoring, and IoT deployments where range exceeds WiFi and cellular coverage is unavailable.
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
| spiBus | number | No | 0 | SPI bus number |
| spiDevice | number | No | 0 | SPI chip select (CE0=0, CE1=1) |
| resetPin | number | No | 25 | GPIO pin for hardware reset |
| dio0Pin | number | No | 22 | GPIO pin for DIO0 interrupt (TX/RX done) |
| frequency | select | No | "915" | Frequency band in MHz: "433", "868", "915" |
| bandwidth | select | No | "125" | Signal bandwidth in kHz: "7.8" to "500" |
| spreadingFactor | select | No | "7" | Spreading factor: "6" to "12" (higher = longer range, slower) |
| codingRate | select | No | "5" | Coding rate denominator: "5" (4/5) to "8" (4/8) |
| txPower | number | No | 17 | Transmit power in dBm (2-20) |
| syncWord | string | No | "0x12" | Sync word: 0x12 (private), 0x34 (LoRaWAN) |
Inputs
{
"payload": "Hello from sensor node!",
"topic": "lora/tx"
} {
"payload": {
"data": [0x01, 0x02, 0x1A, 0x3C],
"destId": 2
}
} Outputs
{
"payload": "Hello from sensor node!",
"rssi": -65,
"snr": 9.5,
"frequencyError": 1250,
"packetSize": 22,
"timestamp": "2025-01-15T10:30:00.000Z"
} {
"payload": true,
"topic": "lora/tx/done",
"bytesSent": 22
} Wiring Diagram
SX1276 to Raspberry Pi
SX1276 Module Raspberry Pi +------------+ +------------+ | VCC (3.3V)|--------| 3.3V (Pin 1)| | GND |--------| GND (Pin 6)| | SCK (CLK) |--------| SCLK (Pin 23)| | MISO |--------| MISO (Pin 21)| | MOSI |--------| MOSI (Pin 19)| | NSS (CS) |--------| CE0 (Pin 24)| | RESET |--------| GPIO25(Pin 22)| | DIO0 |--------| GPIO22(Pin 15)| +------------+ +------------+
Wiring Notes
VCC must be 3.3V only (module is NOT 5V tolerant)
DIO0 triggers interrupt on TX/RX complete
RESET active-low hardware reset line
NSS chip select, active low
Warning: Match the antenna to your frequency band. Transmitting without an antenna can damage the module.
Example Use Cases
Remote Weather Station Gateway
Receive sensor data from remote LoRa nodes and publish to MQTT broker.
[
{
"id": "lora-rx",
"type": "lora_sx1276",
"frequency": "915",
"spreadingFactor": "10",
"bandwidth": "125",
"syncWord": "0x12"
},
{
"id": "parse-json",
"type": "json-parser"
},
{
"id": "mqtt-pub",
"type": "mqtt-out",
"topic": "sensors/weather/remote",
"broker": "localhost"
}
] Agricultural Soil Moisture Network
Transmit soil moisture readings from field nodes to a central gateway every 15 minutes.
[
{
"id": "soil-trigger",
"type": "inject",
"repeat": "900",
"payload": ""
},
{
"id": "read-adc",
"type": "ads1x15",
"channel": 0,
"gain": 1
},
{
"id": "format-packet",
"type": "function",
"name": "Format LoRa Packet"
},
{
"id": "lora-tx",
"type": "lora_sx1276",
"frequency": "915",
"spreadingFactor": "12",
"txPower": 20
}
] Common Use Cases
Remote Sensor Networks
Collect data from sensors spread across large areas
Asset Tracking
Track vehicles and equipment across campuses or farms
Smart Agriculture
Soil, weather, and crop monitoring over kilometers
Flood/Fire Alerting
Low-power environmental hazard detection and alerts