I am trying to simulate the effects of the distance on wifi 802.11g links and I am having several problems.
When I set the nodes (2 nodes) in ad-hoc mode, all works fine. I set up the AckTimeout and CtsTimeout with:
mac.SetType ("ns3::ApWifiMac",
"Ssid", SsidValue (ssid),
"BeaconInterval" , TimeValue (Seconds (0.01024)),
"BeaconGeneration", BooleanValue (true),
"AckTimeout", TimeValue (Seconds (0.0006)),
"CtsTimeout", TimeValue (Seconds (0.0006)),
"MaxPropagationDelay", TimeValue (Seconds (100000.0 / 300000000.0)));
mac.SetType ("ns3::StaWifiMac",
"Ssid", SsidValue (ssid),
"AckTimeout", TimeValue (Seconds (0.0006)),
"CtsTimeout", TimeValue (Seconds (0.0006)),
"ActiveProbing", BooleanValue (false),
"MaxPropagationDelay", TimeValue (Seconds (100000.0 / 300000000.0)));
(I have also modified wifi-mac.cc commenting the lines with relation with the acktimeout)
and I observe that the thorughput is constant until the distance reach the limit for the AckTimeout and decreases to 10% of the normal throughput.
But if I set up the infraestructure mode, the throughtput remains constant until the distance reach the limite for the AckTimeout. Then, the throughput decreases to zero, so it is not the expected behavior.
I have logged the StaWifiMac and I see that the STA can't associate with the AP. STA try it seven times sending the association request and AP sending the association response.
But the association is not completed. I can see in the log: