Cannot install TENS1.2 in NS2.35
Hey,
I've been trying to find a way to install a directional antenna in NS2.35. I tried to install TENS by downloading the changes for ns2.1b9a from http://www.cse.iitk.ac.in/users/braman/tens/ and I change the path and package versions in the Makefile. after that I followed the instructions given in the web site. But its not working. Is there any other changes to do(to files in TENS) before installing TENS 1.2 in NS2.35 any help will be greatfull.... |
Welcome to LQ.
NS-2 Directional Antenna : The code is available for ns-2.33 : http://www.linuxquestions.org/questi...ntenna-833449/ .. The original links are down. My backup, dir-antenna_ns233-files.tar.gz can be downloaded from .. https://drive.google.com/file/d/0B7S...it?usp=sharing Using : $ cd ns-allinone-2.33/ns-2.33/ $ patch -p1 < dir-antenna.patch $ patch -p1 < multi-if.patch $ cd ../ && export CC=gcc41 CXX=g++41 && ./install *** Note : The { gcc41 / g++41 } compilers : Versions are available for all new 32bits (i686) Ubuntu's. ? Which is yours ? Please show the replies from these commands : a) $ uname -m b) $ cat /etc/issue Note 2 : The simulation ( sample_long.tcl = Dir-antenna-test.tcl ) .. fails with "Floating point exception" on the (3) Linux OS's , that I have tested with the patches : I guess you can edit the tcl file (antenna files?) to a usable result. Note 3 : You can have as many ns-allinone-2.xx as you want, installed at the same time. But do not add any *PATH text to .bashrc : Not required. - |
Thank you for your reply, these are the results from commands,
x86_64 Ubuntu 12.04.3 LTS \n \l I installed the ns2.33 as well and I use the patch, but since I already add the path of ns2.35 to bashrc file when I tried to run the simulation, I geuss it ran through ns2.35 instead of ns2.33. can you please tell me how to run the simulation using ns2.33. I'm tring to use the directional antenna with OLSR protocol, but in the simulation file it says that all other wireless protocol don't work. Is it possible to use this directional antenna to support OLSR protocol??? |
# 3 .
Using multiple 'ns' : You already have one 'ns' (from ns235), so please use a copy with a different name : $ cd ns-allinone-2.33/ns-2.33/ $ cp ns ns-dir-antenna $ sudo cp ns-dir-antenna /usr/local/bin/ ... Run the simulation with : 1) $ export NS_ANTENNA_FILE=./antenna.txt (or wherever you have a copy of {antenna.txt antenna1.txt}). 2) $ ns-dir-antenna Dir-antenna-test.tcl Using "Directional-Antenna" and OLSR in the same ns-allinone-2.33 : Might be possible. Some patches will work together. Some will conflict. But no reason to think about that until you've got a working DirectAntenna simulation. Quote:
Would have been useful 15 years ago, if you used the University Computer, and had no write permissions to /usr/local/bin/. The right install in ns-2.35/ is done with $ sudo make install * So you can easily delete what you added to .bashrc. ! The executable 'ns' is hard coded to know the location of it's libraries. So adding some path text makes no sense at all. - |
thank you very much!!! now the simulation is working. but when I tried to run a another simulation in ns2.33 (an example in ns2.33/tcl/ex) i got this error.
sudee@sudee:~$ ns2 simple-wireless.tcl num_nodes is set 2 can't read "numifs": no such variable while executing "subst $[subst $var]" (procedure "_o3" line 5) (SplitObject set line 5) invoked from within "$ns set numifs" (procedure "_o14" line 6) (Node/MobileNode add-interface line 6) invoked from within "$node add-interface $chan $propInstance_ $llType_ $macType_ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ $inerrProc_ $outerrProc_ $FECProc_" (procedure "_o3" line 77) (Simulator create-wireless-node line 77) invoked from within "_o3 create-wireless-node" ("eval" body line 1) invoked from within "eval $self create-wireless-node $args" (procedure "_o3" line 23) (Simulator node line 23) invoked from within "$ns_ node" ("for" body line 2) invoked from within "for {set i 0} {$i < $val(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) random-motion 0 ;# disable random motion }" (file "simple-wireless.tcl" line 93) I got same kind of errors when I tried to run few other simulations as well.. can you please help me for this as well... as I said earlier my project is to evaluate the performance of OLSR using directional antennas. Can you recomend any good books or other publications regarding the programming side, If you can it would be greatfull... |
# 5 .
Not unusual : Some of the extra protocols that you can add to ns2 .. will prevent the default simulations from working. The solution is simple : Keep a none patched 'ns-orig' executable in /usr/local/bin/. The version isn't important. Nearly all examples in tcl/ex are ancient. And the most of them can be used with $ ns_any-name_orig file.tcl - |
Is there anyway to use both OLSR and Directional antenna in one ns??? because I need both of them for my project.
|
# 7 .
See post #4 : ".. no reason to think about that until you've got a working DirectAntenna simulation." Have you got some perfect results with the "Direct Antenna simulation" ? ? |
yes I got a perfect result from it... when I tried installing OLSR first and then directional antenna, only the OLSR works and I got the same kind of error for the direct antenna simulation. Is there any solution for it, because my whole project depends on it.
|
# 9 .
Quote:
Code:
[knudfl@localhost ns-2.33]$ ns Dir-antenna-test.tcl - |
this is the result,
Code:
sudee@sudee:~/ns-allinone-2.33/ns-2.33$ ns-dir-antenna Dir-antenna-test.tcl |
# 9 .
Status report : These are the files that get changed with the patches ... ### um-olsr_ns-2.33_v1.0.patch Makefile.in common/packet.h queue/priqueue.cc trace/cmu-trace.cc trace/cmu-trace.h tcl/lib/ns-agent.tcl tcl/lib/ns-default.tcl tcl/lib/ns-lib.tcl tcl/lib/ns-packet.tcl ### dir.antenna.patch Makefile.in mobile/dir-antenna.cc mobile/dir-antenna.h tcl/lib/ns-default.tcl ### multi-if.patch aodv/aodv.cc aodv/aodv.h aodv/aodv_rtable.h tcl/lib/ns-lib.tcl tcl/lib/ns-mobilenode.tcl .... So the exercise is to write the changes together. * The current 3 patches : Files with the same name may be overridden by the next patch. - |
since I first installed the directional patch and then OLSR patch, I tried to install the directional patch again in a fresh install of ns2.33. But when I do that I get this error every time..
Quote:
|
# 13 .
Quote:
where you can install the gcc41 / g++41 packages. * You can of course not use gcc41, when it isn't present / isn't installed. So please describe how you installed {ns-2.33 + "direct-antenna"} .. and got that perfect result shown in post #11. - |
I used following commands to install ns2.33 & directional patch
Code:
ns2.33 : |
All times are GMT -5. The time now is 02:23 PM. |