Installation and Usage of WSNet
|"Projet de Spécialité 2010"||Routing simulation with WSNet|
|Team||Alexandre Euriat, Benjamin Morin, William Ogeard, Rémi Poux|
|Location||Grenoble INP Ensimag|
Before compiling WSNet make sure the following software packages are installed on your system:
- gcc, libtool, and make
- automake, autoconf, and pkg-config
- libglib2.0-0, and libglib2.0-dev
- libxml2, and libxml2-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.
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.
wget http://ftp.sjtu.edu.cn/ubuntu/pool/main/libt/libtool/libtool_1.5.26-1ubuntu1_i386.deb 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://scm.gforge.inria.fr/svn/wsnet
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:
make 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:
PATH=$PATH:/usr/local/wsnet-2.0/bin 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