Connect your Raspberry Pi gateway to the worldwide MeshCore federation. Your field radios will reach any connected mesh on earth. Takes about 30 minutes from scratch.
Any of these combinations work. Pick what is available and affordable in your country.
| Item | Recommended | Also Works | Cost | |
|---|---|---|---|---|
| Raspberry Pi | Pi 4 (2GB or 4GB RAM) | Pi 3B+, Pi Zero 2W | ~$45-75 | REQUIRED |
| LoRa Radio | RAK4631 WisBlock + base | Waveshare SX1262 HAT, Heltec V3 | ~$25-40 | REQUIRED |
| Antenna | 5-8 dBi fibreglass omni | Stock whip antenna | ~$5-40 | REQUIRED |
| MicroSD Card | Samsung 32GB Endurance | Any Class 10 / A1, 16GB+ | ~$8-15 | REQUIRED |
| Power Supply | Official Pi USB-C PSU (3A) | Any 5V 3A USB-C | ~$10-15 | REQUIRED |
| Internet | Ethernet to router | Wi-Fi, 4G USB modem | existing | REQUIRED |
| UPS HAT | PiJuice HAT | Waveshare UPS HAT C | ~$25-45 | recommended |
| 4G Backup | Huawei E3372 USB dongle | Any USB 4G modem | ~$30-65 | optional |
Your radio must use the correct frequency for your country. Use this table to find your region code for the installer.
| Country / Region | Frequency | Installer flag |
|---|---|---|
| USA, Canada, Mexico, Brazil | 915 MHz | --region us |
| Philippines | 915 MHz | --region us |
| Europe, UK, Africa, Middle East | 868 MHz | --region eu868 |
| Australia, New Zealand | 917 MHz | --region au |
| India | 865 MHz | --region in |
| Japan | 920.6 MHz | --region jp |
| South Korea | 921.9 MHz | --region kr |
| China | 470 MHz | --region cn |
| Russia | 868.8 MHz | --region ru |
| SE Asia (Singapore, Thailand, Malaysia) | 923 MHz | --region sea |
| Taiwan | 922 MHz | --region tw |
Not sure? Check the TTN frequency table β
Download Raspberry Pi Imager from raspberrypi.com/software and install it on your computer.
Open Imager and make these exact selections:
meshcore-gwpiInsert MicroSD into Pi, connect Ethernet, connect power. Wait 90 seconds.
Find your Pi's IP address in your router's connected devices list, then SSH in from your computer:
# From Windows PowerShell, Mac Terminal, or Linux terminal ssh pi@192.168.1.xxx # use your Pi's actual IP # or try the hostname: ssh pi@meshcore-gw.local
Once logged in, update the system:
sudo apt update && sudo apt upgrade -y sudo reboot
Wait 60 seconds, then SSH back in β you are ready for the installer.
Register as a gateway operator. This gives you a JWT token that the installer uses to automatically register your gateway.
# Register via API (run on your computer β not the Pi) curl -X POST mesh.meshcorefederationnetwork.org/api/auth/register \ -H "Content-Type: application/json" \ -d '{ "username": "yourname", "email": "you@example.com", "password": "StrongPassword123", "display_name": "Your Name", "country": "US" }' # Response: { "token": "eyJhbGci...your-jwt-token-here...", "operator": {"id": "uuid", "username": "yourname"} } # Copy the token value β you need it in Step 4
Or log in if you already have an account:
curl -X POST mesh.meshcorefederationnetwork.org/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"yourname","password":"yourpassword"}'
Pick the reflector that best matches your location and use case. You can change this later at any time.
Selected: MESH-GLOBAL-01
SSH into your Pi and run:
# Download installer curl -L https://mesh.meshcorefederationnetwork.org/install.sh -o meshcore-all-in-one.sh chmod +x meshcore-all-in-one.sh # Or use wget: wget https://mesh.meshcorefederationnetwork.org/install.sh -O meshcore-all-in-one.sh chmod +x meshcore-all-in-one.sh
Replace the values below with your actual information, then run on your Pi:
sudo bash meshcore-all-in-one.sh \ --install gateway \ --lora-iface serial \ # or: spi (for GPIO HAT) --region us \ # your region code from Step 1 --site-name "MyGateway" \ # your gateway name --federation \ --fed-server "https://mesh.meshcorefederationnetwork.org" \ --fed-reflector "MESH-GLOBAL-01" \ # your chosen reflector --fed-location "City, Country" \ --fed-operator-token "eyJhbGci..." \ # your JWT token from Step 3 -y
sudo bash meshcore-all-in-one.sh
Just answer the questions β it handles everything.
The RAK4631 plugged into your Pi needs MeshCore Companion firmware:
On your Pi via SSH:
# Check all services sudo systemctl status meshcore-gateway sudo systemctl status meshcore-federation sudo systemctl status meshcore-roomserver sudo systemctl status mosquitto # All should show: active (running) in green
# Watch live federation logs sudo journalctl -u meshcore-federation -f # Should see: Federation Client starting Server : https://mesh.meshcorefederationnetwork.org Site : MyGateway Reflector: MESH-GLOBAL-01 Connected to federation server
Open your browser and go to:
https://mesh.meshcorefederationnetwork.org/map
Your gateway should appear as a green pin on the map within 60 seconds of the federation client connecting. Click your pin to see your gateway details.
--fed-location "lat,lon".
Open your Pi dashboard and send a message from the Send tab:
http://<your-pi-ip>:8080
The message should appear in the reflector's message feed and be delivered to all other gateways on MESH-GLOBAL-01 within 1-2 seconds.
You can also check with the MeshCore CLI on your Pi:
# Connect to companion and send a test message
meshcli -t localhost msg "Hello from MyGateway!"
Your gateway is now part of the worldwide MeshCore federation. Your field radios can reach any connected mesh on earth.
Field radios carried by your operators need our custom firmware for GPS tracking and long battery life:
include/config.h β set NODE_NAME for each radio# Dashboard (all services, messages, map) http://<your-pi-ip>:8080 # Check federation status sudo systemctl status meshcore-federation sudo journalctl -u meshcore-federation -f # Switch reflector curl -X GET https://mesh.meshcorefederationnetwork.org/api/gateways/join/MESH-EMCOMM \ -H "X-Gateway-Token: $(cat /opt/meshcore-gateway/federation_token.txt)" sudo systemctl restart meshcore-federation # View all MQTT traffic mosquitto_sub -h localhost -u meshcore \ -P $(grep PASS /opt/meshcore-gateway/mqtt.credentials | cut -d= -f2) \ -t '#' -v
| Problem | Fix |
|---|---|
| Gateway not on map | Check sudo systemctl status meshcore-federation β token may not be set |
| Federation not connecting | Check internet: ping 8.8.8.8 β check token in service file |
| Radio not detected | ls /dev/ttyACM* β must show /dev/ttyACM0 |
| Messages not routing | Check both gateways are on same reflector β check MQTT bridge |
| Need help | Discord: discord.gg/meshcore |