Join the Global Mesh Network

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.

1Hardware
2Pi OS
3Account
4Install
5Verify
6Done

πŸ–₯️ What You Need

Any of these combinations work. Pick what is available and affordable in your country.

ItemRecommendedAlso WorksCost
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
⚠️ Never power a LoRa radio without an antenna attached. The SX1262 chip will be permanently damaged in seconds without an antenna connected.

πŸ“‘ LoRa Frequency for Your Country

Your radio must use the correct frequency for your country. Use this table to find your region code for the installer.

Country / RegionFrequencyInstaller flag
USA, Canada, Mexico, Brazil915 MHz--region us
Philippines915 MHz--region us
Europe, UK, Africa, Middle East868 MHz--region eu868
Australia, New Zealand917 MHz--region au
India865 MHz--region in
Japan920.6 MHz--region jp
South Korea921.9 MHz--region kr
China470 MHz--region cn
Russia868.8 MHz--region ru
SE Asia (Singapore, Thailand, Malaysia)923 MHz--region sea
Taiwan922 MHz--region tw

Not sure? Check the TTN frequency table β†’

πŸ’Ύ Flash Raspberry Pi OS

Download Raspberry Pi Imager from raspberrypi.com/software and install it on your computer.

Open Imager and make these exact selections:

  1. Choose Device β†’ Raspberry Pi 4 (or your model)
  2. Choose OS β†’ Raspberry Pi OS (other) β†’ Raspberry Pi OS Lite (64-bit)
  3. Choose Storage β†’ your MicroSD card
  4. Click the gear icon βš™ before writing:
    • Hostname: meshcore-gw
    • Enable SSH βœ…
    • Username: pi
    • Set a strong password β€” write it down
    • Configure Wi-Fi if not using Ethernet
  5. Click Write and wait for verification to complete

πŸ”Œ First Boot

Insert 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.

ℹ️ Green LED not blinking? The Pi is not reading the SD card. Re-flash the card and make sure SSH was enabled in Imager settings. The green LED should blink rapidly within 30 seconds of powering on.

πŸ‘€ Create Your Operator Account

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"}'

πŸ“‘ Choose Your Reflector

Pick the reflector that best matches your location and use case. You can change this later at any time.

MESH-GLOBAL-01
Worldwide open network β€” all regions welcome
MESH-EMCOMM
Emergency communications and disaster response
MESH-ASIA-PAC
Philippines, Japan, Australia, SE Asia
MESH-AMERICAS
USA, Canada, Mexico, Latin America

Selected: MESH-GLOBAL-01

πŸ“₯ Download the Installer to Your Pi

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

πŸš€ Run the Installer

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
ℹ️ The interactive wizard is easier if you prefer: sudo bash meshcore-all-in-one.sh Just answer the questions β€” it handles everything.
βœ… The installer automatically: registers your gateway with the federation, joins your chosen reflector, saves your gateway token, and starts the federation client service.

πŸ“» Flash Your Gateway Radio

The RAK4631 plugged into your Pi needs MeshCore Companion firmware:

  1. Go to flasher.meshcore.io
  2. Connect your gateway RAK4631 to your computer via USB
  3. Select: RAK4631 β†’ Companion β†’ v1.15.0
  4. Click Flash and wait for completion
  5. Plug the flashed radio into your Pi via USB
⚠️ Flash the radio as Companion β€” not Repeater or Node. Companion mode lets the Pi control the radio. The other modes are for standalone radios.

βœ… Check Everything is Running

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

πŸ—ΊοΈ Check the Global Map

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.

ℹ️ If your gateway does not have GPS coordinates set, it will appear in the sidebar list but not on the map. Add coordinates in your account settings or re-run the installer with --fed-location "lat,lon".

πŸ’¬ Send a Test Message

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!"

πŸŽ‰ Welcome to the Global Mesh Network!

Your gateway is now part of the worldwide MeshCore federation. Your field radios can reach any connected mesh on earth.

  • Gateway running on Raspberry Pi
  • Connected to mesh.meshcorefederationnetwork.org
  • Joined reflector MESH-GLOBAL-01
  • Appearing on global map
  • Messages routing to all connected gateways

πŸ“± Connect Field Radios

Field radios carried by your operators need our custom firmware for GPS tracking and long battery life:

  1. Download meshcore-field-firmware.zip from the portal
  2. Install VS Code + PlatformIO on your computer
  3. Edit include/config.h β€” set NODE_NAME for each radio
  4. Flash via PlatformIO β†’ each radio shows on the global map with GPS

πŸ”§ Useful Commands

# 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

πŸ†˜ Troubleshooting

ProblemFix
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