Hi, Did you re-compile the simulator after applying the patch? You can find instructions here: http://masimum.inf.um.es/?Software:UM-OLSR:Installation
Regards, fran On Sunday 03 September 2006 13:04, ns user wrote: > dear ns users, > i have installed the patch UM-OLSR to ns 2.29 to support the routing > protocol OLSR. but it when using OLSR in a NS script it give an error. > > here the example used : > > set val(chan) Channel/WirelessChannel ;# channel type > set val(prop) Propagation/TwoRayGround ;# radio-propagation > model set val(netif) Phy/WirelessPhy ;# network > interface type set val(mac) Mac/802_11 ;# 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) 50 ;# max packet in ifq > set val(rp) OLSR > set val(n) 4 ;# Nombre de Noeuds > set val(simtime) 50 > set val(X) 3000 > set val(Y) 1000 > set val(dataRate) 2.0 > set val(basicRate) 1.0 > > Antenna/OmniAntenna set X_ 0 > Antenna/OmniAntenna set Y_ 0 > Antenna/OmniAntenna set Z_ 1.5 > Antenna/OmniAntenna set Gt_ 1.0 > Antenna/OmniAntenna set Gr_ 1.0 > > Phy/WirelessPhy set CPThresh_ 10.0 > Phy/WirelessPhy set CSThresh_ 1.559e-11 ;# 550 m > Phy/WirelessPhy set RXThresh_ 3.652e-10 ;# 250 m > Phy/WirelessPhy set bandwidth_ 2e6 > Phy/WirelessPhy set Pt_ 0.28183815 > Phy/WirelessPhy set freq_ 914e+6 > Phy/WirelessPhy set L_ 1.0 > Phy/WirelessPhy set dataRate_ $val(dataRate)Mbps > Phy/WirelessPhy set basicRate_ $val(basicRate)Mbps > > Mac/802_11 set RTSThreshold_ 3000 ;# Sans le mode RTS/CTS > > set ns [new Simulator] > > set topo [new Topography] > $topo load_flatgrid $val(X) $val(Y) > # Create God > set god_ [create-god $val(n)] > set chan [new $val(chan)] > > $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) \ > -channel $chan \ > -topoInstance $topo \ > -agentTrace OFF \ > -routerTrace OFF \ > -macTrace ON \ > -movementTrace OFF > > for {set i 0} {$i < $val(n)} {incr i} { > set node_($i) [$ns node] > $node_($i) random-motion 0 > > $node_($i) set X_ [expr $i * 100] > $node_($i) set Y_ 0 > } > > and this is the error : > > (_o14 cmd line 1) > invoked from within > "_o14 cmd addr" > 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 "_o14" line 2) > (SplitObject unknown line 2) > invoked from within > "_o14 addr" > ("eval" body line 1) > invoked from within > "eval $node addr $args" > ("default" arm line 2) > invoked from within > "switch -exact $routingAgent_ { > DSDV { > set ragent [$self create-dsdv-agent $node] > } > DSR { > $self at 0.0 "$node start-dsr" > } > AODV { > set ragent [$self cre..." > (procedure "_o3" line 11) > (Simulator create-wireless-node line 11) > 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(n)} {incr i} { > set node_($i) [$ns node] > $node_($i) random-motion 0 > > $node_($i) set X_ [expr $i * 100] > $node..."