Hello,
I am trying to connect to device by wifi mesh using BATMAN. I think that I am really close to achieve it but, when I probe making ping from 192.168.2.34 (actual device) to 192.168.2.33 the other there are not any response. Two devices are very near so, it is imposible not to be coverage. In addition, if I scan wifi the signal is found.
This is my UCI configuration:
/etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option macaddr '00:25:CA:3C:1F:97'
option channel '1'
option phy 'phy0'
option hwmode '11g'
option path 'soc0/soc/2100000.aips-bus/2190000.usdhc/mmc_host/mmc0/mmc0:0001/mmc0:0001:1'
option country 'ES'
option txpower '18'
config wifi-iface 'mesh'
option device 'radio0'
option mode 'adhoc'
option network 'bat0_hardif_mesh0'
option ssid 'ingerev'
option encryption 'psk2'
option key 'meshmesh'
/etc/config/network
config interface 'bat0'
option proto 'batadv'
## optional settings to override the defaults:
option routing_algo 'BATMAN_IV'
option aggregated_ogms 1
option ap_isolation 0
option bonding 0
option fragmentation 1
option gw_mode 'off'
#option gw_bandwidth '10000/2000'
#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 multicast_fanout 16
option network_coding 0
option hop_penalty 30
option isolation_mark '0x00000000/0x00000000'
config interface 'bat0_hardif_mesh0'
option proto 'batadv_hardif'
option master 'bat0'
option mtu '1560'
config interface 'bat0_lan'
option ifname 'bat0'
option proto 'static'
option ipaddr '192.168.2.34'
option netmask '255.255.255.0'
option ip6assign '60'
The result of this configuration is the following one:
bat0
and wlan0
are up. bat0
is master of wlan0
and it has got the IP address. If I use tcpdump
tool in bat0
interface as the same time as I ping that is the result:
Thank you for you attetion. I am looking forward to reading your answers
mk24
December 3, 2019, 1:43pm
2
This interface name is not valid, maximum length (including sometimes mandatory prefix) is 15 characters.
2 Likes
Thank You! I corrected it but, it does not still work.
bat0
is the interface who should have the IP. Isn't it?
Theorically is linked with wlan0
and, for this reason, wlan0
does not need any IP.
jeff
December 3, 2019, 2:16pm
4
The current batman protocol doesn’t need IP addresses on its interfaces at all. The IP address is generally associated with the bridge over the batman interface or sub-interface and the interface(s) associated with the local network segment.
I don't see a bridge in your config for the wireless to associate with. I suspect that if you look at ip link
and brctl show
you'll find your network is not as you might imagine it.
Code/terminal output is much more readable using the preformatted-text button, </>
mk24
December 3, 2019, 2:30pm
5
For initial testing I suggest placing bat0 into the br-lan which exists by default. Then you can set up a typical main router and one or more dumb AP configuration except the routers are linked by mesh instead of by cable. If you enable stp on the br-lan you can safely connect the routers by cable until you get the mesh working.
1 Like
Is this what you said?
config interface 'bat0'
option proto 'batadv'
## optional settings to override the defaults:
option routing_algo 'BATMAN_IV'
option aggregated_ogms 1
option ap_isolation 0
option bonding 0
option fragmentation 1
option gw_mode 'off'
#option gw_bandwidth '10000/2000'
#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 multicast_fanout 16
option network_coding 0
option hop_penalty 30
option isolation_mark '0x00000000/0x00000000'
config interface 'bat0_hardif'
option proto 'batadv_hardif'
option master 'bat0'
option mtu '2034'
config interface 'bat0_lan'
option type 'bridge'
option stp '1'
option ifname 'bat0'
option proto 'static'
option ipaddr '192.168.2.34'
option netmask '255.255.255.0'
option ip6assign '60'
Those are the interfaces:
bat0 Link encap:Ethernet HWaddr 2A:6F:C3:00:17:FF
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:281 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2520 (2.4 KiB) TX bytes:252 (252.0 B)
br-bat0_lan Link encap:Ethernet HWaddr 2A:6F:C3:00:17:FF
inet addr:192.168.2.34 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::286f:c3ff:fe00:17ff/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1680 (1.6 KiB) TX bytes:1524 (1.4 KiB)
eth0 Link encap:Ethernet HWaddr F8:DC:7A:23:9E:85
inet addr:192.168.1.33 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1160 errors:0 dropped:0 overruns:0 frame:0
TX packets:1160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:61384 (59.9 KiB) TX bytes:61384 (59.9 KiB)
usb0 Link encap:Ethernet HWaddr 7A:63:7C:D5:9B:03
inet addr:192.168.33.33 Bcast:192.168.33.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:515 errors:0 dropped:0 overruns:0 frame:0
TX packets:256 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:56113 (54.7 KiB) TX bytes:41416 (40.4 KiB)
wlan0 Link encap:Ethernet HWaddr 00:25:CA:3C:1F:97
inet6 addr: fe80::225:caff:fe3c:1f97/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:2034 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:533 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:52438 (51.2 KiB)
ip link
command result:
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2034 qdisc pfifo_fast master bat0 state UP mode DORMANT group default qlen 1000
link/ether 00:25:ca:3c:1f:97 brd ff:ff:ff:ff:ff:ff
7: bat0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-bat0_lan state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 2a:6f:c3:00:17:ff brd ff:ff:ff:ff:ff:ff
8: br-bat0_lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 2a:6f:c3:00:17:ff brd ff:ff:ff:ff:ff:ff
It is wrong again...