Project: LoRaWAN Sensor Network - Native STM32WL integrated radio Hardware: 2x NUCLEO-WL55JC1 + RAK7268V2 Gateway Network Server: RAK Built-in LoRa Server (AU915) Status: ✅ COMPLETE - Both nodes operational, Grafana dashboard live
Week 10 implements a production LoRaWAN sensor network using STM32WL55 microcontrollers with native SubGHz radio. The system includes a complete data pipeline from sensors to Grafana visualization.
┌─────────────────────────────────────────────────────────────────────────┐
│ LORAWAN SENSOR NETWORK │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────────────┐ ┌──────────────────────┐ │
│ │ LoRa-1 │ │ LoRa-2 │ │
│ │ STM32WL55JC1 │ │ STM32WL55JC1 │ │
│ │ SHT41 (Temp/Hum) │ │ BME680 (Env Sensor) │ │
│ │ SSD1306 OLED 128x32 │ │ SH1106 OLED 128x64 │ │
│ │ DevEUI: 23ce1b... │ │ DevEUI: 24ce1b... │ │
│ └──────────┬───────────┘ └──────────┬───────────┘ │
│ │ │ │
│ │ LoRaWAN AU915 │ │
│ │ (915.2-916.6 MHz) │ │
│ └────────────────┬────────────────┘ │
│ │ │
│ ▼ │
│ ┌──────────────────────┐ │
│ │ RAK7268V2 Gateway │ │
│ │ Built-in LoRa Server │ │
│ │ MQTT: 10.10.10.254 │ │
│ │ Application: "TOT" │ │
│ └──────────┬───────────┘ │
│ │ │
│ │ MQTT (TCP :1883) │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Docker Services │ │
│ │ ┌─────────────────┐ ┌─────────────┐ ┌─────────────────────┐ │ │
│ │ │ wk10-mqtt-bridge│─▶│ wk7-influxdb│─▶│ wk7-grafana │ │ │
│ │ │ Python decoder │ │ Time-series │ │ Dashboard │ │ │
│ │ │ │ │ :8086 │ │ :3000 │ │ │
│ │ └─────────────────┘ └─────────────┘ └─────────────────────┘ │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────┘
| Component | Specification |
|---|---|
| MCU | STM32WL55JC1 (Probe: 003E00463234510A33353533) |
| Sensor | SHT41 (I2C 0x44) - High-precision temp/humidity |
| Display | SSD1306 OLED 128x32 (I2C 0x3C) |
| I2C Bus | I2C2: PA12 (SCL), PA11 (SDA) |
| Radio | Integrated SubGHz SX126x |
| DevEUI | 23ce1bfeff091fac |
| Payload | 4 bytes (temp + humidity) |
Current Readings: ~31°C, 58% RH Uplink Interval: ~30 seconds
| Component | Specification |
|---|---|
| MCU | STM32WL55JC1 (Probe: 0026003A3234510A33353533) |
| Sensor | BME680 (I2C 0x76) - Temp/Hum/Pressure/Gas |
| Display | SH1106 OLED 128x64 (I2C 0x3C) |
| I2C Bus | I2C2: PA12 (SCL), PA11 (SDA) |
| Radio | Integrated SubGHz SX126x |
| DevEUI | 24ce1bfeff091fac |
| Payload | 12 bytes (temp + humidity + pressure + gas + padding) |
Current Readings: ~28°C, 60% RH, 1020 hPa, 134 kOhm gas resistance Uplink Interval: ~30 seconds
| Parameter | Value |
|---|---|
| Gateway EUI | ac1f09fffe1bce23 |
| IP Address | 10.10.10.254 |
| Region | AU915 Sub-band 2 (915.2-916.6 MHz) |
| Network Server | Built-in LoRa Server (NOT ChirpStack) |
| MQTT Broker | 10.10.10.254:1883 (no auth) |
| Application | "TOT" |
Sensor → STM32WL55 → LoRaWAN → RAK Gateway → MQTT → Python Bridge → InfluxDB → Grafana
-
MQTT Bridge (mqtt_to_influx.py)
- Subscribes to gateway MQTT (10.10.10.254:1883)
- Decodes Base64 LoRaWAN payloads
- Writes to InfluxDB with tags (node, sensor, dev_eui)
-
InfluxDB (wk7-influxdb container)
- Bucket:
lorawan - Measurement:
lorawan_sensor - Fields: temperature, humidity, pressure, gas_resistance, rssi, snr
- Bucket:
-
Grafana Dashboard (wk7-grafana container)
- URL: http://localhost:3000/d/lorawan-sensors/lorawan-sensor-network
- 10 panels: Temperature, Humidity, Pressure, Gas, RSSI, SNR, Stats
# Install probe-rs
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/probe-rs/probe-rs/releases/latest/download/probe-rs-tools-installer.sh | sh
# Add Rust embedded target
rustup target add thumbv7em-none-eabihfLoRa-1:
cd firmware/lora-1
cargo run --releaseLoRa-2:
cd firmware/lora-2
cargo run --releaseprobe-rs attach --chip STM32WL55JCIx# Start Week 7 services (InfluxDB + Grafana)
cd ~/dev/4-month-plan/wk7-mqtt-influx
docker compose up -d
# Start MQTT bridge
cd ~/dev/4-month-plan/wk10-lorawan
docker compose up -d# Check MQTT bridge logs
docker logs -f wk10-mqtt-bridge
# Expected output:
# [10:05:15] lora1: Temp=31.0C Hum=58.0% RSSI=-13 SNR=13.2 -> InfluxDB: OK
# [10:05:51] lora2: Temp=28.0C Hum=60.0% Press=1020.0hPa Gas=135kOhm RSSI=-17 SNR=12.0 -> InfluxDB: OK- Grafana: http://localhost:3000 (admin/admin)
- Dashboard: Dashboards → LoRaWAN Sensor Network
| Bytes | Type | Description | Decode |
|---|---|---|---|
| 0-1 | i16 BE | Temperature × 100 | value / 100 = °C |
| 2-3 | u16 BE | Humidity × 100 | value / 100 = % |
| Bytes | Type | Description | Decode |
|---|---|---|---|
| 0-1 | i16 BE | Temperature × 100 | value / 100 = °C |
| 2-3 | u16 BE | Humidity × 100 | value / 100 = % |
| 4-5 | u16 BE | Pressure × 10 | value / 10 = hPa |
| 6-7 | u16 BE | Gas Resistance | kOhm |
| 8-11 | - | Padding | (unused) |
# Decode a Base64 payload
python3 decode_payload.py CowZyA==
# Output: Temp: 27.00°C, Humidity: 66.00%Subscribe to gateway MQTT for debugging:
# All TOT application messages
mosquitto_sub -h 10.10.10.254 -t "application/TOT/device/#" -v
# LoRa-1 uplinks only
mosquitto_sub -h 10.10.10.254 -t "application/TOT/device/23ce1bfeff091fac/rx" -v
# LoRa-2 uplinks only
mosquitto_sub -h 10.10.10.254 -t "application/TOT/device/24ce1bfeff091fac/rx" -v
# Join events
mosquitto_sub -h 10.10.10.254 -t "application/TOT/device/+/join" -v| Document | Description |
|---|---|
| USERGUIDE.md | Complete setup and operation guide |
| HARDWARE_CONFIG.md | Detailed hardware specifications |
| LORAWAN_CREDENTIALS.md | Device credentials and EUIs |
| docs/rak7268v2-config.md | Gateway configuration |
| TROUBLESHOOTING_WL55.md | Common issues and solutions |
| CLAUDE.md | Development notes and constraints |
| NOTES.md | Technical learnings |
- RAK7268V2 deployed and configured (AU915 Sub-band 2)
- Built-in LoRa Server operational
- Application "TOT" created with OTAA credentials
- MQTT broker accessible at 10.10.10.254:1883
- STM32WL55 hardware integration
- SHT41 sensor reading (temperature, humidity)
- SSD1306 OLED display (TX count, readings, SNR/RSSI)
- LoRaWAN OTAA join
- Uplink transmission (~30 second interval)
- LED flash on transmission
- STM32WL55 hardware integration
- BME680 sensor reading (temp, humidity, pressure, gas)
- SH1106 OLED display (TX count, readings, SNR/RSSI)
- LoRaWAN OTAA join
- Uplink transmission (~30 second interval)
- LED flash on transmission
- Python MQTT bridge subscribing to gateway
- Payload decoding (both node formats)
- InfluxDB bucket and data writes
- Grafana datasource configured
- Dashboard with 10 panels
- USERGUIDE.md - Comprehensive deployment guide
- Hardware configuration documented
- Gateway configuration documented
- Troubleshooting guide
- LoRaWAN Byte Order: EUIs must be reversed (little-endian) in firmware
- No FPU: STM32WL55 requires integer-only math
- SHT41 Wake-up: Sensor needs measurement command before I2C scan
- MQTT 3.1 Protocol: RAK gateway requires older MQTT protocol version
- Peripheral Stealing: Embassy async pattern for I2C sharing
| Metric | Value |
|---|---|
| Join Time | ~7 seconds |
| Uplink Interval | ~30 seconds |
| LoRa-1 Payload | 4 bytes |
| LoRa-2 Payload | 12 bytes |
| Typical RSSI | -15 to -80 dBm |
| Typical SNR | -10 to +14 dB |
| End-to-End Latency | <2 seconds |
Status: ✅ Week 10 Complete Last Updated: 2026-01-09

