User Tools

Site Tools


docs:guide-user:network:wifi:mesh:batman

B.A.T.M.A.N

B.A.T.M.A.N. is an alias for “Better Approach To Mobile Adhoc Networking”.

  • Batman-adv is a mesh protocol for a layer 2 network
  • batmand is a userspace daemon that operates on layer 3

But please see the Documentation on the Project Homepage.

OpenWrt currently (June 2016) uses BATMAN 2012.3 2016.5 but read about difference in syntax between BATMAN 2012.x and BATMAN 2013.x

Installing and configuration of B.A.T.M.A.N advanced

Installing

opkg update
opkg install kmod-batman-adv

Configuration

OpenWrt 12.09.1, batman-adv 2013.4.0 (compatibility version 14)

/etc/config/wireless

config wifi-iface
        option device   radio0
        option ifname   mesh0
        option network  mesh
        option mode     adhoc
        option ssid     mesh
        option bssid    '02:CA:FE:CA:CA:40'
        option mcast_rate 18000
        option encryption none

/etc/config/network

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

config interface 'bat'
        option ifname 'bat0'
        option proto 'static'
        option mtu '1500'
        option ipaddr '10.0.0.1'
        option netmask '255.255.255.0'

And then:

/etc/init.d/network restart

Older versions

uci set network.bat0=interface
uci set network.bat0.ifname=bat0
uci set network.bat0.proto=static
uci set network.bat0.mtu=1500
uci set wireless.radio0.disabled=0
uci set network.bat0.ipaddr=10.1.1.1 # change ip address so that each node has different one
uci set network.bat0.netmask=255.255.255.0
uci commit
/etc/init.d/network restart
wifi

Problems

In OpenWrt 17.01.04 (LEDE), self-compiled, with all necessary packages, I failed doing the setup described on this page (although /lib/netifd/proto/batadv.sh is present). Nothing was configured. I had to revert to manually calling batctl from an initscript to get things working.

Aditional Resources

docs/guide-user/network/wifi/mesh/batman.txt · Last modified: 2018/06/27 21:07 by tmomas