Bugzilla – Bug 3013
Noise PSD is not updated when phyCurrentChannel is set
Last modified: 2018-11-15 13:20:42 EST
Created attachment 3215 [details] Diff from ns-3-dev fixing the build and the reported issue When the phyCurrentChannel attribute is changed from its default value (11) by calling LrWpanPhy::PlmeSetAttributeRequest, the noise power spectral density, stored in the LrWpanPhy::m_noise member, is not updated accordingly. The observed effect is that, for any channel number other than the defaut value, the spectrum channel seems to be ideal, free of packet loss. This problem can be easily reproduced, starting with the example src / lr-wpan / examples / lr-wpan-error-distance-plot.cc. However, in fact, there is another bug in this example regarding phyCurrentChannel change that must be fixed first. The patches for both the example and lr-wpan-phy.cc are attached. After the example is patched, the psr plot behaves as expected only if the example is run with the default channel number value. On the other hand, if the channelNumber command-line argument specifies any other value (e.g. 12), no packet will be lost due to path loss in the simulation. After patching both the example and lr-wpan-phy.cc and then running the simulation one more time, the correct behavior is observed. Both patches were created from commit 5c4e5b38e53ec2379064a766a451d888f71a2f3a. There are also modifications in files src/wifi/model/he-configuration.cc and src/wifi/model/he-configuration.h in order to fix the build, which is currently broken for ns-3-dev.