Bug 2399 - wifi: add scanning support
wifi: add scanning support
Status: PATCH PENDING
Product: ns-3
Classification: Unclassified
Component: wifi
unspecified
All All
: P5 enhancement
Assigned To: Tom Henderson
:
Depends on:
Blocks: 2400
  Show dependency treegraph
 
Reported: 2016-05-03 19:13 EDT by Tom Henderson
Modified: 2017-04-01 06:34 EDT (History)
3 users (show)

See Also:


Attachments
modified sta-wifi-mac (34.35 KB, text/plain)
2017-03-31 08:54 EDT, manish puraswani
Details
modified header file (7.17 KB, text/plain)
2017-03-31 08:55 EDT, manish puraswani
Details
modifed file (44.30 KB, text/plain)
2017-03-31 08:55 EDT, manish puraswani
Details
example with 1sta and 1 ap (8.16 KB, text/plain)
2017-03-31 09:15 EDT, manish puraswani
Details
patch file for modification (12.37 KB, text/plain)
2017-04-01 06:31 EDT, manish puraswani
Details
patch file for modification (12.37 KB, patch)
2017-04-01 06:34 EDT, manish puraswani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2016-05-03 19:13:14 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
Comment 1 sebastien.deronne 2016-05-04 02:23:40 EDT
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, ...)?
Comment 2 Tom Henderson 2016-05-04 09:13:46 EDT
(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.
Comment 3 sebastien.deronne 2016-06-04 06:51:33 EDT
Example to be provided, then ok to be pushed.
Comment 4 sebastien.deronne 2016-11-01 11:35:54 EDT
Tom, by when can you finish this up? 
I think only example needs to be written.
Comment 5 Tom Henderson 2016-11-05 17:17:04 EDT
(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.
Comment 6 sebastien.deronne 2017-01-02 02:55:51 EST
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?
Comment 7 manish puraswani 2017-02-21 04:27:56 EST
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
Comment 8 manish puraswani 2017-03-31 08:54:17 EDT
Created attachment 2815 [details]
modified sta-wifi-mac
Comment 9 manish puraswani 2017-03-31 08:55:04 EDT
Created attachment 2816 [details]
modified header file
Comment 10 manish puraswani 2017-03-31 08:55:40 EDT
Created attachment 2817 [details]
modifed file
Comment 11 manish puraswani 2017-03-31 09:06:58 EDT
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
Comment 12 manish puraswani 2017-03-31 09:15:11 EDT
Created attachment 2818 [details]
example with 1sta and 1 ap

modified wifi simple infra example.
Comment 13 sebastien.deronne 2017-03-31 12:56:34 EDT
(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.
Comment 14 manish puraswani 2017-04-01 06:31:06 EDT
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
Comment 15 manish puraswani 2017-04-01 06:34:21 EDT
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