Bugzilla – Bug 2399
wifi: add scanning support
Last modified: 2017-04-01 06:34:21 EDT
This patch adds support to StaWifiMac to allow it to scan and select from multiple possible APs, either on the same channel or across multiple channels. It relies on bug 2398 patch to carry SNR information up the stack. It relies on an extension of WifiPhy to define an 'operational channel list' across which it may scan; by default, only the configured channel is scanned. It defines a scanning timeout (default 120ms) to collect beacons before changing channels. This is in contrast to the current behavior which will try to associate with the first beacon that it hears on the configured channel. https://github.com/tomhenderson/ns-3-dev-git/commit/6f5c76a65401f29f031d8c7734dfc6567e4e8eaf
It is a really nice new feature. I did not check thoroughly the proposed changes, but it looks ok in general. Do you have an example illustrating several different cases (e.g. 1 channel, several channels, several APs on a same channel, several APs on different channels, mobile stations, ...)?
(In reply to sebastien.deronne from comment #1) > It is a really nice new feature. I did not check thoroughly the proposed > changes, but it looks ok in general. > Do you have an example illustrating several different cases (e.g. 1 channel, > several channels, several APs on a same channel, several APs on different > channels, mobile stations, ...)? I don't have an example yet since it was used only in the context of 3GPP LAA indoor scenario. However, I agree that this would be useful as a small standalone example, so I will provide one at a later date.
Example to be provided, then ok to be pushed.
Tom, by when can you finish this up? I think only example needs to be written.
(In reply to sebastien.deronne from comment #4) > Tom, by when can you finish this up? > I think only example needs to be written. Not sure; will bump up its priority.
Tom, any updates? I think it was almost ready to be delivered, so I still believe it could be included in the upcoming release, right?
Dear Sir Requesting you to please update and add this patch in upcomming NS3 release, as channel roaming is my reasearch topic and it will help me lot regards manish Puraswani
Created attachment 2815 [details] modified sta-wifi-mac
Created attachment 2816 [details] modified header file
Created attachment 2817 [details] modifed file
Dear Sir; I have edited attached file to support channel roaming in wifi module and now it works as follows :- 1) if activeprobing is true a) the STA send probe request on each channel configured using AddOperationChannel method of yans-wifi-phy b) it wait for minChannelTimeout to switch to next channel if no activity found on current channel c) if some activity found it will wait till maxChnnelTimeout to collect probe response. 2) if activeprobing is false i.e. passive probing a)it wait till ScanningTimeout on each channel to get Beacon Info. after selecting best SNR it send association request on that channel and to get AP. Have tested same for single sta and single AP scenario, and found working fine . I am testing same for multi STA and multi AP scenario and will update result soon,(facing problem as initialization at same time results in probe request at same time and thus collision in channel.) With Thanks and Regards Manish
Created attachment 2818 [details] example with 1sta and 1 ap modified wifi simple infra example.
(In reply to manish puraswani from comment #8) > Created attachment 2815 [details] > modified sta-wifi-mac Please include patch and tell what you did change compare to Tom's implementation.
Created attachment 2824 [details] patch file for modification dear sir This is the patch file for modification done. Following modification has been done :- IN sta-wifi-mac.cc:- including new variables :- 1)MinChannelTimeout & MaxChannelTimeout to store time duration of min channel time and max channel time during active probing 2)activityDetected :- to check some activity on channel modification of functions 1)excluding of m_candidateChannels.size check from StaWifiMac::SendProbeRequest (void) 2)modification in StaWifiMac::TryToEnsureAssociated (void) removal of m_bestBeaconObserved.Clear (); as it was resulting in clearing of best becon data of channel and some other improvements 3) inclusion of m_phy->SetChannelNumber (m_bestBeaconObserved.m_channelNumber)in some functions to communicate channel to physical layer 4)modification in StaWifiMac::StartScanning to check active /passive probing and wait on channel accordingly. Inclusion of new function 1)StaWifiMac::MinScanningTimeout (void) to check whether to wait for more time to have probeResponse or to switch to new channel and some other minor modifications. accordingly modification has been done in sta-wif-mac.h file some short modification in yans-wifi-phy.cc has been done, to have proper working of GetOperationalChannelList () function with Regards Manish Puraswani
Created attachment 2825 [details] patch file for modification dear sir This is the patch file for modification done. Following modification has been done :- IN sta-wifi-mac.cc:- including new variables :- 1)MinChannelTimeout & MaxChannelTimeout to store time duration of min channel time and max channel time during active probing 2)activityDetected :- to check some activity on channel modification of functions 1)excluding of m_candidateChannels.size check from StaWifiMac::SendProbeRequest (void) 2)modification in StaWifiMac::TryToEnsureAssociated (void) removal of m_bestBeaconObserved.Clear (); as it was resulting in clearing of best becon data of channel and some other improvements 3) inclusion of m_phy->SetChannelNumber (m_bestBeaconObserved.m_channelNumber)in some functions to communicate channel to physical layer 4)modification in StaWifiMac::StartScanning to check active /passive probing and wait on channel accordingly. Inclusion of new function 1)StaWifiMac::MinScanningTimeout (void) to check whether to wait for more time to have probeResponse or to switch to new channel and some other minor modifications. accordingly modification has been done in sta-wif-mac.h file some short modification in yans-wifi-phy.cc has been done, to have proper working of GetOperationalChannelList () function with Regards Manish Puraswani