I have a problem in combining SpectrumWifi and lr-wpan

76 views
Skip to first unread message

Chih-Mo Li

unread,
Aug 14, 2014, 6:35:53 PM8/14/14
to ns-3-...@googlegroups.com
Dear friends,

I have a problem now, I am trying to combine spectrumwifi and lr-wpan to research inter-channel interference.

And now, my spectrumwifi is use adhoc-aloha-ideal-phy with  MultiModelSpectrumChannel and MatrixPropagationLossModel by udp to transport.

When I create lr-wpan nodes with Ipv6 and sixlowpan to transport packet in udp.

  uint16_t wsnport = 5000;
  UdpServerHelper server2 (wsnport);
  ApplicationContainer apps2 ;
  apps2 = server2.Install (wsnnodes.Get (1));
  apps2.Start (Seconds (0.0));
  apps2.Stop (Seconds (5.0));

  uint32_t MaxPacketSize2 = 127;
  Time interPacketInterval2 = Seconds (0.01);
  uint32_t maxPacketCount2 = 10;
  UdpClientHelper client2 (serverAddress2, wsnport);
  client2.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount2));
  client2.SetAttribute ("Interval", TimeValue (interPacketInterval2));
  client2.SetAttribute ("PacketSize", UintegerValue (MaxPacketSize2));
  apps2 = client2.Install (wsnnodes.Get (0));
  apps2.Start (Seconds (0.0));
  apps2.Stop (Seconds (5.0));

Although it would build successed, but sending me messages,"Error while sending 127 bytes to".

how can I resolve this problem?

please give me some suggestions, thanks.


Thanks 
Regards

Chih-Mo Li

Tommaso Pecorella

unread,
Aug 15, 2014, 3:21:47 AM8/15/14
to ns-3-...@googlegroups.com
Hi,

the error is from the UdpClient app, and means (basically) that the Socket is returning zero. This may happens for a number of reasons, but they all go down to the same root: the socket wasn't able to send the packet.
Why this happened.. I have no idea. The only decent suggestion I can give you is: use a debugger and good luck.

As a side note, you just made me remember that I have to submit my MultiModelSpectrumChannel patch for lr-wpan...

Cheers,

T.

Chih-Mo Li

unread,
Aug 16, 2014, 3:31:03 AM8/16/14
to ns-3-...@googlegroups.com
Dear friend,

Thanks, I would keep try some methods.


Best Regards,


Chih-Mo Li




Chih-Mo Li於 2014年8月15日星期五UTC+8上午6時35分53秒寫道:
Reply all
Reply to author
Forward
0 new messages