I am having some trouble setting up batman-adv for my mesh. I can get each access point to see the other using "batctl o" but I am not able to route messages between my client devices. I think there is something wrong with my bridging.
Here is the nature of my testbed:
2 Pandaboards running Ubuntu 12.04. They are connected to each other with wired Ethernet (eth0) and wireless ad-hoc (wlan1). wlan0 is set up as an access point using hostapd and udhcpd.
2 client Android phones, one connected to each access point. Using the Scripting Layer for Android app, they are running Python scripts. One is set to receive UDP messages, and the other is hardcoded to send UDP messages at a 2-per-second clip to the IP address of the receiver.
In setting up batman-adv, I run these commands:
sudo modprobe batman-adv sudo batctl if add eth0 sudo batctl if add wlan1 sudo ifconfig eth0 0.0.0.0 mtu 1528 sudo ifconfig wlan1 0.0.0.0 mtu 1528 sudo ifconfig bat0 10.50.0.x (x being a unique number for each access point) netmask 255.255.0.0 up
At this point, and after any modification to bat0, I receive several instances of the error message: "bat0: hw csum failure." However, when I run "batctl o" I am able to see the MAC addresses of the opposite access point's eth0 and wlan1 interfaces, indicating so far so good. I can even ping the opposite board with a regular ping of their bat0 IP address. My difficulty is getting the access points to share HNA messages that show routes to their respective client devices. I can capably use batmand for such a task (sudo batmand -a 10.x.0.0/16 -d 1 eth0 wlan1) because the -a is easy for announcing the wlan0 network. How do I perform a similar task using this architecture?
Regards, Adam
On Tuesday 07 August 2012 10:18:13 adam wiz wrote:
I am having some trouble setting up batman-adv for my mesh. I can get each access point to see the other using "batctl o" but I am not able to route messages between my client devices. I think there is something wrong with my bridging.
[...]
In setting up batman-adv, I run these commands:
sudo modprobe batman-adv sudo batctl if add eth0 sudo batctl if add wlan1 sudo ifconfig eth0 0.0.0.0 mtu 1528 sudo ifconfig wlan1 0.0.0.0 mtu 1528 sudo ifconfig bat0 10.50.0.x (x being a unique number for each access point) netmask 255.255.0.0 up
What brigde? I don't see a single bridge here. Only an ethernet device, wlan device and a batman device that contains both. The bat0 device has an ip... so I would doubt that you added it to a bridge.
I would guess that you wanted to do something like this (I just assume that br0 is already created through hostapd and includes wlan0... you have to ensure that this is done):
sudo modprobe batman-adv sudo batctl if add eth0 sudo batctl if add wlan1 sudo ip addr flush dev eth0 sudo ip addr flush dev wlan1 sudo ip link set dev eth0 mtu 1528 sudo ip link set dev wlan1 mtu 1528 sudo brctl addif br0 bat0 sudo ip link set dev bat0 up sudo ip addr add 10.50.0.x/24 dev br0 sudo ip link set dev br0 up
Kind regards, Sven
Thanks for the quick reply. I didn't mention my bridge setup because it didn't work, but what I was doing was essentially following the quick-start-guide. In this case I did not assign IP to bat0, but created a bridge called mesh-bridge and added wlan0 and bat0 to it. I also used udhcp to configure the addresses assigned to clients of the access points.
I will try this, and I appreciate the help.
Adam
--- On Tue, 8/7/12, Sven Eckelmann sven@narfation.org wrote:
From: Sven Eckelmann sven@narfation.org Subject: Re: [B.A.T.M.A.N.] trouble setting up my mesh To: b.a.t.m.a.n@lists.open-mesh.org Cc: "adam wiz" gibsonsg91921@yahoo.com Date: Tuesday, August 7, 2012, 1:33 PM On Tuesday 07 August 2012 10:18:13 adam wiz wrote:
I am having some trouble setting up batman-adv for my
mesh. I can get each
access point to see the other using "batctl o" but I am
not able to route
messages between my client devices. I think there is
something wrong with
my bridging.
[...]
In setting up batman-adv, I run these commands:
sudo modprobe batman-adv sudo batctl if add eth0 sudo batctl if add wlan1 sudo ifconfig eth0 0.0.0.0 mtu 1528 sudo ifconfig wlan1 0.0.0.0 mtu 1528 sudo ifconfig bat0 10.50.0.x (x being a unique number
for each access point)
netmask 255.255.0.0 up
What brigde? I don't see a single bridge here. Only an ethernet device, wlan device and a batman device that contains both. The bat0 device has an ip... so I would doubt that you added it to a bridge.
I would guess that you wanted to do something like this (I just assume that br0 is already created through hostapd and includes wlan0... you have to ensure that this is done):
sudo modprobe batman-adv sudo batctl if add eth0 sudo batctl if add wlan1 sudo ip addr flush dev eth0 sudo ip addr flush dev wlan1 sudo ip link set dev eth0 mtu 1528 sudo ip link set dev wlan1 mtu 1528 sudo brctl addif br0 bat0 sudo ip link set dev bat0 up sudo ip addr add 10.50.0.x/24 dev br0 sudo ip link set dev br0 up
Kind regards, Sven
b.a.t.m.a.n@lists.open-mesh.org