Wifi-adhoc queries

51 views
Skip to first unread message

Parth Deodia

unread,
Jun 25, 2014, 8:06:30 PM6/25/14
to ns-3-...@googlegroups.com
Hello,

Can anyone explain wifi-adhoc code like the tutorials ?

I want to implement different mobility variations in wifi-adhoc.(In the wifi-adhoc, one node is static and the other moves in +ve X direction. I want to make (a) movement in both the nodes in +ve X direction, (b) movement in opposite X direction ) How can I do this ?

Also how can I change the protocol in wifi-adhoc ? I want to use AODV ? (by changing the number in {socket.SetProtocol (1)). What does this number mean ?

Also, I want to lot the graph of throughput versus the distance between the nodes. How can I do it ? I am using OS X. 

Thank you.

Konstantinos

unread,
Jun 26, 2014, 5:49:26 AM6/26/14
to ns-3-...@googlegroups.com
Dear Parth,


On Thursday, June 26, 2014 1:06:30 AM UTC+1, Parth Deodia wrote:
Hello,

Can anyone explain wifi-adhoc code like the tutorials ?
 
Have you studied the tutorials/documentation and you do not understand something in the wifi-adhoc? If you have a specific question we could answer.
 
I want to implement different mobility variations in wifi-adhoc.(In the wifi-adhoc, one node is static and the other moves in +ve X direction. I want to make (a) movement in both the nodes in +ve X direction, (b) movement in opposite X direction ) How can I do this ?


You need to specify that your self. In current scenario the movement of node_1 is controlled by the following line

153  Simulator::Schedule (Seconds (1.5), &Experiment::AdvancePosition, this, c.Get (1));

You can write a similar code for the other node. Also you can change the "AdvancePosition" method to take other arguments as well (e.g. the direction you want to increment) 
 
Also how can I change the protocol in wifi-adhoc ? I want to use AODV ? (by changing the number in {socket.SetProtocol (1)). What does this number mean ?


If you have only 2 nodes as in that example, you do not need a routing protocol... However, if you 'must' use AODV or other routing protocols, I would recommend to read the tutorials and the other wireless examples that use such routing. The SetProtocol in the PacketSocketAddress is about the transport protocol not the routing protocol. 
 
Also, I want to lot the graph of throughput versus the distance between the nodes. How can I do it ? I am using OS X. 


The current example you study plots exactly that... Throughput vs Distance and since node_0 is always at (0,0) it uses the position of node_1 to get the distance.
 
Thank you.
Message has been deleted
Message has been deleted
Message has been deleted

Parth Deodia

unread,
Jun 26, 2014, 8:34:38 AM6/26/14
to ns-3-...@googlegroups.com
Hello Konstantinos,

Thank you for the help.

I have one more query in Netanim how can I speed up the simulation ? I mean how to fasten the clock instead of running in milliseconds, how can I set it to seconds?
 Also, what is the boundary of Netanim ?
I am using Netanim 3.105 and ns3-dev.

Thank you.

Parth Deodia

unread,
Jul 7, 2014, 4:11:33 PM7/7/14
to ns-3-...@googlegroups.com
Hello Konstantinos,

In wifi-adhoc, what is the packet size, packet rate and and at what time instant packet leave the node ?
Also what physical parameters are assumed in the code ? What kind of environment is considered for the packet transmission in air ?
I understood the device used is 802.11a and the range of device is taken as 30 m. Is it correct ?

Kindly help. 
Thank you.

Konstantinos

unread,
Jul 7, 2014, 4:34:44 PM7/7/14
to ns-3-...@googlegroups.com
ALL your questions are answered by carefully studying the code.

Parth Deodia

unread,
Jul 7, 2014, 7:25:09 PM7/7/14
to ns-3-...@googlegroups.com
Thank you Konstantinos !



--
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/shpeuJHdS7g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages