Installation and Usage of WSNet

De Ensiwiki
Révision de 30 avril 2013 à 15:52 par Rousfran (discussion | contributions) (Home page)

(diff) ← Version précédente | Voir la version courante (diff) | Version suivante → (diff)
Aller à : navigation, rechercher
Project schedule.png
Titre du projet Simulation de routage sous WSNet
Cadre Projets de spécialité
Page principale Simulation de routage sous WSNet

System requirements

General points

Before compiling WSNet make sure the following software packages are installed on your system:

  • gcc, libtool, and make
  • automake, autoconf, and pkg-config
  • openjdk-6-jdk
  • libglib2.0-0, and libglib2.0-dev
  • libxml2, and libxml2-dev
  • libgsl0-dev

For example, type the following command to install one of the packages mentioned above :

sudo apt-get install "packet name"

The same operation can be performed via the packet management tool Synaptic.

AttentionAccording to the INRIA, WSNet may not compile with a version of libtool higher than 2.0. However, we managed to compile WSNet with the 2.2.6a version but not with the 2.2.6b version.

Downgrade libtool to a compatible version

x86 architecture (32 bit)

If you have an x86 architecture (32 bit) here is how to get libtool 1.5.

sudo dpkg - install libtool_1.5.26-1ubuntu1_i386.deb

x64 architecture (64 bit)

If you have en x64 architecture (64 bit) you can get a compatible version of libtool package on this site :


In order to install WSNet, check out the very latest source code from the SVN repository by typing the following command:

svn checkout svn://

After checking out the SVN repository, move to the ./wsnet/ directory and type the following commands:


You can type ./configure --help for a complete list of the main configure options.

Then, to compile and install the WSNet source code, type the following commands:

sudo make install

By default, WSNet will be installed at the /usr/local/wsnet-2.0/ directory. The install directory is organized as follows:

  • /usr/local/wsnet-2.0/bin/: simulator binary files (wsnet, wsnet-replay, wsnet-topogen, ...)
  • /usr/local/wsnet-2.0/lib/: shared libraries for application, routing, mac and radio protocols
  • /usr/local/wsnet-2.0/shared/: shared ressources
  • /usr/local/wsnet-2.0/include/: header files for implementing new modules
  • /usr/local/wsnet-2.0/demo/: demo simulation files

You can add the WSNet install directory in the search path by adding the following entries in ~/.bashrc:

export PATH


Once WSNet is properly compiled and installed you can run a simulation by executing the wsnet binary file. Possible options are:

  • -c configfile.xml: to specify a config file for the simulation parameters
  • -S rng-seed: to specify a seed for the random number generator
  • -R rng-type: to specify the random number generator type.

Possible value are: mt19937, ranlxs0, ranlxs1, ranlxs2, ranlxd1, ranlxd2, rng_ranlux and rng_ranlux389. The default value is mt19937.

  • -V : to print the version number

You can run a simulation with a demonstration config file by typing the following command :

wsnet -c /usr/local/wsnet-2.0/demo/cbr.xml


INRIA Installation/Usage tutorial