LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 03-30-2015, 01:22 AM   #1
rashi pandey
LQ Newbie
 
Registered: Mar 2015
Posts: 8

Rep: Reputation: Disabled
Question Error running the localization codes in NS2


i tried adding the localisation module in ns2.
After successfull integration of modified files when i try to run tcl script the following error occurs.

num_nodes is set 4 INITIALIZE THE LIST xListHead invalid command name "Agent/LocReq" while executing "Agent/LocReq create _o82 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/LocReq" ("for" body line 3) invoked from within "for {set i 0} {$i < $val(nu)} {incr i} { # Setup the request agent set lreq_($i) [new Agent/LocReq] $ns_ attach-agent $node_($i) $lreq_($i) # Set..." (file "loc1.tcl" line 185)

Please provide me with some solution for the same.
 
Old 03-30-2015, 06:11 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
? Which version of Localisation ?
? And is it WSN Localisation :
http://sourceforge.net/projects/wsnlocalisation/files/ ?
? Which ns2 version are you using ?
... We'd also like to know which 'Linux OS' you are using :
a) uname -m
b) OS name and version, please. ( Ubuntu 1X.xx - i686 (x86_64).

Please read ...
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html


-

Last edited by knudfl; 03-30-2015 at 06:36 PM.
 
1 members found this post helpful.
Old 03-30-2015, 06:55 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
invalid command name "Agent/LocReq"
You are using an executable 'ns' with no "Localisation".


No issues here : $ ns234-Loc loc1.tcl 1
.. The files location.tr 983B, simwrls.nam 625B are created.
$ nam simwrls.nam : Probably OK.

$ ns234-Loc loc5.tcl 1 1
.. location.tr 2.6MB, simwrls.nam 15kB.
$ nam simwrls.nam : Nice activity in the nam window.

-
 
1 members found this post helpful.
Old 03-31-2015, 04:34 AM   #4
rashi pandey
LQ Newbie
 
Registered: Mar 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
? Which version of Localisation ?
? And is it WSN Localisation :
http://sourceforge.net/projects/wsnlocalisation/files/ ?
? Which ns2 version are you using ?
... We'd also like to know which 'Linux OS' you are using :
a) uname -m
b) OS name and version, please. ( Ubuntu 1X.xx - i686 (x86_64).

Please read ...
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html


-
1.I am using Ubuntu 14.04 lts os.
2. And yes it is WSN localization.
3. The version of ns2 version 2.35
4. The version of ns2 localization is 2.34
 
Old 03-31-2015, 04:42 AM   #5
rashi pandey
LQ Newbie
 
Registered: Mar 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
error in ns2 localization code

Quote:
Originally Posted by knudfl View Post
? Which version of Localisation ?
? And is it WSN Localisation :
http://sourceforge.net/projects/wsnlocalisation/files/ ?
? Which ns2 version are you using ?
... We'd also like to know which 'Linux OS' you are using :
a) uname -m
b) OS name and version, please. ( Ubuntu 1X.xx - i686 (x86_64).

Please read ...
. http://www.linuxquestions.org/linux/...Ask_a_Question
. http://www.catb.org/~esr/faqs/smart-questions.html


-

1.I am using Ubuntu 14.04 lts os.
2. And yes it is WSN localization.
3. The version of ns2 version 2.35
4. The version of ns2 localization is 2.34

and this http://sourceforge.net/projects/wsnlocalisation/files/ ultimately takes u to ns2 localisation 2.34.

Last edited by rashi pandey; 03-31-2015 at 04:58 AM. Reason: providing additional details
 
Old 03-31-2015, 07:02 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Repeat : Please show the output from this command : $ uname -m

And please do not quote entire posts : A "one word reference" will do. Like: Re #2.

Using the old ns234 files for ns-2.35 : Good, the ns235 files here ..
http://sourceforge.net/projects/wsnlocalisation/files/
... will supply a reduced "Localization" result.

Building ns-2.35 :
$ tar xvf ns-allinone-2.35_gcc482.tar.gz ('Nov 2014' update for gcc-4.6 ..-4.9)
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ cd ns-allinone-2.35/
$ patch -p0 < WSN-Localisation-ns234-for_ns235.patch
https://drive.google.com/file/d/0B7S...ew?usp=sharing
$ ./install
$ cd ns-2.35/
$ sudo make install ('make install' will copy ns to /usr/local/bin/)
$ cp ns ns235-Loc-0 ( ns-<any-name> will work )
$ sudo cp ns235-Loc-0 /usr/local/bin/
$ cd ../nam-1.15/ && sudo make install

Simulation : 'ns235-Loc-0 loc1.tcl 1' and 'ns235-Loc-0 loc5.tcl 1 1' :
Same result as shown in post #3.


Your error : You probably used plain 'ns' in your command.
Please don't do that.
Then you are at risk using another (unpatched) "ns".
! All simulations will work with $ ns_new-name file.tcl


-

Last edited by knudfl; 03-31-2015 at 07:04 AM.
 
1 members found this post helpful.
Old 03-31-2015, 10:51 AM   #7
rashi pandey
LQ Newbie
 
Registered: Mar 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Repeat : Please show the output from this command : $ uname -m

-
The output of this command is: i686
 
Old 04-01-2015, 01:11 PM   #8
rashi pandey
LQ Newbie
 
Registered: Mar 2015
Posts: 8

Original Poster
Rep: Reputation: Disabled
Red face

Quote:
Originally Posted by knudfl View Post
$ ./install
-
After adding the patch n following the given steps when i used install command.
I am getting the following errors:

dccp/dccp.cc: In constructor ‘DCCPAgent:CCPAgent()’:
dccp/dccp.cc:1427:32: error: ‘PT_DCCP’ was not declared in this scope
DCCPAgent:CCPAgent() : Agent(PT_DCCP){
^
make: *** [dccp/dccp.o] Error 1
Ns make failed!

Please help me resolve this issue.
 
Old 04-01-2015, 04:41 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #8.
Code:
$ tar xvf ns-allinone-2.35_gcc482.tar.gz && cd ns-allinone-2.35/ && patch -p0 < WSN-Localisation-ns234-for_ns235.patch && ./install
No issues here with a second test compile : A reference OS.
And a third test compile, with 'Ubuntu 14.04.1 - i686' : No issues.

So you will simply have to start from scratch with a new unpacked ns-allinone-2.35_gcc482.tar.gz:
As many times as it takes to get it right.

-

Last edited by knudfl; 04-01-2015 at 04:43 PM.
 
1 members found this post helpful.
  


Reply

Tags
localization-ns2, ns2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
an error after running ./configure in ns2 mary1001 Linux - Software 7 12-06-2014 10:31 AM
error in running new protocol in ns2.34 melodyH Linux - Networking 3 10-06-2012 03:01 AM
how to start writing codes in ns2? ziajustin Linux - Newbie 3 03-25-2012 01:55 PM
I got an error while running leach package in ns2.. help me to get out of this error. rkgowrishankar Linux - Software 1 02-07-2012 04:51 AM
ns2 codes for OLSR codes sukrutha Linux - Newbie 3 01-25-2012 11:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration