Packet Loss Rate in Wifi Adhoc mode

252 views
Skip to first unread message

Rukna

unread,
Feb 2, 2015, 9:44:18 PM2/2/15
to ns-3-...@googlegroups.com
I have set three Wifi nodes connected in Adhoc mode. Now, I am trying to get the packet loss using MacTxDrop, PhyTxDrop and PhyRxDrop. However, only PhyRxDrop is non-zero, others are zero always. I have checked some other posts but my problem has not been fixed yet.

Can anyone suggest me how to calculate packet loss, delay in Adhoc mode? Any other way to do so?

I have also another problem. When I am trying to using  FlowmonitorHelper, it gives me error. I have added header file and added one line in script file. But, I does not work. 

TIA!!

Tommaso Pecorella

unread,
Feb 3, 2015, 2:40:09 AM2/3/15
to ns-3-...@googlegroups.com
Hi,

please check the code, it will save a lot of time.
- MacTxDrop is called only when the node is not associated.
- PhyTxDrop is called only if you send a packet while the PHY is in sleep mode (unlikely, the Mac should wake the PHY before using send).

FlowMonitor: I love the smell of napalm in the morning. What "error" do you get, if you don't mind?
Perhaps the fact that it's not recording packets because (as stated in the documentation) FlowMonitor doesn't record packets sent to multicast/broadcast addresses? 

Furthermore, this topic has been discussed like... countless times. Use the same technique used in UdpClient / UdpServer apps: add a custom header to your packets.

T.

Rukna

unread,
Feb 3, 2015, 8:52:07 AM2/3/15
to ns-3-...@googlegroups.com
Thanks again for your reply. Can you give me more details about UDP server/client packet loss technique? Frankly speaking, I am too novice. 

For flow monitor, I have used following code to declare flow monitor:
  // Install FlowMonitor on all nodes
  FlowMonitorHelper flowmon;
  Ptr<FlowMonitor> monitor = flowmon.InstallAll();

And I am getting this error:

../scratch/lab.cc: In function ‘int main(int, char**)’:
../scratch/lab.cc:366:11: error: base operand of ‘->’ has non-pointer type ‘ns3::FlowMonitorHelper’
    flowmon->CheckForLostPackets ();
           ^
../scratch/lab.cc:367:11: error: base operand of ‘->’ has non-pointer type ‘ns3::FlowMonitorHelper’
    flowmon->SerializeToXmlFile("lab-4.flowmon", true, true); 

Tommaso Pecorella

unread,
Feb 3, 2015, 11:05:48 AM2/3/15
to ns-3-...@googlegroups.com
Hi,

open and study the code in
- src/applications/model/udp-client.cc (and .h)
- src/applications/model/udp-server.cc (and .h)
- examples/udp/udp-echo.cc

About the compilation error.... it's not "flowmon->" it's "monitor->". Please study your C++ textbook.

Have fun,

T.

Rukna

unread,
Feb 3, 2015, 11:53:58 AM2/3/15
to ns-3-...@googlegroups.com
Thank you for suggestions.
Reply all
Reply to author
Forward
0 new messages