Hello all-
I am attempting to use batman-adv in openwrt 8.09.1 on three Ubiquiti NanoStation2. This is just a test environment. For now, my goal is to have:
node 1: eth0 -> 10.0.0.1/24 ath0 -> bat0 -> 10.0.1.1/24
node 2: eth0 -> 10.0.0.2/24 ath0 -> bat0 -> 10.0.1.2/24
node 3: eth0 -> 10.0.0.3/24 ath0 -> bat0 -> 10.0.1.3/24
So far, I have an adhoc network on ath0, and I have installed batmand-adv, battool, and kmod-batman-advanced. Do I need badmand-adv? Is this the old userspace batman-adv implementation?
- "lsmod" shows that a module batman-adv is loaded, and the directory /proc/net/batman-adv/ looks right. - "cat /proc/net/batman-adv/interfaces" shows nothing. - "ifconfig" does *not* list an interface called bat0. - "cat ath0 > /proc/net/batman-adv/interfaces" doesn't complain. - "cat /proc/net/batman-adv/interfaces" *still* shows nothing.
I have no bat0 interface. Rebooting doesn't help. At first, I only installed kmod-batman-advanced. When that didn't work, I installed batmand-adv and battool. Still nothing.
Any ideas? TIA,
Jake
On Thu, Jun 11, 2009 at 11:40 AM, Jacob Marblejacobmarble@gmail.com wrote:
- "cat ath0 > /proc/net/batman-adv/interfaces" doesn't complain.
correction: "echo ath0 > /proc/net/batman-adv/interfaces" doesn't complain.
- "cat /proc/net/batman-adv/interfaces" *still* shows nothing.
correction: "ifconfig" still doesn't show bat0.
Jake
I ran iwconfig and this shows bat0. So I did a little reading about ifconfig.
"cat /proc/net/batman-adv/originators" shows potential nexthops properly. "battool ping ..." works.
I removed the batmand-adv package, and all is well. This must be the userspace version.
In summary:
Install OpenWrt. Create an adhoc network on wifi0. I used LuCI to do this. It will configure an interface ath0.
The openwrt packages required for batman-adv-kernelland to work properly are kmod-batman-advanced and battool (handy; not required). Installing kmod-batman-advanced also inserts the batman-adv module, creating bat0; no insmod or reboot required. "opkg install kmod-batman-advanced battool"
Add ath0 to bat0: "echo ath0 > /proc/net/batman-adv/interfaces"
Configure the batman interface: "ifconfig bat0 10.0.1.x netmask 255.255.255.0"
Do this to two or more openwrt boxes aka "mesh nodes". Be sure that the adhoc network is configured the same on all nodes.
On Friday 12 June 2009 03:46:05 Jacob Marble wrote:
I removed the batmand-adv package, and all is well. This must be the userspace version.
Yes, you should not use the kernel version and the user space version at the same time. Actually, the user space version is obsolete and has been removed from our SVN (http://www.open-mesh.net/changeset/1283) and from OpenWRT lately. It created more confusion than anything else.
The openwrt packages required for batman-adv-kernelland to work properly are kmod-batman-advanced and battool (handy; not required). Installing kmod-batman-advanced also inserts the batman-adv module, creating bat0; no insmod or reboot required. "opkg install kmod-batman-advanced battool"
Add ath0 to bat0: "echo ath0 > /proc/net/batman-adv/interfaces"
Configure the batman interface: "ifconfig bat0 10.0.1.x netmask 255.255.255.0"
Do this to two or more openwrt boxes aka "mesh nodes". Be sure that the adhoc network is configured the same on all nodes.
Great that you found your way through. We seeking to make things more obvious - any hints ?
Regards, Marek
On Fri, Jun 12, 2009 at 5:13 AM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Friday 12 June 2009 03:46:05 Jacob Marble wrote:
I removed the batmand-adv package, and all is well. This must be the userspace version.
Yes, you should not use the kernel version and the user space version at the same time. Actually, the user space version is obsolete and has been removed from our SVN (http://www.open-mesh.net/changeset/1283) and from OpenWRT lately. It created more confusion than anything else.
Agreed.
Great that you found your way through. We seeking to make things more obvious
- any hints ?
batman-advanced needs a howto. I'm a pretty smart guy, but this took me all week to figure out. I'm still shaky and my mesh network isn't working very well yet. I would be willing to put together some more detailed info for OpenWrt.
I'm sure that there are people like me who can "get it" if you just hold their hand through getting bat0 on one node to see bat0 on another node. adhoc mode? ahdemo mode? What is the difference? This might be a little off-topic for batman-adv but it's very relevant.
Also, it's tedious to deal with /proc/net/batman-adv/* It's cool in hacky sort of way, but tedious. Is there any way that this could be manipulated with a script? brctl is a nice interface, how about bactl? "bactl show originators" "bactl show interfaces" "bactl set log_level 15" "bactl help" Of course, leave the /proc interface for hard-core types. ;)
Overall, this is really great software, so I hope barriers-to-entry can be removed.
Jake
On Friday 12 June 2009 23:21:18 Jacob Marble wrote:
batman-advanced needs a howto. I'm a pretty smart guy, but this took me all week to figure out. I'm still shaky and my mesh network isn't working very well yet. I would be willing to put together some more detailed info for OpenWrt.
It would be great if you would write something. We can either publish it on open-mesh.net or link to your site. Christoph Pilka started writing a howto (in German) but the link it not accessable anymore (http://debian.asconix.com/batman-advanced-openwrt-howto).
Also, it's tedious to deal with /proc/net/batman-adv/* It's cool in hacky sort of way, but tedious. Is there any way that this could be manipulated with a script? brctl is a nice interface, how about bactl? "bactl show originators" "bactl show interfaces" "bactl set log_level 15" "bactl help" Of course, leave the /proc interface for hard-core types. ;)
The idea sounds interesting. We could integrate these feature into the battools in order to not create another tool. What do you think ?
Regards, Marek
On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Friday 12 June 2009 23:21:18 Jacob Marble wrote:
batman-advanced needs a howto. I'm a pretty smart guy, but this took me all week to figure out. I'm still shaky and my mesh network isn't working very well yet. I would be willing to put together some more detailed info for OpenWrt.
It would be great if you would write something. We can either publish it on open-mesh.net or link to your site. Christoph Pilka started writing a howto (in German) but the link it not accessable anymore (http://debian.asconix.com/batman-advanced-openwrt-howto).
I have read the Google translation, and it's pretty good, but not simple enough for my simply self. I would be *very happy* to write something.
Also, it's tedious to deal with /proc/net/batman-adv/* It's cool in hacky sort of way, but tedious. Is there any way that this could be manipulated with a script? brctl is a nice interface, how about bactl? "bactl show originators" "bactl show interfaces" "bactl set log_level 15" "bactl help" Of course, leave the /proc interface for hard-core types. ;)
The idea sounds interesting. We could integrate these feature into the battools in order to not create another tool. What do you think ?
Sure, I have already started something, written in sh. I'll post it here later.
On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindnerlindner_marek@yahoo.de wrote:
Also, it's tedious to deal with /proc/net/batman-adv/* It's cool in hacky sort of way, but tedious. Is there any way that this could be manipulated with a script? brctl is a nice interface, how about bactl? "bactl show originators" "bactl show interfaces" "bactl set log_level 15" "bactl help" Of course, leave the /proc interface for hard-core types. ;)
The idea sounds interesting. We could integrate these feature into the battools in order to not create another tool. What do you think ?
Here is batctl. I have only tested it in OpenWrt 8.09.1 and the latest SVN.
Jake
On Tuesday 16 June 2009 03:40:13 Jacob Marble wrote:
Here is batctl. I have only tested it in OpenWrt 8.09.1 and the latest SVN.
Thanks for sharing it with us. I uploaded it on open-mesh: http://downloads.open-mesh.net/batman/useful-scripts-and-tools/batctl and also mentioned it briefly here: http://www.open-mesh.net/wiki/batman-adv
Regards, Marek
On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Friday 12 June 2009 23:21:18 Jacob Marble wrote:
batman-advanced needs a howto. I'm a pretty smart guy, but this took me all week to figure out. I'm still shaky and my mesh network isn't working very well yet. I would be willing to put together some more detailed info for OpenWrt.
It would be great if you would write something. We can either publish it on open-mesh.net or link to your site. Christoph Pilka started writing a howto (in German) but the link it not accessable anymore (http://debian.asconix.com/batman-advanced-openwrt-howto).
Here is the beginning of a How-To. It explains the most basic install from easy-access binaries. I'm working on a second section, which will talk about compiling. http://wiki.hskflashcards.com/index.php?page=B.A.T.M.A.N.+Advanced+on+OpenWr...
On Friday 19 June 2009 02:41:17 Jacob Marble wrote:
Here is the beginning of a How-To. It explains the most basic install from easy-access binaries. I'm working on a second section, which will talk about compiling. http://wiki.hskflashcards.com/index.php?page=B.A.T.M.A.N.+Advanced+on+OpenW rt+How-To
Good work. I added a link in our UserDocs section.
Regards, Marek
Some of my nodes cannot see each other... For example, node 1 can battool ping node 2, but node 2 cannot battool ping node 1. All nodes have the following:
With log_level = 11: "cat ath0 > /proc/net/batman-adv/interfaces" produces: "Can't activate module: the primary interface is not active"
The node that can ping out, but not be pinged gave the following before it died:
"Could not read from deactivated interface <NULL>!"
I have looked at the source code, and I can see where these log messages come from, but nothing else in there makes sense to me. And now it looks like it's working again. This is with all of the interfaces in ahdemo mode.
On Saturday 13 June 2009 01:19:51 Jacob Marble wrote:
Some of my nodes cannot see each other... For example, node 1 can battool ping node 2, but node 2 cannot battool ping node 1.
That would be pretty strange as batman always has to make sure that the connection goes in both directions. Can you post the originators output plus the batping result ?
"cat ath0 > /proc/net/batman-adv/interfaces" produces: "Can't activate module: the primary interface is not active"
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
The node that can ping out, but not be pinged gave the following before it died:
"Could not read from deactivated interface <NULL>!"
Can you explain the exact steps to reproduce this behaviour ?
Regards, Marek
On Fri, Jun 12, 2009 at 2:08 PM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Saturday 13 June 2009 01:19:51 Jacob Marble wrote:
Some of my nodes cannot see each other... For example, node 1 can battool ping node 2, but node 2 cannot battool ping node 1.
That would be pretty strange as batman always has to make sure that the connection goes in both directions. Can you post the originators output plus the batping result ?
I will when it happens again.
"cat ath0 > /proc/net/batman-adv/interfaces" produces: "Can't activate module: the primary interface is not active"
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14) [ 97535] Adding route towards: 00:15:6d:a7:6a:9c (via 00:15:6d:a7:6a:9c) [ 97535] Creating new global hna entry: 00:ff:a2:47:d9:c3 (via 00:15:6d:a7:6a:9c) [ 97539] Changing route towards: 00:15:6d:a7:6a:9c (now via 00:15:6d:a7:6a:14 - was via 00:15:6d:a7:6a:9c)
The node that can ping out, but not be pinged gave the following before it died:
"Could not read from deactivated interface <NULL>!"
Can you explain the exact steps to reproduce this behaviour ?
I will when it happens again.
Jake
On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
It looks like a bug that I fixed in revision 1254. What version are you using ?
Regards, Marek
On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
It looks like a bug that I fixed in revision 1254. What version are you using ?
1176 (from OpenWrt repositories). I'll get the latest svn.
On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marblejacobmarble@gmail.com wrote:
On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
It looks like a bug that I fixed in revision 1254. What version are you using ?
1176 (from OpenWrt repositories). I'll get the latest svn.
Alright, I have OpenWrt SVN compiling, which has revision 1289. However, I would like to compile the batman-advanced code from the batman SVN repository instead. I have tried copying the batman-advanced directory to [the openwrt sdk]/package/ and then run make, and this doesn't work. I have tried compiling the batman-advanced code by simply "make KERNELPATH=~/OpenWrt-SDK-atheros-for-Linux-i686/" and that didn't work. I have tried several paths for KERNELPATH, but I think I need the other cross-compile tools to be available as well...
Can someone give me a quick-and-dirty "Howto compile for OpenWrt"? Afterwards, I could put together a nice README.openwrt for the SVN repository.
TIA,
Jake
On Mon, Jun 15, 2009 at 4:03 PM, Jacob Marblejacobmarble@gmail.com wrote:
On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marblejacobmarble@gmail.com wrote:
On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindnerlindner_marek@yahoo.de wrote:
On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
This message indicates that this nodes already has one interface which is not activate. Could you post "cat /proc/net/batman-adv/interfaces" after you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
It looks like a bug that I fixed in revision 1254. What version are you using ?
1176 (from OpenWrt repositories). I'll get the latest svn.
Alright, I have OpenWrt SVN compiling, which has revision 1289. However, I would like to compile the batman-advanced code from the batman SVN repository instead. I have tried copying the batman-advanced directory to [the openwrt sdk]/package/ and then run make, and this doesn't work. I have tried compiling the batman-advanced code by simply "make KERNELPATH=~/OpenWrt-SDK-atheros-for-Linux-i686/" and that didn't work. I have tried several paths for KERNELPATH, but I think I need the other cross-compile tools to be available as well...
Can someone give me a quick-and-dirty "Howto compile for OpenWrt"? Afterwards, I could put together a nice README.openwrt for the SVN repository.
TIA,
Jake
I tried to define CC:
$ make KERNELPATH=~/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10/ V=99 CC=~/build/openwrt-svn/staging_dir/toolchain-mips_gcc-4.1.2_uClibc-0.9.30.1/usr/bin/mips-openwrt-linux-gcc make -C /home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10/ REVISION=1288 M=/home/jake/build/batman-adv-svn PWD=/home/jake/build/batman-adv-svn -j 2 modules make[1]: Entering directory `/home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10' CC [M] /home/jake/build/batman-adv-svn/main.o cc1: error: unrecognized command line option "-m64" cc1: error: unrecognized command line option "-mno-red-zone" cc1: error: unrecognized command line option "-mcmodel=kernel" cc1: error: unrecognized command line option "-maccumulate-outgoing-args" CC [M] /home/jake/build/batman-adv-svn/proc.o make[2]: *** [/home/jake/build/batman-adv-svn/main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... cc1: error: unrecognized command line option "-m64" cc1: error: unrecognized command line option "-mno-red-zone" cc1: error: unrecognized command line option "-mcmodel=kernel" cc1: error: unrecognized command line option "-maccumulate-outgoing-args" make[2]: *** [/home/jake/build/batman-adv-svn/proc.o] Error 1 make[1]: *** [_module_/home/jake/build/batman-adv-svn] Error 2 make[1]: Leaving directory `/home/jake/build/openwrt-svn/build_dir/linux-atheros/linux-2.6.28.10' make: *** [all] Error 2
change the version in the batman-adv packages Makefile, and rebuild should be all you need
On 6/15/09, Jacob Marble jacobmarble@gmail.com wrote:
On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marblejacobmarble@gmail.com wrote:
On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindnerlindner_marek@yahoo.de
wrote:
On Saturday 13 June 2009 04:27:44 Jacob Marble wrote:
This message indicates that this nodes already has one interface
which is
not activate. Could you post "cat /proc/net/batman-adv/interfaces"
after
you get this result ?
"echo 'ath0' > interfaces" "cat interfaces" ath0
[ 97532] Adding interface: ath0 [ 97532] Can't activate module: the primary interface is not active [ 97534] Adding route towards: 00:15:6d:a7:6a:14 (via 00:15:6d:a7:6a:14) [ 97534] Creating new global hna entry: 00:ff:cf:5c:68:e0 (via 00:15:6d:a7:6a:14)
It looks like a bug that I fixed in revision 1254. What version are you
using ?
1176 (from OpenWrt repositories). I'll get the latest svn.
Alright, I have OpenWrt SVN compiling, which has revision 1289. However, I would like to compile the batman-advanced code from the batman SVN repository instead. I have tried copying the batman-advanced directory to [the openwrt sdk]/package/ and then run make, and this doesn't work. I have tried compiling the batman-advanced code by simply "make KERNELPATH=~/OpenWrt-SDK-atheros-for-Linux-i686/" and that didn't work. I have tried several paths for KERNELPATH, but I think I need the other cross-compile tools to be available as well...
Can someone give me a quick-and-dirty "Howto compile for OpenWrt"? Afterwards, I could put together a nice README.openwrt for the SVN repository.
TIA,
Jake
B.A.T.M.A.N mailing list B.A.T.M.A.N@open-mesh.net https://lists.open-mesh.net/mm/listinfo/b.a.t.m.a.n
Thank you, that worked.
On Mon, Jun 15, 2009 at 4:10 PM, Outback Dingooutbackdingo@gmail.com wrote:
change the version in the batman-adv packages Makefile, and rebuild should be all you need
On Friday 12 June 2009 01:40:11 Jacob Marble wrote:
So far, I have an adhoc network on ath0, and I have installed batmand-adv, battool, and kmod-batman-advanced. Do I need badmand-adv? Is this the old userspace batman-adv implementation?
Yes, batman-adv is the old user space implementation. Please use the latest OpenWRT package which does not contain this daemon anymore. Remove the daemon first and check whether it works for you then.
Regards, Marek
b.a.t.m.a.n@lists.open-mesh.org