Batman - bat0 interface failure on BT HomeHub 5 Type A

Hi,

I hope someone here can help me out, I've gone around the docs and forums looking for an answer, to no avail.

I have two Bt HomeHub 5 Type A's, both freshly installed with openwrt-18.06.4-lantiq-xrx200-bt_homehub-v5a-squashfs-sysupgrade. One is being used as my main router for internet access and works very well. I have been trying to setup a Batman mesh network using this and another BT Home Hub 5 Type A.

The files /etc/config/network and /etc/config/wireless have been setup according to the documentation (https://openwrt.org/docs/guide-user/network/wifi/mesh/batman and https://www.open-mesh.org/projects/batman-adv/wiki/Batman-adv-openwrt-config). The "batman" stanzas are included on both nodes.

Batman version is: batctl openwrt-2018.1-1 [batman-adv: openwrt-2018.1-8]. During installation I removed wpad-mini and replaced with wpad-mesh-openssl.

The mesh network component works fine (both encrypted and non-encrypted), but I have so far been unable to get the bat0 interface to come up. Thus, I cannot proceed any further.

I'm sure there is probably a simple solution to this issue. I'd really appreciate help finding the solution to get this working.

Let me know if you need any further details.

Many thanks,

Jon

Some technical details:

Network configuration files (on the "slave" - no WAN etc) note radio1 is the 2.4 GHz radio:

*/etc/config/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 'fdaf:aa0d:a4c3::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.1.11'
        option gateway '192.168.1.1'
        option dns '8.8.8.8 8.8.4.4'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr '54:64:d9:29:a3:aa'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option aggregated_ogms 1
        option ap_isolation 0
        option bonding 0
        option fragmentation 1
        #option gw_bandwidth '10000/2000'
        option gw_mode 'off'
        #option gw_sel_class 20
        option log_level 0
        option orig_interval 1000
        option bridge_loop_avoidance 1
        option distributed_arp_table 1
        option multicast_mode 1
        option network_coding 0
        option hop_penalty 30
        option isolation_mark '0x00000000/0x00000000'

config interface 'nwi_mesh0'
        option ifname 'mesh0'
        option mtu '2304'
        option proto 'batadv_hardif'
        option master 'bat0'

*/etc/config/wireless:*

config wifi-device 'radio0'
        option type 'mac80211'
        option hwmode '11a'
        option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
        option htmode 'VHT80'
        option country 'GB'
        option legacy_rates '1'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option encryption 'psk2+ccmp'
        option key 'a63954f594'
        option wpa_disable_eapol_key_retries '1'
        option ssid 'BTHub5-5GHZ'
        option disabled '1'

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:0e.0'
        option htmode 'HT20'
        option country 'GB'
        option legacy_rates '1'
        option __toggle 'Enable'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid 'BTHub-SH6K'
        option encryption 'psk2+tkip+ccmp'
        option key 'a63954f594'
        option wpa_disable_eapol_key_retries '1'
        option disabled '1'

config wifi-iface 'mesh0'
        option device 'radio1'
        option ifname 'mesh0'
        option network 'nwi_mesh0'
        option mode 'mesh'
        option mesh_fwding '0'
        option mesh_id 'MyMesh'
        option encryption 'none'
        option encryption 'psk2+ccmp'
        option key 'MyPassword'
		
*ip link* shows (no bat0):

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
    link/ether 76:25:b3:1b:f8:16 brd ff:ff:ff:ff:ff:ff
5: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 54:64:d9:29:a3:aa brd ff:ff:ff:ff:ff:ff
6: eth0.1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-lan state UP qlen 1000
    link/ether 54:64:d9:29:a3:aa brd ff:ff:ff:ff:ff:ff
7: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2304 qdisc noqueue state UP qlen 1000
    link/ether 54:64:d9:29:a3:ac brd ff:ff:ff:ff:ff:ff

*iw dev mesh0 station dump* shows that the mesh network itself is working OK - connecting to the main router which has also been configured:

Station 44:e9:dd:6b:05:68 (on mesh0)
        inactive time:  96 ms
        rx bytes:       8887
        rx packets:     130
        tx bytes:       274
        tx packets:     3
        tx retries:     0
        tx failed:      0
        rx drop misc:   0
        signal:         -42 [-45, -44] dBm
        signal avg:     -41 [-43, -46] dBm
        Toffset:        1639409794 us
        tx bitrate:     6.5 MBit/s MCS 0
        rx bitrate:     39.0 MBit/s MCS 4
        mesh llid:      31641
        mesh plid:      33050
        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:            no
        TDLS peer:      no
        DTIM period:    2
        beacon interval:100
        short slot time:yes
        connected time: 6 seconds


*iw phy | fgrep mesh* shows:

* mesh point
* #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
* mesh point
* #{ AP, mesh point } <= 8, #{ managed } <= 1,

The interfaces GUI shows "unsupported protocol type" for the bat0 interface:

You’re running the old batman package with the new config. If you want to run batman, I’d upgrade to a current ROM and install batman-adv. There’s also a link in the OpenWrt wiki page to an old version that describes the old config.

Then again, with only two devices, why a mesh protocol and routing?? Mesh only becomes interesting when there are different paths - three or more nodes. WDS or GRE tunnels are sufficient for a point-to-point link.

Hi Jeff,

Thanks for your prompt response.

I made the mistake of assuming that the version installed in OpenWRT would correspond to the documentation page, my error.

In terms of updating Batman to a version that supports my configuration, is there an "easy" way with opkg or do I need to download the packages from https://downloads.open-mesh.org/batman/releases/batman-adv-2019.4/ and then compile manually on the device?

I'm only setting up the initial two nodes to prove that the setup will work. Once I have these two devices working I'll add another 2 or more (identical devices) to make best use of the mesh.

Many thanks,

Jon

1 Like

Personally, I build from source which avoids some of the headaches around package versions changing on a regular basis with snapshot builds.

If not building from source, I'd go with either snapshots (master branch "nightlies") or 19.07 (presently in "pre-RC" status)

Great, thank you Jeff.

I'll give that a go this evening.

Many thanks,

Jon

1 Like

hi @GrumpyChops

How did you finally fix it, I am also facing the same issue, I am trying to build from the source.

Hi sorry for the late reply.

It was quite some time ago now, so I'll just provide what works (still), I can't remember the full details, but do know that it took a lot longer than I expected. I was almost ready to throw in the towel and go buy an off the shelf mesh kit. I'm glad I didn't though, as I now have a pretty stable mesh network in my home, with 4 nodes in total. Total cost ~£30 + lots of time, effort and learning.
The network uses OpenDNS for web content filtering and redirects all search engine requests/ youtube etc to the safe search option, to protect my kids.

Regarding building from source... I didn't bother. At the time the latest release candidate had the right packages/ version of BATMAN, so I just used that. I'm running OpenWrt 19.07.2 on all nodes, so assume it was the release candidate of that version.

I think the biggest mistake that I made, was assuming that I could make the gateway router 192.168.1.1 also act as a BATMAN node. Once I moved to using the gateway only for direct broadband connectivity and then attached the first of my BATMAN nodes to that did I have success.

So the overall layout is 192.168.1.1 is the base router/ gateway with connection via the BT socket on the wall. Connected to that via a network cable is 192.168.1.21. Throughout the house are three other nodes 192.168.1.22 to 24. Using batctl o, I can see all of the nodes happily talking to each other wirelessly. Use the files below (with the necessary modifications) to configure each Mesh node.

I hope his helps you.

Regards,

Jon

On each node amend the following files:

/etc/config/network

        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdaf:aa0d:a4c3::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1 bat0.3333'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
# Set the IP address of the node on the next line - different IP's per node.
        option ipaddr '192.168.1.21'
# Uncomment the next two lines when you want the node to get to the internet directly - e.g. when installing packages on the node.
#        option gateway '192.168.1.1'
#        option dns '192.168.1.1'

config device 'lan_dev'
        option name 'eth0.1'
        option macaddr '54:64:d9:29:a3:aa'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 4 6t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6t'

config interface 'bat0'
        option proto 'batadv'
        option routing_algo 'BATMAN_IV'
        option aggregated_ogms 1
        option ap_isolation 0
        option bonding 0
        option fragmentation 1
        #option gw_bandwidth '10000/2000'
        option gw_mode 'off'
        #option gw_sel_class 20
        option log_level 0
        option orig_interval 1000
        option bridge_loop_avoidance 1
        option distributed_arp_table 1
        option multicast_mode 1
        option network_coding 0
        option hop_penalty 30
        option isolation_mark '0x00000000/0x00000000'

config interface 'nwi_mesh0'
        option ifname 'mesh0'
        option mtu '2304'
        option proto 'batadv_hardif'
        option master 'bat0'

config interface 'vlan3333'
        option type 'bridge'
        option stp '1'
        option ifname 'bat0.3333'
        option proto 'none'
        option auto '1'
        option delegate '0'

/etc/config/wireless

        option type 'mac80211'
        option hwmode '11a'
        option path 'pci0000:01/0000:01:00.0/0000:02:00.0'
        option htmode 'VHT80'
        option country 'GB'
        option legacy_rates '1'
        option channel 'auto'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option encryption 'psk2+ccmp'
        option key '<AddYourSSIDPasswordHere>'	#Change this - same as default_radio1
        option wpa_disable_eapol_key_retries '1'
        option ssid '<AddYourSSIDNameHere>' #Change this - same as default_radio1

config wifi-device 'radio1'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:0e.0'
        option htmode 'HT20'
        option country 'GB'
        option __toggle 'Enable'

config wifi-iface 'default_radio1'
        option device 'radio1'
        option network 'lan'
        option mode 'ap'
        option ssid '<AddYourSSIDNameHere>' #Change this
        option encryption 'psk2+tkip+ccmp'
        option key '<AddYourSSIDPasswordHere>'	#Change this
        option wpa_disable_eapol_key_retries '1'

config wifi-iface 'mesh0'
        option device 'radio1'
        option ifname 'mesh0'
        option network 'nwi_mesh0'
        option mode 'mesh'
        option mesh_fwding '0'
        option mesh_id '<AddYourMESHNameHere>'	#Change this
        option encryption 'psk2+ccmp'
        option key '<AddYourMESHPasswordHere>'	#Change this

Not sure if the stuff for config wifi-iface 'default_radio0' is required, can't remember why I have the details for my home SSID in both that and config wifi-iface 'default_radio1'. Whatever, it works so I'm not inclined to change my setup.