All of lore.kernel.org
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] batman advanced in openwrt
@ 2009-06-11 17:40 Jacob Marble
  2009-06-11 18:12 ` Jacob Marble
  2009-06-18 13:10 ` Marek Lindner
  0 siblings, 2 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-11 17:40 UTC (permalink / raw)
  To: b.a.t.m.a.n

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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-11 17:40 [B.A.T.M.A.N.] batman advanced in openwrt Jacob Marble
@ 2009-06-11 18:12 ` Jacob Marble
  2009-06-11 19:46   ` Jacob Marble
  2009-06-18 13:10 ` Marek Lindner
  1 sibling, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-11 18:12 UTC (permalink / raw)
  To: b.a.t.m.a.n

On Thu, Jun 11, 2009 at 11:40 AM, Jacob Marble<jacobmarble@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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-11 18:12 ` Jacob Marble
@ 2009-06-11 19:46   ` Jacob Marble
  2009-06-12 11:13     ` Marek Lindner
  0 siblings, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-11 19:46 UTC (permalink / raw)
  To: b.a.t.m.a.n

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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-11 19:46   ` Jacob Marble
@ 2009-06-12 11:13     ` Marek Lindner
  2009-06-12 15:21       ` Jacob Marble
  0 siblings, 1 reply; 21+ messages in thread
From: Marek Lindner @ 2009-06-12 11:13 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 11:13     ` Marek Lindner
@ 2009-06-12 15:21       ` Jacob Marble
  2009-06-12 16:59         ` Marek Lindner
  2009-06-12 17:19         ` Jacob Marble
  0 siblings, 2 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-12 15:21 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 5:13 AM, Marek Lindner<lindner_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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 15:21       ` Jacob Marble
@ 2009-06-12 16:59         ` Marek Lindner
  2009-06-12 17:14           ` Jacob Marble
                             ` (2 more replies)
  2009-06-12 17:19         ` Jacob Marble
  1 sibling, 3 replies; 21+ messages in thread
From: Marek Lindner @ 2009-06-12 16:59 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 16:59         ` Marek Lindner
@ 2009-06-12 17:14           ` Jacob Marble
  2009-06-15 19:40           ` Jacob Marble
  2009-06-18 18:41           ` Jacob Marble
  2 siblings, 0 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-12 17:14 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindner<lindner_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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 15:21       ` Jacob Marble
  2009-06-12 16:59         ` Marek Lindner
@ 2009-06-12 17:19         ` Jacob Marble
  2009-06-12 20:08           ` Marek Lindner
  1 sibling, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-12 17:19 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 17:19         ` Jacob Marble
@ 2009-06-12 20:08           ` Marek Lindner
  2009-06-12 20:27             ` Jacob Marble
  0 siblings, 1 reply; 21+ messages in thread
From: Marek Lindner @ 2009-06-12 20:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 20:08           ` Marek Lindner
@ 2009-06-12 20:27             ` Jacob Marble
  2009-06-12 21:38               ` Marek Lindner
  0 siblings, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-12 20:27 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 2:08 PM, Marek Lindner<lindner_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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 20:27             ` Jacob Marble
@ 2009-06-12 21:38               ` Marek Lindner
  2009-06-12 21:52                 ` Jacob Marble
  0 siblings, 1 reply; 21+ messages in thread
From: Marek Lindner @ 2009-06-12 21:38 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 21:38               ` Marek Lindner
@ 2009-06-12 21:52                 ` Jacob Marble
  2009-06-15 22:03                   ` Jacob Marble
  0 siblings, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-12 21:52 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindner<lindner_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.

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 16:59         ` Marek Lindner
  2009-06-12 17:14           ` Jacob Marble
@ 2009-06-15 19:40           ` Jacob Marble
  2009-06-15 23:02             ` Marek Lindner
  2009-06-18 18:41           ` Jacob Marble
  2 siblings, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-15 19:40 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindner<lindner_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

[-- Attachment #2: batctl --]
[-- Type: application/octet-stream, Size: 3551 bytes --]

#!/bin/sh
#
# batctl - batman-adv control tool; wrapper for /proc/net/batman-adv interface
#
# written by Jacob Marble (jacobmarble@gmail.com)
# jun-2009

PREFIX="/proc/net/batman-adv/"
INTERFACES="interfaces"
ORIGINATORS="originators"
LOG_LEVEL="log_level"
ORIG_INTERVAL="orig_interval"
TRANSTABLE_GLOBAL="transtable_global"
TRANSTABLE_LOCAL="transtable_local"
AGGREGATE_OGM="aggregate_ogm"
VIS="vis"
VIS_FORMAT="vis_format"
LOG="log"

batctl_test_file() {
	if [ ! -r $1 ] ; then
		echo "$1 does not exist or is not readable."
		exit 1
	fi
	return 0
}

batctl_interfaces() {
	batctl_test_file $PREFIX$INTERFACES
	if [ -n "$1" ] ; then
		if [ "$1" = "none" ] ; then
			echo "" > $PREFIX$INTERFACES
		else
			echo "$1" > $PREFIX$INTERFACES
		fi
	fi
	echo "Interfaces attached to bat0: `cat $PREFIX$INTERFACES`"
}

batctl_originators() {
	batctl_test_file $PREFIX$ORIGINATORS
	cat $PREFIX$ORIGINATORS
}

batctl_log_level() {
	batctl_test_file $PREFIX$LOG_LEVEL
	[ -n "$1" ] && echo "$1" > $PREFIX$LOG_LEVEL
	echo -e "Currently logging:\n`cat $PREFIX$LOG_LEVEL`"
}

batctl_orig_interval() {
	batctl_test_file $PREFIX$ORIG_INTERVAL
	[ -n "$1" ] && echo "$1" > $PREFIX$ORIG_INTERVAL
	echo "Originator Interval: `cat $PREFIX$ORIG_INTERVAL`"
}

batctl_transtable_global() {
	batctl_test_file $PREFIX$TRANSTABLE_GLOBAL
	cat $PREFIX$TRANSTABLE_GLOBAL
}

batctl_transtable_local() {
	batctl_test_file $PREFIX$TRANSTABLE_LOCAL
	cat $PREFIX$TRANSTABLE_LOCAL
}

batctl_aggregate_ogm() {
	batctl_test_file $PREFIX$AGGREGATE_OGM
	echo "Aggregate OGM value: `cat $PREFIX$AGGREGATE_OGM`"
}

batctl_vis() {
	batctl_test_file $PREFIX$VIS
	[ -n "$1" ] && echo "$1" > $PREFIX$VIS
	echo -e "Visualization server says:\n`cat $PREFIX$VIS`"
}

batctl_vis_format() {
	batctl_test_file $PREFIX$VIS_FORMAT
	[ -n "$1" ] && echo "$1" > $PREFIX$VIS_FORMAT
	echo -e "Visualization server format:\n`cat $PREFIX$VIS_FORMAT`"
}

batctl_log() {
	batctl_test_file $PREFIX$LOG
	cat $PREFIX$LOG
}

if [ $# -ne 0 ] ; then
	[ "$1" = "all" -o "$1" = "$INTERFACES" ] && batctl_$INTERFACES $2
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$ORIGINATORS" ] && batctl_$ORIGINATORS
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$LOG_LEVEL" ] && batctl_$LOG_LEVEL $2
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$ORIG_INTERVAL" ] && batctl_$ORIG_INTERVAL $2
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$TRANSTABLE_GLOBAL" ] && batctl_$TRANSTABLE_GLOBAL
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$TRANSTABLE_LOCAL" ] && batctl_$TRANSTABLE_LOCAL
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$AGGREGATE_OGM" ] && batctl_$AGGREGATE_OGM
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$VIS" ] && batctl_$VIS $2
	[ "$1" = "all" ] && echo -e ""
	[ "$1" = "all" -o "$1" = "$VIS_FORMAT" ] && batctl_$VIS_FORMAT $2
	[ "$1" = "$LOG" ] && batctl_$LOG
else
	echo "batctl is batman-advanced-control, candy for the /proc interface"
	echo "Usage: $0 command [value]"
	echo "commands:"
	echo "	$INTERFACES		[athX|ethX|none|whatever]"
	echo "	$ORIGINATORS"
	echo "	$LOG_LEVEL		[0-15]"
	echo "	$ORIG_INTERVAL		[integer > 0]"
	echo "	$TRANSTABLE_GLOBAL"
	echo "	$TRANSTABLE_LOCAL"
	echo "	$AGGREGATE_OGM"
	echo "	$VIS			[client|server]"
	echo "	$VIS_FORMAT		[dot_draw|json]"
	echo "	$LOG"
	echo "	all"
	echo "examples:"
	echo "	$0 $INTERFACES ath0	# add ath0 to the bat0 interface"
	echo "	$0 $INTERFACES none	# clear all interfaces and disable batman-advanced"
	echo "	$0 all		# show everything except the log"
	exit 0
fi

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 21:52                 ` Jacob Marble
@ 2009-06-15 22:03                   ` Jacob Marble
  2009-06-15 22:08                     ` Jacob Marble
  2009-06-15 22:10                     ` Outback Dingo
  0 siblings, 2 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-15 22:03 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marble<jacobmarble@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindner<lindner_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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-15 22:03                   ` Jacob Marble
@ 2009-06-15 22:08                     ` Jacob Marble
  2009-06-15 22:10                     ` Outback Dingo
  1 sibling, 0 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-15 22:08 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Mon, Jun 15, 2009 at 4:03 PM, Jacob Marble<jacobmarble@gmail.com> wrote:
> On Fri, Jun 12, 2009 at 3:52 PM, Jacob Marble<jacobmarble@gmail.com> wrote:
>> On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindner<lindner_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

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-15 22:03                   ` Jacob Marble
  2009-06-15 22:08                     ` Jacob Marble
@ 2009-06-15 22:10                     ` Outback Dingo
  2009-06-18 18:38                       ` Jacob Marble
  1 sibling, 1 reply; 21+ messages in thread
From: Outback Dingo @ 2009-06-15 22:10 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]

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 Marble<jacobmarble@gmail.com>
> wrote:
> > On Fri, Jun 12, 2009 at 3:38 PM, Marek Lindner<lindner_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
>

[-- Attachment #2: Type: text/html, Size: 2850 bytes --]

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-15 19:40           ` Jacob Marble
@ 2009-06-15 23:02             ` Marek Lindner
  0 siblings, 0 replies; 21+ messages in thread
From: Marek Lindner @ 2009-06-15 23:02 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-11 17:40 [B.A.T.M.A.N.] batman advanced in openwrt Jacob Marble
  2009-06-11 18:12 ` Jacob Marble
@ 2009-06-18 13:10 ` Marek Lindner
  1 sibling, 0 replies; 21+ messages in thread
From: Marek Lindner @ 2009-06-18 13:10 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-15 22:10                     ` Outback Dingo
@ 2009-06-18 18:38                       ` Jacob Marble
  0 siblings, 0 replies; 21+ messages in thread
From: Jacob Marble @ 2009-06-18 18:38 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

Thank you, that worked.

On Mon, Jun 15, 2009 at 4:10 PM, Outback Dingo<outbackdingo@gmail.com> wrote:
> change the version in the batman-adv packages Makefile, and rebuild should
> be all you need
>

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-12 16:59         ` Marek Lindner
  2009-06-12 17:14           ` Jacob Marble
  2009-06-15 19:40           ` Jacob Marble
@ 2009-06-18 18:41           ` Jacob Marble
  2009-06-19 11:37             ` Marek Lindner
  2 siblings, 1 reply; 21+ messages in thread
From: Jacob Marble @ 2009-06-18 18:41 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

On Fri, Jun 12, 2009 at 10:59 AM, Marek Lindner<lindner_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+OpenWrt+How-To

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [B.A.T.M.A.N.] batman advanced in openwrt
  2009-06-18 18:41           ` Jacob Marble
@ 2009-06-19 11:37             ` Marek Lindner
  0 siblings, 0 replies; 21+ messages in thread
From: Marek Lindner @ 2009-06-19 11:37 UTC (permalink / raw)
  To: The list for a Better Approach To Mobile Ad-hoc Networking

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


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2009-06-19 11:37 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-11 17:40 [B.A.T.M.A.N.] batman advanced in openwrt Jacob Marble
2009-06-11 18:12 ` Jacob Marble
2009-06-11 19:46   ` Jacob Marble
2009-06-12 11:13     ` Marek Lindner
2009-06-12 15:21       ` Jacob Marble
2009-06-12 16:59         ` Marek Lindner
2009-06-12 17:14           ` Jacob Marble
2009-06-15 19:40           ` Jacob Marble
2009-06-15 23:02             ` Marek Lindner
2009-06-18 18:41           ` Jacob Marble
2009-06-19 11:37             ` Marek Lindner
2009-06-12 17:19         ` Jacob Marble
2009-06-12 20:08           ` Marek Lindner
2009-06-12 20:27             ` Jacob Marble
2009-06-12 21:38               ` Marek Lindner
2009-06-12 21:52                 ` Jacob Marble
2009-06-15 22:03                   ` Jacob Marble
2009-06-15 22:08                     ` Jacob Marble
2009-06-15 22:10                     ` Outback Dingo
2009-06-18 18:38                       ` Jacob Marble
2009-06-18 13:10 ` Marek Lindner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.