Re: Question about batman for ARM

2022-11-01 Thread Sven Eckelmann
On Tuesday, 1 November 2022 19:49:54 CET cch...@creonexsystems.com wrote:
> We are now looking into getting BATMAN working on a Zynq-7000 Xilinx FPGA.
> This FPGA hosts dual-arm A9 cores. We have successfully loaded up Ubuntu on
> this platform and it is running
> Linux version 4.19.0-xilinx-v2019.2 (oe-user@oe-host) (gcc version 8.2.0
> (GCC))

I don't know what this should be. It is not an ubuntu kernel (more like an 
openembedded kernel). So you might have to get in contact with whoever 
provided you with this kernel and ask them how to build externel kernel 
modules against this kernel. They hopefully have some linux-headers package 
which you can install and then build some kernel modules against it.

And if it is openembedded (with yocto) then you can either try to update
these recipes (which are using ancient batman-adv versions):

https://github.com/jhaws1982/meta-batman

Or simply enable CONFIG_BATMAN_ADV (and related symbols) in your kernel 
configuration which you are using to build this kernel. It will not be
the most recent batman-adv version but better than nothing.

Kind regards,
Sven


signature.asc
Description: This is a digitally signed message part.


Re: Question about batman for ARM

2022-11-01 Thread Moritz Warning

Hi Charles,

batman-adv is part of the Linux kernel. So it might very well be present on 
your system already.
But you might need to install batctl package to enable and configure it.

On 11/1/22 19:49, cch...@creonexsystems.com wrote:

Hi Sven,

Thank you for your past suggestions.
We are now looking into getting BATMAN working on a Zynq-7000 Xilinx FPGA.
This FPGA hosts dual-arm A9 cores. We have successfully loaded up Ubuntu on
this platform and it is running
Linux version 4.19.0-xilinx-v2019.2 (oe-user@oe-host) (gcc version 8.2.0
(GCC))

The above line is from cat /proc/version.

Can you point me to a BATMAN installation for this OS and platform? I could
not find any resources online for this.
The way suggested by BATMAN home page does not work for some reason.

Thank you for your help.

Regards,
Charles
_
CreoNex Systems
2625 Townsgate Road, Suite 330
Westlake Village, CA 91320
www.creonexsystems.com
(805) 558-9687
This message (including any attachments) is for the named addressee(s)'s use
only. It may contain sensitive, confidential, private proprietary or legally
privileged information intended for a specific individual and purpose, and
is protected by law. If you are not the intended recipient, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender. Any use, disclosure, copying, or
distribution of this message and/or any attachments is strictly prohibited.


-Original Message-
From: Sven Eckelmann 
Sent: Monday, June 20, 2022 5:51 AM
To: cch...@creonexsystems.com
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Question about batman for ARM

On Monday, 20 June 2022 12:20:19 CEST cch...@creonexsystems.com wrote:

Does BATMAN ADV interfaces with the radio via the network driver or
does BATMAN include the network driver?


As said before, it is interfacing with the generic ethernet netdev layer of
the kernel. For example in:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l727
*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/send.c#l108
*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l185

There are a lot of other places when it uses the abstraction interfaces of
the kernels for ethernet related communication.

For B.A.T.M.A.N. V, it is also trying to get throughput information via
various generic kernel functionality:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/bat_v_elp.c#l67

There is also one detection for wifi interfaces to decide whether broadcast
messages should be repeated or not:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l877



Can you provide some guidance on where the network driver or interface
to network driver is located within BATMAN?


It is not talking directly to the driver. It is always using abstraction
layers. Either the normal network core, ethernet or cfg80211 abstraction
interfaces. But these don't abstract the requirement for ethernet
compatibility away - the underlying device must provide this either directly
or via a wrapper. Just perform a `git grep -e ETH_ -e eth_ -e ethhdr` to see
that it is build around the concept of ethernet packets.

Also things like originators and the complete translation table only works
with ethernet addresses.

Kind regards,
Sven


RE: Question about batman for ARM

2022-11-01 Thread cchien
Hi Sven,

Thank you for your past suggestions.
We are now looking into getting BATMAN working on a Zynq-7000 Xilinx FPGA.
This FPGA hosts dual-arm A9 cores. We have successfully loaded up Ubuntu on
this platform and it is running
Linux version 4.19.0-xilinx-v2019.2 (oe-user@oe-host) (gcc version 8.2.0
(GCC))

The above line is from cat /proc/version.

Can you point me to a BATMAN installation for this OS and platform? I could
not find any resources online for this.
The way suggested by BATMAN home page does not work for some reason.

Thank you for your help.

Regards,
Charles
_
CreoNex Systems
2625 Townsgate Road, Suite 330
Westlake Village, CA 91320
www.creonexsystems.com
(805) 558-9687
This message (including any attachments) is for the named addressee(s)'s use
only. It may contain sensitive, confidential, private proprietary or legally
privileged information intended for a specific individual and purpose, and
is protected by law. If you are not the intended recipient, please
immediately delete it and all copies of it from your system, destroy any
hard copies of it and notify the sender. Any use, disclosure, copying, or
distribution of this message and/or any attachments is strictly prohibited.


-Original Message-
From: Sven Eckelmann  
Sent: Monday, June 20, 2022 5:51 AM
To: cch...@creonexsystems.com
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Question about batman for ARM

On Monday, 20 June 2022 12:20:19 CEST cch...@creonexsystems.com wrote:
> Does BATMAN ADV interfaces with the radio via the network driver or 
> does BATMAN include the network driver?

As said before, it is interfacing with the generic ethernet netdev layer of
the kernel. For example in:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l727
*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/send.c#l108
*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l185

There are a lot of other places when it uses the abstraction interfaces of
the kernels for ethernet related communication.

For B.A.T.M.A.N. V, it is also trying to get throughput information via
various generic kernel functionality:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/bat_v_elp.c#l67

There is also one detection for wifi interfaces to decide whether broadcast
messages should be repeated or not:

*
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b89025
2a865efa91:/net/batman-adv/hard-interface.c#l877


> Can you provide some guidance on where the network driver or interface 
> to network driver is located within BATMAN?

It is not talking directly to the driver. It is always using abstraction
layers. Either the normal network core, ethernet or cfg80211 abstraction
interfaces. But these don't abstract the requirement for ethernet
compatibility away - the underlying device must provide this either directly
or via a wrapper. Just perform a `git grep -e ETH_ -e eth_ -e ethhdr` to see
that it is build around the concept of ethernet packets.

Also things like originators and the complete translation table only works
with ethernet addresses.

Kind regards,
Sven


RE: Question about batman for ARM

2022-06-21 Thread cchien
Hi Sven,

Thank you for the insight.
We definitely do not want to reimplement BATMAN.
Does BATMAN ADV interfaces with the radio via the network driver or does
BATMAN include the network driver?
Can you provide some guidance on where the network driver or interface to
network driver is located within BATMAN?

Regards,
Charles

-Original Message-
From: Sven Eckelmann  
Sent: Friday, June 17, 2022 1:46 AM
To: cch...@creonexsystems.com
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Question about batman for ARM

On Friday, 17 June 2022 10:41:46 CEST cch...@creonexsystems.com wrote:
[...]
> We would like to use batman with a custom radio and are trying to figure
out what part of the source code we may need to modify to allow batman to
work with a custom radio.
> Custom radio means that the radio is not a commercial radio, such as wi-fi
or Bluetooth.

batman-adv (especially with the B.A.T.M.A.N. IV algo) only requires that the
device itself can transport ethernet frames (with proper unicast and
broadcast behavior). If you need something else then you either need a
virtual interface which does the translation from $whatever to ethernet (and
back) - or you need to reimplement the B.A.T.M.A.N. IV/V algorithms
yourself.

Kind regards,
Sven


Re: Question about batman for ARM

2022-06-20 Thread Sven Eckelmann
On Monday, 20 June 2022 12:20:19 CEST cch...@creonexsystems.com wrote:
> Does BATMAN ADV interfaces with the radio via the network driver or does
> BATMAN include the network driver?

As said before, it is interfacing with the generic ethernet netdev layer of 
the kernel. For example in:

* 
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b890252a865efa91:/net/batman-adv/hard-interface.c#l727
* 
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b890252a865efa91:/net/batman-adv/send.c#l108
* 
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b890252a865efa91:/net/batman-adv/hard-interface.c#l185

There are a lot of other places when it uses the abstraction interfaces of the 
kernels for ethernet related communication.

For B.A.T.M.A.N. V, it is also trying to get throughput information via 
various generic kernel functionality:

* 
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b890252a865efa91:/net/batman-adv/bat_v_elp.c#l67

There is also one detection for wifi interfaces to decide whether broadcast 
messages should be repeated or not:

* 
https://git.open-mesh.org/batman-adv.git/blob/caa1eb0cf7bf8ebfe43bba06b890252a865efa91:/net/batman-adv/hard-interface.c#l877


> Can you provide some guidance on where the network driver or interface to
> network driver is located within BATMAN?

It is not talking directly to the driver. It is always using abstraction 
layers. Either the normal network core, ethernet or cfg80211 abstraction 
interfaces. But these don't abstract the requirement for ethernet 
compatibility away - the underlying device must provide this either directly 
or via a wrapper. Just perform a `git grep -e ETH_ -e eth_ -e ethhdr` to
see that it is build around the concept of ethernet packets.

Also things like originators and the complete translation table only works 
with ethernet addresses.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.


Re: Question about batman for ARM

2022-06-17 Thread Simon Wunderlich
On Friday, June 17, 2022 10:45:48 AM CEST Sven Eckelmann wrote:
> On Friday, 17 June 2022 10:41:46 CEST cch...@creonexsystems.com wrote:
> [...]
> 
> > We would like to use batman with a custom radio and are trying to figure
> > out what part of the source code we may need to modify to allow batman to
> > work with a custom radio. Custom radio means that the radio is not a
> > commercial radio, such as wi-fi or Bluetooth.
> batman-adv (especially with the B.A.T.M.A.N. IV algo) only requires that the
> device itself can transport ethernet frames (with proper unicast and
> broadcast behavior). If you need something else then you either need a
> virtual interface which does the translation from $whatever to ethernet
> (and back) - or you need to reimplement the B.A.T.M.A.N. IV/V algorithms
> yourself.

In other words, if your radio comes up as a regular Ethernet interface in 
Linux (like WiFi, for example), then you can easily run batman-adv on top of 
it. If that's not the case, then you can write a driver to present a (virtual) 
interface to the system like Sven suggested.

Cheers,
   Simon

signature.asc
Description: This is a digitally signed message part.


RE: Question about batman for ARM

2022-06-17 Thread cchien
Hi Sven,

Thanks for the suggestions.
We were able to get Debian to boot up with batman enabled in raspberry-pi.

We would like to use batman with a custom radio and are trying to figure out 
what part of the source code we may need to modify to allow batman to work with 
a custom radio.
Custom radio means that the radio is not a commercial radio, such as wi-fi or 
Bluetooth.

The comments in the source code are limited and so we are wondering if you 
could suggest any resources and/or documentations that might provide more 
information to help us in what we are trying to do?

Regards,
Charles

CreoNex Systems
2625 Townsgate Road, Suite 330 
Westlake Village, CA 91361
www.creonexsystems.com
(805) 558-9687
This message (including any attachments) is for the named addressee(s)'s use 
only. It may contain sensitive, confidential, private proprietary or legally 
privileged information intended for a specific individual and purpose, and is 
protected by law. If you are not the intended recipient, please immediately 
delete it and all copies of it from your system, destroy any hard copies of it 
and notify the sender. Any use, disclosure, copying, or distribution of this 
message and/or any attachments is strictly prohibited.

-Original Message-
From: cch...@creonexsystems.com  
Sent: Friday, May 20, 2022 8:51 AM
To: 'Sven Eckelmann' 
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: RE: Question about batman for ARM


Hi Sven,

Thank you for the quick and informative response.
We will look into your suggestions.

Regards,
Charles
_
CreoNex Systems
2625 Townsgate Road, Suite 330
Westlake Village, CA 91320
www.creonexsystems.com
(805) 558-9687
This message (including any attachments) is for the named addressee(s)'s use 
only. It may contain sensitive, confidential, private proprietary or legally 
privileged information intended for a specific individual and purpose, and is 
protected by law. If you are not the intended recipient, please immediately 
delete it and all copies of it from your system, destroy any hard copies of it 
and notify the sender. Any use, disclosure, copying, or distribution of this 
message and/or any attachments is strictly prohibited.


-Original Message-
From: Sven Eckelmann 
Sent: Friday, May 20, 2022 12:43 AM
To: Charles Chien 
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Question about batman for ARM

On Friday, 20 May 2022 08:18:45 CEST Charles Chien wrote:
> We’re currently trying to install batman-adv on an ARM platform but we 
> ran into some issues and we would appreciate your help to answer our 
> questions below:
> 
> Is the batman-adv module compatible with an ARM processor (Raspberry PI 4)?

There is not just an "ARM" processor. It is a family of various processors.

Anyway, it can be used easily on Raspberry Pi - just make sure that you use a 
good wifi device + driver (+firmware) which actually can communicate over 
IBSS/802.11s (without forwarding enabled) and has no (extreme low) peer limit. 
Unfortunately, you cannot take this for granted.

> I’m trying to install batman-adv onto an ARM Raspberry PI 4 with a 
> Debian based Linux distribution (Pop OS). However, when I run 
> “modprobe batman-adv”, it returns a FATAL error complaining that the 
> module is not found in the “/lib/modules” directory. Where can I 
> find/download the “.ko” for batman-adv for the ARM platform?

Ehrm, this is not how this works. You cannot just use a kernel module and hope 
that it works on all kernel (builds) available in the universe. This is also 
why we write following in each batman-adv release news entry: "As the kernel 
module always depends on the Linux kernel it is compiled against, it does not 
make sense to provide binaries on our website. As usual, you will find the 
signed tarballs in our download section:"

Either your distribution has to enable this module in their kernel build or you 
have to get their kernel headers (and build scripts) and then build it from 
scratch. And at least on the default Debian kernel, batman-adv is enabled since 
ages - so no idea why PopOS doesn't ship it

> And if I need to recompile the .ko file for ARM, is there an online 
> repository where I can find the original source code for the 
> batman-adv driver?

This is mentioned in multiple places on the website. Just to mention a few 
interesting pages:

* https://www.open-mesh.org/projects/open-mesh/wiki
* https://www.open-mesh.org/news/108
* https://www.open-mesh.org/projects/open-mesh/wiki/Download
* https://www.open-mesh.org/projects/open-mesh/wiki/UsingBatmanGit
* https://git.open-mesh.org/
  https://git.open-mesh.org/batman-adv.git
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

Kind regards,
Sven



Re: Question about batman for ARM

2022-06-17 Thread Sven Eckelmann
On Friday, 17 June 2022 10:41:46 CEST cch...@creonexsystems.com wrote:
[...]
> We would like to use batman with a custom radio and are trying to figure out 
> what part of the source code we may need to modify to allow batman to work 
> with a custom radio.
> Custom radio means that the radio is not a commercial radio, such as wi-fi or 
> Bluetooth.

batman-adv (especially with the B.A.T.M.A.N. IV algo) only requires that the 
device itself can transport ethernet frames (with proper unicast and broadcast 
behavior). If you need something else then you either need a virtual interface 
which does the translation from $whatever to ethernet (and back) - or you need 
to reimplement the B.A.T.M.A.N. IV/V algorithms yourself.

Kind regards,
Sven

signature.asc
Description: This is a digitally signed message part.


RE: Question about batman for ARM

2022-05-31 Thread cchien


Hi Sven,

Thank you for the quick and informative response.
We will look into your suggestions.

Regards,
Charles
_
CreoNex Systems
2625 Townsgate Road, Suite 330
Westlake Village, CA 91320
www.creonexsystems.com
(805) 558-9687
This message (including any attachments) is for the named addressee(s)'s use 
only. It may contain sensitive, confidential, private proprietary or legally 
privileged information intended for a specific individual and purpose, and is 
protected by law. If you are not the intended recipient, please immediately 
delete it and all copies of it from your system, destroy any hard copies of it 
and notify the sender. Any use, disclosure, copying, or distribution of this 
message and/or any attachments is strictly prohibited.


-Original Message-
From: Sven Eckelmann  
Sent: Friday, May 20, 2022 12:43 AM
To: Charles Chien 
Cc: b.a.t.m.a.n@lists.open-mesh.org
Subject: Re: Question about batman for ARM

On Friday, 20 May 2022 08:18:45 CEST Charles Chien wrote:
> We’re currently trying to install batman-adv on an ARM platform but we 
> ran into some issues and we would appreciate your help to answer our 
> questions below:
> 
> Is the batman-adv module compatible with an ARM processor (Raspberry PI 4)?

There is not just an "ARM" processor. It is a family of various processors.

Anyway, it can be used easily on Raspberry Pi - just make sure that you use a 
good wifi device + driver (+firmware) which actually can communicate over 
IBSS/802.11s (without forwarding enabled) and has no (extreme low) peer limit. 
Unfortunately, you cannot take this for granted.

> I’m trying to install batman-adv onto an ARM Raspberry PI 4 with a 
> Debian based Linux distribution (Pop OS). However, when I run 
> “modprobe batman-adv”, it returns a FATAL error complaining that the 
> module is not found in the “/lib/modules” directory. Where can I 
> find/download the “.ko” for batman-adv for the ARM platform?

Ehrm, this is not how this works. You cannot just use a kernel module and hope 
that it works on all kernel (builds) available in the universe. This is also 
why we write following in each batman-adv release news entry: "As the kernel 
module always depends on the Linux kernel it is compiled against, it does not 
make sense to provide binaries on our website. As usual, you will find the 
signed tarballs in our download section:"

Either your distribution has to enable this module in their kernel build or you 
have to get their kernel headers (and build scripts) and then build it from 
scratch. And at least on the default Debian kernel, batman-adv is enabled since 
ages - so no idea why PopOS doesn't ship it

> And if I need to recompile the .ko file for ARM, is there an online 
> repository where I can find the original source code for the 
> batman-adv driver?

This is mentioned in multiple places on the website. Just to mention a few 
interesting pages:

* https://www.open-mesh.org/projects/open-mesh/wiki
* https://www.open-mesh.org/news/108
* https://www.open-mesh.org/projects/open-mesh/wiki/Download
* https://www.open-mesh.org/projects/open-mesh/wiki/UsingBatmanGit
* https://git.open-mesh.org/
  https://git.open-mesh.org/batman-adv.git
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

Kind regards,
Sven


Re: Question about batman for ARM

2022-05-20 Thread Sven Eckelmann
On Friday, 20 May 2022 08:18:45 CEST Charles Chien wrote:
> We’re currently trying to install batman-adv on an ARM platform but we
> ran into some issues and we would appreciate your help to answer our
> questions below:
> 
> Is the batman-adv module compatible with an ARM processor (Raspberry PI 4)?

There is not just an "ARM" processor. It is a family of various processors.

Anyway, it can be used easily on Raspberry Pi - just make sure that you use a 
good wifi device + driver (+firmware) which actually can communicate over 
IBSS/802.11s (without forwarding enabled) and has no (extreme low) peer limit. 
Unfortunately, you cannot take this for granted.

> I’m trying to install batman-adv onto an ARM Raspberry PI 4 with a
> Debian based Linux distribution (Pop OS). However, when I run
> “modprobe batman-adv”, it returns a FATAL error complaining that the
> module is not found in the “/lib/modules” directory. Where can I
> find/download the “.ko” for batman-adv for the ARM platform?

Ehrm, this is not how this works. You cannot just use a kernel module and hope 
that it works on all kernel (builds) available in the universe. This is also 
why we write following in each batman-adv release news entry: "As the kernel 
module always depends on the Linux kernel it is compiled against, it does not 
make sense to provide binaries on our website. As usual, you will find the 
signed tarballs in our download section:"

Either your distribution has to enable this module in their kernel build or 
you have to get their kernel headers (and build scripts) and then build it 
from scratch. And at least on the default Debian kernel, batman-adv is enabled 
since ages - so no idea why PopOS doesn't ship it

> And if I need to recompile the .ko file for ARM, is there an online
> repository where I can find the original source code for the
> batman-adv driver?

This is mentioned in multiple places on the website. Just to mention a few 
interesting pages:

* https://www.open-mesh.org/projects/open-mesh/wiki
* https://www.open-mesh.org/news/108
* https://www.open-mesh.org/projects/open-mesh/wiki/Download
* https://www.open-mesh.org/projects/open-mesh/wiki/UsingBatmanGit
* https://git.open-mesh.org/
  https://git.open-mesh.org/batman-adv.git
* https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

Kind regards,
Sven


signature.asc
Description: This is a digitally signed message part.