Help with mesh using batman-adv

Hi all,

I am new to batman-adv and mesh networking in general.

Both routers are exactly the same:

  • QCA9880+AR8035 (3x3) with ath9k and ath10k driver.
  • two radios 2.4/5 GHz and one ethernet port for LAN/WAN.
  • I installed kmod-batman-adv 4.4.50+2016.5-3 and batctl.

Topology:

wan <--> router (dhcp server) <--> (lan/dhcp client) node1 (dumb access point)

                                                    node1 <---> node2 (dumb access point)

Clients connect to either node1 or node2 and receive dhcp from the router. 
Sometimes both node1 and node2 can be connected to the router via ethernet.

When I do batctl gw i get this error: Error - interface bat0 is not present or not a batman-adv interface

For some reason bat0 interface does not exist.

valid interface (radio1 @ 2.4GHz) 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 }

radio0 @ 5GHz does not have IBSS mode. I think from what I gather its because ath10k driver does not support adhoc mode?

The changes I did in the child node (node not connected to LAN/WAN via ethernet) are

  • set gw_mode 'client'
  • different ssid on 5GHz band'

Here are my configs:

batman-adv

config 'mesh' 'bat0'
    option 'interfaces' 'adhoc0'
    option 'aggregated_ogms' '1'
    option 'ap_isolation' '0'
    option 'bonding' '0'
    option 'fragmentation' '0'
    option 'gw_bandwidth'
    option 'gw_mode' 'server'
    option 'gw_sel_class' '20'
    option 'log_level'
    option 'orig_interval' '1000'
    option 'bridge_loop_avoidance' '1'
    option 'distributed_arp_table' '1'
    option 'multicast_mode' '1'
    option 'network_coding'
    option 'hop_penalty' '15'
    option 'isolation_mark'

wireless

# 2.4 BGN
config wifi-device 'radio1'
    option type 'mac80211'
    option hwmode '11g'
    option path 'platform/qca955x_wmac'
    option country 'US'
    option channel 'auto'
    option htmode 'HT20'

config wifi-iface 'wmesh'
    option device 'radio1'
#    option channel '1'
    option mode 'adhoc'
    option ssid 'le_my_mesh'
    option bssid '02:CA:FE:CA:00:10'
#    option ifname 'adhoc0'
    option network 'mesh'
    option disabled '0'
#    option hidden '1'

# 5 NAC
config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11a'
    option path 'pci0000:00/0000:00:00.0'
    option country 'US'
    option channel 'auto'
    option htmode 'VHT40'
#    option noscan '1'

config wifi-iface 'default_radio0'
    option device 'radio0'
    option mode 'ap'
    option ssid 'lenode_1_5'
    option encryption 'psk2'
    option key 'mNX?Y7$3tA@u'
    option network 'lan'

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 'fdf8:d16f:a700::/48'

config interface 'lan'
    option type 'bridge'
    option ifname 'eth0 bat0'
    option _orig_ifname 'eth0'
    option _orig_bridge 'true'
    option proto 'dhcp'
    option hostname 'Node1'

config interface 'mesh'
    option ifname 'adhoc0'
    option mtu '1532'
    option proto 'batadv'
    option mesh 'bat0'

Please let me know if using 802.11s is better since both radios have AP + mesh point modes.

Thanks for the advice!