Batman Advanced

154 views
Skip to first unread message

Tomáš

unread,
Mar 11, 2022, 5:29:06 AM3/11/22
to mininet-wifi-discuss
Hello everyone,

can someone help me with implementing batman_adv into my topology? I was able to run batman_adv in adhoc.py and took it as a reference for writing my own code. There is no error whatsoever, but the interface bat0 doesn´t show up so I assume the protocol is not implemented. I run my code like this:

              $ sudo python MYcontainer.py batman_adv

Please find my code below. Thank you in advance.

Wish you the best,
Thomas
MYcontainer.py

Tomáš

unread,
Mar 11, 2022, 6:03:32 AM3/11/22
to mininet-wifi-discuss
My initial idea is to define the batman_adv protocol on stations individually when setting the adhoc mode on runtime with "py sta1.setAdhocMode(intf="sta1-wlan0", proto="batman_adv"). This command didn´t throw any error at me but the bat0 interface still doesn´t show up.
Dátum: piatok 11. marca 2022, čas: 11:29:06 UTC+1, odosielateľ: Tomáš

Ramon Fontes

unread,
Mar 11, 2022, 6:10:43 AM3/11/22
to Tomáš, mininet-wifi-discuss
You can run the code in debug level -> (setLogLevel('debug')) and see what is going on.

Tomáš

unread,
Mar 11, 2022, 7:04:14 AM3/11/22
to mininet-wifi-discuss
This is the error I found on all stations in debug mode. I should say that I succesfully installed the batman protocol because when I run the adhoc.py it works just fine. I can also see that tools such "iw" are not ready until the installation in xterm windows is finished so a lot of things fail because of it. I attached two files - first (debug) contains only the batman_adv section and second (debug_all) contains the whole debug message. Please let me know if you need any other details.

Dátum: piatok 11. marca 2022, čas: 12:10:43 UTC+1, odosielateľ: ramonre...@gmail.com
debug_all.txt
debug.txt

Ramon Fontes

unread,
Mar 11, 2022, 7:38:04 AM3/11/22
to Tomáš, mininet-wifi-discuss
Containers should have all dependencies satisfied at the beginning of the emulation. You must set "privileged" as well.

Sent from my android

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mininet-wifi-discuss/3c7c87bd-cc57-4e61-8280-99fe45018709n%40googlegroups.com.

Tomáš

unread,
Mar 11, 2022, 3:11:55 PM3/11/22
to mininet-wifi-discuss
I´ve been trying hard for the past couple hours but no result. The privileged is set. I tried to install batman_adv individually on stations through "cmd" command in addStation() function and on runtime but I guess that´s not the way you do it. I figured out that I can modprobe the batman-adv on runtime but I don´t know how to install batman_adv individually on stations in the first place. I´m only guessing that by "having dependencies" you mean actually telling the stations to install this and that (for example iw tools etc.)

Dátum: piatok 11. marca 2022, čas: 13:38:04 UTC+1, odosielateľ: ramonre...@gmail.com

Ramon Fontes

unread,
Mar 11, 2022, 3:35:24 PM3/11/22
to Tomáš, mininet-wifi-discuss
> I´m only guessing that by "having dependencies" you mean actually telling the stations to install this and that (for example iw tools etc.)

You have to create an image with all dependencies included.

Sent from my android

Tomáš

unread,
Mar 11, 2022, 3:41:26 PM3/11/22
to mininet-wifi-discuss
Ah, so the Dockerfile it is then. I´m not very familiar with it but I´ll give it a try. Thank you.
Dátum: piatok 11. marca 2022, čas: 21:35:24 UTC+1, odosielateľ: ramonre...@gmail.com

Ramon Fontes

unread,
Mar 11, 2022, 3:52:45 PM3/11/22
to Tomáš, mininet-wifi-discuss
"sudo commit containerID imageName" does the work.

Sent from my android

--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.

Tomáš

unread,
Mar 12, 2022, 8:01:45 AM3/12/22
to mininet-wifi-discuss
I´m using the openvswitch image from Docker hub (https://hub.docker.com/r/openvswitch/ovs).
I installed every dependency sucessfully but batman-adv. I followed the commands from the install.sh file:
       > git clone https://github.com/open-mesh-mirror/batman-adv --depth=1
       > cd batman-adv
       > make
The error says I´m missing /lib/modules/5.4.0-104-generic/build. Why is the folder whole modules folder missing?
Can you please tell me if I´m using the right installation approach? I attach the error message and lib directory content.

I tried to run these commands:
        > apt update && apt full-upgrade && apt autoremove
        > apt install build-essential linux-kernel-headers
        > uname -a
Output of "uname -a" -> Linux wifi-virtualbox 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

I also tried to run "apt-get install linux-headers-`uname -r`" but I get error:
         E: Unable to locate package linux-headers-5.4.0-104-generic
         E: Couldn't find any package by glob 'linux-headers-5.4.0-104-generic'
         E: Couldn't find any package by regex 'linux-headers-5.4.0-104-generic'

Dátum: piatok 11. marca 2022, čas: 21:52:45 UTC+1, odosielateľ: ramonre...@gmail.com
no_modules.PNG
make_output.PNG

Tomáš

unread,
Mar 12, 2022, 8:22:42 AM3/12/22
to mininet-wifi-discuss
Update:
I think I found the problem! I run the "lsb_release -a" command inside the docker container and it showed me that the system is Ubuntu 16.04. I guess that means the version 16.04 didn´t have the 5.4.0-104-generic package, right? 

Dátum: sobota 12. marca 2022, čas: 14:01:45 UTC+1, odosielateľ: Tomáš

Tomáš

unread,
Mar 12, 2022, 9:36:35 AM3/12/22
to mininet-wifi-discuss
Update 2:
Batman works! As I said the problem was old version of Ubuntu (16.04). I upgraded to 20.04 and was instantly able to install batman advanced.

Dátum: sobota 12. marca 2022, čas: 14:22:42 UTC+1, odosielateľ: Tomáš
Reply all
Reply to author
Forward
0 new messages