Transform your Raspberry Pi 4B/5 + RAK 6421 WisMesh Pi HAT + RAK Wisblock sensors into a Meshtastic-powered environment monitoring station with real-time visualization.
- 📖 What This Guide Provides
- 1. Hardware Preparation
- 2. Software Preparation
- 3. Quick Start - Use Meshtastic Web Client ⭐ Start here!
- 4. Advanced Setup - Add Visualization Dashboard
- 5. Post-Installation Configuration
- 6. Verify Installation
- 7. Troubleshooting
🚀 Quick Start (Recommended for Beginners)
- Use Meshtastic web client directly - no installation needed
- Standard firmware includes meshtasticd service pre-installed
- Basic LoRa messaging and sensor data ready to use
- Perfect for users who just want to get started quickly
📊 Advanced Setup (Optional - For Visualization)
- Add Grafana dashboard for real-time monitoring
- Historical data storage with InfluxDB
- MQTT integration for automation
- Choose between one-command or step-by-step installation
When using the full monitoring stack, you will get:
- Environment telemetry collection (temperature, humidity, pressure, air quality)
- GPS location services
- Real-time Grafana dashboards
- MQTT integration for automation
- Historical storage in InfluxDB
When you add the visualization stack, data flows through this chain:
Sensors -> meshtasticd -> MQTT (Mosquitto) -> Node-RED -> InfluxDB -> Grafana
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ RAK1906/1901 │────▶│ meshtasticd │────▶│ Mosquitto │
│ Environment │ I2C │ Daemon │MQTT │ MQTT Broker │
│ Sensors │ │ (Pre-installed)│ │ Port 1883 │
└─────────────────┘ └─────────────────┘ └────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Grafana │◀────│ InfluxDB │◀────│ Node-RED │
│ Visualization │Query│ Time-series DB │Write│ JSON Parser │
│ Port 3000 │ │ Port 8086 │ │ Port 1880 │
└─────────────────┘ └─────────────────┘ └─────────────────┘
The RAK6421 WisMesh Pi HAT is the hardware integration layer for Raspberry Pi Meshtastic nodes:
- Hardware layer: connects Pi GPIO to LoRa radio module and I2C sensors
- Software layer: works with
meshtasticdon Linux - Gateway layer: can forward telemetry into MQTT/Node-RED/InfluxDB/Grafana
To assemble the board on top of Raspberry Pi:
- Mount modules/sensors to the HAT first and secure with screws
- Keep host powered off and unplugged during assembly
- Use spacers to keep proper distance/alignment between boards
The RAK6421 WisBlock Pi HAT provides 2 IO slots and 4 sensor slots:
- IO Slots (1 & 2): LoRa radio modules such as RAK13300 or RAK13302
- Sensor Slot A: larger slot for RAK12501 GNSS module
- Sensor Slots B/C/D: environmental sensors such as RAK1901, RAK1906
Note: Slot pin layouts differ. See the RAK6421 WisBlock Pi HAT Datasheet.
Compatibility note: This document targets meshtasticd 2.7.20. The following WisBlock modules have been tested and work with meshtasticd (as of version 2.7.20). We will update this list as new versions are released:
| RAK Name | Chip / Component | slot | Measures | Status |
|---|---|---|---|---|
| RAK13300 | Semtech SX1262 | IO slots (1 &2) | LoRa module | Yes |
| RAK13302 | Semtech SX1262, SKY66122 signal booster | IO slots (1 &2) | LoRa module | Yes |
| RAK12002 | Micro Crystal RV-3028-C7 | Sensor slot B/C/D | RTC | Yes |
| RAK12003 | Melexis MLX90632 | Sensor slot B/C/D | IR Temperature | Yes |
| RAK12019 | Lite On LTR-390UV-01 | Sensor slot B/C/D | UV sensor | Yes |
| RAK12020 | AMS TSL25911FN | Sensor slot B/C/D | Ambient light | Yes |
| RAK12037 | Sensirion SCD30 | IO slot 1 only | CO2 | PR ongoing |
| RAK12501 | Quectel L76K | Sensor slot A | GNSS GPS Location | Yes |
| RAK1902 | STMicro LPS22HB | Sensor slot B/C/D | Barometric Pressure | Yes |
| RAK1901 | Sensirion SHTC3 | Sensor slot B/C/D | Temp, Humidity | Yes |
| RAK1906 | BME680 | Sensor slot B/C/D | Temperature, Humidity, Pressure, VOC gas sensing | Yes |
RAK6421 includes onboard EEPROM so meshtasticd can auto-detect board info.
If you use your own Raspberry Pi image, ensure EEPROM detection is enabled in /boot/firmware/config.txt:
# Enable I2C-0 bus for HAT EEPROM
dtparam=i2c_vc=on
dtoverlay=i2c0A reboot is required. If you use the RAKwireless-provided image, this is already configured, you can ignore this.
| Requirement | Details |
|---|---|
| Hardware | Raspberry Pi 4 or Raspberry Pi 5 |
| Raspberry Pi Image | See Firmware options below |
| Hat | RAK6421 WisMesh Pi HAT |
| Sensors and radio module | Sensor modules( e.g., RAK1906, RAK1901) + LoRa radio module(e.g., RAK13300, RAK13302) |
🎯 Recommended: RAKwireless Official Image (Ready to Use)
Use the dedicated Meshtastic firmware from RAKwireless, which includes:
- meshtasticd pre-installed and configured
- Ready for RAK6421 HAT
- Optimized for Raspberry Pi 4/5
- Based on pi-gen
💡 This is the easiest option - flash the image, boot, and start using Meshtastic immediately via web client.
Alternative Options (For Advanced Users)
| Option | Description |
|---|---|
| Meshtastic Linux docs | Follow the Meshtasticd Linux installation to install meshtasticd on your preferred distro (e.g. Raspberry Pi OS). You manage the base system yourself. |
| mPWRD OS (Armbian) | Build a custom Armbian image with Meshtastic integration using mPWRD-userpatches (Armbian + Meshtastic). Use config-raspberry-pi-64bit.conf for Raspberry Pi. |
✅ The standard RAKwireless firmware includes meshtasticd service - it's already running when you boot!
Before You Start:
- Flash the Meshtastic firmware from RAKwireless to your SD card
- Assemble the RAK6421 HAT with LoRa radio (RAK13300/RAK13302) and sensors
- Important: Connect the antenna to the LoRa radio before powering on
- Insert SD card, power on your Raspberry Pi
Step 1: Find Your Pi's IP Address
Check your router's DHCP client list, or connect a monitor/keyboard to the Pi and run:
hostname -IStep 2: Open Meshtastic Web Client
From any device on the same network, open: https://<Pi-IP>:9443
Example: https://192.168.1.100:9443
Step 3: Connect to Your Node
-
Click "+ New Connection"
-
Select HTTP, enter
<Pi-IP>:9443, then click Connect -
Go to Config -> Radio Config -> LoRa to verify and configure settings
Step 4: Start Using Meshtastic!
You can now:
- Configure your node name and settings
- Join mesh networks
- Send messages
- View sensor data in the Messages tab
- Configure telemetry intervals
Download the Meshtastic app on iOS or Android, then connect using the Pi's IP address (ensure phone and Pi are on the same local network).
SSH into your Pi and use the meshtastic python cli, for example:
meshtastic --info🎉 You're Done! Your Meshtastic node is fully functional.
Want Advanced Visualization?
- If you're happy with the web client, you can stop here
- If you want Grafana dashboards, historical data, and MQTT integration, continue to Section 4 below
⚠️ This section is optional - only follow these steps if you want Grafana dashboards and historical data storage.
The basic Meshtastic web client shows current data, but if you want:
- Real-time dashboards with graphs and charts
- Historical data stored in a database
- MQTT integration for automation
- Multi-node visualization on one dashboard
...then continue with this advanced setup.
First, clone this repository to get the installation scripts:
git clone https://github.com/RAKWireless/meshtastic-rak6421-guide.git
cd meshtastic-rak6421-guideOption A: One-Command Installation (Recommended) → Jump to instructions
Option B: Step-by-Step Installation (For Advanced Users) → Jump to instructions
Both methods install the same components. After installation, continue with Post-Installation Configuration.
The fastest way to add visualization is to run the complete installation script:
cd setup/scripts
./install-all.shThis script installs all components in the correct order and takes approximately 20-30 minutes (depending on your network speed).
What Gets Installed:
- Mosquitto MQTT Broker (for message routing)
- Configure telemetry settings
- InfluxDB (time-series database)
- Node-RED (data processing)
- Grafana (visualization dashboard)
Tip: Before running the installation, you can customize credentials in
setup/config/credentials.env
# InfluxDB Configuration
INFLUXDB_USERNAME="admin"
INFLUXDB_PASSWORD="your_secure_password"
INFLUXDB_ORG="meshtastic"
INFLUXDB_BUCKET="meshtastic"
# Grafana Configuration
GRAFANA_ADMIN_USER="admin"
GRAFANA_ADMIN_PASSWORD="your_secure_password"After installation completes, skip to Section 5: Post-Installation Configuration.
If you prefer to install components individually or need more control, follow these steps.
Before running any scripts, ensure you're in the scripts directory:
cd setup/scriptsEach script can be run independently. The scripts install their own dependencies, so you can run any step by itself if needed.
./01-configure-serial.shThis configures the serial port for the Meshtastic GPS module (UART enabled, serial console disabled) and also updates /etc/meshtasticd/config.yaml by uncommenting common required lines (only if they are currently commented), including:
GPS.SerialPath: The script automatically detects your Raspberry Pi version and sets the correct device:- Raspberry Pi 5:
/dev/ttyAMA0 - Raspberry Pi 4:
/dev/ttyS0
- Raspberry Pi 5:
I2C.I2CDevice: /dev/i2c-1Webserver.Port: 9443
A reboot is required for changes to take effect.
Important for Manual Configuration: If you prefer to edit
/etc/meshtasticd/config.yamlmanually instead of running this script, note that the GPS serial path differs between Raspberry Pi models:
- Raspberry Pi 5: Use
SerialPath: /dev/ttyAMA0- Raspberry Pi 4: Use
SerialPath: /dev/ttyS0
If you'd rather make these edits yourself, see config.yaml in this repository for an example configuration.
./02-install-mosquitto.shThe MQTT broker receives messages from meshtasticd on port 1883.
Note: Install the MQTT broker first before configuring telemetry settings. The Meshtastic device needs a working MQTT broker connection to successfully apply MQTT-related configurations.
./03-configure-telemetry.shThis script will use the Meshtastic Python CLI to configure:
- Environment telemetry (sensor data collection)
- GPS/position mode and broadcast settings
- MQTT: enabled, broker address (default
localhost), JSON output enabled - Channel 0 uplink enabled (required for MQTT publishing)
Important: Before running this script, ensure your MQTT broker is running and accessible. The script will configure MQTT settings on your Meshtastic device, which requires a working MQTT connection. If you use a remote MQTT broker instead of the local one from Step 2, edit the script to set the correct MQTT address, or configure it manually as described below.
If you configure manually (via the Meshtastic web client, mobile app, or Python CLI instead of this script), you must enable the same options:
- MQTT: enable MQTT, set the broker address (e.g.
localhostor your remote broker), enable JSON packets - Channel 0: enable uplink for the primary channel (e.g. with the CLI:
meshtastic --ch-set uplink_enabled true --ch-index 0) - Telemetry: enable environment measurement and set update interval as needed
- Position: set GPS mode and position broadcast options as needed
./04-install-influxdb.shThis script installs InfluxDB as a system service, creates the organization and bucket for Meshtastic data, and configures the admin account. Node-RED will write telemetry to this database; Grafana will read from it.
Default configuration:
| Setting | Value |
|---|---|
| Username | admin |
| Password | meshtastic |
| Organization | meshtastic |
| Bucket | meshtastic |
Note: You can customize these in
config/credentials.envbefore installation.
./05-install-nodered.shThis script installs Node.js (20 LTS) and Node-RED using the official installer, applies the project's custom settings.js, and enables the Node-RED system service. After installation you will configure the InfluxDB token in Node-RED (see Section 5: Post-Installation Configuration).
Important: This step takes 20-30 minutes on slower Pi models.
./06-install-grafana.shThis script adds the Grafana APT repository, installs Grafana, enables the service, and provisions the InfluxDB data source. A pre-configured dashboard is deployed so you can view Meshtastic data without manual setup: it displays environment telemetry (temperature, humidity, pressure, air quality / IAQ, light and UV) and GPS/position (satellite count, PDOP, track, and map). After installation, open Dashboards → Meshtastic → Meshtastic Environment Monitor in Grafana. The dashboard definition is in setup/grafana/dashboard.json if you want to customize or inspect it.
Default configuration:
| Setting | Value |
|---|---|
| Admin user | admin |
| Admin password | admin |
Note: You can customize these in
config/credentials.envbefore installation.
After installation, you need to configure the InfluxDB token in Node-RED:
1. Get the token:
./show-token.sh2. Open Node-RED at http://<Pi-IP>:1880 (from any device on your LAN)
3. Double-click the "Write to InfluxDB" node:
4. Click the pencil icon next to "Local InfluxDB" and paste the token:
5. Click "Update", then "Done", then click "Deploy":
rak@rakpios:~/setup/scripts $ ./check-services.sh
==========================================
Meshtastic Monitoring System Service Status
==========================================
--- Meshtastic Daemon ---
✓ meshtasticd is running
--- MQTT Broker ---
✓ Mosquitto is running
URL: http://<Pi-IP>:1883
--- Node-RED ---
✓ Node-RED is running
URL: http://<Pi-IP>:1880
--- InfluxDB ---
✓ InfluxDB is running
URL: http://<Pi-IP>:8086
--- Grafana ---
✓ Grafana is running
URL: http://<Pi-IP>:3000
==========================================
MQTT Test
==========================================
mosquitto_sub not installed, skipping MQTT test
==========================================
Port Listening Status
==========================================
MQTT (1883):
LISTEN 0 100 0.0.0.0:1883 0.0.0.0:*
Node-RED (1880):
LISTEN 0 511 0.0.0.0:1880 0.0.0.0:* users:(("node-red",pid=2839,fd=19))
InfluxDB (8086):
LISTEN 0 4096 *:8086 *:*
Grafana (3000):
LISTEN 0 4096 *:3000 *:*
==========================================
Quick Access Links
==========================================
Node-RED: http://10.2.13.62:1880
InfluxDB: http://10.2.13.62:8086
Grafana: http://10.2.13.62:3000Access these services from any device on your LAN using http://<Pi-IP>:<port>, where <Pi-IP> is your Raspberry Pi's IP address.
| Service | URL | Default Login |
|---|---|---|
| Node-RED | http://<Pi-IP>:1880 |
- |
| InfluxDB | http://<Pi-IP>:8086 |
admin / meshtastic |
| Grafana | http://<Pi-IP>:3000 |
admin / admin |
- Open Grafana at
http://<Pi-IP>:3000 - Login with admin / admin
- Navigate to Dashboards → Meshtastic folder
- Click Meshtastic Environment Monitor
-
Check if meshtasticd is running:
systemctl status meshtasticd
-
Verify MQTT is enabled:
meshtastic --get mqtt.enabled
-
Test MQTT subscription (run on the Pi or from another machine on the LAN):
mosquitto_sub -h <Pi-IP> -t 'msh/#' -v
-
Verify InfluxDB is running:
systemctl status influxdb
-
Check the token is correct in Node-RED
-
Verify organization name matches (default: "meshtastic")
-
Check data source configuration:
- Go to Connections → Data Sources → InfluxDB
- Click Save & Test
-
Verify data is being written:
-
Check Node-RED debug output for errors
-
Check sensor connection:
i2cdetect -y 1
Should show address 0x76 for RAK1906(BME680)and 0x70 for RAK1901(SHTC3)
-
View meshtasticd logs:
journalctl -u meshtasticd -f
Use minicom to check whether the GPS is outputting NMEA data on the serial port (install minicom if needed):
-
Install minicom:
sudo apt-get install -y minicom
-
Connect to the GPS serial device at 9600 baud. Use the device that matches your Pi and setup:
- Raspberry Pi 4:
/dev/ttyS0 - Raspberry Pi 5:
/dev/ttyAMA0
sudo minicom -D /dev/ttyS0 -b 9600
Replace
/dev/ttyS0with/dev/ttyAMA0as appropriate. - Raspberry Pi 4:
-
You should see NMEA sentences (lines starting with
$GP...) if the GPS is working. Exit minicom with Ctrl+A, then Z (Opens the Help Screen),Q (quit), and finally Enter.
# Restart all services
sudo systemctl restart mosquitto nodered influxdb grafana-server
# View logs
journalctl -u meshtasticd -f
journalctl -u nodered -f
...
# Check status
setup/scripts/check-services.sh









