The present embodiments relate generally to wireless communications, and specifically to wireless devices that operate in a concurrency mode as both an access point and a station in a wireless network.
A wireless device (e.g., in a WiFi network or other wireless network) may concurrently operate as an access point (AP) and a station (STA). For example, the wireless device may operate as an AP for another nearby wireless device, while simultaneously acting as a STA that communicates with another AP. Such a wireless device is said to be operating in a concurrency mode (e.g., a STA-AP concurrency mode). Furthermore, a wireless device may operate as both a STA and two APs in a STA-AP-AP concurrency mode.
While acting as an AP, the wireless device periodically sends out beacon signals, referred to as beacons. While acting as a STA, the wireless device receives beacons from an AP to which it is connected and scans for other APs within range. Scanning, however, may conflict with scheduled beacon transmission and/or reception. Coordinating these actions in concurrency mode is challenging. If scanning is preempted in favor of beacon transmission and/or reception, the scan fail percentage (e.g., the probability that the scan will fail to identify an AP in range) increases. Performing scanning instead of transmitting and/or receiving beacons, however, can result in link disconnection.
Accordingly, there is a need for techniques to balance scanning and beacon scheduling in a wireless device in concurrency mode.
In some embodiments, a method of wireless communication is performed in a wireless device operating as both a station and one or more access points. In the method, a scan window of a specified duration is requested to start at a first time, to scan for access points external to the wireless device in accordance with operation of the wireless device as a station. It is determined that a beacon scheduled for transmission or reception at a second time conflicts with the requested scan window. In response, the beacon is transmitted or received at the second time and at least a portion of the scan window is delayed until after the beacon has been transmitted or received.
In some embodiments, a wireless device includes one or more antennas, a wireless modem to transmit and receive signals through the one or more antennas, one or more processors, and memory storing one or more programs configured for execution by the one or more processors. The one or more programs enable the wireless device to operate as both a station and one or more access points. The one or more programs include instructions to request that a scan window of a specified duration start at a first time, wherein the scan window is for scanning for access points external to the wireless device in accordance with operation of the wireless device as a station; instructions to determine whether a beacon scheduled for transmission or reception at a second time conflicts with the requested scan window; instructions to transmit or receive the beacon at the second time; and instructions to delay at least a portion of the scan window until after the beacon has been transmitted or received, if scheduling of the beacon at the second time conflicts with the requested scan window.
In some embodiments, a non-transitory computer-readable storage medium stores one or more programs configured for execution by one or more processors in a wireless device. The wireless device also includes one or more antennas and a wireless modem to transmit and receive signals through the one or more antennas. The wireless device is configurable to operate as both a station and one or more access points. The one or more programs include instructions to request that a scan window of a specified duration start at a first time, wherein the scan window is for scanning for access points external to the wireless device in accordance with operation of the wireless device as a station; instructions to determine whether a beacon scheduled for transmission or reception at a second time conflicts with the requested scan window; instructions to transmit or receive the beacon at the second time; and instructions to delay at least a portion of the scan window until after the beacon has been transmitted or received, if scheduling of the beacon at the second time conflicts with the requested scan window.
The present embodiments are illustrated by way of example and are not intended to be limited by the figures of the accompanying drawings.
Like reference numerals refer to corresponding parts throughout the drawings and specification.
In the following description, numerous specific details are set forth such as examples of specific components, circuits, and processes to provide a thorough understanding of the present disclosure. Also, in the following description and for purposes of explanation, specific nomenclature is set forth to provide a thorough understanding of the present embodiments. However, it will be apparent to one skilled in the art that these specific details may not be required to practice the present embodiments. In other instances, well-known circuits and devices are shown in block diagram form to avoid obscuring the present disclosure. The term “coupled” as used herein means connected directly to or connected through one or more intervening components or circuits. Any of the signals provided over various buses described herein may be time-multiplexed with other signals and provided over one or more common buses. Additionally, the interconnection between circuit elements or software blocks may be shown as buses or as single signal lines. Each of the buses may alternatively be a single signal line, and each of the single signal lines may alternatively be buses, and a single line or bus might represent any one or more of a myriad of physical or logical mechanisms for communication between components. The present embodiments are not to be construed as limited to specific examples described herein but rather to include within their scope all embodiments defined by the appended claims.
The virtual STA 106 in the wireless device 104A wirelessly connects to and communicates with the AP 102. In some embodiments, this wireless connection is a WiFi connection, in accordance with any of the IEEE 802.11 family of standards. The AP 102 provides the wireless device 104A with access to one or more networks beyond the wireless network 100A, and thus serves as a gateway to one or more wider networks. For example, the AP 102 may provide the wireless device 104A with access to a wide-area network (WAN), metropolitan-area network (MAN), campus network, and/or the Internet.
The virtual AP 108 in the wireless device 104A wirelessly connects to and communicates with the one or more STAs 110. In some embodiments, these wireless connections are also WiFi connections, in accordance with one or more standards in the IEEE 802.11 family of standards. Through these connections, the wireless device 104A gives the STAs 110 access to the AP 102 and any wider networks beyond the AP 102. The wireless device 104A thus shares its access to the AP 102 with the one or more STAs 110.
In its role as the virtual AP 108, the wireless device 104A periodically transmits beacons, which are received by the one or more stations 110. In its role as the virtual STA 106, the wireless device 104A periodically receives beacons transmitted by the AP 102. Beacons are used to establish and/or maintain wireless connections (i.e., wireless links) between respective devices. A beacon may include a traffic indication map (TIM) indicating whether downlink data is available. For example, a TIM in a beacon sent by the AP 102 may indicate whether the AP 102 has queued data for the wireless device 104A. A TIM in a beacon sent by the wireless device 104A (e.g., by the virtual AP 108) may indicate whether the wireless device 104A has queued data for any of the STAs 110. A beacon may also include timing synchronization information, such as a timing synchronization function (TSF) value. Beacons are transmitted according to a target beacon transmission time (TBTT) schedule. The wireless device 104A is aware of the TBTT schedule for the AP 102. The one or more STAs 110 are aware of the TBTT schedule for the virtual AP 108 in the wireless device 104A.
In its role as the virtual STA 106, the wireless device 104A also scans for APs (i.e., APs external to the wireless device 104A, as opposed to the virtual AP 108 in the wireless device 104A). Scanning is performed on a specified channel (e.g., a specified WiFi channel) during a scan window. This channel is referred to as the scan channel. Scanning may be active or passive. In active scanning, the virtual STA 106 transmits probe signals and listens for responses to the probe signals. A probe signal may be transmitted once at the beginning of a scan window or repeatedly (e.g., periodically) during the scan window. In passive scanning, the virtual STA 106 does not transmit probe signals, but merely listens for signals from external APs. In some embodiments, the virtual STA 106 may perform normal scans, connect scans, and/or roam scans, each of which may be active or passive. In a normal scan, the virtual STA 106 scans for available APs, and thus for hot-spots associated with available APs, and updates a table of available APs (e.g., its roaming table) accordingly, without deciding whether to connect to a particular AP. In a connect scan, the virtual STA 106 has identified an external AP to connect to and performs a scan as part of the connection process. In a roam scan, the virtual STA 106 is connected to a first external AP (e.g., the AP 102) but scans for other APs to which it might connect (e.g., because it is losing its connection to the first AP).
The wireless devices 104A (
The virtual STA interface 202-1 (
The channel scheduler 204A could allow scanning to begin at time T and abort the scan before the beacon 306 is transmitted at time B. Scanning thus would occur during the time period 308, which has a duration less than D. Aborting the scan, however, would increase the scan fail percentage (e.g., the probability that the scan will fail to identify an AP in range). Or the channel scheduler 204A could preempt transmission or reception of the beacon 306 in favor of scanning during the requested scan window 302. Preempting transmission or reception of the beacon 306, however, could result in link disconnection.
Instead, the requested scan window 302 is delayed until after the beacon is transmitted or received at time B. Scanning thus occurs in a delayed scan window 310 of duration D, in a time period 312 that starts after time B and ends at time B+D. The scan thus is not preempted by the beacon 306, allowing the virtual STA 106 to spend more time (i.e., to dwell longer) on the scan channel, thus improving scan findings.
A series of time slots 504, 506, 508, and 510 are scheduled for allocation to the first and second virtual APs 108-1 and 108-2 in an alternating manner. Slot 504 is allocated for transmission or reception of a beacon on channel X by the first virtual AP 108-1, while slot 510 is allocated for transmission or reception of a beacon on channel Y by the second virtual AP 108-2. Slots 506 and 508 are non-beacon slots allocated for other uses besides beacon transmission or reception. Each of the slots 504, 506, 508, and 510 has a duration of 25 ms. (The various durations shown in
The requested scan window 502, with a duration of 80 ms, is requested 20 ms before the beginning of the beacon slot 504. The requested scan window 502 therefore conflicts with the beacon slot 504. Furthermore, the 80 ms duration of the requested scan window 502 is greater than the 50 ms time interval between beacon slots, making a conflict inevitable. The channel scheduler 204B could allow the scan on channel C to start as requested, but then preempt the scan and switch to channel X to honor the beacon slot 504. This preemption would reduce the scan's effectiveness, however: the scan's effectiveness is proportional to its duration.
To address these challenges, the requested scan window 502 is divided into multiple portions 512, 514, and 516 that are separated by the beacon slots 504 and 510. The portion 512, which is 20 ms, begins at the requested time (e.g., the current time) and continues until the beginning of the beacon slot 504. The portion 514, which is 50 ms, begins after the beacon slot 504 and ends before the beacon slot 510. The portion 514 thus preempts the non-beacon slots 506 and 508: this time period is used to scan on channel C and not to communicate on channels X and Y. (The portions 512 and 516 may similarly preempt non-beacon slots, which are not shown for simplicity). The portion 516, which is 10 ms, begins after the beacon slot 510. Scanning is performed on channel C during each of the portions 512, 514, and 516: during each of these periods, the wireless device 104B dwells on channel C for the scan. The portions 512, 514, and 516 taken together have a total duration equal to the duration of the requested scan window 502. The split-window technique of
In the method 600, a scan window (e.g., requested scan window 302,
The first beacon is transmitted or received (606) at the second time (e.g., at the TBTT). At least a portion of the first scan window is delayed (608) until after the first beacon has been transmitted or received (e.g., until after the TBTT).
In some embodiments, the first scan window is maintained (610) as a single continuous window and delayed until after the first beacon has been transmitted or received (e.g., resulting in delayed scan window 310,
In some embodiments, the first scan window is split (612) into at least a first portion and a second portion. The first portion begins at the first time and ends before the second time. The second portion begins after the first beacon has been transmitted or received. Scanning for APs external to the wireless device is performed during the first portion and again during the second portion.
In some embodiments, the first scan window is split (614) into a first portion (e.g., portion 512,
In some embodiments (e.g., in the example of
Scanning is performed on a scan channel that is distinct from the home channel(s) of the wireless device.
The method 600 may be repeated for multiple scan windows. If a respective scan window, as requested, is determined not to conflict with a scheduled beacon, then scanning for APs external to the wireless device is performed during the respective scan window (e.g., in operation 408,
At times it may be desirable to give scanning priority over scheduled beacons (e.g., over AP beacon transmission), thus allowing channel dwells for scanning to be continuous without interruption by beacon transmission (or reception). For example, it may be desirable to give scanning priority over TBTTs when performing connect or roam scans. However, repeated skipping of beacon transmission (or reception) will eventually result in link disconnection.
The scanning process of the method 700 is initiated (702) by identifying N channels on which scanning is to be performed, where N is an integer greater than or equal to one. A channel count is set (704) to zero and the starvation count is set to zero.
The method 700 then enters a loop. The starvation count is compared (706) to the threshold. If the starvation count does not satisfy the threshold (706—No) (e.g., is less than or equal to the threshold, or is less than the threshold), then the wireless device 104A or 104B switches (710) to the next identified scan channel and dwells on the channel to scan for external APs. The channel count and starvation count are incremented (712). The wireless device 104A or 104B thus suppresses transmission (or reception) of a beacon on each iteration through this branch of the loop. (It is assumed in the example of
If the starvation count satisfies the threshold (706-Yes) (e.g., is greater than the threshold, or greater than or equal to the threshold), then the wireless device 104A or 104B switches to the channel on which the next beacon is scheduled and transmits (or alternatively, receives) the next beacon. The wireless device 104A or 104B thus halts the scanning to transmit (or receive) a beacon. For example, the wireless device 104A switches to the channel used by the virtual AP 108 and transmits a beacon at the next TBTT. In another example, the wireless device 104B switches to the channel used by one of the virtual APs 108-1 and 108-2 and transmits a beacon at the next TBTT.
The channel count is compared (714) to N. If the channel count is less than N (714—No), then there are more channels to be scanned, and the execution of the method 700 returns to operation 706. If the channel count equals N, then there are no more channels to be scanned, and the channel scheduler 204A or 204B (
The one or more programs include software 810 for implementing a virtual STA 106 (
In the foregoing specification, the present embodiments have been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the disclosure as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative sense rather than a restrictive sense.