SpectrumWifiPhy with multiple interfering APs.

182 views
Skip to first unread message

Michael Rademacher

unread,
Jul 7, 2016, 9:13:48 AM7/7/16
to ns-3-users
Hi everybody, 

I have started to use the new ns-3 SpectrumWifiPhy module which is, as far as I understand, in the final review phase.
See:
https://codereview.appspot.com/293380043/ 

First (but simple) experiments with this new module look promising. Thanks to the developers.

I am currently working with the following code base:

https://github.com/tomhenderson/ns-3-dev-git/tree/spectrum-wifi

However, multiple WiFi APs and stations on the same MultiModelSpectrumChammel seems not to be working. 
I slightly modified the code in examples/wireless/wifi-spectrum-per-example.cc  by adding one additional AP and station on the same spectrumchannel:

***** Snippet from the lines 440-458

else if (wifiType == "ns3::SpectrumWifiPhy")
    {
    mac.SetType ("ns3::StaWifiMac",
                "Ssid", SsidValue (ssid),
                "ActiveProbing", BooleanValue (false));
    staDevice = wifi.Install (spectrumPhy, mac, wifiStaNode);
    mac.SetType ("ns3::ApWifiMac",
                "Ssid", SsidValue (ssid));
    apDevice = wifi.Install (spectrumPhy, mac, wifiApNode);
    // Added
    spectrumPhy.Set ("ChannelNumber", UintegerValue (36)); // 5.180 GHz
    mac.SetType ("ns3::StaWifiMac",
                "Ssid", SsidValue (ssid2),
                "ActiveProbing", BooleanValue (false));
    staDevice2 = wifi.Install (spectrumPhy, mac, wifiStaNode2);
    mac.SetType ("ns3::ApWifiMac",
                "Ssid", SsidValue (ssid2));
    apDevice2 = wifi.Install (spectrumPhy, mac, wifiApNode2);
    }

****

I have attached the modified example to this post. When I run the simulation, it terminates immediately with: 

msg="Received Wi-Fi Spectrum Signal with no WifiPhyTag", file=../src/wifi/model/spectrum-wifi-phy.cc, line=707
terminate called without an active exception

At the moment, I am stuck. Any suggestions how I should proceed?

Thanks, 
Michael
wifi-spectrum-per-example-2APs.cc

Michael Rademacher

unread,
Jul 20, 2016, 6:03:00 AM7/20/16
to ns-3-users
A small update on this issue, perhaps useful for others and for future references. 

Mr. Henderson updated the code in his github repo
https://github.com/tomhenderson/ns-3-dev-git/tree/spectrum-wifi

and provided a new patch set here:
https://codereview.appspot.com/293380043/

The msg="Received Wi-Fi Spectrum Signal with no WifiPhyTag" is resolved!

However, a new bug was introduced and the provided example still fails with the following message:

assert failed. cond="m_current >= m_dataStart && m_current < m_dataEnd", msg="You have attempted to read beyond the bounds of the available buffer space. This usually indicates that a Header::Deserialize or Trailer::Deserialize method is trying to read data which was not written by a Header::Serialize or Trailer::Serialize method. In short: check the code of your Serialize and Deserialize methods.", file=./ns3/buffer.h, line=996

Tom Henderson

unread,
Jul 20, 2016, 10:14:17 AM7/20/16
to ns-3-...@googlegroups.com
On 07/20/2016 03:03 AM, Michael Rademacher wrote:
A small update on this issue, perhaps useful for others and for future references. 

Mr. Henderson updated the code in his github repo
https://github.com/tomhenderson/ns-3-dev-git/tree/spectrum-wifi



and provided a new patch set here: https://codereview.appspot.com/293380043/ The msg="Received Wi-Fi Spectrum Signal with no WifiPhyTag" is resolved!
However, a new bug was introduced and the provided example still fails with the following message:
Sorry that I missed the earlier post on this.  I just pushed a small fix to the above issue to my github branch. - Tom

Michael Rademacher

unread,
Jul 21, 2016, 4:18:16 AM7/21/16
to ns-3-users
Thank you very much Tom. It works now. 

I will conduct some further testing and report back if I encounter anything else related to SpetrumWifiPhy.
Reply all
Reply to author
Forward
0 new messages