WifiDevice: how to know what is the cause of destruction of a packet

106 views
Skip to first unread message

Kevin Tewouda

unread,
May 20, 2015, 11:44:09 AM5/20/15
to ns-3-...@googlegroups.com
Hello,
I simulate a Vanet environment. I want to know the cause of packet destruction for analysis. It is due to interference or because there was a collision? Is there a method or TraceSource for that? (although I don't think I have seen such)
If not, does anyone know in which place of the NS3 code it is decided whether a paquet will  be destroyed for x reason? So I can directly edit the code.
thank you
.

Tommaso Pecorella

unread,
May 20, 2015, 3:54:23 PM5/20/15
to ns-3-...@googlegroups.com
Hi,

You wrote "It is due to interference or because there was a collision". Do you understand that interference and collision is the very same thing ? Seriously...

T.

Kevin Tewouda

unread,
May 21, 2015, 4:03:01 AM5/21/15
to ns-3-...@googlegroups.com
Hi
I dont' understant what you said.
If many nodes transmitted packets at the same time there will be collisions. On the other side, if a node calculated  the energy received and deems that because of the noise it can not retrieve the information, it will be destroyed. This is the scenario I  am talking "Seriously". I want to know when a packet is dropped for one or the other case.

Tommaso Pecorella

unread,
May 21, 2015, 5:01:07 AM5/21/15
to ns-3-...@googlegroups.com
What you call "interference" is noise. A collision generates more noise power, and the packet is dropped. It os not the collision the drop reason, it's the fact that the signal power of the packet being received Vs the sum of the "other" signal power (noise and other packets) is too low.

That's why I call for seriousness. You can't really differentiate between "pure" noise and collisions, simply because there's no such clear distinction.
You could check if there is some interfering power from other packets, but then ?
If you have two nodes 1 meter apart and a third one 1 Km away, the channel model will still add the 1Km away node power to the count, but is it a collisions ?
Think.

Anyway, check the PHY models and the StartRx / EndRx functions. The function names can be different, but more or less they are named in this way. The EndRx one is where the packet is dropped due to SNR.

T.

Kevin Tewouda

unread,
May 21, 2015, 8:24:31 AM5/21/15
to ns-3-...@googlegroups.com
Hi, Ok I will check it
Thank you.

Kevin Tewouda

unread,
May 22, 2015, 4:45:14 AM5/22/15
to ns-3-...@googlegroups.com
I saw this when exploring edca-txop-n.cc file. I think that is what i want.
void
EdcaTxopN::NotifyCollision (void)
{
  NS_LOG_FUNCTION (this);
  m_dcf->StartBackoffNow (m_rng->GetNext (0, m_dcf->GetCw ()));
  RestartAccessIfNeeded ();
}

Also i have another question. I want to know the correspondence of the energy detection threshold (yans wifi phy) expressed in dBm, in meters. In the code I see only dbm-> watts conversions and vice versa. Do anyone know where i can find the formula?

Tommaso Pecorella

unread,
May 22, 2015, 5:05:16 AM5/22/15
to ns-3-...@googlegroups.com
If you find a way to convert an energy in a distance... let me know, it could be worth a Nobel Prize. I mean, we'd be able to completely subvert all the classical physics.

T.

Kevin Tewouda

unread,
May 22, 2015, 5:17:22 AM5/22/15
to ns-3-...@googlegroups.com
I just want to add that there is also in the  yanswifiphy class, startReceivePacket method's to know why a packet is dropped. But my second question still remains.

Kevin Tewouda

unread,
May 22, 2015, 7:53:57 AM5/22/15
to ns-3-...@googlegroups.com
LOL
I think I
misspoke. I mean, from a value of the carrier sense expressed in dB, we can estimate the distance it covers, and it is this distance that I want to know starting from the dbm.
Reply all
Reply to author
Forward
0 new messages