US-20260129537-A1 - COMMUNICATION METHOD AND APPARATUS
Abstract
A communication method and apparatus are provided, applied to the field of communication technologies, and may be applied to a wireless local area network system of 802.11 series protocols such as the IEEE 802.11a/b/g protocol, the 802.11n protocol, the 802.11ac protocol, the 802.11ax protocol, the 802.11be protocol, the 802.11bn protocol, and the integrated millimeter wave (IMMW) protocol, and may be further applied to a WPAN system that supports UWB, a sensing system, or the like. A station (STA) communicates with a first AP. In a process in which the STA communicates with the first AP, the STA maintains a connected state with a second AP, and a MAC address used when the STA communicates with the first AP is the same as a MAC address used when the STA maintains the connected state with the second AP. The STA is handed over to the second AP, and communicates with the second AP.
Inventors
- Guowang Tang
- Yu Zhang
- Lianbing TIAN
- Ziyang HU
Assignees
- HUAWEI TECHNOLOGIES CO., LTD.
Dates
- Publication Date
- 20260507
- Application Date
- 20260102
- Priority Date
- 20230704
Claims (20)
- 1 . A communication method, comprising: communicating with a first access point (AP), wherein in a process in which a station (STA) communicates with the first AP, the STA maintains a connected state with a second AP, and a medium access control (MAC) address used when the STA communicates with the first AP is the same as a MAC address used when the STA maintains the connected state with the second AP; and handing over to the second AP, to communicate with the second AP.
- 2 . The method according to claim 1 , wherein in a process in which the STA communicates with the second AP, the STA maintains a connected state with the first AP.
- 3 . The method according to claim 1 , wherein the first AP and the second AP belong to a same extended service set (ESS), or a service set identifier (SSID) of the second AP and a service set identifier (SSID) of the first AP are different.
- 4 . The method according to claim 1 , wherein the STA stores information about the second AP.
- 5 . The method according to claim 1 , wherein maintaining the connected state with the second AP by the STA comprises: the STA maintains the connected state with the second AP through a medium access control (MAC) layer and a physical (PHY) layer; and communicating with the first AP by the STA comprises: the STA communicates with the first AP through the MAC layer, the PHY layer, and a transmission control protocol/internet protocol (TCP/IP) layer.
- 6 . The method according to claim 1 , wherein handing over to the second AP comprises: handing over to the second AP when at least one of the following conditions is met: signal quality between the STA and the first AP is less than or equal to a quality threshold; a communication link between the STA and the first AP is disconnected; or the signal quality between the STA and the first AP is less than signal quality between the STA and the second AP.
- 7 . The method according to claim 1 , wherein handing over to the second AP comprises: handing over the STA to the second AP when at least one of the following conditions is met: a probability that the STA successfully sends data is less than or equal to a probability threshold; or a delay between sending data and receiving a response frame of the data by the STA is greater than or equal to a delay threshold.
- 8 . The method according to claim 1 , further comprising: handing over to the first AP, wherein the STA communicates with the first AP.
- 9 . A communication apparatus, comprising at least one processor and at least one memory storing instructions that, when executed by the at least one processor, cause the communication apparatus, configured to perform operations of a station (STA), to: communicate with a first access point (AP), wherein in a process in which the communication apparatus communicates with the first AP, the communication apparatus maintains a connected state with a second AP, and a medium access control (MAC) address used when the communication apparatus communicates with the first AP is the same as a MAC address used when the communication apparatus maintains the connected state with the second AP; and hand over to the second AP, to communicate with the second AP.
- 10 . The apparatus according to claim 9 , wherein in a process in which the communication apparatus communicates with the second AP, the communication apparatus maintains a connected state with the first AP.
- 11 . The apparatus according to claim 9 , wherein the first AP and the second AP belong to a same extended service set (ESS), or a service set identifier (SSID) of the second AP and a service set identifier (SSID) of the first AP are different.
- 12 . The apparatus according to claim 9 , wherein the communication apparatus stores information about the second AP.
- 13 . The apparatus according to claim 9 , wherein maintaining the connected state with the second AP by the communication apparatus comprises: the communication apparatus maintains the connected state with the second AP through a medium access control (MAC) layer and a physical (PHY) layer; and communicating with the first AP by the communication apparatus comprises: the communication apparatus communicates with the first AP through the MAC layer, the PHY layer, and a transmission control protocol/internet protocol (TCP/IP) layer.
- 14 . The apparatus according to claim 9 , wherein handing over to the second AP comprises: handing over to the second AP when at least one of the following conditions is met: signal quality between the communication apparatus and the first AP is less than or equal to a quality threshold; a communication link between the communication apparatus and the first AP is disconnected; or the signal quality between the communication apparatus and the first AP is less than signal quality between the communication apparatus and the second AP.
- 15 . The apparatus according to claim 9 , wherein handing over to the second AP comprises: handing over the communication apparatus to the second AP when at least one of the following conditions is met: a probability that the communication apparatus successfully sends data is less than or equal to a probability threshold; or a delay between sending data and receiving a response frame of the data by the communication apparatus is greater than or equal to a delay threshold.
- 16 . The apparatus according to claim 9 , wherein the instructions, when executed by the at least one processor, further cause the apparatus to: hand over to the first AP, wherein the communication apparatus communicates with the first AP.
- 17 . A non-transitory computer-readable storage medium, configured to store a computer program including instructions that, when executed by at least one processor of a station (STA), control the at least one processor to perform operations comprising: communicating with a first access point (AP), wherein in a process in which the STA communicates with the first AP, the STA maintains a connected state with a second AP, and a medium access control MAC address used when the STA communicates with the first AP is the same as a MAC address used when the STA maintains the connected state with the second AP; and handing over to the second AP, to communicate with the second AP.
- 18 . The non-transitory computer-readable storage medium according to claim 17 , wherein in a process in which the STA communicates with the second AP, the STA maintains a connected state with the first AP.
- 19 . The non-transitory computer-readable storage medium according to claim 17 , wherein the first AP and the second AP belong to a same extended service set (ESS), or a service set identifier (SSID) of the second AP and a service set identifier (SSID) of the first AP are different.
- 20 . The non-transitory computer-readable storage medium according to claim 17 , wherein the STA stores information about the second AP.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Application No. PCT/CN2024/099868, filed on Jun. 18, 2024, which claims priority to Chinese Patent Application No.202310816963.8, filed on Jul. 4, 2023. The disclosures of the aforementioned applications are hereby incorporated by reference in their entireties. TECHNICAL FIELD This application relates to the field of communication technologies, and in particular, to a communication method and apparatus. BACKGROUND With the rapid development of wireless network technologies, almost all wireless router hotspots that support Wi-Fi networks support a 5 GHz frequency band, and the Wi-Fi 6E standard that supports a 6 GHz frequency band is also emerging. Hotspots such as routers can support a plurality of networks in frequency bands such as 2G and 5G at the same time, and even support a plurality of networks in a same frequency band, for example, support guest networks. Generally, one household uses one or more routers. The router enables at least two networks in the 2 GHz frequency band, the 5 GHz frequency band, and the like at the same time. Generally, a plurality of terminal devices (such as a computer, a mobile phone, and a panel light) are connected to a network formed by the router hotspot. When network handover is triggered due to a reason like network quality deterioration, a network handover delay is high. Therefore, how to reduce the delay is a problem that is being studied by a person skilled in the art. SUMMARY Embodiments of this application provide a communication method and apparatus, to effectively reduce a network handover delay and a delay in transmitting and receiving data by a station (STA). According to a first aspect, an embodiment of this application provides a communication method. The method may be applied to a Wi-Fi device like a STA, or may be applied to a Wi-Fi chip, a module, or the like. The Wi-Fi chip or the module may be disposed in the STA. The method includes: communicating with a first access point (AP), where in a process in which a STA communicates with the first AP, the STA maintains a connected state with a second AP, and a medium access control (MAC) address used when the STA communicates with the first AP is the same as a MAC address used when the STA maintains the connected state with the second AP; and the STA is handed over to the second AP, and communicates with the second AP. In this embodiment, in a process in which the station communicates with the first AP, the station maintains the connected state with the second AP, so that the station can be quickly and effectively handed over to the second AP. This reduces a network handover delay, so that the station can perform data transmission with minimal interruption, reduces a delay in transmitting and receiving data by the STA, and improves user experience. In an example embodiment, in a process in which the STA communicates with the second AP, the STA maintains the connected state with the first AP. In this embodiment, the MAC address used when the STA communicates with the second AP is the same as the MAC address used when the STA maintains the connected state with the first AP. In an example embodiment, in a process in which the STA communicates with the second AP, the STA maintains the connected state with a third AP. In this embodiment, in a process in which the STA communicates with an AP, the STA may maintain the connected state with one or more APs (an AP other than an AP). In an example embodiment, the first AP and the second AP belong to a same extended service set (ESS), or a service set identifier (SSID) of the second AP and a service set identifier of the first AP are different. Generally, if the first AP and the second AP belong to the same ESS, when the STA separately communicates with the two APs by using different MAC addresses, the two APs consider the STA to be different STAs. For example, the second AP considers a STA that communicates with the first AP is different from a STA that communicates with the second AP. Therefore, the second AP re-initiates a connection, resulting in communication interruption of the STA. In this embodiment, when the first AP and the second AP belong to the same ESS, the STA separately communicates with the first AP and the second AP by using a same MAC address, so that a case in which communication of the STA is interrupted because the second AP re-initiates a connection can be effectively avoided, thereby reducing a delay in transmitting and receiving data by the STA. This improves user experience. In an example embodiment, the STA stores information about the second AP. In an example embodiment, that the STA maintains the connected state with the second AP includes: The STA maintains the connected state with the second AP through a medium access control MAC layer and a physical (PHY) layer. That the STA communicates with the first AP includes: The STA communicates with the first