Body Sensor Network
A body area network (BAN), also referred to as a wireless body area network (WBAN) or a body sensor network (BSN) or a medical body area network (MBAN), is a wireless network of wearable computing devices[4].
Castalia
Castalia is a simulator for Wireless Sensor Networks (WSN), Body Area Networks (BAN) and generally networks of low-power embedded devices[1]. It is based on an old OmNet++ version. The most recent version of Castalia (3.3) works with old versions of OmNet++ versions between 4.3 and 4.6. Note that the higher versions of OmNet++ are not compatible with Castalia. It can be used by researchers and developers who want to test their distributed algorithms and/or protocols in realistic wireless channel and radio models, with a realistic node behaviour especially relating to access of the radio.[1].
This article shows the way of installing the old version of OmNet++ with Castalia 3.3 on a chrooted 64-bit Debian 8 (Jessie) on Debian 11 Host OS.
If you wish to do the installation on chroot environment, then you may first learn the way of setting the “chroot” Jail by reading the following post. Instead of installing Debian 9, you install Debian 8 under chroot. Instead of installing OmNet++ 5, you install OmNet++ 4.6.
Installing Omnet++ in Debian 9 chroot Jail Under Debian 11 Host OS
Features of Castalia
According to Documentation found in [1], the main features of Castalia are:
Channel model
- Model defines a map of path loss, not simply connections between nodes
- Complex model for temporal variation of path loss
- Fully supports mobility of the nodes
- Interference is handled as received signal strength, not as separate feature
Radio model
- Probability of reception based on SINR, packet size, and modulation type. PSK FSK supported, custom modulation allowed by defining SNR-BER curve
- Multiple TX power levels with individual node variations allowed
- States with different power consumption and delays switching between them
- Flexible carrier sensing (polling-based and interrupt-based)
Extendable Capabilities
- Highly flexible physical process model
- Sensing device noise, bias, and power consumption
- Node clock drift, CPU power consumption.
- Designed for adaptation and expansion.
Availability of MAC and routing protocols
- In Castalia four main MAC modules were implemented: 1) TunableMAC, 2) TMAC, 3) IEEE 802.15.4 MAC. 4) IEEE 802.15.6 MAC (draft proposal for Body Area Networks).
-
simpleTreeRouting and multipathRingsRouting were available in old versions and multipathRingsRouting only available in new versions.
- The default mac is “BypassMAC” and routing is “BypassRouting“
Installation of OmNet++
You can download the required old version of OmNet++ from [2].
Step 1: Install Dependencies
Install the necessary dependencies of OmNet++
$ apt-get update
#install the dependencies – if you only wish to use Castalia, then your will not require some of the following packages
$ apt-get install wget build-essential gcc g++ bison flex perl python python3 qt5-default libqt5opengl5-dev tcl-dev tk-dev libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-3.0-0
# If needed, add extra GIS repo – the osg related installation may fail – just ignore it
$ apt install software-properties-common
$ apt-get update
$ add-apt-repository ppa:ubuntugis/ppa
$ apt-get update
# install osgearth development package and OpenSceneGraph
$ apt-get install openscenegraph-plugin-osgearth libosgearth-dev
# for parallel simulation support
$ apt-get install openmpi-bin libopenmpi-dev
Step 2: Download OmNet++ 4.6
https://github.com/omnetpp/omnetpp/releases/download/omnetpp-4.6/omnetpp-4.6-src.tgz
Step 3: Extract the compressed file
$ tar -xvf omnetpp-4.6-src.tgz
Step 3: Compilin OmNet++
#configure make file according to the environment
$ ./configure
$ export PATH=/home/omnetpp-4.6/bin:$PATH
$ make -j9
Step 4: Running OmNet ++
To test the OmNet++ installation, we can run the omnetpp GUI from chroot jail using the host OSs display.
The following screenshots of the guest OS (Debian 11) show the starting of OmNet++ gui from the chrooted Debian 8.
Step 5: Downloading Castalia
$ git clone https://github.com/boulis/Castalia.git
Step 6: Compiling Castalia in Command line mode (terminal)
$ ./makemake
Now you will see a output similar to the following one (under chroot environment only) – just ignore the warnings.
Now compile Castalia as follows:
$ make -j9
Step 6: Compiling Castalia in OmNet++ GUI
Alternatively, we can compile Castalia under OmNet++ GUI after importing the project in to an existing or new workspace.
The following section Explains the GUI mode Import and Compile:
The following Screenshot shows the example BAN simulation
The following animation shows the animated output of that simple BAN simulation:
We will see a more realistic BSN simulation in another atricle.
Limitations of Catalia
Castalia is not sensor platform-specific. Castalia is meant to provide a generic reliable and realistic framework for the first order validation of an algorithm before moving to implementation on a specific sensor platform and not useful if one would like to test code compiled for a specific sensor node platform[1]. And hopefully, making it work on recent versions of OmNet++ is not possible or may require a complete rewire of the entire module.