Git Product home page Git Product logo

Comments (16)

Cway14 avatar Cway14 commented on May 25, 2024 2

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:

  1. Remove the package - sudo apt-get remove batctl
  2. Clone the repo with up to date version - git clone https://git.open-mesh.org/batctl.git
  3. Change directory - cd batctl
  4. Compile package - sudo make install
  5. Reboot - sudo reboot

from wifimeshraspberrypi.

jw2476 avatar jw2476 commented on May 25, 2024 1

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

@binnes

from wifimeshraspberrypi.

jrauh431 avatar jrauh431 commented on May 25, 2024

Same issue..

Gateway: Raspberry Pi 4 Model B Rev 1.4p

from wifimeshraspberrypi.

jw2476 avatar jw2476 commented on May 25, 2024

Same here

from wifimeshraspberrypi.

steros76 avatar steros76 commented on May 25, 2024

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.

torkel avatar torkel commented on May 25, 2024

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.

steros76 avatar steros76 commented on May 25, 2024

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.

jw2476 avatar jw2476 commented on May 25, 2024

Could u send the output of ifconfig and sudo batctl n please? @steros76

from wifimeshraspberrypi.

steros76 avatar steros76 commented on May 25, 2024

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.

jw2476 avatar jw2476 commented on May 25, 2024

Try using the standard ping instead of the batctl one.

from wifimeshraspberrypi.

steros76 avatar steros76 commented on May 25, 2024

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.

jw2476 avatar jw2476 commented on May 25, 2024

Something is wrong with the startup scripts if it's unreachable, they aren't connecting 2 each other.

from wifimeshraspberrypi.

steros76 avatar steros76 commented on May 25, 2024

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.

jw2476 avatar jw2476 commented on May 25, 2024

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.

steros76 avatar steros76 commented on May 25, 2024

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.

binnes avatar binnes commented on May 25, 2024

THIS WORKSHOP IS NO LONGER BEING MAINTAINED - CLOSING AS ARCHIVING REPO

from wifimeshraspberrypi.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.