Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-29-2013, 03:57 AM
|
#1
|
LQ Newbie
Registered: Apr 2013
Posts: 4
Rep:
|
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.
|
|
|
04-30-2013, 05:24 AM
|
#2
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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/
-
Last edited by knudfl; 04-30-2013 at 05:27 AM.
|
|
1 members found this post helpful.
|
10-01-2013, 08:23 AM
|
#3
|
LQ Newbie
Registered: Sep 2013
Posts: 23
Rep:
|
is the tcl script that we need to use to adjust the power level involves in crcn?
how?
thank you in advance
|
|
|
10-26-2013, 08:33 AM
|
#4
|
LQ Newbie
Registered: Sep 2013
Posts: 23
Rep:
|
how to adjust the cognitive radio CR power level in tcl script to find the optimal power level?
thank you in advance
|
|
|
11-23-2015, 12:47 PM
|
#5
|
Member
Registered: Nov 2015
Posts: 56
Rep:
|
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
There is any other solution for fedora12 please?
Thank you
|
|
|
11-23-2015, 04:13 PM
|
#6
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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/*
-
Last edited by knudfl; 11-23-2015 at 04:22 PM.
|
|
|
11-23-2015, 04:56 PM
|
#7
|
Member
Registered: Nov 2015
Posts: 56
Rep:
|
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.
|
|
|
11-23-2015, 05:09 PM
|
#8
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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.
-
|
|
|
11-23-2015, 07:09 PM
|
#9
|
Member
Registered: Nov 2015
Posts: 56
Rep:
|
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.
Last edited by marwa88; 11-23-2015 at 07:13 PM.
|
|
|
11-23-2015, 07:41 PM
|
#10
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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
-
Last edited by knudfl; 11-23-2015 at 07:52 PM.
|
|
|
11-23-2015, 08:07 PM
|
#11
|
Member
Registered: Nov 2015
Posts: 56
Rep:
|
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:
Extract CRCN.zip and you will see several files inside that. You have to copy each file in that and replace the corresponding files in ns2.31 folder.
Let me explain this in more detail.
If you have a folder named AODV in crcn. Copy all its contents and paste it in /home/micman/ns-allinone-2.31/ns-2.31/aodv folder.
Here micman is my username, replace it with your username.
You would be replacing the existing aodv folder contents with the new one you copied from crcn. Leave rest of the files unmodified.
Similarly, you will have folders named common,mac, mobile and so on. Repeat Step2 for all these folders.
|
I do this step in fedora or i skip it?
|
|
|
11-23-2015, 10:54 PM
|
#12
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
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.
-
|
|
|
11-24-2015, 09:04 AM
|
#13
|
Member
Registered: Nov 2015
Posts: 56
Rep:
|
yes i will use crcn_ns231.patch and if i understand those are steps to instal the patch.
Quote:
$ tar xvf ns-allinone-2.31.tar.gz
$ cd ns-allinone-2.31/
$ tar xvf crcn-ns2.31.tar.gz
$ export CC=gcc34 CXX=g++34 && ./install
$ cd ns-2.31/
cp ns ns231-crcn
# make install
cp ns231-crcn /usr/local/bin/
|
But before doing those steps i must copy each file in that patch and replace the corresponding files in ns2.31 folder or i start directly doing steps above?
Thank you.
|
|
|
11-24-2015, 10:24 AM
|
#14
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,519
|
Re #13.
Quote:
I will use crcn_ns231.patch
|
Using the patch is different than your ``quote`` : $ patch -p0 < crcn_ns231.patch
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/
-
|
|
|
All times are GMT -5. The time now is 01:15 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|