Hi.
I am running a program that has 2 APs running in infrastructure mode. There is also an additional ah-hoc channel between the APs for communication. I am setting up a UDP flow within a BSS i.e. from a station to the AP and in parallel the channel width of the said AP is modified. For example, STA 1 of AP 1 is UDP client and sends UDP flow to AP1 and the width of AP1 changes from 40MHz to 20Mhz and vice versa during simulation to observed impact of changing channel widths.
The problem I am facing is that if I don't setup a UDP flow, the channel width is modified successfully and there is no error. However, when a UDP flow is ongoing and I try to decrease the width from 40 to 20 MHz, I get the following error:
assert failed. cond="primaryChannelWidth <= GetWidth ()", +4.000523017s 5 file=../src/wifi/model/wifi-phy-operating-channel.cc, line=407
It seems that the primary channel width changes to 40 while it should be 20. Any help or information would be great as I am stuck with this error.
*The statement being used to modify channel width: (This is inside a function which is called during simulation)
Config::Set ("/NodeList/6/DeviceList/1/$ns3::WifiNetDevice/Phy/$ns3::WifiPhy/ChannelSettings",
StringValue ("{40, 20, BAND_5GHZ, 0}"));
Regards,
Ahmed Hasan Ansari