Bug 2673 - run-time channel switch does not update WiFi spectrum model
run-time channel switch does not update WiFi spectrum model
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3.26
All All
: P3 normal
Assigned To: Tom Henderson
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-17 12:59 UTC by Tom Henderson
Modified: 2017-07-04 15:38 UTC (History)
3 users (show)

See Also:


Attachments
program to reproduce the problem (12.39 KB, text/x-c++src)
2017-03-17 13:00 UTC, Tom Henderson
Details
patch to fix (4.75 KB, patch)
2017-06-26 17:28 UTC, Tom Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2017-03-17 12:59:02 UTC
Described in this thread:

https://groups.google.com/forum/#!topic/ns-3-users/Ih8Hgs2qgeg

The gist of the problem is as follows:

"When calling (channel switch) during run time, the channel switch on the devices is actually conducted:
DEBUG_LOG: 1s -1 SpectrumWifiPhy:DoChannelSwitch(): switching channel 36 -> 40
DEBUG_LOG: 1s -1 WifiPhy:SetChannelNumber(): Setting frequency to 5200; width to 20
However there is no call to create a new receiving channel on the phy using the new frequency/width.  Therefore, the first attempt to receive on packet on that phy fails since since the spectrum model is not updated"
Comment 1 Tom Henderson 2017-03-17 13:00:04 UTC
Created attachment 2804 [details]
program to reproduce the problem
Comment 2 sebastien.deronne 2017-04-21 06:02:29 UTC
Tom, I think you are the most familiar with this part of the code, can you have a look at it? Thanks.
Comment 3 Tom Henderson 2017-06-26 17:28:11 UTC
Created attachment 2877 [details]
patch to fix
Comment 4 sebastien.deronne 2017-06-27 15:41:03 UTC
It looks ok, could the submitter check whether his problem is solved by applying Tom's patch?
Comment 5 sebastien.deronne 2017-07-02 09:46:27 UTC
waiting for submitter to confirm this solves the problem so that patch can be pushed
Comment 6 Michael Rademacher 2017-07-03 08:35:21 UTC
(In reply to sebastien.deronne from comment #5)
> waiting for submitter to confirm this solves the problem so that patch can
> be pushed

I just tested this patch using a minimal example and the current ns3-dev version. It works as accepted. Thank you very much. 

I would be very happy if this is going to be part of ns-3.27

I planing to merge a larger project to ns-3.27 where this channel switch functionality is a key part. I will report back if I encounter any additional bugs/difficulties. 

(Sorry for the late reply, I was afk for a week).
Comment 7 sebastien.deronne 2017-07-03 08:46:55 UTC
(In reply to Michael Rademacher from comment #6)
> (In reply to sebastien.deronne from comment #5)
> > waiting for submitter to confirm this solves the problem so that patch can
> > be pushed
> 
> I just tested this patch using a minimal example and the current ns3-dev
> version. It works as accepted. Thank you very much. 
> 
> I would be very happy if this is going to be part of ns-3.27
> 
> I planing to merge a larger project to ns-3.27 where this channel switch
> functionality is a key part. I will report back if I encounter any
> additional bugs/difficulties. 
> 
> (Sorry for the late reply, I was afk for a week).

Thanks for you feedback.
Yes it will be part of ns-3.27, I will push Tom's patch to our mainstream later this week.
Comment 8 sebastien.deronne 2017-07-04 15:38:06 UTC
fixed in changeset 12951:51a7df2fd8a2