Code Monkey home page Code Monkey logo

emane-tutorial's People

Contributors

kakru avatar sgalgano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emane-tutorial's Issues

OLSR Topology Not Drawing

When I run the olsrlinkview script, all of the nodes are drawn on top of each other (top panel in the screenshot below). I can manually pull the nodes out of the pile at the top left and see that there is in fact a link being detected by the script (bottom panel in the screenshot below). I've verified the same behavior in Demo 1. I'm at a loss as to how to debug this.

I'm running on a fresh Ubuntu 18.04 LTS virtual machine and worked through the build process per the tutorial documentation. The only build anomaly I ran into is that python3-pynodestatviz wouldn't build. It references the package "python3-pmw" which doesn't appear to exist anywhere for Debian releases. Installing pmw via pip3 didn't help matters. python-pynodestatviz built and installed fine.

VirtualBox_vEMANE-18_30_07_2020_11_46_35

Makefile searches for wrong oslrd plugin version - CentOS 7

$ cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

Installing olsrd from source olsrd-0.9.0.3.tar.bz2 (http://www.olsr.org/mediawiki/index.php/Releases) on my system installs the binary and plugins to /usr/local instead of /usr

$ which olsrd
/usr/local/sbin/olsrd

the tutorial Makefile/rules.mk uses find to find the txtinfo plugin location, but it searches /usr/lib* so on my system it does not find it:

$ sudo find /usr/lib* -name "olsrd_txtinfo.so*" | wc -l
0

so on my system all of the routingN.conf plugin files have a bad stanza because the sed line replaces OLSRTXTINFO with an empty string. Making the routing config files look like:

LoadPlugin ""
{
PlParam "accept" "0.0.0.0"
}

Took a bit of debugging to figure out. Noticed olsrd wasn't running inside of the NEM containers and I had to manually run olsrd with debug mode to see a cryptic error:

$ sudo olsrd -f routing1.conf -d 2
...snip...
---------- LOADING LIBRARY  ----------
Checking plugin interface version: FAILED: "/usr/local/sbin/olsrd: undefined symbol: olsrd_plugin_interface_version"
---------- LIBRARY  FAILED ----------

This was indicative of olsrd trying to load the "" plugin and not being able to grab it's plugin interface version.

I was unable to figure out with the olsrd Makefile how to get it to install to a different location. I normally would use a ./configure script to change the prefix, but I couldn't see any easy way in olsrd's Makefile.

if I change the Makefile to remove the /lib* I can find it:

$ find /usr -name "olsrd_txtinfo.so*" | wc -l
1

My current solution was to modify the rules.mk to find the correct location of the txtinfo plugin:

diff --git a/rules.mk b/rules.mk
index 7ba97f9..4020d67 100644
--- a/rules.mk
+++ b/rules.mk
@@ -52,7 +52,7 @@ edit= sed -e 's|@NEMID[@]|$*|g' \
           -e 's|@NEMXML[@]|$(NEM_XML)|g ' \
           -e 's|@TOPDIR[@]|$(shell dirname $$(pwd))|g' \
           -e 's|@OLSRTXTINFO[@]|$(shell basename \
-                 $$(find /usr/lib* -name "olsrd_txtinfo.so*" -print 2> /dev/null))|g' \
+                 $$(find /usr -name "olsrd_txtinfo.so*" -print 2> /dev/null))|g' \
           -e 's|@NODECOUNT[@]|$(shell if [ -n "$(NODE_COUNT)" ]; \
                                       then \
                                         echo $(NODE_COUNT); \

The make operation will fail in emane-tutorial/2 due to the wrong path setting of the file emane/rules.mk

Environment:

Ubuntu 18.04
emane-tutorial 0.27
emane 1.2.6
GUN make 4.1

Issue

Since there is no xml file such as rfpipenem.xml in the .emanegentransportxml directory In emane-tutotial/2, the error in the figure will appear when make.

ๅ›พ็‰‡

So I tried to modify lines 72 to 79 in emane-tutorial/rules.mk to make it work.

solution

Original code

$(PLATFORMDEPS): .%-dep:%
	mkdir .emanegentransportxml && \
	 cd .emanegentransportxml &&   \
	 emanegentransportxml ../$< && \
	 for i in $$(ls *.xml); do chmod g-w,u-w $$i; cp -f $$i ..; done && \
	 cd .. && \
	 rm -rf .emanegentransportxml
	@touch $@

Modified code

$(PLATFORMDEPS): .%-dep:%
	emanegentransportxml ./$< && \
	for i in $$(ls *.xml); do chmod g-w,u-w $$i; done
        @touch $@

It works well with the modified code.

typo in scripts/democtl-host

There is a typo in the script democt-host. The logging path for the eventservice is "persit/host/var/log/emaneeventservice.log". See the missing "s" in "persit".

Tutorial 0 - level 0 fails

In trying to run the tutorial 0 level 0 I get the following responses:

root@cedardrome:/home/m/emane-tutorial/0# ls
bypassmac.xml eventservice.xml NO-node-gpsd
bypassnem.xml gpsdlocationagent1.xml NO-node-routing
bypassphy.xml gpsdlocationagent2.xml persist
demo-start Makefile platform1.xml
demo-stop NO-host-emaneeventservice platform2.xml
eelgenerator.xml NO-node-emane routing1.conf
eventdaemon1.xml NO-node-emaneeventd routing2.conf
eventdaemon2.xml NO-node-emanetransportd transvirtual.xml

root@cedardrome:/home/m/emane-tutorial/0# ./demo-start
Creating bridge: emanenode0
kernel.sched_rt_runtime_us = -1
Starting lxc instance: node-1
Starting lxc instance: node-2
root@cedardrome:/home/m/emane-tutorial/0#

The demo-start script terminates immedaitely.

The log file for node 1 is

lxc-execute 1450896658.716 ERROR lxc_sync - sync.c:__sync_wake:62 - sync wake failure : Broken pipe
lxc-execute 1450896658.716 ERROR lxc_start - start.c:__lxc_start:1121 - failed to spawn 'node-1'

The log file for node 2 is the same, excepting that it notes node-2 not node-1

GPSD Telnet Content Issues in olsrdviewer.py Altitude JSON Field

I have the latest version of GPSD built on the CentOS platform as version 3.19.1 within the content of a radio container which includes the gpsd binary as well as the emane event daemon per the examples.

When using the olsrdviewer.py application to view the GPS position associated with a node, I get an exception thrown that leaves the lock unreleased, deadlocking the thread. This was easy enough to fix, per the modified source codes snippet listing below from within the GPS thread.

From observing the logging from the container's event daemon, as well as manually invoking a Telnet session to the gpsd, all looks well. A manual Telnet session outside of the container is listed below.

The problem occurs when parsing through the returned JSON code per the following line of Python code, coupled with the fact that the data returned from GPS does not include the 'alt' fields with the 'lat' field in its response, but instead provides 'altHAE' and 'altMSL' (Mean Sea Level).

Modifying the source to use the 'altMSL' field fixed things.

Is there any explanation for this format change for the altitude field?

                        self._locations[self._nodeId] = (
                            data['lat'], data['lon'], data['alt'])

Instead a single line of response is something like the following:

{u'altHAE': 146.0, u'altMSL': 180.0, u'class': u'TPV', u'climb': 0.0, u'device': u'/dev/pts/0', u'epc': 14.95, u'eph': 5.225, u'eps': 7.38, u'ept': 0.005, u'epv': 7.475, u'epx': 2.507, u'epy': 3.689, u'geoidSep': -34.0, u'lat': 39.274915, ...}


[rrpucsuser@localhost scripts]$ telnet radio1ctl 2947
Trying 10.99.0.1...
Connected to radio1ctl.
Escape character is '^]'.
{"class":"VERSION","release":"3.19.1dev","rev":"3.19.1dev-2019-11-28T08:39:47","proto_major":3,"proto_minor":14}
?WATCH={"enable":true,"json":true}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/pts/0","driver":"NMEA0183","activated":"2019-11-30T19:52:34.091Z","flags":1,"native":0,"bps":4800,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":true,"nmea":false,"raw":0,"scaled":false,"timing":false,"split24":false,"pps":false}
{"class":"TPV","device":"/dev/pts/0","mode":3,"time":"2019-11-30T19:52:35.000Z","ept":0.005,"lat":39.274915000,"lon":-84.446193333,"altHAE":146.000,"altMSL":180.000,"epx":2.507,"epy":3.689,"epv":7.475,"track":0.0000,"magtrack":353.9591,"magvar":-6.0,"speed":0.000,"climb":0.000,"eps":7.38,"epc":14.95,"geoidSep":-34.000,"eph":5.225,"sep":8.550}
{"class":"SKY","device":"/dev/pts/0","xdop":0.67,"ydop":0.98,"vdop":1.30,"tdop":0.87,"hdop":1.10,"gdop":2.02,"pdop":1.80,"satellites":[{"PRN":1,"el":41.0,"az":104.0,"ss":41.0,"used":true,"gnssid":0,"svid":1},{"PRN":3,"el":9.0,"az":84.0,"ss":51.0,"used":true,"gnssid":0,"svid":3},


                    # Add exception handling to release lock upon exception to avoid deadlock
                    try:
                        if self._nodeId not in self._locations:
                            self._locations[self._nodeId] = None

                        self._locations[self._nodeId] = (
                            data['lat'], data['lon'], data['alt'])

                        print("NodeGPSDThread::run:releasing lock %d" %
                              self._nodeId)
                        self._lock.release()
                    except:
                        print("NodeGPSDThread::run:exception releasing lock %d" %
                              self._nodeId)
                        self._lock.release()

olsrlinkview.py not showing the two nodes

I am trying to get the Emane tutorial "0" to run. After some effort, I have OLSRd running on node-1 and node-2 and they seem to have each other as neighbors but in olsrlinkview.py window I see nothing. Can anyone help? Thanks.

tkinter - Error: unable to find a match

In step #2, Fedora35 throws an error saying no match for argument: tkinter

I'm personally quite unfamiliar to the Linux and python terminologies but it might be due to missing package of python 2. I replaced the argument tkinter with python3-tkinter and looks like it worked. Not sure if that was a right thing to do though.

EMANE Event Dump remains empty even though there are new published events

I have built EMANE on RHEL 8.5 and have been testing the efficacy of the build by running the EMANE-tutorial modules. Everything seems to work, whether it's the different models or the intended network activity on the OLSRD GUI. I am able to see changes such as pathloss integration and location events displayed on the OLSRD GUI. However, I do not see these event changes when running the emaneevent-dump script. Are there any possible solutions to this problem?

How do I connect "emane0" from one Virtual Machine (vm) to "emane0" on another Virtual Machine (vm)?

How do I connect "emane0" from one Virtual Machine (vm) to "emane0" on another Virtual Machine (vm)?

I currently have EMANE setup on a host machine with 6 NEMs.
I'm trying to replace two of the NEMs with Virtual Machines running on the same host.

VM-1 and VM-2 can ping each other via the Virtual Network Interface Bridge (ens10).

If I launch the LXC containers with ./demo-start I can SSH into [VM1]Node-1 and ping [VM1]10.100.0.2.
Outside of the nodes VM-1 and VM-2 can ping each other.
I don't know how to ping [VM2]10.100.0.2 from VM-1 or [VM1]Node-1 or [VM1]Node-2.

Would using "brctl" to bridge ens10 with emanenode0 be the proper way to go about this?

The other thing I tried was to change"otamanagerdevice" and "eventservicedevice" values to "ens10".
Then launch "sudo emane platform1.xml -r -d -l 3 -f persist/1/var/log/emane.log" in VM-1 and
"sudo emane platform2.xml -r -d -l 3 -f persist/2/var/log/emane.log" in VM-2.
Followed by "brctl addbr test", "brctl addif test ens10 emane0".
Thinking I can "ping 10.100.0.2" from VM-1 afterwards.
However, if I do this I can't ping 10.100.02 or VM-2 from VM-1.

The end goal is to send packets from VM-1 to VM-2 with the EMANE network being in the middle conducting events.

Moved question to:
adjacentlink/emane#102

LXC 4 Support

Is there a fix hanging around that allows the tutorial to run with LXC 4.x?

OLSR topology viewer errors from imports

Where is it advised to place the directory for pynodestatviz? I'm running into import errors when I call ../scripts/olsrlinkview.py & and am having to fix the import paths (e.g. from folder.nodestatviz import function as opposed to from nodestatviz import function). I am running Ubuntu 16.04.

How to debug TDMA timing in tutorial 8?

I'm running the TDMA tutorial and I'm seeing a large fraction of slots (>10%) being missed. I'm not sure where to begin to debug address this issue. Something strikes me as fundamentally wrong with my setup if the nodes cannot keep up with their receive schedule. Also, when I trim the simulation down to just two nodes I am seeing about 10% of slots being missed as well.

I'm running EMANE in a VM on a brand new laptop (i9 processor), so I don't think that the emulation platform is underpowered. Where do I start with an issue like this?

The installation guide for Pynodestatviz is out off date

Step 3, build and install the pytnodestatviz, the make file does not exist. Since the readme in the pytnodestatviz points to this project for installation instructions, I opened the issue here. The steps appear to be:

# git clone https://github.com/adjacentlink/pynodestatviz
# cd pynodestatviz
# ./autogen.sh
# ./configure
# sudo yum install ./.rpmbuild/RPMS/noarch/*.rpm

Demo1 - Activity 2 - Emulation Event Log Event Generator

The code after the instruction: "Remove the NO-host-eventservice file and re-start the demonstration" has a small error.

[me@host 1]$ rm -f NO-host-eventservice

should be changed to

[me@host 1]$ rm -f NO-host-emaneeventservice

Thanks!

pynodestatviz build fails

When I try and build the rpm's I get this tar error:

make rpm
if test -f pynodestatviz.spec; then chmod u+w pynodestatviz.spec; fi
sed -e 's|@Version[@]|0.2.3|g' -e 's|@DEBIAN_VERSION[@]||g' -e 's|@DATE_RFC2822[@]|Mon, 04 Oct 2021 14:00:08 -0400|g' pynodestatviz.spec.in > pynodestatviz.spec
chmod g-w,u-w pynodestatviz.spec
if test -d "pynodestatviz-0.2.3"; then find "pynodestatviz-0.2.3" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "pynodestatviz-0.2.3" || { sleep 5 && rm -rf "pynodestatviz-0.2.3"; }; else :; fi
test -d "pynodestatviz-0.2.3" || mkdir "pynodestatviz-0.2.3"
test -n ""
|| find "pynodestatviz-0.2.3" -type d ! -perm -755
-exec chmod u+rwx,go+rx {} ; -o
! -type d ! -perm -444 -links 1 -exec chmod a+r {} ; -o
! -type d ! -perm -400 -exec chmod a+r {} ; -o
! -type d ! -perm -444 -exec /bin/sh /local_disk/ER30730/pynodestatviz/install-sh -c -m a+r {} {} ;
|| chmod -R a+r "pynodestatviz-0.2.3"
tardir=pynodestatviz-0.2.3 && ${TAR-tar} chof - "$tardir" | GZIP=--best gzip -c >pynodestatviz-0.2.3.tar.gz
tar: value 50020745 out of uid_t range 0..2097151
tar: Exiting with failure status due to previous errors

Multiple NEM on the same platform

How would I go about reproducing something like tutorial 6 but with two nems on a single platform?
Tutorial 6

Emane is launching but Node-2 isn't reachable with emane.shell
I think I set up my files incorrectly.

My setup:
platform1-3.xml
platform2.xml contains 2 nems
eventdaemon1-4.xml
gpsdlocationagent1-4.xml
routing1-4.conf

Error during build: 'basename: missing operand'

During the initial build of the emane-tutorial, i get the following error error:

basename: missing operand
Try 'basename --help' for more information.

and then it prints out a massive sed command from the script. Am I missing an installation? I followed the installation guide for emane. Can the script be modified to print out a more useful error message?

This is on CentOS 7

Network topology change from single hop to multi-hop in demo-8

Hi,

I am using demo-8 to do some tests, the topology I am going to use is two hops network with just one receiver rather than 10, can you give me some ideas about which configure files I need to change in demo-8? I saw some configurations the platform.xml may be related to the topology in demo-2 but I didn't find this kind of file in demo-8.

Best,
Shaoyi

Trouble setting up LXC version 3 using democtl-host as an example

Using democtl-host as an example I'm trying to Launch EMANE in LXC manually.

lxc.hook.autodev.sh

#!/bin/bash -
if ! [ -c /dev/net/tun ]; then
 mkdir -p /dev/net
 mknod -m 666 /dev/net/tun c 10 200
fi

lxc.conf.1

lxc.uts.name=node-1
lxc.net.0.type=veth
lxc.net.0.name=eth1
lxc.net.0.flags=up
lxc.net.0.link=emanenode0
lxc.net.0.hwaddr=02:00:01:01:00:01
lxc.net.0.ipv4.address=10.99.0.1/24
lxc.net.0.veth.pair=veth1.1

lxc.net.2.type = empty
lxc.net.2.flags=up

lxc.console.path = none
lxc.tty.max = 1
lxc.pty.max = 128
lxc.cgroup.devices.allow = a
lxc.mount.auto = proc sys cgroup

lxc.autodev = 1
lxc.hook.autodev = /persist/1/var/run/lxc.hook.autodev.sh
lxc.apparmor.profile = unconfined

Command:
lxc-execute -f persist/1/var/run/lxc.conf.1 -n node-1 -o /persist/1/var/log/lxc-execute.log.1 -- scripts/demo-init . 1

Error Message:

lxc-execute: node-1: start.c: proc_pidfd_open: 1607 Function not implemented - Failed to send signal through pidfd
lxc-execute: node-1: start.c: lxc_spawn: 1785 Failed to setup cgroup limits for container "node-1"
lxc-execute: node-1: start.c: __lxc_start: 2019 Failed to spawn container "node-1"
lxc-execute: node-1: tools/lxc_execute.c: main: 245 Failed run an application inside container

I tried using python3-lxc bindings thinking it would be easier but I can't make a container at all. Hard to find tutorials/docs on it as well.

Instructions for olsrd?

Can you provide any more details for step 5 (build and install olsrd)? The link doesn't lead to any place with explicit instructions.

Thanks

rules.mk clean rule contains extraneous rm in test

Some rules.mk clean rule items contain extraneous rm command in tests:

if test -n "rm -f $(GENERATED_EVENTDAEMONS)"; then rm -f $(GENERATED_EVENTDAEMONS); fi
if test -n "rm -f $(GENERATED_GPSDLOCATIONAGENTS)"; then rm -f $(GENERATED_GPSDLOCATIONAGENTS); fi
if test -n "rm -f $(GENERATED_MGENINPUTS)"; then rm -f $(GENERATED_MGENINPUTS); fi
if test -n "rm -f $(GENERATED_ROUTINGCONFS)"; then rm -f $(GENERATED_ROUTINGCONFS); fi
if test -n "rm -f $(GENERATED_EXTRA)"; then rm -f $(GENERATED_EXTRA); fi
if test -n "rm -f $(GENERATED_OTESTPOINTDS)"; then rm -f $(GENERATED_OTESTPOINTDS); fi
if test -n "rm -f $(GENERATED_OTESTPOINTRECORDERS)"; then rm -f $(GENERATED_OTESTPOINTRECORDERS); fi

Resources

Hello I was wondering if there are any resources to help me hook up traffic from a device or application to a NEM instance. Anything would help thanks

LXC configuration issues on Ubuntu 18.04 (lxc 3.0.0)

Reported on mailing list by Michael J. Vincent:

I've compiled the latest 1.2.2 and Protobuf 3.5.1; however, none of the EMANE tutorial simulations (https://github.com/adjacentlink/emane-tutorial) work. Investigating the issues why nothing starts - it seems LXC is at major version 3.x on Ubuntu 18.04 and that means config syntax changes (https://github.com/lxc/lxd/issues/4396#issuecomment-378322166).

I updated the scripts/demctl-init.sh script to accommodate; however, I'm still having issues - now with OLSRd not finding the /proc filesystem on the containers.

Calling service.publish() rapidly numerous times

#!/usr/bin/env python
from emanesh.events import EventService
from emanesh.events import LocationEvent
service = EventService(('224.1.2.8',45703,'emanenode0'))
event = LocationEvent()
event.append(10,latitude=40.031290,longitude=-74.523095,altitude=3.000000)
service.publish(0,event)

If we want to have multiple NEMs change positions rapidly, what would be the best approach?

for _ in xrange(10):
event.append(10, latitude=increasing_lat, longitude=decreasing_lon, altitude=3.0)
service.publish(0,event)
increasing_lat+=0.01
decreasing_lon-=0.01`

Would something like this work?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.