Comments (16)
I understand this issue is closed but leaving this here in case it helps someone else:
The issue for me was that the batctl installed using sudo apt-get install batctl
is too old and therefore was resolved by updating the package:
- Remove the package -
sudo apt-get remove batctl
- Clone the repo with up to date version -
git clone https://git.open-mesh.org/batctl.git
- Change directory -
cd batctl
- Compile package -
sudo make install
- Reboot -
sudo reboot
from wifimeshraspberrypi.
I've done some testing and it looks like the issue is with batctl instead, there's a massive version desync with batman-adv module (v2020.4) and batctl present in the raspberry pi repository (v2019.0) and with the latest update of the raspberry pi kernel (from 5.4 to 5.10) this gap has broken batman-adv.
This can be fixed with the following which updates batctl:
sudo apt purge batctl -y && \
sudo apt install libnl-genl-3-dev libnl-3-dev -y && \
wget https://downloads.open-mesh.org/batman/releases/batman-adv-2020.4/batctl-2020.4.tar.gz && \
tar -xvf batctl-2020.4.tar.gz && \
cd batctl-2020.4 && \
make -j 4 && \
sudo make install
Might be worth writing to the raspberry pi people and asking them to update the package instead of having to change the batctl version every kernel update
Also, had an issue with pinging/ connecting to nodes, fixed it by changing the MTU value of bat0 to 1400 and leaving wlan0 as 1500
from wifimeshraspberrypi.
Same issue..
Gateway: Raspberry Pi 4 Model B Rev 1.4p
from wifimeshraspberrypi.
Same here
from wifimeshraspberrypi.
Same problem on Raspberry Pi Zero W (Buster 10.8 up-to-date).
Note that "/sys/class/net/wlan0/batman_adv" is missing.
from wifimeshraspberrypi.
Im not fully sure yet, but I think this is due to that batman-adv and batctl are very old in default packages from Raspberry OS.
I have downloaded latest batman-adv from https://www.open-mesh.org/ and compiled it.
Then I do not get "wlan0: error reading status" and "Error - interface bat0 is not present or not a batman-adv interface."
Have some things left to test but looks promising with new versions.
from wifimeshraspberrypi.
I updated only batctl as you described. Now I see the other device as neighbour but not as originator.
MTU is 1400 but ping is not working.
Any hint?
from wifimeshraspberrypi.
Could u send the output of ifconfig and sudo batctl n please? @steros76
from wifimeshraspberrypi.
I have 2 Raspberry Pi Zero W: batman1 (the gateway) with an external usb wifi for connect to the standard router and batman2.
I use onboard wlan0 for batman.
Here are the logs you requested:
root@batman1:~# ifconfig
bat0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1400
inet 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::f814:ee66:f819:4297 prefixlen 64 scopeid 0x20<link>
ether be:a7:8c:5d:6c:0e txqueuelen 1000 (Ethernet)
RX packets 59 bytes 3480 (3.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 1700 (1.6 KiB)
TX errors 0 dropped 51 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 6 bytes 522 (522.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 522 (522.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::ba27:ebff:fe7b:879a prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:7b:87:9a txqueuelen 1000 (Ethernet)
RX packets 471 bytes 29822 (29.1 KiB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 1425 bytes 140536 (137.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlx00e04cfb40ae: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.76 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::fb74:8472:4a0a:2198 prefixlen 64 scopeid 0x20<link>
ether 00:e0:4c:fb:40:ae txqueuelen 1000 (Ethernet)
RX packets 479 bytes 64886 (63.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 351 bytes 61392 (59.9 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@batman1:~# batctl n
[B.A.T.M.A.N. adv 2020.4, MainIF/MAC: wlan0/b8:27:eb:7b:87:9a (bat0/be:a7:8c:5d:6c:0e BATMAN_IV)]
IF Neighbor last-seen
wlan0 b8:27:eb:1b:cc:89 0.140s
root@batman1:~# batctl ping b8:27:eb:1b:cc:89
PING b8:27:eb:1b:cc:89 (b8:27:eb:1b:cc:89) 20(48) bytes of data
Reply from host b8:27:eb:1b:cc:89 timed out
Reply from host b8:27:eb:1b:cc:89 timed out
Reply from host b8:27:eb:1b:cc:89 timed out
-----
root@batman2:~# ifconfig
bat0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1400
inet 192.168.2.2 netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::7602:c34a:a5e:e693 prefixlen 64 scopeid 0x20<link>
inet6 fe80::880:38ff:fea7:ff87 prefixlen 64 scopeid 0x20<link>
ether 0a:80:38:a7:ff:87 txqueuelen 1000 (Ethernet)
RX packets 60 bytes 2588 (2.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 1218 (1.1 KiB)
TX errors 0 dropped 62 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 3 bytes 197 (197.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3 bytes 197 (197.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::ba27:ebff:fe1b:cc89 prefixlen 64 scopeid 0x20<link>
ether b8:27:eb:1b:cc:89 txqueuelen 1000 (Ethernet)
RX packets 20 bytes 2586 (2.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 506 bytes 52084 (50.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@batman2:~# batctl n
[B.A.T.M.A.N. adv 2020.4, MainIF/MAC: wlan0/b8:27:eb:1b:cc:89 (bat0/0a:80:38:a7:ff:87 BATMAN_IV)]
IF Neighbor last-seen
wlan0 b8:27:eb:7b:87:9a 27.730s
root@batman2:~# batctl ping b8:27:eb:1b:cc:89
PING b8:27:eb:1b:cc:89 (b8:27:eb:1b:cc:89) 20(48) bytes of data
From b8:27:eb:1b:cc:89: Destination Host Unreachable (icmp_seq 1)
From b8:27:eb:1b:cc:89: Destination Host Unreachable (icmp_seq 2)
From b8:27:eb:1b:cc:89: Destination Host Unreachable (icmp_seq 3)
The starting script for batman1 is the following:
#!/bin/bash
# batman-adv interface to use
REALNET=wlx00e04c2cac7a
batctl if add wlan0
ifconfig bat0 mtu 1400
# Tell batman-adv this is a gateway client
batctl gw_mode server
# Enable port forwarding
sysctl -w net.ipv4.ip_forward=1
iptables -t nat -A POSTROUTING -o REALNET -j MASQUERADE
iptables -A FORWARD -i $REALNET -o bat0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i bat0 -o $REALNET -j ACCEPT
# Activates batman-adv interfaces
ifconfig wlan0 up
ifconfig bat0 up
ifconfig bat0 192.168.2.1/24
And this is the one for batman2:
#!/bin/bash
# batman-adv interface to use
batctl if add wlan0
ifconfig bat0 mtu 1400
# Tell batman-adv this is a gateway client
batctl gw_mode client
# Activates batman-adv interfaces
ifconfig wlan0 up
ifconfig bat0 up
ifconfig bat0 192.168.2.2/24
from wifimeshraspberrypi.
Try using the standard ping instead of the batctl one.
from wifimeshraspberrypi.
Same thing.
root@batman1:~# ping 192.168.2.2
PING 192.168.2.2 (192.168.2.2) 56(84) bytes of data.
From 192.168.2.1 icmp_seq=1 Destination Host Unreachable
From 192.168.2.1 icmp_seq=2 Destination Host Unreachable
From 192.168.2.1 icmp_seq=3 Destination Host Unreachable
root@batman2:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data.
From 192.168.2.2 icmp_seq=1 Destination Host Unreachable
From 192.168.2.2 icmp_seq=2 Destination Host Unreachable
From 192.168.2.2 icmp_seq=3 Destination Host Unreachable
from wifimeshraspberrypi.
Something is wrong with the startup scripts if it's unreachable, they aren't connecting 2 each other.
from wifimeshraspberrypi.
I tried with "batctl tcpdump bat0" bat I can't see any packet coming from the other host.
If they are visible each other other as neighbours, the wifi config should be ok, isn't it?
I used this configuration:
iface wlan0 inet manual
wireless-channel 5
wireless-essid srmesh
wireless-mode ad-hoc
Another doubt: no originators are visible... is this correct?
from wifimeshraspberrypi.
There should be sudo at the beginning of most of the commands in the scripts. Also, the IP address on the standard/ non-gateway node shouldn't have its IP set by ifconfig, it should be given an address by the gateway's DHCP server.
from wifimeshraspberrypi.
There's no sudo because I used root user directly. If I don't assign ip on client host I get a 169.254.x.x address (surely because they don't talk each other).
I can't figure out where the problem could be in the full stack.
When I have more time I will test the same configuration on Raspberry PI 3 using ethernet to detect if the problem is on batman or on wifi.
from wifimeshraspberrypi.
THIS WORKSHOP IS NO LONGER BEING MAINTAINED - CLOSING AS ARCHIVING REPO
from wifimeshraspberrypi.
Related Issues (17)
- How to send/recieve data through the network HOT 3
- wifi bridge no wireless interface found HOT 4
- NEED HELP WIFI BRIDGE PART 2 HOT 1
- WIFI BRIDGE USING USB DONGLE AS IN PART 2 (URGENT) HOT 8
- WIFI GATEWAY USING HOTSPOT DOESNT SHOW WLAN 1 HOT 1
- Trouble getting nodes communicating
- "interface bat0 is not present" - expected on gateway if no other nodes? HOT 1
- Wifi AP on gateway HOT 1
- URGENT HOT 1
- Issue with Bridge Node HOT 18
- problem with part2 HOT 2
- mtu value of 1532 on host adapter instead of MTU 1468 on bat0 interface HOT 3
- Multiple Access points, using same SSID HOT 2
- Remove "sudo batctl gw_mode client" for bridged mesh with no gateway server as it stops DHCP requests working. HOT 1
- KERNEL 5.10: Error - interface bat0 is not present or not a batman-adv interface HOT 1
- l --version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wifimeshraspberrypi.