DoDWAN is an opportunistic networking middleware system that allows mobile devices to exchange information using the publish/subscribe model.
DodwanDroid is a communication application suite for Android smartphones or tablets, based on DoDWAN.
LEPTON can orchestrate communications between Android devices running DodwanDroid, thus simulating the mobility of these devices. This mode of operation can be useful during demo sessions, as each participant can use DodwanDroid on a smartphone or tablet, while a display screen shows how LEPTON simulates the mobility of all devices involved in the demo, and thus allows or prevents radio contacts between these devices.
LEPTON and DoDWAN's adapter must be installed on a desktop workstation or on a laptop. Please refer to the corresponding installation instructions (for LEPTON, and for DoDWAN adapter).
DodwanDroid can be download as an
APK package,
and it must be installed on each smartphone or tablet you plan to
use. On some devices this may require allowing the installation of
applications from "unknown sources" (in the Settings/Security
sub-menu).
The host running LEPTON and all Android devices must belong to the
same local area network (LAN). Typically, a Wi-Fi access point is
deployed. The Android devices associate with this access point, and
obtain an IP address from a DHCP server. The host running LEPTON is
on the wired (Ethernet) part of the LAN, on a statically assigned
(or at least stable) IP address.
Alternatively, the host running LEPTON can also serve as a Software
Access Point (Soft AP), so Android devices associate directly with
that host.
Before starting LEPTON, please note down the IP address of the workstation or laptop it will run on. This address will be required to configure DodwanDroid on the Android devices.
When starting LEPTON a reference to DoDWAN's adapter must be provided,
so LEPTON knows how to process the traffic it will receive from the
Android devices. This is obtained by defining argument
oppnet_adapter
when starting LEPTON:
lepton.sh start oppnet_adapter=${DODWAN_ADAPTER_HOME}/bin/adapter.sh \
nodes=0
In this example, LEPTON is started with argument nodes=0
, which
means that LEPTON will not attempt to create virtual nodes at
startup. Instead it will simply wait to receive beacons from real
devices, thus discovering these devices at runtime.
Before starting DodwanDroid on an Android device, make sure this device is connected to the Wi-Fi access point, and thus belongs to the same LAN as the host running LEPTON.
Also make sure that the clock of the device is set correctly. This is important for DodwanDroid to run as expected.
When starting DodwanDroid for the first time, you will be asked to enter a pseudo. This pseudo should be unique.
DodwanDroid supports several modes of operation. In "Direct mode" Android devices interact directly with one another, using UDP multicast for neighbor discovery, and TCP unicast for peer-to-peer interaction. In "Hub mode", all traffic is sent to --and received from-- a software hub. This is the mode we need for DodwanDroid to run with LEPTON: all traffic must be controlled by LEPTON's hub.
By default DodwanDroid runs in "Direct mode". In order to switch to
"Hub mode", click on tab "More" on the screen, then enter the
"Settings" menu, and then the "DoDWAN Network Config" submenu. You
should see that the Network mode is presently set to "direct". Change
this mode to "hub", and replace the IP address registered under
"Hub/Remote address" by the address of the host running LEPTON.
These changes will be effective as soon as you leave the "Settings"
sub-menu.
As soon as LEPTON starts receiving beacons from Android devices, you should see blips appear on the screen. Each blip is labeled with the corresponding device's id (in DodwanDroid you can find this id at the bottom of the "Settings" sub-menu).
If you'd like the displayed labels to be more user-friendly, you can
create a file containing a list of nodeid=label
pairs, and use this
file when starting LEPTON:
cat << EOF > labels.txt
# nodeid=label
TA3956AW=Alice
BI4698FA=Bob
EOF
lepton.sh stop
lepton.sh start oppnet_adapter=${DODWAN_ADAPTER_HOME}/bin/adapter.sh \
nodes=0 node_labels=labels.txt
By default LEPTON simulates the mobility of nodes according to the Levy Walk mobility pattern. During a demo session it may sometimes be more convenient to control the connectivity between nodes manually:
lepton.sh stop
lepton.sh start oppnet_adapter=${DODWAN_ADAPTER_HOME}/bin/adapter.sh \
nodes=0 node_labels=labels.txt manual=true
With argument manual=true
, no mobility pattern is applied to move
the nodes discovered at runtime. Instead LEPTON applies an
"auto-layout" pattern, which means that it tries to distribute the
nodes evenly in the window. In that case the distance between nodes in
the window has no incidence on their being connected or not: you
are the one who can decide which pairs of nodes should be connected or
disconnected.
To connect two nodes together, first select the edge editing
option
(button in the bottom-right side of the window). Then select a node,
and with a drag-and-drop action, connect this node to another node. A
blue vertex should appear to show that these nodes are now
connected. This vertex will turn red as soon as the nodes have
discovered one another, and have reacted accordingly by establishing a
TCP connection.
To disconnect two nodes, select the edge between these nodes and press the delete key on your keyboard.
Do not forget to stop LEPTON after your demo session.
lepton.sh stop