Here is the tutorial once I prepared
You need to figure out which steps you should take and which steps you should skip
Also, I guess they recently updated nanosim
Probably these steps will not work
But take them as a generic guideline
You need Linux!
Assume that you have ubuntu the first step is to install
required packages for this the command is :
--------------paste it to terminal-----------------------
sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl-dev libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev python-pygccxml
--------------------------------------------
After that :
---------------------------------------------------------------------------------------------
nanosim works with ns3 version 3.20! I guess also with 3.21 too
Here is a step by step guide for Linux. Let me know if anything goes wrong:
---------------------------------------------------------------------------------------
Download ns-3 version 3.20:
************************************************************************************
FOR UBUNTU:
install (not all of them of course, cmake is necessary) packages listed on this page:
NOTE THAT:
Python API scanning support: cmake libc6-dev libc6-dev-i386 g++-multilib
To rescan Python bindings requires gccxml and pygccxml, which are installed by bake.
However, for Ubuntu 16.04, gccxml will not build without a patch and a
You may skip this gccxml step!!!
*************************************************************************************
unzip master.zip like this:
unzip master.zip
mv gccxml-master gccxml
save it to a text file called "gccxml-patch.txt" in the same dir as master.zip
replace in the patch file :
"gccxml-0.9.0-20150423.orig" to "gccxml.orig"
"gccxml-0.9.0-20150423" to "gccxml"
then:
cd gccxml
patch -p1 < ../gccxml-patch.txt
now build gccxml in gccxml dir:
cmake ../gccxml -DCMAKE_INSTALL_PREFIX:PATH=../../build -DCMAKE_C_FLAGS=-fgnu89-inline
make -j4
or
make -j8
as root install it
sudo make install
Now gccxml will be in let say:
/home/<your user name>/Desktop/build/bin
Check it!
you must add "/home/<your user name>/Desktop/build/bin" to your PATH
add line to your .bashrc as
export PATH=/home<your user name>/build/bin:$PATH
now ready to compile ns3
*************************************************************************************
Download nanosim package:
unzip ns-allinone-3.20.tar.bz2:
tar xvjf ns-allinone-3.20.tar.bz2
go to ns-3.20 dir in ns-allinone-3.20:
cd ns-allinone-3.20/ns-3.20/
configure ns-3.20 :
CXXFLAGS="-Wall" ./waf configure
compile it:
./waf
If all goes well then go up where you downloaded all:
cd ../../
extract the "linux" (there is also code for MACOSX) directory from nanonetworks.zip :
unzip nanonetworks.zip 'nanonetworks/*' -d ./
then copy nanonetworks dir to ns-allinone-3.20/ns-3.20/src/ :
cp -R nanonetworks ns-allinone-3.20/ns-3.20/src/
then do configure and compile again after you go to ns-allinone-3.20/ns-3.20/ dir :
cd ns-allinone-3.20/ns-3.20/
CXXFLAGS="-Wall" ./waf configure
./waf
if all goes well you can run nanosim examples, first copy all examples of nanosim to scratch dir:
cp src/nanonetworks/examples/* scratch/
then:
./waf --run scratch/health-care
you must see some output stuff!!!
Done!