[ns] connect many nodes with for loop in tcl script

2012-09-24 Thread Rafael P B Mota
Hello, I am trying to connect a node called $reader1 to 30 other nodes. I tryed to write a for statemant but it is not working. This works: but with two nodes is very simple $ns connect $reader1 $tag_1 $ns connect $reader1 $tag_2 This is not working: for {set i 1} {$i $val(nn)} { incr i } {

Re: [ns] connect many nodes with for loop in tcl script

2012-09-24 Thread Rafael P B Mota
Thank you very much. It is working now!! Rafael 2012/9/24 Newaz shne...@gmail.com HI try this code. I am attaching. Regards Newaz On 24 September 2012 18:37, Rafael P B Mota rafaelpera...@gmail.comwrote: Hello, I am trying to connect a node called $reader1 to 30 other nodes. I

[ns] Wifi transmission power

2012-09-24 Thread Rafael P B Mota
Is there any way to restrict the transmit power (to lower the range) of wifi nodes ? How can I configure this ? In my cenario, the wifi nodes have a large range, but I am simulating RFID tags, so I need to limitate the range. Thanks --

[ns] RFID and wifi - ns2

2012-10-01 Thread Rafael P B Mota
Hello ns-users, I have two questions about ns, maybe somebody can help me: 1)Is there any ns-2 extension that simulates a RFID system ? (tags and readers). If the answer is yes, where can I download ? 2) Is there any way to decrease the range of a wifi node ? (decrease the signal power) 3) Is

[ns] Schedule an event

2012-10-03 Thread Rafael P B Mota
Hello, I am trying to use a random delay (in receiver) before the packet is sent back to the sender agent. For example: 1) the receiver agent receive the sender packet 2) the receiver sets up a response packet 3) Wait for a random time (in ms) 4) sends the packet. I don't know how to do the

[ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
Hello, I am trying to use a random delay (in receiver) before the packet is sent back to the sender agent. For example: 1) the receiver agent receive the sender packet 2) the receiver sets up a response packet 3) Wait for a random time (in ms) 4) sends the packet. I don't know how to do the

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
!! 2012/10/3 Christos Spatiotis spati...@ceid.upatras.gr -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello , Rafael If you try to put send(pktret,0) in a while which run for a random time. I guess i do not know. Please let me know if you make it. On 10/03/2012 05:37 PM, Rafael P B

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
in ms]); The second way I don't remember exactly but it consists in using the function reschedule. You can read about these functions in detail in ns2 manual. Hope it helps you, -- Cordialement, Natalya Rozhnova 03.10.2012, 21:44, Rafael P B Mota rafaelpera...@gmail.com: Hello, I am

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
. 03.10.2012, 22:38, Rafael P B Mota rafaelpera...@gmail.com: Hello Natalya, I tryed the solution: srand(time(NULL)); int tempo = rand() % 400 + 100; Scheduler sch = Scheduler::instance(); sch.schedule(target_,pktret,tempo); //send(pktret,0

Re: [ns] Random time to send a packet

2012-10-03 Thread Rafael P B Mota
. If you look a realization of the function send you'll find something like target_-recv(p). What's about schedule: this is a timer that executes the same target_-recv(p) but in some seconds (the third parameter: a delay). Natalya 03.10.2012, 23:46, Rafael P B Mota rafaelpera...@gmail.com

[ns] Trace only specific fields

2012-10-11 Thread Rafael P B Mota
Hello ns users, Is there any way to trace only some fields, to avoid trace-all option ? For example, I need only the options: (s/r/d), -t (time), -Ni, -Is, -Id, -Ii. How can I do this ? My trace files are becoming to large with a lot of unecessary information. Thanks for help!! --

Re: [ns] broadcast tranmission MAC leve 802.11

2012-10-23 Thread Rafael P B Mota
Pedro, Just set the destination address to IP_BROADCAST. It's the best way. Rafael 2012/10/23 pedro chaparro pdr...@gmail.com: Hi,in 802.11 which is the address to use in destination field when i want to send some packet in broadcast way?It is -2? Thanks -- Pedro Alonso Chaparro Valero

Re: [ns] how to Re compile NS2 after modifing a .cc file ?

2012-11-03 Thread Rafael P B Mota
Just run make command in ns-2.xx folder. Rafael Em 03/11/2012 07:23, Basma Bejaoui bejaoui.ba...@gmail.com escreveu: I modify a .cc files for my project simulation, How to recompile NS2, to consider the modification ?? thx -- *Cordialement* *Basma Bejaoui* *Ingénieur Informatique, Génie

Re: [ns] tcl script

2012-11-04 Thread Rafael P B Mota
Show us your tcl script. It will be easier to help you. Em 04/11/2012 11:28, shiny shiny@gmail.com escreveu: hi frndz, i have set my ftp stop time as 250 in my tcl script but nam window stop at 18 sec itself. can anyone help me plz. very urgent.. -- With Regards, John

[ns] Wait for a packet

2013-01-24 Thread Rafael P B Mota
Hello users, Does sombody know how to can I make a node wait for a reply from another node ? For example: Node 1 sends a packet do Node 2. Node 1 can wait 0.5 seconds (for the reply) before try another request again. If node 2 sends a reply do Node 1, that's ok. Else , Node 1 after 0.5 seconds

Re: [ns] Wait for a packet

2013-01-24 Thread Rafael P B Mota
24.01.2013, 23:25, Rafael P B Mota rafaelpera...@gmail.com: Hello users, Does sombody know how to can I make a node wait for a reply from another node ? For example: Node 1 sends a packet do Node 2. Node 1 can wait 0.5 seconds (for the reply) before try another request again. If node 2 sends

Re: [ns] Ns-users Digest, Vol 109, Issue 21

2013-01-25 Thread Rafael P B Mota
How can I do that ? Em 25/01/2013 00:08, Fazlullah Khan fazlullah@gmail.com escreveu: Hello Rafael How about to use Error Model between those two nodes, then you will get the dropped packet in the trace file. On Fri, Jan 25, 2013 at 10:00 AM, ns-users-requ...@isi.edu wrote: : [ns]

[ns] Random number between two floats

2013-01-25 Thread Rafael P B Mota
Helllo users, Is there any way to generate a random number between two given float numbers ? For example, I'd like to generate a number between 0.1 and 0.3. I'm using the command double tempo = Random::uniform(0,time_); But this command requires two int numbers, instead of two float numbers.

[ns] Transmission range

2013-01-26 Thread Rafael P B Mota
How can I change the transmission power to allow 2 nodes communicate themselves at a max distance of 5m ? How can I calculate the Pt_ value ? What does a 0.28 Pt_ value mean ? Thanks

[ns] Bind a float

2013-01-28 Thread Rafael P B Mota
How can I bind a float member ? For example, when I bind an integer (bind(value_,value_) it works. When I bind a float (bind(number_,number_) I receive errors. What can I do to solve this problem ? Thanks, --

[ns] Creating many wireless nodes

2013-01-31 Thread Rafael P B Mota
How can I create, for instance, 100 wireless nodes in tcl script ? I tried set nn 100 for {set i 1} {$i $val(nn) } { incr i } { set tag($i) [new Agent/...] $tag($i) set var1_ $i+10 $tag($i) set time_ 1 $tag($i) set debug_ 0 } But I am not able to bind the vars.

Re: [ns] Modifying ns2 to control the output in the trace-file

2013-02-26 Thread Rafael P B Mota
Check the file: trace/cmu-trace.cc 2013/2/26 Adel Qodmani mpca...@gmail.com: Hello everyone, In an earlier message to the mailing list, I was wondering how can I modify a tcl script to force the trace-file output to contain the locations of my mobile nodes; the reply I got said that such

[ns] Scenario file

2013-02-27 Thread Rafael P B Mota
How can I use a scenario file in tcl script generated by indep-utils/cmu-scen-gen/setdest ? thanks -- Rafael Perazzo B Mota rafaelpera...@gmail.com Web-page: