Skip to content

PiMesh turns Raspberry Pi devices into self-contained mesh nodes that create their own Wi-Fi network using ad-hoc mode. No router, internet, or infrastructure required. Each Pi broadcasts and connects directly to others, forming a resilient, peer-to-peer mesh with batman-adv. This makes it ideal for remote areas, off-grid zones, emergencies, etc.

Notifications You must be signed in to change notification settings

aranbarri/pimesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PiMesh

PiMesh turns any Raspberry Pi into a self-sufficient mesh network node using WiFi and batman-adv.

Fully offline. No internet. No router. Just Raspberry Pis talking to each other.

image


Features

  • Creates an ad-hoc mesh WiFi network using batman-adv
  • Web dashboard served on each node (FastAPI + Tailwind)
  • Message system between nodes (text exchange)
  • Works on Raspberry Pi 5 and Raspberry Pi Zero 2 W
  • Containerized (runs via Docker)

Project Structure

pimesh/
├── backend/           # FastAPI message API
├── frontend/          # Web interface (HTML + Tailwind)
├── mesh/              # Mesh networking setup scripts
├── Dockerfile         # Backend container
├── docker-compose.yml
└── README.md

⚙️ Requirements

  • Raspberry Pi with WiFi
  • Raspbian OS (Lite or Desktop)
  • Docker installed
  • batctl, iw, wireless-tools

Install dependencies:

sudo apt update
sudo apt install -y batctl iw wireless-tools

Setting up a Mesh Node

  1. Enable batman-adv kernel module:
sudo modprobe batman-adv
  1. Run the mesh setup script:
sudo bash mesh/mesh-setup.sh

This configures wlan0 in ad-hoc mode, joins the pimesh network, and assigns IP 10.0.0.100 to bat0.

You can change the IP in the script for each node.


Running the Node Web Server

docker compose up -d

Then visit:

http://<raspip>:8088

You’ll see the local node dashboard and message form.


Systemd Auto-start (Optional)

To run mesh setup at boot:

sudo cp mesh/systemd.service /etc/systemd/system/pimesh.service
sudo systemctl enable pimesh

To-Do (Future)

  • Auto-discovery of other nodes
  • Multi-hop message relay
  • File sharing or media broadcast
  • Node map visualization

🔗 License

MIT — Use it freely and build your own mesh 🛠️


Want to build mesh networks for events, villages or just for fun?
This project is for you.

About

PiMesh turns Raspberry Pi devices into self-contained mesh nodes that create their own Wi-Fi network using ad-hoc mode. No router, internet, or infrastructure required. Each Pi broadcasts and connects directly to others, forming a resilient, peer-to-peer mesh with batman-adv. This makes it ideal for remote areas, off-grid zones, emergencies, etc.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published