Mesh on raspberry pi 3b

I want to make a "wifi mesh" on ra-pi 3b (Reason: I have so many of them).

I am unsure of the correct term of "mesh" but I want ONE collective wifi (same SSID) so my phone or device wont change to a new wifi-spot.

As a start I have not bought external wifi-antenna. But I will do when (IF) it all works :slight_smile:

My network is rather simple. I have a ubuntu linux server which works as router (DHCP, gateway, etc.) with the internal IP of 192.168.1.1.

I want a wifi network in the same IP-range (192.168.1.*). I would like the meshed to have a permant IP. All of them will have wifi enabled (that's the whole point) - and some will also have net cable. If a cable is there that should be the primary gateway for the ra-pi "hotspot".

I have used 20+ hours to try and make it work - and I get along installing and I can see the hotspot

Every time I un-comment bat0 in the /etc/interfaces I loose my SSH-connection and network on the ra-pi kind of collapse

Hope someone can set me on the right track :slight_smile:

Cheers Nikolaj

Here are my config files......................

############ /etc/network/interfaces

auto lo
iface lo inet loopback

# Cable
auto eth0
iface eth0 inet static
  address 192.168.1.158
  netmask 255.255.255.0
  gateway 192.168.1.1
  dns-nameservers 192.168.1.1

# WIFI
auto wlan0
iface wlan0 inet manual
  pre-up ip link set wlan0 down
  pre-up iw dev wlan0 set type ibss
  pre-up ip link set wlan0 up
  pre-up iw dev wlan0 ibss join mesh_network 2412
  pre-up batctl if add wlan0
  up ip link set wlan0 up

# BATMAN
#auto bat0
#iface bat0 inet static
#  address 192.168.1.210
#  netmask 255.255.255.0
#  gateway 192.168.1.1
#  dns-nameservers 192.168.1.1

############ /etc/modules

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

i2c-dev
batman-adv

############ /etc/dhcpcd.conf

NO CHANGES

############ /usr/local/bin/mesh_setup.sh

(chatgpt made this for me - in a long conversation.......dont know if its any good)

#!/bin/bash
ip link set wlan0 down
iw dev wlan0 set type ibss
ip link set wlan0 up
iw dev wlan0 ibss join mesh_network 2412
batctl if add wlan0
ip link set wlan0 up
ip link set bat0 up

mesh_setup.sh is run from "/etc/rc.local"

#Om my adventure into this I was suggested to make a file "/etc/wpa_supplicant/wpa_supplicant.conf". Unsure if it is actually used, but it looks like this

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="mesh_network"
    mode=1
    frequency=2412
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP
    group=CCMP
    psk="YourPassword"
}

if you're using the RPi's built in wifi, you can stop right now.

https://openwrt.org/meta/infobox/broadcom_wifi

This is NOT a mesh. This is roaming.

Even if you ALSO want a mesh, you can't on the built in radio because it does NOT support mesh.

As I said, the built in radio does not support mesh (or pretty much anything else as it is intended to be used as if the Rpi is a workstation (ie STA mode).

This is not OpenWrt, is it Ubuntu? If so ask on a Ubuntu forum.

HaHaHaHaHa :rofl: :melting_face:

I would suggest this type of mesh:

I don't quite get the part about the shopping bag - that will in no way solve my issue?

Unfortunately, your issue cannot be solved here because you're not using OpenWrt on your Pi devices. You need to ask on support channels that handle the operating system that you have installed (RaspberyPi OS, Ubuntu, whatever is running there now).

'Mesh' is a generic term that WIFI retailers use indescriminatly...

When OpenWrt uses mesh it is just to get you to here and explaine the different protocols that fall under the umbrella terrm.

:spiral_notepad: Oh, and we are not fond of fixing chatgpt messes.
If you want to build a network based on OpenWrt it would take an overhaul; if all your equipment is supported.

1 Like

Thats a good transparent industry standard MESH bag, scales to 50 or so rasberies.

jokes aside - you need "raspberry pi 3b cluster enclosure" , it comes with power headers, network connectors and a switch. Just ignore (and switch off) sub-par wifi.