Wireless Adhoc mode not working for batman-adv

Hi,

I am configuring batman-adv on ipq806x router board but wireless interface will not show when setting adhoc mode.

Network config:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0 eth1 bat0'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '10.0.0.1'
        option netmask '255.0.0.0'

config interface 'mesh'
        option mtu '1532'
        option proto 'batadv'
        option mesh 'bat0'
        option routing_algo 'BATMAN_IV'

Wireless config:

config wifi-device  radio0
        option type     mac80211
        option channel  2
        option hwmode   11ng
        option path 'platform/soc/a000000.wifi'

config wifi-iface
        option device   radio0
        option network  mesh
        option mode     adhoc
        option ifname   adhoc0
        option ssid     'batmanadv'
        option encryption psk2
        option key      'abcdefghijkl'
        option bssid    '10:11:12:13:14:15'

Packages installed: wpa_supplicant and hostapd

No "adhoc0" or "wlan0" or any wireless interface shows with ifconfig or iwconfig

Does anyone have any ideas?

I've got a related config with 802.11s and am not using the network option.

config wifi-iface 'mesh0'
        option device 'radio5'
        option ifname 'mesh0'
        option mode 'mesh'
        option mesh_id '<redacted>'
        option mesh_fwding '1'
        option encryption 'psk2+ccmp'
        option key '<redacted>'
        option sae_password '<redacted>'

and don't declare an OpenWRT "network" for it. Perhaps it is related to that?

I remember going in circles with getting a named interface without all the overlay of an OpenWRT network associated with it, but, alas, not all the details anymore.

Thanks, though I think the configurations for 802.11s is different to batman-adv

I should also mention that the same configuration works on a different board but I notice that on the other board a wpa_supplicant process is launched like:

/usr/sbin/wpa_supplicant -B -P /var/run/wpa_supplicant-adhoc0.pid -D nl80211 -i adhoc0 -c /var/run/wpa_supplicant-adhoc0.conf -C /var/run/wpa_supplicant

But the same process is not launched on the ipq806x! Or if it is then it is immediately closing because there is no adhoc0 interface

That's a reasonable thing to look at. I believe you should be able to at least see interface creation in the logs. I run without an OpenWrt "network" as I don't bridge the interface proper, but rather the tunnel endpoints that run over the interface.

From my logs (routed through syslog-ng)

2018 Aug 20 19:57:57 office info kernel: [   38.782894] IPv6: ADDRCONF(NETDEV_UP): mesh0: link is not ready

Use iw list to check if your wifi driver supports adhoc mode (IBSS).

It is common to use a "dumb" 802.11s (mesh) mode radio underneath BATMAN, instead of adhoc. Turning off mesh_fwding gives the mesh routing control to BATMAN. Of course all the nodes in the mesh must use the same radio mode.