An all-in-one test package for running LEPTON with DoDWAN nodes

Installation procedure

Extract the content of the archive:

tar vfxz test_lepton_with_dodwan.tgz

Set environment variables:

cd test_lepton_with_dodwan
export LEPTON_HOME="${PWD}/lepton"
export DODWAN_HOME="${PWD}/dodwan"
export DODWAN_ADAPTER_HOME="${PWD}/dodwan-adapter"
export PATH="${PATH}:${LEPTON_HOME}/bin:${DODWAN_HOME}/bin"

Note: you may find it convenient to copy these command lines of variables in your ~/.${SHELL}rc file.

Run LEPTON with DoDWAN nodes

lepton.sh start oppnet_adapter=${DODWAN_ADAPTER_HOME}/bin/adapter.sh

By default LEPTON creates 20 nodes and drives their mobility according to a Levy Walk policy.

You can verify that 20 instances of DoDWAN are indeed running in the background:

ps ax | grep casa.dodwan.run.dodwand

Each DoDWAN node is indeed discovering and losing neighbors according to the topology of the dynamic graph shown in the display screen:

tail -f /dev/shm/${USER}/dodwan/var/node/N00/log/*.log
(Use Ctrl-C to terminate)

All transmissions between DoDWAN nodes are conducted by LEPTON's software hub, which behaves as a proxy between these nodes:

tail -f /dev/shm/${USER}/lepton/lepton.out

You may have observed that vertices in the graph sometimes turn red. This happens when a TCP session is established (through LEPTON's hub) between two nodes.

Commands can be addressed to any node at runtime, as shown below.

Let us assume you would like node N00 to publish a (pseudo) music file:

echo "Let us pretend this is jazz music" > /tmp/file1.mp3
lepton.sh exec N00 publish type=music,style=jazz /tmp/file1.mp3

And if you wish node N12 to be able to receive music files and save them in directory /tmp/music_for_N12, you simply need to set a subscription accordingly on that node:

mkdir /tmp/music_for_N12
lepton.sh exec N12 subscribe myMusicPrefs "type=music,style=(jazz|classical)" -d /tmp/music_for_N12

You can now wait for N12 to receive the file published by N00:

watch -n 1 ls /tmp/music_for_N12
(Use Ctrl-C to terminate)

This may take some time, though, since you have to wait for nodes N00 and N12 to come within radio range.

But you can make things way faster by setting subscriptions on some of the other nodes, so they become mobile carriers for any kind of music:

for node in N00 N01 N02 N03 N04 N05 N06 N07 N08 N09 N10 N11 N12 N13 N14 N15 N16 N17 N18 N19 ; do
  lepton.sh exec $node subscribe anyMusic "type=music" ;
done

Now it shouldn't take too long for N12 to receive file1.mp3!

When you're done playing with LEPTON and DoDWAN nodes, they can all be terminated with:

lepton.sh stop