Bugzilla – Bug 953
WiMAX channel scanning overflow
Last modified: 2010-12-28 19:41:29 EST
when a ss node moves out of range, it starts to scan
SubscriberStationNetDevice::EventType type, bool deleteParameters)
if (m_ss->GetState () != SubscriberStationNetDevice::SS_STATE_IDLE)
however, if no base station is found, the above counter will overflow after 20 tries and segmentation fault will occur. The value of 20 is due to the below code:
// initializing arbitrary vector of channels (or frequencies)
uint64_t frequency = 2000;
for (uint8_t i = 0; i < 20; i++)
frequency += 40;
I started to provide a patch for this that:
- moved the magic number 20 into an attribute
- cause a check in the above scanning code so that it did not overflow
but one question I have is what should be the behavior if the max value is reached? Stop scanning, restart immediately from channel 0, go to sleep for a while? Please advise.
Also, can you please comment on whether the above frequency = 2000 assignment is still arbitrary and needs to be moved also to an attribute? What defaults correspond to real implementations (frequency start, frequency increment, number of channels, etc.)? In other words, can we remove the "arbitrary" from the above?
The IEEE 802.16 standard does not specify what to do if SS does not scan a BS. I've resolved restarting immediately from channel 0.
On channel initialization method, I've changed the "arbitrary" to values specified by WirelessMAN-OFDM RF profile for 10 MHz channelization (Section 188.8.131.52 from IEEE 802.16-2004 standard).
I had to revert the changes in src/devices/wimax/bs-link-manager.cc in order to get the wimax-phy-layer and wimax-ss-mac-layer tests to pass. One of them crashed and the other failed. I'm not exactly sure yet what this does to wimax, but I am re-opening in case the bug is valid again. Here is the reverted changeset: http://code.nsnam.org/ns-3-dev/rev/d4a75eecfa7d
I was not able to easily find a solution to this so I am reassigning to Flavio.
To connect quickly, BS is using the first channel. All the others values is the values defined in the IEEE 802.16-2004 standard.
The segmentation fault is fixed.