Howto setup Raspberry Pi 3 with Mesh wireless networking using B.A.T.M.A.N. | raspberry pi 3 wifi mesh networking batman howto

For around two years I have been trying to get Mesh networking going on the raspberry pi’s. I have used different Pi’s and bought a heap of USB Wifi dongles which also did not work.

I tried again the other day using an out of the box raspberry pi 3 with the standard Jesse Lite os, this worked.

I have been testing the setup lately and I’m really impressed. I have been able to have connectivity throughout my house and into the backyard, this is around 50+ meters of connectivity through brick walls. I will continue testing of the range and application features.

Here is the howto.

FIrst, we install a few packages we might need.

We download the BATMAN source, and install it.

Here we’ll create the script which we just to establish the wifi network and mesh networking. Save it to /root/mesh.sh. Make sure you change the IP address at the last like and increment upward for each device you setup.

Make the script executable.

Add an entry into the crontab to run it at startup by typing “crontab -e” and adding the following line.

Reboot the Pi and it should be operational, to test type “ifconfig” it should look like this.

Note: the bat0 is the mesh network and the eth0 is the hardwired network connection.

Once you have all the devices online, you can ping to see if they’re online or type this to see if batman can see them

Should look like this.

In this example you can see three other Pi’s online.

 

7 thoughts on “Howto setup Raspberry Pi 3 with Mesh wireless networking using B.A.T.M.A.N. | raspberry pi 3 wifi mesh networking batman howto”

  1. the cell id for both pi always not same in my case, i had try to manually set the cell id but the command seen not working. any suggestion for me ?

  2. Just wondering what WiFi dongle you used for this? The command to change the mtu to 1532 fails on the Raspberry Pi 3 Model B using the onboard wireless chipset. The OS I am using is Raspbian Stretch Desktop, released 11-03-18, not Jessie as used in your howto.

    Thanks for sharing this howto. It was very helpful.

    1. Diane, this howto was tested with a Raspberry Pi 3 using its onboard wifi chip. I tried using many different WIFI USB dongles but they did not work. I will test using the latest Jessie and post back.

Leave a Reply

Your email address will not be published. Required fields are marked *