DEMO-OPPNET   Documentation Download About

Installation of DEMO-OPPNET

Overview

The self-extractible archive demo_oppnet.run allows you to install DEMO-OPPNET. It installs by defaults the following elements:

Optionally, can also be installed a Bluetooth gateway that will enable access to the DoDWAN Network API from a smartphone (provided that the DoDWAN Bluetooth Gateway Android application is installed on the smartphone).

Dependencies

Running the demo assumes that a certain number of programs are already present (see -checkonly option in the next section) on the target machine.

On Debian bookworm, this corresponds to the installation of the following packages:

  sudo apt install openjdk-17-jre-headless python3 nodejs iw wpasupplicant isc-dhcp-client network-manager  \
  wireless-tools netcat-openbsd rsync inotify-tools rfkill

It is likely that the first packages (up to network-manager) are already present for a laptop. The JRE version may vary (at least Java 8). If you want to install the Bluetooth part in addition:

  sudo apt install bluetooth python3-bluez bluez-tools

Installing the demo

The self-extracting archive demo_oppnet.run contains a shell preamble followed by a GZIP archive of the directory demo_oppnet. When demo_oppnet.run is launched (as root or sudoer), the preamble extracts the archive (in /tmp) and executes the script util/setup.sh found there. The setup.sh script copies the demo_oppnet directory to its final location (/opt directory), checks software dependencies and does everything necessary to install the demo. If the dependencies are not respected, the script stops.

The demo_oppnet.run archive can be run from anywhere and takes parameters which will be passed to setup.sh, by preceding these parameters with --. For example sh demo_oppnet.run -- -bt -noenable

Possible parameters:

The setup.sh script is reentrant. So you can call it after installation, to add (or remove) the bluetooth part (or the systemd options). Note that installation starts with uninstall if it's not the 1st time. For example, sudo /opt/demo_oppnet/util/setup.sh -bt -noenable or sudo /opt/demo_oppnet/util/setup.sh -uninstall.

Launching the demo

The demo is launched as a systemd service (demo-oppnet.service). By default, it is enabled (i.e. it starts automatically on boot) and is started during installation. The demo is therefore already started by default after installation.

If the -noenable option has been used, you can manually enable the service afterwards (sudo systemctl enable demo-oppnet). If the -nostart option has been used, you can manually start the service (sudo systemctl start demo-oppnet).

Of course, you can stop the service at any time (sudo systemctl stop demo-oppnet) or disable it (sudo systemctl disable demo-oppnet).

You can also control the demo via the script /opt/demo_oppnet/bin/demo.sh by passing it the start, stop or status parameter. The oppnet user must execute it. For example: sudo su oppnet ; /opt/demo_oppnet/bin/demo.sh stop.

The demo.sh script can finely control sub-services (dodwan, wifi, monitor, webadmin, bt-agent, bt-bounding, bt-gateway) with the same parameters. For example: sudo su oppnet ; /opt/demo_oppnet/bin/demo.sh status wifi. The (pseudo) sub-service demonoweb groups together all sub-services except the webadmin server.