Skip to main content

Aqua Sim for NS2 - Underwater Sensor Networks


Sensor nodes deployed inside water are known to be underwater sensor networks. These network is helpful in fish cultivation, habitat monitoring, predicting ptusami, etc.

Updated 9th April 2016 : the link to download the Aquasim is updated, the regular link is not working

This network uses different MAC protocol, routing protocol, etc. Real test bed are costlier and one cannot afford it. Simulators are the ultimate solution to know about these networks. Aquasim is one such tool that is integrated in ns2 for handling underwater sensor networks. This simulator supports new mac layer, new protocols that are helpful in routing inside water. There are examples also to simulate these networks.

Here is the installation steps of Aquasim.  Some points to be taken care of
  • ns-allinone-2.30 is used in creating the underwater sensor networks 
  • nam misbehaves (or does not work) in recent Ubuntu and Mint distributions. 
  •  Need to have the X11, automake and build essential tools to install Aquasim. 
Installation of AquaSim
OS Tested:  Ubuntu 14.04+ and Linux Mint 17+
AquaSim: 1.0 Version (It does not have a 3D version)

Download the aquasim simulator
Here are steps to install the libraries needed to install Aquasim

pradeep@localhost $] sudo apt-get update
pradeep@localhost $] sudo apt-get install libxmu-dev build-essential autoconf automake 

Create a folder called aquasim/ and extract the Aquasim-1.0.tgz inside this folder

pradeep@localhost $] mkdir aquasim 
pradeep@localhost $] cd aquasim/
copy the Aquasim-1.0.tgz in aquasim folder and extract it using 
pradeep@localhost $] tar zxvf Aquasim-1.0.tgz
pradeep@localhost $] ./install 

You may get an error as stated below: to clear this error, do the following step

Open the file (~aquasim/ns-2.30/linkstate/ls.h)  using gedit or vi or vim 

In line number 137, change the following line
void eraseAll() { erase(baseMap::begin(), baseMap::end()); }
to
void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); }

and again issue the command ./install . After successful installation, some paths will be provided. You need to paste those paths in the /home/pradeepkumar/.profile or .bashrc (/home/pradeepkumar/ is my home, you have to use your corresponding directory where the software is installed)

Here is the sample path in my .profile file

export PATH=$PATH:/home/pradeepkumar/aquasim/bin:/home/pradeepkumar/aquasim/tcl8.4.13/unix:/home/pradeepkumar/aquasim/tk8.4.13/unix
export LD_LIBRARY_PATH=/home/pradeepkumar/aquasim/otcl-1.12:/home/pradeepkumar/aquasim/lib
export TCL_LIBRARY=/home/pradeepkumar/aquasim/tcl8.4.13/library


After setting these paths, you logout and login back and aquasim works well now.

Open the terminal and type ns, if it indicates a %, then aquasim was installed successfully.

Nam as i said earlier, may not work well, here is a workaround - please follow the link - http://www.nsnam.com/2015/07/nam-installation-segmentation-fault.html

Once installed, you can explore the folder /home/pradeepkumar/aquasim/ns-2.30/underwatersensor

This folder contains all the source codes relevant to the under water sensor networks. The above folder has five sub folders like uw_common/, uw_routing/, uw_mac/, uw_mobility_pattern/ and uw_tcl/ 

pradeep@localhost $] cd uw_tcl/ 
will give you the examples of under water sensor networks. 

pradeep@localhost $] ns vbf_example_5.tcl 
pradeep@localhost $] nam vbf_example_5.nam 
Here is the screenshot of the example run using nam
aquasim
Aquasim
This post does not handle the Aqua 3d where you have the option of viewing the nodes inside a water using a 3D view. Users are requested to try themselves for installing Aqua 3D. 

Comment below for any queries related to this installation.

 T S Pradeep Kumar

Comments

  1. sir , some files are missing, as it is not getting installed. i tried many times. can u please help me out

    ReplyDelete
  2. Hey! I am having this issue,

    make: gcc-4.3: Command not found
    make: *** [Makefile:92: libotcl.a] Error 127
    otcl-1.12 make failed! Exiting ...
    See http://www.isi.edu/nsnam/ns/ns-problems.html for problems

    Did you successfully install aquasim? If yes please reply...

    ReplyDelete
    Replies
    1. I am getting same error. Did you solve this?

      Delete
  3. hello in first thanks for your help
    in try to install aqusim by using ns 2.30 and test of successfully is good ns command give % but instruction ns vbf_example_5.tcl give folloying message


    the file name is vbf_example_5.data
    the sending interval is 10.0
    invalid command name "Agent/Vectorbasedforward"
    while executing
    "Agent/Vectorbasedforward set hop_by_hop_ 0"
    (file "vbf_example_5.tcl" line 64)

    ReplyDelete
  4. hello sir
    first thanks for your help
    please, only i follow the same way to install aquasim with ns 2.30 in linux mint 18, but in execution i have some error like this
    $ ns
    %
    ~/aquasim/ns-2.30/underwatersensor/uw_tcl $ ns vbf_example_5.tcl
    the file name is vbf_example_5.data
    the sending interval is 10.0
    invalid command name "Agent/Vectorbasedforward"
    while executing
    "Agent/Vectorbasedforward set hop_by_hop_ 0"
    (file "vbf_example_5.tcl" line 64)
    please whet is the solution?
    my regards

    ReplyDelete
  5. I want aqua sim in ns2 code

    ReplyDelete

Post a Comment

Popular posts from this blog

Installing ns3 in Ubuntu 22.04 | Complete Instructions

In this post, we are going to see how to install ns-3.36.1 in Ubuntu 22.04. You can follow the video for complete details Tools used in this simulation: NS3 version ns-3.36.1  OS Used: Ubuntu 22.04 LTS Installation of NS3 (ns-3.36.1) There are some changes in the ns3 installation procedure and the dependencies. So open a terminal and issue the following commands Step 1:  Prerequisites $ sudo apt update In the following packages, all the required dependencies are taken care and you can install all these packages for the complete use of ns3. $ sudo apt install g++ python3 python3-dev pkg-config sqlite3 cmake python3-setuptools git qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar gsl-bin libgsl-dev libgslcblas0 wireshark tcpdump sqlite sqlite3 libsqlite3-dev  libxml2 libxml2-dev libc6-dev libc6-dev-i386 libc...

Installation of NS2 (ns-2.35) in Ubuntu 20.04

Installation of NS2 (ns-2.35) in Ubuntu 20.04 LTS Step 1: Install the basic libraries like      $] sudo apt install build-essential autoconf automake libxmu-dev Step 2: install gcc-4.8 and g++-4.8 open the file using sudo mode $] sudo nano /etc/apt/sources.list Include the following line deb http://in.archive.ubuntu.com/ubuntu bionic main universe $] sudo apt update $] sudo apt install gcc-4.8 g++-4.8 Step 3:  Unzip the ns2 packages to home folder $] tar zxvf ns-allinone-2.35.tar.gz $] cd ns-allinone-2.35/ns-2.35 Modify the following make files. ~ns-2.35/Makefile.in Change @CC@ to gcc-4.8 change @CXX@ to g++-4.8 ~nam-1.15/Makefile.in ~xgraph-12.2/Makefile.in ~otcl-1.14/Makefile.in Change in all places  @CC@ to gcc-4.8 @CPP@ or @CXX@ to g++-4.8 open the file: ~ns-2.35/linkstate/ls.h Change at the Line no 137  void eraseAll() { erase(baseMap::begin(), baseMap::end()); } to This void eraseAll() { this->erase(baseMap::begin(), baseMap::end()); } All changes ...

Installation of NS2 in Ubuntu 22.04 | NS2 Tutorial 2

NS-2.35 installation in Ubuntu 22.04 This post shows how to install ns-2.35 in Ubuntu 22.04 Operating System Since ns-2.35 is too old, it needs the following packages gcc-4.8 g++-4.8 gawk and some more libraries Follow the video for more instructions So, here are the steps to install this software: To download and extract the ns2 software Download the software from the following link http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz/download Extract it to home folder and in my case its /home/pradeepkumar (I recommend to install it under your home folder) $ tar zxvf ns-allinone-2.35.tar.gz or Right click over the file and click extract here and select the home folder. $ sudo apt update $ sudo apt install build-essential autoconf automake libxmu-dev gawk To install gcc-4.8 and g++-4.8 $ sudo gedit /etc/apt/sources.list make an entry in the above file deb http://in.archive.ubuntu.com/ubuntu/ bionic main universe $ sudo apt update Since, it...