Question on: example-ping-lr-wpan.cc

53 views
Skip to first unread message

Shashidhar B.L

unread,
May 27, 2015, 8:35:02 AM5/27/15
to ns-3-...@googlegroups.com
Hi,
In the example for Lr-WPAN "example-ping-lr-wpan.cc", I am not sure if the propagationlossmodel is being set. 

The reason I think so is because, in the mobility model, i changed the deltaX and deltaY to 10,000 each and still the ping application was working. So I changed deltaX and deltaY to its original values then i tried to dig in and see why the propagationlossmodel was not activated when the transmission starts at singlemodelspectrum::startTx. 

Based on the post 

I figured out that it is important for the m_porpagationLoss to hold the pointer to the propagationlossmodel. 

But the control doesnt seem to reach this point at all, because the following condition fails

if (sendermobility && receivermobility)

I dont understand why this condition is failing and the propagationlossmodel is not activated during transmission.
Following which, i also dont understand how the nodes are communicating even when i make the deltaX and deltaY 10,000 (if at all the propagationlossmodels are working).

Basically, just run this example and enable logs for singlemodelspectrum and check if the condition if (m_propagationLoss) passes. If it does, then there is something wrong with my unchanged code, then I shall look into it by myself, if it doesnt, please let me know. Or is the condition meant to fail for just this example. 

Thanks in advance
Regards
Shashidhar B.L

Tommaso Pecorella

unread,
May 27, 2015, 6:43:43 PM5/27/15
to ns-3-...@googlegroups.com
Hi,

are you using the latest ns-3 release ?
In case, can you share a modified script showing the problem ?

Cheers,

T.

Shashidhar B.L

unread,
May 28, 2015, 3:26:43 AM5/28/15
to ns-3-...@googlegroups.com
Hi,
I am using ns3.22. Please find attached the requested script.

Regards
Shashidhar B.L

--
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/Kvk17VdXbdE/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.

example-ping-lr-wpan.cc

Tommaso Pecorella

unread,
May 28, 2015, 4:29:23 AM5/28/15
to ns-3-...@googlegroups.com
Gratz, you found Bug 2126.

The patch has been already pushed to ns-3-dev. Shortly put: you have to create and install the Mobility model before installing LrWpanNetDevice, not the opposite.
The patch fixes this in the example and adds a warning message if one fails to install the mobility model properly.

Cheers,

T.

Shashidhar B.L

unread,
May 28, 2015, 4:32:41 AM5/28/15
to ns-3-...@googlegroups.com
Hi,
I ran another example and noticed same behavior. Now that you mention it was a bug, then I will make the required changes.

Many thanks for a very quick response. You guyz are saving a lot of time for many people out there.

Regards
Shashidhar B.L

Tommaso Pecorella

unread,
May 28, 2015, 4:36:43 AM5/28/15
to ns-3-...@googlegroups.com
Hi,

you're welcome. If you find other examples doing the same, let me know and we'll fix them. They are examples, people should be able to run them and learn how to do things right... not how to do them wrong :)

Cheers,

T.

Shashidhar B.L

unread,
May 28, 2015, 4:55:19 AM5/28/15
to ns-3-...@googlegroups.com
Hi,
Yes i will let you know, this example which i just ran, modified it based on my requirements, but the unchanged one works fine, i double checked it, no problems.

Regards
Shashidhar B.L
Reply all
Reply to author
Forward
0 new messages