Wirless Nodes Distance

360 views
Skip to first unread message

Julio César Muñoz Benítez

unread,
Jun 17, 2013, 1:28:09 PM6/17/13
to omn...@googlegroups.com
First of all. Thans a lot to all of you answering our questions. You have helped me a lot.

I have a better understanding about OMNet++, I developed my simulations using wired and wirless nodes. But I have another questio.

My scenario will be a WSN, I know that INET framework would help me in this, I already downloaded and ran some of the examples. But It is really complex for me. I mean, I don't know where to start.

Anyway, my scenario will be some Static Wireless nodes, a Generator and a Sink. I can simulate the wirless scenario using only OMNet, the generator sends a message to the nearest node and it passes the message to the Sink, the problem is that I know who is the nearest node, so I tell the generator in the code the destination of the first message. 

I want to know if there is any way to know who is the nearest node, without using INET, maybe getting the distances between coordinates of each node. 

Is it really necessary to use INET? if so.. wich is the way to learn more about INET? 

Thanks a lot!

N.omar

unread,
Jun 19, 2013, 7:05:26 AM6/19/13
to omn...@googlegroups.com
It is not recommended to begin from scratch , you can look at the examples in Inet or Inetmanet . 
"to understand what any module does try to right click and choose "go to source 
the .h file will open and you can read .cc to understand the functionality of this module. 
Also use F3 button(or mouse left click ) + ctrl 
when you are try to understand the parameters in configuration  file 

About Inet there is a manual 

Good Luck 

Rudolf Hornig

unread,
Jun 20, 2013, 6:04:41 PM6/20/13
to omn...@googlegroups.com
Whether you need INET or not depends on many factor, like:

Do you intend to use standard internet protocols like IP, TCP?
Do you need detailed modeling of the linklayer and physical layer?

If yes, then INET is a must.

If you need detailed physical layer model, but no internet protocols, go for MIXIM.

If neither of them is needed (and you are sure it will not be needed), you may be able to implement your model without using INET/MIXIM.
You may be able to copy/paste some code from INET that would let you start, like the "mobility" feature that handles the placement/movement of the nodes. You may also take a look at the idealwireless NIC in INET which implent a very simple radio channel.

Rudolf

oark saha

unread,
Jun 21, 2013, 10:42:27 AM6/21/13
to omn...@googlegroups.com

can u tell a scenario just a simple wireless connection no framework used...

oark saha

unread,
Jun 21, 2013, 1:08:25 PM6/21/13
to omn...@googlegroups.com


julio can u tell me how u did it??

Julio César Muñoz Benítez

unread,
Jun 24, 2013, 1:22:35 PM6/24/13
to omn...@googlegroups.com
Thanks for your kind responses.

The Scenario is the following:

All are fixed nodes. 

A node will serve as a Generator, wich will send a Message randomly to the Wireless node within it's ratio. This is the main problem, emulate the distance. There will be other Wirless nodes wich are not within the ratio of the Generator but thay are within the ratio of the first node.

The main purpouse of this scenario is to simulate a Simple Flooding Protocol. After this, I'll create my own headers to avoid the duplication of the message in the network. 

I have done this, but programing in the Generator which node is within the ratio. What I want to know is if it is possible to test the distance between nodes without using INET, just the distance. For example,  getting the Position of the First node and the position of the Generator and if the value is withing a range.. send the message. 

Thanks a lot!


On Fri, Jun 21, 2013 at 12:08 PM, oark saha <oarks...@gmail.com> wrote:


julio can u tell me how u did it??

--
--
Sent from the OMNeT++ mailing list. To configure your membership,
visit http://groups.google.com/group/omnetpp
 
---
You received this message because you are subscribed to a topic in the Google Groups "omnetpp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/omnetpp/LvHkB7TCYeQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to omnetpp+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

oark saha

unread,
Jun 25, 2013, 6:10:25 AM6/25/13
to omn...@googlegroups.com
thank you very much for the response...appreciate it a lot...
it will be really helpful if you can upload or send the project,then i can get a better understanding of it..
thank you..

Rudolf Hornig

unread,
Jun 25, 2013, 8:18:35 AM6/25/13
to omn...@googlegroups.com


On Monday, 24 June 2013 19:22:35 UTC+2, Julio César Muñoz Benítez wrote:
Thanks for your kind responses.

The Scenario is the following:

All are fixed nodes. 

A node will serve as a Generator, wich will send a Message randomly to the Wireless node within it's ratio. This is the main problem, emulate the distance. There will be other Wirless nodes wich are not within the ratio of the Generator but thay are within the ratio of the first node.

The main purpouse of this scenario is to simulate a Simple Flooding Protocol. After this, I'll create my own headers to avoid the duplication of the message in the network. 

I have done this, but programing in the Generator which node is within the ratio. What I want to know is if it is possible to test the distance between nodes without using INET, just the distance. For example,  getting the Position of the First node and the position of the Generator and if the value is withing a range.. send the message. 

Sure, you can. But I don't exactly get your problem. If you have placed the nodes randomly, obviously you have specified explicitly or implicitly their X,Y coordinates. Read that coordinate out and use that to calculate the distance.

(if you have not specified any x,y parameters for the nodes and just using the IDE to place the nodes by hand, then the coordinates are available in the node's display string as the p=x,y parameter. You can read that out and use it as a parameter. Check the manual, how to access the module's display string. Tip: check INET's MobilityBase.cc and look at the initializePosition() method. You will see how the display string is accessed and parsed.

Rudolf

Julio César Muñoz Benítez

unread,
Jul 2, 2013, 5:36:52 PM7/2/13
to omn...@googlegroups.com
Rudolf thanks a lot for your response.

The problem is that using the coordinates I can get the distance between nodes. Following your advice I can get the Sender's display string, thanks to a message,  and I get something like this: "p=30,165;i=device/antennatower;r=90" this is a string, but is there any way to get just the p values? or Do I need to analize the whole string? That way if the position of the first node is too far away from the second node I'll just discard the message.. if not thet the message could be processed as usual.
Reply all
Reply to author
Forward
0 new messages