LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 06-20-2012, 01:19 AM   #1
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Rep: Reputation: Disabled
invalid command name "Agent/ConsBuffer"


I am patching FSR protocol module in NS-2.31 and i got :

./common/packet.h:270: warning: deprecated conversion from string constant to ‘char*’
./common/packet.h:272: warning: deprecated conversion from string constant to ‘char*’
g++ -c -Wall -DTCP_DELAY_BIND_ALL -DNO_TK -DTCLCL_CLASSINSTVAR -DNDEBUG -DLINUX_TCP_HEADER -DUSE_SHM -DHAVE_LIBTCLCL -DHAVE_TCLCL_H -DHAVE_LIBOTCL1_13 -DHAVE_OTCL_H -DHAVE_LIBTK8_4 -DHAVE_TK_H -DHAVE_LIBTCL8_4 -DHAVE_TCL_H -DHAVE_CONFIG_H -DNS_DIFFUSION -DSMAC_NO_SYNC -DCPP_NAMESPACE=std -DUSE_SINGLE_ADDRESS_SPACE -Drng_test -I. -I/home/sabri/ns-allinone-2.31/tclcl-1.19 -I/home/sabri/ns-allinone-2.31/otcl-1.13 -I/home/sabri/ns-allinone-2.31/include -I/home/sabri/ns-allinone-2.31/include -I/usr/include/pcap -I./tcp -I./sctp -I./common -I./link -I./queue -I./adc -I./apps -I./mac -I./mobile -I./trace -I./routing -I./tools -I./classifier -I./mcast -I./diffusion3/lib/main -I./diffusion3/lib -I./diffusion3/lib/nr -I./diffusion3/ns -I./diffusion3/filter_core -I./asim/ -I./qs -I./diffserv -I./satellite -I./wpan -o tools/consbuffer.o tools/consbuffer.cc
tools/consbuffer.cc:16: fatal error: hash_map.h: No such file or directory
compilation terminated.
make: *** [tools/consbuffer.o] Error 1
Ns make failed!
See http://www.isi.edu/nsnam/ns/ns-problems.html for problems
sabri@sabrilaptop:~/ns-allinone-2.31$

please help me

Last edited by barthunder52; 06-20-2012 at 01:21 AM.
 
Old 06-20-2012, 02:55 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,433

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Welcome to LQ.

Quote:
fatal error: hash_map.h: No such file or directory
'hash_map.h' is an old gcc (-4.1.x) file.
Please use g++-4.1 if available or your OS version.

Ubuntu <later-versions> : Please specify version.

Example Ubuntu 11.04 (10.10):
http://www.linuxquestions.org/questi...68/page13.html
>> post # 181.

.
 
1 members found this post helpful.
Old 06-20-2012, 10:33 PM   #3
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
thank you Knudfl, it's working in my Maverick 32bit,,,

but now comes another problem :

sabri@sabrilaptop:~$ cd scrypt/
sabri@sabrilaptop:~/scrypt$ ns 10.tcl
num_nodes is set 10
INITIALIZE THE LIST xListHead
channel.cc:sendUp - Calc highestAntennaZ_ and distCST_
highestAntennaZ_ = 1.5, distCST_ = 550.0
SORTING LISTS ...DONE!
[wpan/p802_15_4phy.cc::PD_DATA_request][5.088567](node 0) Invalid PSDU/MPDU length: type = message, src = 0, dst = -1, uid = 0, mac_uid = 989, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.111943](node 1) Invalid PSDU/MPDU length: type = message, src = 1, dst = -1, uid = 0, mac_uid = 995, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.139770](node 7) Invalid PSDU/MPDU length: type = message, src = 7, dst = -1, uid = 0, mac_uid = 1000, size = 135
[wpan/p802_15_4phy.cc::PD_DATA_request][5.180776](node 4) Invalid PSDU/MPDU length: type = message, src = 4, dst = -1, uid = 0, mac_uid = 1009, size = 163
[wpan/p802_15_4phy.cc::PD_DATA_request][10.113284](node 3) Invalid PSDU/MPDU length: type = message, src = 3, dst = -1, uid = 0, mac_uid = 2191, size = 183
[wpan/p802_15_4phy.cc::PD_DATA_request][10.138722](node 5) Invalid PSDU/MPDU length: type = message, src = 5, dst = -1, uid = 0, mac_uid = 2199, size = 183
[wpan/p802_15_4phy.cc::PD_DATA_request][10.159135](node 2) Invalid PSDU/MPDU length: type = message, src = 2, dst = -1, uid = 0, mac_uid = 2205, size = 219
[wpan/p802_15_4phy.cc::PD_DATA_request][10.163068](node 6) Invalid PSDU/MPDU length: type = message, src = 6, dst = -1, uid = 0, mac_uid = 2207, size = 183
[wpan/p802_15_4phy.cc::PD_DATA_request][10.164988](node 9) Invalid PSDU/MPDU length: type = message, src = 9, dst = -1, uid = 0, mac_uid = 2206, size = 183
sabri@sabrilaptop:~/scrypt$


That is a failure to follow it when I run the simulation Zigbee , patch module for ns2.31 FSR routing protocols.

what should i do?

Last edited by barthunder52; 06-20-2012 at 10:59 PM.
 
Old 06-22-2012, 05:34 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,433

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
OK, please show a direct (download) link for the modifications :

"Zigbee , patch module for ns2.31 FSR ".
 
Old 06-24-2012, 02:35 AM   #5
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
I use ZigBee modules available on the default ns-2.31

and this is the web address where I download the FSR:
http://grcm.dcc.ufam.edu.br/?page_id=142

FSR can directly download here:
http://grcm.dcc.ufam.edu.br/wp-conte...fsr-ns2311.zip

Last edited by barthunder52; 06-24-2012 at 02:41 AM.
 
Old 06-25-2012, 05:20 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,433

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
# 5

The links are not working these days.

( Please upload "Patch-fsr-ns2311.zip" to Google Docs.)
EDIT EDIT : The links are working again.
Will have a look at the patch and ns-2.31.

.

Last edited by knudfl; 06-25-2012 at 07:13 AM.
 
Old 06-25-2012, 08:05 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2021 CentOS7.9 + 50+ other Linux OS, for test only.
Posts: 17,433

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
No issues with ns-allinone-2.31 + fsr-ns-2.31.diff .

cd ns-allinone-2.31/ns-2.31/fsr/example/ && ns simulation-FSR-example.tcl :
The file "simulation-FSR-example.tr" is created.

Your question in post # 3 is about "10.tcl" : Unknown file.
Please show the code. ( A link ? )
Code : Please use code tags : The # button in the 'Advanced Editor'.

.
 
Old 06-25-2012, 10:20 AM   #8
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
When I change the 'set val (netif)' and 'set val (mac)' from 802_11 to 802_15_4 on simulation-FSR-example.tcl error 'invalid PSDU / MPDU' appears.

Below is a code '10.tcl' I have made:

##########################################################################
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio propagation model
set val(netif) Phy/WirelessPhy/802_15_4 ;# network inteface type
set val(mac) Mac/802_15_4 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 5
set val(nn) 10 ;# mobile node
set val(rp) FSR ;# rp type
set val(x) 500 ;# x
set val(y) 500 ;# y
set val(stop) 200 ;# stop time

# main program
set ns_ [new Simulator]

# set Tracefile
set tracefd [open 10.tr w]
$ns_ trace-all $tracefd

# set Namfile
set namtrace [open 10.nam w]
$ns_ namtrace-all-wireless $namtrace $val(x) $val(y)

# membuat topografi
set topo [new Topography]
$topo load_flatgrid $val(x) $val(y)

# create god
create-god $val(nn)
set chan_1_ [new $val(chan)]
set chan_2_ [new $val(chan)]


# configure mobile node
$ns_ node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace OFF \
-channel $chan_1_


# create 10 nodes
for {set i 0} {$i < $val(nn) } { incr i } {
set node_($i) [$ns_ node]
$node_($i) random-motion 0
}


$node_(0) set X_ 251.0
$node_(0) set Y_ 200.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 231.0
$node_(1) set Y_ 285.0
$node_(1) set Z_ 0.0
$node_(2) set X_ 231.0
$node_(2) set Y_ 245.0
$node_(2) set Z_ 0.0
$node_(3) set X_ 254.0
$node_(3) set Y_ 235.0
$node_(3) set Z_ 0.0
$node_(4) set X_ 243.0
$node_(4) set Y_ 203.0
$node_(4) set Z_ 0.0
$node_(5) set X_ 282.0
$node_(5) set Y_ 303.0
$node_(5) set Z_ 0.0
$node_(6) set X_ 323.0
$node_(6) set Y_ 394.0
$node_(6) set Z_ 0.0
$node_(7) set X_ 243.0
$node_(7) set Y_ 293.0
$node_(7) set Z_ 0.0
$node_(8) set X_ 212.0
$node_(8) set Y_ 213.0
$node_(8) set Z_ 0.0
$node_(9) set X_ 229.0
$node_(9) set Y_ 242.0
$node_(9) set Z_ 0.0


$ns_ at 3.0 "$node_(0) setdest 431.0 178.0 1.0"
$ns_ at 3.0 "$node_(3) setdest 134.0 296.0 2.0"
$ns_ at 3.0 "$node_(6) setdest 341.0 368.0 1.0"
$ns_ at 3.0 "$node_(8) setdest 314.0 197.0 3.0"
$ns_ at 3.0 "$node_(2) setdest 178.0 397.0 2.0"
$ns_ at 3.0 "$node_(9) setdest 318.0 156.0 3.0"
$ns_ at 3.0 "$node_(5) setdest 397.0 247.0 1.0"
$ns_ at 3.0 "$node_(4) setdest 134.0 186.0 1.0"
$ns_ at 3.0 "$node_(7) setdest 476.0 169.0 2.0"
$ns_ at 3.0 "$node_(1) setdest 165.0 448.0 3.0"

$ns_ at 20.0 "$node_(2) setdest 123.0 316.0 1.0"
$ns_ at 20.0 "$node_(8) setdest 412.0 157.0 1.0"
$ns_ at 20.0 "$node_(4) setdest 276.0 348.0 1.0"
$ns_ at 20.0 "$node_(7) setdest 128.0 275.0 2.0"
$ns_ at 20.0 "$node_(1) setdest 273.0 478.0 2.0"
$ns_ at 20.0 "$node_(6) setdest 496.0 265.0 2.0"
$ns_ at 20.0 "$node_(3) setdest 148.0 443.0 3.0"
$ns_ at 20.0 "$node_(9) setdest 179.0 139.0 3.0"
$ns_ at 20.0 "$node_(5) setdest 389.0 185.0 3.0"
$ns_ at 20.0 "$node_(0) setdest 497.0 239.0 1.0"

$ns_ at 80.0 "$node_(3) setdest 175.0 149.0 3.0"
$ns_ at 80.0 "$node_(6) setdest 145.0 434.0 2.0"
$ns_ at 80.0 "$node_(2) setdest 135.0 187.0 1.0"
$ns_ at 80.0 "$node_(9) setdest 426.0 178.0 3.0"
$ns_ at 80.0 "$node_(0) setdest 174.0 497.0 2.0"
$ns_ at 80.0 "$node_(5) setdest 356.0 279.0 1.0"
$ns_ at 80.0 "$node_(8) setdest 431.0 498.0 3.0"
$ns_ at 80.0 "$node_(1) setdest 129.0 389.0 2.0"
$ns_ at 80.0 "$node_(7) setdest 285.0 379.0 2.0"
$ns_ at 80.0 "$node_(4) setdest 355.0 219.0 1.0"

$ns_ at 150.0 "$node_(3) setdest 239.0 179.0 3.0"
$ns_ at 150.0 "$node_(6) setdest 149.0 277.0 2.0"
$ns_ at 150.0 "$node_(2) setdest 491.0 368.0 1.0"
$ns_ at 150.0 "$node_(9) setdest 167.0 178.0 3.0"
$ns_ at 150.0 "$node_(0) setdest 410.0 286.0 2.0"
$ns_ at 150.0 "$node_(5) setdest 289.0 367.0 1.0"
$ns_ at 150.0 "$node_(8) setdest 222.0 477.0 3.0"
$ns_ at 150.0 "$node_(1) setdest 381.0 157.0 2.0"
$ns_ at 150.0 "$node_(7) setdest 172.0 462.0 2.0"
$ns_ at 150.0 "$node_(4) setdest 111.0 444.0 1.0"


set tcp [new Agent/TCP]
$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns_ attach-agent $node_(0) $tcp
$ns_ attach-agent $node_(1) $sink
$ns_ connect $tcp $sink
set ftp [new Application/FTP]
$ftp set packetSize_ 20
$ftp set rate_ 124 Kb ;# sending rate
$ftp attach-agent $tcp
$ns_ at 1.0 "$ftp start"
$ns_ at 1500 "$ftp stop"

set tcp1 [new Agent/TCP]
$tcp1 set window_ 2000
set sink1 [new Agent/TCPSink]
$ns_ attach-agent $node_(2) $tcp1
$ns_ attach-agent $node_(3) $sink1
$ns_ connect $tcp1 $sink1
set ftp1 [new Application/FTP]
$ftp1 set packetSize_ 20
$ftp1 set rate_ 124 Kb ;# sending rate
$ftp1 attach-agent $tcp1
$ns_ at 1.0 "$ftp1 start"
$ns_ at 1500 "$ftp1 stop"

set tcp2 [new Agent/TCP]
$tcp2 set window_ 2000
set sink2 [new Agent/TCPSink]
$ns_ attach-agent $node_(5) $tcp2
$ns_ attach-agent $node_(4) $sink2
$ns_ connect $tcp2 $sink2
set ftp2 [new Application/FTP]
$ftp2 set packetSize_ 20
$ftp2 set rate_ 124 Kb ;# sending rate
$ftp2 attach-agent $tcp2
$ns_ at 1.0 "$ftp2 start"
$ns_ at 1500 "$ftp2 stop"

set tcp3 [new Agent/TCP]
$tcp3 set window_ 2000
set sink3 [new Agent/TCPSink]
$ns_ attach-agent $node_(2) $tcp3
$ns_ attach-agent $node_(0) $sink3
$ns_ connect $tcp3 $sink3
set ftp3 [new Application/FTP]
$ftp3 set packetSize_ 20
$ftp3 set rate_ 124 Kb ;# sending rate
$ftp3 attach-agent $tcp3
$ns_ at 1.0 "$ftp3 start"
$ns_ at 1500 "$ftp3 stop"

set tcp4 [new Agent/TCP]
$tcp4 set window_ 2000
set sink4 [new Agent/TCPSink]
$ns_ attach-agent $node_(6) $tcp4
$ns_ attach-agent $node_(7) $sink4
$ns_ connect $tcp4 $sink4
set ftp4 [new Application/FTP]
$ftp4 set packetSize_ 20
$ftp4 set rate_ 124 Kb ;# sending rate
$ftp4 attach-agent $tcp4
$ns_ at 1.0 "$ftp4 start"
$ns_ at 1500 "$ftp4 stop"

set tcp5 [new Agent/TCP]
$tcp5 set window_ 2000
set sink5 [new Agent/TCPSink]
$ns_ attach-agent $node_(7) $tcp5
$ns_ attach-agent $node_(8) $sink5
$ns_ connect $tcp5 $sink5
set ftp5 [new Application/FTP]
$ftp5 set packetSize_ 20
$ftp5 set rate_ 124 Kb ;# sending rate
$ftp5 attach-agent $tcp5
$ns_ at 1.0 "$ftp5 start"
$ns_ at 1500 "$ftp5 stop"

set tcp6 [new Agent/TCP]
$tcp6 set window_ 2000
set sink6 [new Agent/TCPSink]
$ns_ attach-agent $node_(9) $tcp6
$ns_ attach-agent $node_(6) $sink6
$ns_ connect $tcp6 $sink6
set ftp6 [new Application/FTP]
$ftp6 set packetSize_ 20
$ftp6 set rate_ 124 Kb ;# sending rate
$ftp6 attach-agent $tcp6
$ns_ at 1.0 "$ftp6 start"
$ns_ at 1500 "$ftp6 stop"

set tcp7 [new Agent/TCP]
$tcp7 set window_ 2000
set sink7 [new Agent/TCPSink]
$ns_ attach-agent $node_(1) $tcp7
$ns_ attach-agent $node_(7) $sink7
$ns_ connect $tcp7 $sink7
set ftp7 [new Application/FTP]
$ftp7 set packetSize_ 20
$ftp7 set rate_ 124 Kb ;# sending rate
$ftp7 attach-agent $tcp7
$ns_ at 1.0 "$ftp7 start"
$ns_ at 1500 "$ftp7 stop"


for {set i 0} {$i < $val(nn) } { incr i } {
$ns_ initial_node_pos $node_($i) 10
}


for {set i 0} {$i < $val(nn) } { incr i } {
$ns_ at $val(stop) "$node_($i) reset";
}


$ns_ at $val(stop) "$ns_ nam-end-wireless $val(stop)"
$ns_ at $val(stop) "stop"
$ns_ at 201.0 "puts \"end simulation\" ; $ns_ halt"


proc stop {} {
global ns_ tracefd namtrace
$ns_ flush-trace
close $tracefd
close $namtrace

exec nam 10.nam &
exit 0
}

$ns_ run

####################################################

Last edited by barthunder52; 06-25-2012 at 10:22 AM.
 
Old 06-25-2012, 11:20 AM   #9
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
10.tcl in Google Docs :
https://docs.google.com/open?id=0B03...lJNM2RQNUd5alU
 
Old 06-30-2012, 06:12 AM   #10
barthunder52
LQ Newbie
 
Registered: Jun 2012
Location: Las Vegas, Nevada
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
any ideas ?
 
Old 06-30-2012, 07:00 AM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680Reputation: 680
Moved: This thread is more suitable in Linux-Software and has been moved accordingly to help your thread get the exposure it deserves.
 
  


Reply

Tags
fsr, ns2, zigbee


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
invalid command type "llType" error occuring when executing a tcl script in ns2.34 madhu.bm Linux - Software 1 05-04-2012 05:30 AM
"Invalid Command" error running .sh script nixanwin Linux - Newbie 4 07-18-2011 10:49 AM
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
Apache2 Error on Start "Invalid Command" Salen Linux - Newbie 1 12-29-2005 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:51 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