Trouble getting batman-adv working

You should be able to bring up the network with /etc/config/network and /etc/config/wireless alone.

Since your iw list doesn't show "IBSS" and does show "mesh" you probably need to configure it as 802.11s:

changing my choice of "friendly names" to ones that match your other config.

Again, thanks for all the help. This is getting a little frustrating :wink:

I bought two GL.iNet GL-AR750S routers late last week. I can't get batman-adv running, but I at least got the mesh working.

On the AR750S, this works:
iw dev mesh0 del
iw phy phy0 interface add mesh0 type mesh
ip link set up mtu 1532 dev mesh0

On the WRT-1900ACS, I get this instead:
iw dev mesh0 del
iw phy phy0 interface add mesh0 type mesh
ip link set up mtu 1532 dev mesh0
ip: SIOCSIFFLAGS: Operation not permitted

Not sure were to go next with the WRT-1900ACS.

You shouldn't have to use iw commands to bring up the mesh (or batman-adv routing) with proper UCI configuration in /etc/config/network and /etc/config/wireless

1 Like

When you bring up a mesh point manually it uses the internal mesh routing, which is not compatible with BATMAN. So that should be considered only for very preliminary testing, if you do it at all.

Does iw dev show "mesh point" as a supported mode on phy0?

1 Like

mk24: mesh is supported (as noted earlier in the thread).

By editing /etc/config/wireless correctly, 'ip link' shows mesh0 exists, but is DOWN.
On the GL-750S, the same config shows mesh0 exists, but is UP.

I was using the 'iw' commands to try and narrow down the problem.

grain of salt as I have not tried this myself, but my take from the mwlwifi issue list was that 802.11s was borked on the wrtpac devices.

anomeome: Here is my list of supported interface modes:

	Supported interface modes:
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point

Yes, I understand that it is listed as a supported mode, but by all indications I have ever seen, she be dead Jim

Very informative thread!
Just want to share my results with 18.06.4:

  1. 'N' USB adapter, 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
    kmod-rt2800-usb - 4.14.131+2017-11-01-10 - old driver?
    Only unencrypted mesh works. With encryption on everything looks good but no traffic passed.
    EDIT: encrypted works with modified /etc/modules.d/rt2800-usb :
    rt2800usb nohwcrypt=1

  2. 'AC' USB adapter, 0e8d:7612 MediaTek Inc.
    kmod-mt76x2u - 4.14.131+2019-03-23-a5f5605f-1
    Encrypted mesh just works!

2 Likes

Hi,

I have a similar problem an maybe you can help me.
@jeff, I followed your instruction and mesh0 works like expected:

46: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2304 qdisc noqueue state UP qlen 1000
    link/ether 14:cc:20:ec:6a:95 brd ff:ff:ff:ff:ff:ff
root@OpenWrt:~# iw dev mesh0 station dump
Station d4:6e:0e:d3:a0:2f (on mesh0)
        inactive time:  60 ms
        rx bytes:       1294514
        rx packets:     16865
        tx bytes:       22422
        tx packets:     276
        tx retries:     19
        tx failed:      0
        rx drop misc:   3
        signal:         -66 [-75, -67, -75] dBm
        signal avg:     -67 [-76, -71, -72] dBm
        Toffset:        18446744072557139047 us
        tx bitrate:     6.5 MBit/s MCS 0
        rx bitrate:     39.0 MBit/s MCS 4
        mesh llid:      0
        mesh plid:      0
        mesh plink:     ESTAB
        mesh local PS mode:     ACTIVE
        mesh peer PS mode:      ACTIVE
        mesh non-peer PS mode:  ACTIVE
        authorized:     yes
        authenticated:  yes
        associated:     yes
        preamble:       long
        WMM/WME:        yes
        MFP:            yes
        TDLS peer:      no
        DTIM period:    2
        beacon interval:100
        connected time: 887 seconds

The problem is, that the bat0 interface is not appearing. I added your code to the network config file and doublechecked all name etc. but still it doesn't appear.

root@OpenWrt:~# batctl meshif bat0 n
Error - interface bat0 is not present or not a batman-adv interface

What could be the reason? I used this thread and the informations from here. The network config is like here in Post 8.

In LEDE / Interfaces, the NWI_MESH0 is "Protocol unmanaged", no Idea whether it's OK or not.

Edit:
Hardware: TP-LINK Archer C7 v2 and RE450
OpenWrt 18.06.4 r7808-ef686b7292 / LuCI openwrt-18.06 branch (git-19.170.32094-4d6d8bc)

Edit2:
I get "mesh plink: ESTAB" but I cannot see the other stations in the output of

iw dev mesh0 station dump

Has this issue been solved yet? I can't get batman to work on the WRT1900ACS either