Trouble getting batman-adv working

Thanks. More helpful stuff!

  1. Output of iwinfo:
mesh0     ESSID: unknown
          Access Point: 00:25:9C:14:72:E1
          Mode: Mesh Point  Channel: unknown (unknown)
          Tx-Power: 23 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: -89 dBm
          Bit Rate: unknown
          Encryption: unknown
          Type: nl80211  HW Mode(s): 802.11nac
          Hardware: 11AB:2A55 11AB:0000 [Marvell 88W8864]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0

NOTE: no Signal, Bit Rate info. It does know hardware, etc.

  1. wpa_supplicant is not running.

  2. 'logread' shows this:

Thu May 30 14:11:04 2019 daemon.notice netifd: radio0 (1778): ip: SIOCSIFFLAGS: Operation not permitted
Thu May 30 14:11:04 2019 daemon.notice netifd: radio0 (1778): Interface 1 setup failed: IFUP_ERROR
Thu May 30 14:11:04 2019 daemon.notice netifd: Network device 'wlan0-1' link is up
Thu May 30 14:11:04 2019 daemon.notice netifd: Network device 'wlan1' link is up

I'm assuming that the radio0 errors are for 'mesh0', as 'wlan0-1' and 'wlan1' continue with link up.

Does it support 802.11s at all? (Edit: I don't know, I don't have any Marvell wireless)

You may be able to use "ad-hoc" if it doesn't

Sorry for being such a nube
I tried this:

config wifi-iface 'adhoc0'
option device 'radio0'
option ifname 'adhoc0'
option mode 'adhoc'
option bssid '02:CA:FE:CA:CA:40'
option ssid 'stlmesh'

readlog gives me this:

user.notice mac80211: Failed command: iw phy phy0 interface add adhoc0 type adhoc

When I run it manually I get this:

iw phy phy0 interface add adhoc0 type adhoc

command failed: Not supported (-95)

  1. I don't have the proper packages installed? (I installed wpad-full)
  2. I don't have the config right?
  3. I can't do this on a WRT1900ACS?

Sorry, and thanks.

Run iw list, see if "IBSS" (which means adhoc) is one of the supported interface types. I don't think it is on that hardware.

In that case you'd use mode mesh instead. All the mesh points have to use the same mode. This is fine if you're setting up your own mesh. If you're trying to interact with an existing adhoc mesh, it can't be done.

If you run iw phy you can look for two sections to know what each radio supports with the installed driver and firmware, below from a GL-AR300M

	Supported interface modes:
		 * IBSS
		 * managed
		 * AP
		 * AP/VLAN
		 * monitor
		 * mesh point
		 * P2P-client
		 * P2P-GO
		 * outside context of a BSS
	valid interface combinations:
		 * #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
		   total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }

Thanks! I run iw list, and for phy0 and phy1, get:

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

I'm getting closer. Thanks for the help.
I tried:

config wifi-iface 'mesh0'
option device 'radio0'
option ifname 'mesh0'
option mode 'mesh'
option bssid '02:CA:FE:CA:CA:40'
option ssid 'stlmesh'

Now 'iw link' shows 'mesh0' but it's DOWN. And logread shows:

Failed command: iw dev mesh0 set channel 36 VHT80

Got past the failed command by editing /etc/config/wireless, and changing VHT80 to HT20 for radio0 and radio1.

'ip link' still shows 'mesh0' as down:

11: mesh0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop master br-lan state DOWN qlen 1000

iw mesh0 mesh join stlmesh
command failed: Network is down (-100)

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