The problem of running the tcl script file in the NS2.31+crcn environment
After installing the NS2.31 and the crcn patch, I tried to run the script file in the fold crcn.
When I typed the command ns test4maccon.tcl a error appeared: num_nodes is set 6 (_o3 cmd line 1) invoked from within "_o3 cmd add-channel 0 _o13" invoked from within "catch "$self cmd $args" ret" invoked from within "if [catch "$self cmd $args" ret] { set cls [$self info class] global errorInfo set savedInfo $errorInfo error "error when calling class $cls: $args" $..." (procedure "_o3" line 2) (SplitObject unknown line 2) invoked from within "$ns_ add-channel $i $chan_($i)" ("for" body line 2) invoked from within "for {set i 0} {$i < $val(channum) } {incr i} { $ns_ add-channel $i $chan_($i) }" (file "test4maccon.tcl" line 43) I have no idea how to solve this problem. Anyone knows? Regards. |
Welcome to LQ.
A corrupt ns ? A failed build ? Or an 'ns' with no CRCN ? I.e. you could be using a wrong 'ns' executable. It's a good idea to do the following right after the build : $ cd ns-allinone-2.31/ns-2.31/ && cp ns ns-crcn ... Then all commands can be : $ ns-crcn <file>.tcl The ns-CRCN binary package : crcn-ns-2.31-ubuntu10_i386.deb https://docs.google.com/file/d/0B7S2...it?usp=sharing .. Providing /usr/local/bin/ns-crcn crcn-examples-032013.tar.bz2 : https://docs.google.com/file/d/0B7S2...it?usp=sharing All LQ crcn http://www.linuxquestions.org/questions/tags/crcn/ - |
is the tcl script that we need to use to adjust the power level involves in crcn?
how? thank you in advance |
how to adjust the cognitive radio CR power level in tcl script to find the optimal power level?
thank you in advance |
Hi,
i use fedora12 and when i try to run tcl files in the crcn folder, i had this same error of syxcod. The solution provided here is for ubuntu Quote:
Thank you |
Re #5.
The errors in {post #1, @syxcod} are caused by using an executable 'ns' with no CRCN. See http://www.linuxquestions.org/questi...-4175502417/#2 $ cd ns-2.31/ $ cp ns ns231-crcn # make install # cp ns231-crcn /usr/local/bin/ And then run all the simulations from the crcn-examples_06.2015/ folder. ( crcn-examples_06.2015/ can have any location.) crcn-examples_06.2015.tar.gz https://drive.google.com/file/d/0B7S...ew?usp=sharing Example simulation : $ ns231-crcn 0-test4maccon.tcl The examples were modified to create trace files with different names. To prevent that you get a "test.tr" file from all the examples : 0-test4maccon.tcl will create 0test.tr .... 5-test4wcett.tcl will create 5test.tr ... If you have a failed build, simply start from scratch in a new folder, in /home/name/ns2/* - |
Hi,
Thank you for responding me, when i installed the crcn patch i did not copy it in the ns-2.31 folder as decribed above. I replaced the existing files in ns-2.31 by the new files of the crcn patch for example (i replaced the existing aodv folder contents with the new one i copied from crcn. and i Leaved the rest of the files unmodified.) my question is, i want to use your method described above, i must use new ns (not mofified), or my ns that i replaced its files? thank you in advance. |
Re #7.
Start from scratch means : Create a new folder in /home/name/ns2/ ,,, ( Do not use the Desktop ) and : $ tar xvf ns-allinone-2.31.tar.gz I.e. do not reuse, if changes like yours are failing. - |
please tell me what you mean by ns in this instruction, wich ns exactly that i must copy it in the ns231-crcn folder?
cp ns ns231-crcn sorry for all those questions. |
Re #9.
There is no ns231-crcn/ folder, and please do not make one. $ cd ns-2.31/ && cp ns ns231-crcn ... Means that you get a copy of the executable 'ns' by name 'ns231-crcn' ! And that new executable is to be copied to /usr/local/bin/ : # cp ns231-crcn /usr/local/bin/ ... To make it possible doing $ ns231-crcn 0-test4maccon.tcl ... This way you are absolutely sure you are using the right executable. And the simulation will succeed. Unless you have a failed build. The safe way of building http://www.linuxquestions.org/questi...-4175502417/#2 Or use the patch crcn_ns231.patch, instead of "crcn-ns2.31.tar.gz". ... The prerequisites must of course be installed, before a build is started : # yum install gcc-c++ compat-gcc-34-c++ autoconf automake make patch libtool libXmu-devel - |
Please one last question,
in ubuntu i succeed to install this patch but i did not succed to do it in fedora. When i installed it in ubuntu i did this step: Quote:
|
Re #11.
`crcn.zip' : That's the year 2008 files. Not required. Were replaced by crcn-ns2.31.tar.gz, and later by crcn_ns231.patch ... for easier use. Be aware that most "ns2 tutorials" are made by young students using a Linux OS and ns2 for the first time. And not all will know how to create a patch. And a patch is actually an important document, because only the patch will show the exact changes made to the files. - |
yes i will use crcn_ns231.patch and if i understand those are steps to instal the patch.
Quote:
Thank you. |
Re #13.
Quote:
No copying no files nowhere ... unless you are looking for troubles. I.e. nothing but this ... $ tar xvf ns-allinone-2.31.tar.gz $ cd ns-allinone-2.31/ $ patch -p0 < crcn_ns231.patch $ export CC=gcc34 CXX=g++34 && ./install $ cd ns-2.31/ cp ns ns231-crcn # make install cp ns231-crcn /usr/local/bin/ - |
Ah ok, thank you so much i feel that is more clear for me now.
That mean i need only to put this patch in the ns-allinone-2.31 folder. Kindly give me the link of crcn_ns231.patch Because this is the link that you gave me above: http://www.linuxquestions.org/questi...-4175502417/#2 is for crcn-ns2.31.tar.gz: https://drive.google.com/file/d/0B7S...cn_ns231.patch. i did research in this forum and i find this link of crcn_ns231.patch: https://drive.google.com/file/d/0B7S...lpN3VTbUE/view it was used for ubuntu so only i want to verify if i can use it also for fedora? sorry again and thank you so much . |
All times are GMT -5. The time now is 01:41 AM. |