Sunteți pe pagina 1din 12

How To Install GTSNetS ?

A Setp-by-step Installation Tutorial

Mohammed Al-Kateb
Department of Computer Science
The University of Vermont
{malkateb@cs.uvm.edu}
GTSNetS (Georgia Tech Sensor Network Simulator) is a large-scale wire-
less sensor networks simulator [5]. It is best characterized by its scalability,
adaptability, and extensibility. It can be used to simulate a WSN scaling up
to several hundred thousand nodes. The adaptability comes from the differ-
ent methods included in the baseline implementations of energy consumption
models, reading accuracy models, routing protocols and applications, and
tracing options. The extensibility comes from the modular implementations
using the C++ object-oriented programming language.

This document is a self-contained tutorial that gives a step-by-step guide


of how to install the GTSNetS. The tutorial first states the system config-
uration used in the installation process, then details the installation steps,
and finally lists common installation problems and suggests their solutions.

DISCLAIMER

Installation instructions presented in this tutorial are based on the expe-


rience of the author of the tutorial and do not necessarily reflect the opinion
of the GTSNetS inventors. The author does not guarantee the proper func-
tioning of these instructions.

ACKNOWLEDGMENT

The author of this tutorial is grateful to Thomas Watteyne whose in-


structions of GTSNetS installation [1] has been helpful to achieve the in-
stallation successfully. This tutorial adopts the installation instructions in
[1], with further organization, details, enhancements, and suggestions based
on the author experience with the installation of the GTSNetS simulator.

1
System Configuration
Installation instructions presented in this tutorial has been experienced over
a system with the following configuration:

Hardware
Processor : Intel(R) Core(TM)2 CPU T5300 @ 1.73GHz
Cache size : 2048 KB
Memory : 1025920 kB

Software
Linux 2.6.22-14-generic (Ubuntu 7.10)

2
Installation Steps
The installation of the GTSNetS goes through 5 main steps

1. Installing g++ compiler

2. Installing Qt/X11 application development framework

3. Installing libSynk library

4. Installing GTSNetS

5. Testing example programs

3
Step 1: g++ installation
g++ is C++ compiler that takes the C++ source code and compile it into
a binary file that can be executed. The g++ compiler can be downloaded
in a number of forms. A recommended way to download it, if not already
on your system, is using the following command:

sudo apt-get install build-essential

4
Step 2: Qt/X11 installation
Qt [3] is a cross-platform application framework that features several char-
acteristics including: comprehensiveness, portability, ease-of-use, and open-
source availability. Qt/X11 [4] is the Qt edition for Unix and Linux operat-
ing systems, and it is an ideal framework for Linux-based systems to develop
platform-independent applications.
To install Qt/X11, the following steps are recommended:

1. Change the current directory


cd /usr/local

2. Download Qt/X11
sudo wget ftp://ftp.trolltech.com/qt/source/qt-x11-free-3.3.5.tar.gz 1

3. Uncompresses the gzip file


sudo gunzip qt-x11-free-3.3.5.tar.gz

4. Extract the tarfile


sudo tar xf qt-x11-free-3.3.5.tar

5. Rename qt-x11-free-3.3.5 file to qt


sudo mv qt-x11-free-3.3.5 qt

6. Open the /etc/profile file using the gksudo gedit /etc/profile command,
and add the following 6 lines at the end of the file:
# The following lines has been added to configure Qt/X11
QTDIR=/usr/local/qt
PATH=$QTDIR/bin:$PATH
MANPATH=$QTDIR/man:$MANPATH
LD LIBRARY PATH=$QTDIR/lib:$LD LIBRARY PATH
export QTDIR PATH MANPATH LD LIBRARY PATH

7. Change the current directory


cd /usr/local/qt
1
Wget is a free utility for non-interactive download (meaning that it can work in the
background) of files from the Web, and it supports HTTP, HTTPS, and FTP protocols,
as well as retrieval through HTTP proxies.

5
8. Build a new Makefile using the following command and answer Y
sudo ./configure

9. Build the program


sudo make

6
Step 3: libSynk installation
libSynk [2] is a software library for supporting communication and synchro-
nization features in distributed applications.
To install libSynk, the following steps are recommended:

1. Change the current directory


cd /root/

2. Download libSynk
sudo wget ftp://ftp.cc.gatech.edu/pub/people/kalyan/libsynk/libsynk-current.tar.Z

3. Extract the tarfile


sudo tar -xzvf libsynk-current.tar.Z

4. Change the current directory


cd /root/libsync

5. Build the program


sudo make

6. Change the current directory


cd /root/libsync/fdkcompact/

7. Build the program


sudo make

8. run a ping test program


sudo ./brtiping

7
Step 4: GTSNetS installation
This is the actual step of installing the GTSNetS simulator. To install the
GTSNetS, the following steps are recommended:

1. Change the current directory


cd /root/

2. Make a new directory named GTS


sudo mkdir GTS

3. Change the current directory


cd GTS

4. Download GTSNetS
sudo wget http://citi.insa-lyon.fr/ twatteyne/documents/watteyne gtsnets-
pub.tar.gz

5. Extract the tarfile


sudo tar -xzvf watteyne gtsnets-pub.tar.gz

6. Change the current directory


cd gtsnets-pub/

7. Open the Makefile using the gksudo gedit Makefile command and make
sure that the following 2 lines are correctly present in the file
QT= -I/usr/local/qt/include -DHAVE QT
KITHOME= /root/libsync

8. Prepare your files to run using the following commands:


sudo make depend // to build dependencies
sudo make dbg // to build the library with debug syms
sudo make opt // to build the optimized library
sudo make examples // to compile all the examples in EXAMPLES/

8
Step 5: Test Examples
To test examples included with the GTSNetS, do the following:

1. Change the current directory


cd EXAMPLES

2. Run any example program


sudo ./ppp-opt // replace the ppp with the name of the program to
run

9
Common Installation Errors and Their Solutions
This section presents common errors that may take place during the instal-
lation and suggested solutions of these errors.

E: Couldn’t find package libx11-dev


Suggested Solution:
Do the following steps

1. Open the /etc/apt/sources.list file ing the gksudo gedit /etc/apt/sources.list


command

2. uncomment the following two lines:


#deb http://us.archive.ubuntu.com/ubuntu/ gutsy-backports main re-
stricted universe multiverse
#deb-src http://us.archive.ubuntu.com/ubuntu/ gutsy-backports main
restricted universe multiverse

3. Save and close the file

4. Execute the following command:


sudo apt-get update

5. Install the missing package using the command:


sudo apt-get install <package name>

Linux /usr/bin/ld: cannot find lXext


Suggested Solution:
sudo apt-get install libxext-dev

Extra qualification ’SensorsUnit::’ on member ’SensorsUnit’


Suggested Solution:
remove ”SensorsUnit::” from line 80 in the corresponding file

10
Bibliography

[1] http://perso.citi.insa-lyon.fr/twatteyn/documents/install gtsnets.txt.

[2] libsynk. http://www.cc.gatech.edu/fac/kalyan/libsynk.htm.

[3] Qt: Cross-platform rich client development framework.


http://trolltech.com/products/qt.

[4] Qt/x11. http://trolltech.com/developer/downloads/qt/x11.

[5] E. M. Ould-Ahmed-Vall, G. F. Riley, and B. S. Heck. Large-scale sensor


networks simulation with gtsnets. Simulation, 83(3):273–290, 2007.

11

S-ar putea să vă placă și