[WLANware] batman-adv

brent bts at project-phree.org
Fri Jul 26 06:43:21 CEST 2013


On 07/25/2013 08:49 PM, Moritz Warning wrote:
> This will probably help as well:
> 
> http://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config
> 
> regards,
> mwarning
> 

EUREKA.

Have you ever been staring at a problem for so long that you start
"over-thinking" it, and miss some really obvious errors? That's exactly
what was happening here- I had mis-matched network names.

For prosperity's sake (i.e. for someone perhaps parsing the list looking
for a solution), here's the error message you'd get:

root at phreeN:/etc/config# batctl o
Error - mesh has not been enabled yet
Activate your mesh by adding interfaces to batman-adv

(which is a bit ambiguously worded in this context but, of course,
correct- interfaces aren't being matched up properly)

And "batctl if" would be blank:

root at phreeN:/etc/config# batctl if
root at phreeN:/etc/config#

Now. Here's the *working* configuration I have, which adds the wlan0-1
interface to bat0 on boot as expected (only changed configs included):

root at phreeN:/etc/config# egrep -v '^#|^\ .*#' batman-adv
config 'mesh' 'bat0'
        option 'aggregated_ogms' 1
        option 'ap_isolation' 1
        option 'bonding' 0
        option 'gw_mode' 'server'
        option 'bridge_loop_avoidance' 1

root at phreeN:/etc/config# egrep -v '^#|^\ .*#' network
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.1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '172.16.1.1'
        option netmask '255.255.255.0'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'mesh'
        option ifname 'wlan0-1'
        option mtu '1528'
        option proto 'batadv'
        option mesh 'bat0'

config interface 'vpn'
        option ifname 'tun0'
        option proto 'none'

config switch
        option name 'rtl8366rb'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'rtl8366rb'
        option vlan '1'
        option ports '1 2 3 4 5t'

config switch_vlan
        option device 'rtl8366rb'
        option vlan '2'
        option ports '0 5t'

root at phreeN:/etc/config# egrep -v '^#|^\ .*#' wireless
config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11ng'
        option htmode 'HT20'
        list ht_capab 'SHORT-GI-40'
        list ht_capab 'DSSS_CCK-40'
        option channel '3'
        option disabled '0'
        option phy 'phy0'

config wifi-iface
        option device 'radio0'
        option encryption 'none'
        option network 'lan'
        option mode 'ap'
        option ssid 'Project.Phree'
        option ifname 'wlan0'

config wifi-iface
        option device 'radio0'
        option network 'mesh'
        option mode 'adhoc'
        option bssid 'DE:AD:BE:EF:D0:0D'
        option ssid 'mesh0'
        option mcast_rate '11000'
        option ifname 'wlan0-1'

And, on a reboot,

root at phreeN:/# batctl if
wlan0-1: active

root at phreeN:/# batctl o
[B.A.T.M.A.N. adv 2013.1.0, MainIF/MAC: wlan0-1/XX:XX:XX:XX:XX:XX (bat0)]
  Originator      last-seen (#/255)           Nexthop [outgoingIF]:
Potential nexthops ...
YY:YY:YY:YY:YY:YY    0.940s   (238) YY:YY:YY:YY:YY:YY [   wlan0-1]:
YY:YY:YY:YY:YY:YY (238)

and from the test node (desktop w/ USB Alfa antenna):

dawid ~ # batctl o
[B.A.T.M.A.N. adv 2013.2.0, MainIF/MAC: wlan0/YY:YY:YY:YY:YY:YY (bat0)]
  Originator      last-seen (#/255)           Nexthop [outgoingIF]:
Potential nexthops ...
XX:XX:XX:XX:XX:XX    0.450s   (137) XX:XX:XX:XX:XX:XX [     wlan0]:
XX:XX:XX:XX:XX:XX (137)

(Apologies for the newline-mangling)

Thanks for taking a look, Moritz et. al.! Sorry for wasting your time. :)

-- 
brent s.
Project.Phree
http://phreewifi.org


More information about the WLANware mailing list