I do not bridge all 3 interfaces. It as per the web instructions you followed.
Hello everybody, sorry for the long absence, I was waiting for the WiFi USB Dongle I bought online to arrived. I have installed the dongle for RPi 1 and RPi 2, and finally they can detect each other. So that is one problem solved.
Below is the network and interface configuration of both RPi.
RPi 1
/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd8f:d9ae:4317::/48'
config interface 'lan'
option type 'bridge'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option proto 'dhcp'
option ifname 'eth0'
config interface 'mesh'
option proto 'static'
option ipaddr '192.168.10.2'
option netmask '255.255.255.0'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option htmode 'HT20'
option country 'KR'
option legacy_rates '1'
config wifi-iface 'default_radio0'
option device 'radio0'
option mode 'ap'
option encryption 'none'
option ssid 'OpenWRT1'
option network 'lan'
config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0'
option htmode 'HT20'
option country 'KR'
option legacy_rates '1'
config wifi-iface
option device 'radio1'
option mode 'adhoc'
option ssid 'meshbackhaul'
option encryption 'psk'
option key 'meshbackhaul'
option network 'mesh'
RPi 2
/etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd29:812a:a8cd::/48'
config interface 'lan'
option type 'bridge'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
option proto 'dhcp'
option ifname 'eth0'
config interface 'mesh'
option proto 'static'
option ipaddr '192.168.10.3'
option netmask '255.255.255.0'
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
option htmode 'HT20'
option country 'KR'
option legacy_rates '1'
config wifi-iface
option device 'radio0'
option key 'meshnetw'
option mode 'ap'
option ssid 'OpenWRT2'
option encryption 'none'
option network 'lan'
config wifi-device 'radio1'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0'
option htmode 'HT20'
option country 'KR'
option legacy_rates '1'
config wifi-iface
option device 'radio1'
option mode 'adhoc'
option ssid 'meshbackhaul'
option encryption 'psk'
option key 'meshbackhaul'
option network 'mesh'
The second problem is, as I have stated previously, each RPi will also provide wifi internet access via its onboard wifi (SSID: OpenWRT1 by RPi 1 and SSID: OpenWRT2 by RPi 2).
How can I configure each RPi? I assume since only RPi1 is connected to internet via ethernet port, the configuration between RPi1 and RPi2 would be different.
Can anybody provide solution for this? Should I bridge all eth0, wlan0 (onboard wifi), and wlan1 (dongle wifi) at RPi 1 and bridge wlan0 and wlan 1 at RPi 2?
*current condition is eth0 and wlan0 of both RPi is bridged. My smartphone can get internet access from either OpenWRT1 (RPi 1) or OpenWRT2 (RPi 2) wifi, if they have internet connection from ethernet port. I think this is okay for RPi 1, but RPi 2 should only get internet acces from RPi 1 and does not have anything connected to its ethernet port.
You tell the mesh that Internet is available.
This is done by making one single route (0.0.0.0/0) on the mesh, or a combination of 2 or more groups of more-specific routes that equal 0.0.0.0/0 (e.g. 0.0.0.0/1 and 128.0.0.0/1) - on the device(s) that have Internet connectivity.
This way, you can also prioritize one Internet connection over another, etc..
I already set HNA of RPi 1 to 0.0.0.0 because it has internet access, but my smartphone still cant established connection to wifi OpenWRT2 of RPi2 (no internet via ethernet port at RPi 2). Connectting to wifi OpenWRT1 of RPi 1 is no problem. Which part is wrong? Is it bridge problem?
I'm not sure why you're bridging anything, that's the point of using routers.
- The mesh is linked and passes routed traffic via one or more pre-specified interface(s)
- You tell the mesh what networks exist at each router location by adding those subnets
- You NAT to WAN as normal on the router with Internet (i.e. the 0.0.0.0/0 routes), if mesh traffic uses Private RFC1918 IPs
- Your other interfaces are used as normal (or NATed to the MESH, or subnets are added for no-NAT)
So, do you have an OLSR announcement, NAT-masquerade or route issue?
The problem is I dont know what I haven't done or did wrong. I think I have done all steps provided by justingoetz and recommendation by experts in this forum. No error notification shown by each RPi. My smartphone can connect to OpenWRT1 wifi but it cant connect to OpenWRT2 wifi. When trying to connect to OpenWRT2, it says cannot get IP address. Maybe it is something related to DHCP settings in RPi 2?
I just found this tutorial https://openwrt.org/docs/guide-user/network/wifi/routedap. Is this what I need to do?
Hi, thanks for confirming this about the Raspberry Pi 3. I was wondering if the same limitation regarding IBSS and mesh support applies to the Raspberry Pi 4 as well? I currently have both a Raspberry Pi 3 and a Raspberry Pi 4 available, and I'm trying to get an OLSR network working. I've been struggling with it for the past couple of months.
Also, would you recommend a specific version for setting up an OLSR mesh network on a Raspberry Pi?
Finally, if I do use a USB Wi-Fi dongle, will it typically require manual driver installation on Raspberry Pi OS (or OpenWrt), or are they often plug-and-play?
Any further insights or advice you could offer, especially regarding which board might be more suitable, the best OpenWrt version, or the USB dongle driver situation, would be incredibly valuable to me. Thanks in advance!
The OLSR post i made is very old... Suggest looking into 802.11s batman-adv instead now using more modern USB adaptors listed here for example
You still need too confirm or use ones that supports "mesh point" capability
iw list
i got one of these not so long ago not done too much with it yet
Comfast CF-922AC
Olsr is doing layer3 while batman adv is on layer2½.
Why not olsr2 or Babel?
dont care much for layer 3
Ok cool but do not mix apples and oranges then please.
thank you very much for your response to my question, I really appreciate it.
Before I proceed and explore other options, I just want to confirm with you:
Are you sure that the built-in Wi-Fi of the Raspberry Pi does not support Ad-Hoc mode, and that using the built in Wi-Fi, a Raspberry Pi will not be able to discover or connect to another Raspberry Pi in such a setup?
I doubt any modern hardware is still able to do adhoc. Because afaik the requirement for adhoc was dumped so most vendors don't care about adhoc. One reason 80211s is used most of the time.
And regarding the rPi.... If the chip is already be bad to not be an AP at least not reliable I doubt I can handle any other mode... But that's just my opinion. Maybe you should consult the tech spec of the wifi chip.