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