B.A.T.M.A.N Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: How to run batman-adv on interfaces in AP / Station mode?
Date: Thu, 11 Jul 2019 08:48:03 +0200	[thread overview]
Message-ID: <10085991.EQm6kMviFh@bentobox> (raw)
In-Reply-To: <CAH-WULkD2g8KvzWT0=CxcvF5ja54p3qW_OZukM52gtoTkQXb_w@mail.gmail.com>

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

On Thursday, 11 July 2019 05:44:07 CEST Ricardo Cerrato wrote:
> I recently configured a mesh with two nodes running Debian and
> batman-adv and two wireless adapters TP-LINK TL-WN422G configured in
> IBSS mode, and to allow non-mesh clients (like my cellphone) to use
> the mesh I had to use another wireless adapter (same TL-WN422G)
> configured in AP mode and bridged to the mesh interface (bat0).
> Recently I found in the FAQ:
> 
> "Can batman-adv run on interfaces in AP / Station / etc mode ?
> Q: Can BATMAN advanced run on interfaces in AP / Station mode?
> A: Yes, because batman-adv doesn't know anything about stuff below the
> ethernet interface. So you could also use it over layer 2 ethernet
> tunnels, wifi ap, wifi sta, wifi adhoc, ethernet or even write a
> virtual interface which prints everything on paper and scans the paper
> on the remote machine (but you should be fast or increase the ogm
> interval)."
> 
> I guess it is possible use the same adapter as AP and mesh client..

Yes, but this is a question for the linux-wireless folks. And the FAQ entry 
doesn't talk about this at all. You want to run AP and IBSS (which most likely 
doesn't work with your adapter; search for vif and interface combinations) in 
parallel and the FAQ entry talks about running batman-adv on top of something 
which is not IBSS.

> I my tests I found the AP mode and IBSS modes are mutually exclusive,
> but I didn't find examples on how to create a mesh without IBSS...

There are plenty of examples out there which for example use 11s/meshpoint 
(with mesh_fwding set to 0) as an actual useful way to run batman-adv without 
IBSS. Just create the AP as normal and then create the the secondary vif for 
the mesh. It seems like most adapters today support meshpoint better than IBSS 
and thus you can just try to switch your underlying mode from IBSS to 
meshpoint. I also posted the commands to create a meshpoint interface on this 
mailing list a while back [1].

You can then just add the meshpoint interface to batman-adv and use it like 
IBSS (just with the difference that it is NOT IBSS).

But this doesn't seem to be batman-adv related question but questions for the 
linux-wireless community.

[...]
> valid interface combinations:
>  * #{ managed, P2P-client } <= 2, #{ AP, mesh point, P2P-GO } <= 2,
>    total <= 2, #channels <= 1

Here you can see that you can for example run an AP interface and mesh_point 
(just make sure that you disabled mesh_fwding) at the same time. batman-adv 
would run on top of the meshpoint interface.

Btw. you will most likely observer some odd behavior when you try to scale the 
mesh - these are most likely caused by the limitations [2] of the usb wifi 
stick.

Kind regards,
	Sven

[1] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2015-December/013924.html
[2] https://wireless.wiki.kernel.org/en/users/drivers/ath9k_htc

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-07-11  6:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-11  3:44 How to run batman-adv on interfaces in AP / Station mode? Ricardo Cerrato
2019-07-11  6:48 ` Sven Eckelmann [this message]
2019-07-12  3:38   ` Ricardo Cerrato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=10085991.EQm6kMviFh@bentobox \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox