Communication method, electronic equipment and storage medium

By embedding additional WiFi chips in electronic devices, the data transmission interruption caused by the reset of the WiFi module is solved, and the data transmission continuity and user experience are improved when the network environment changes.

CN119629658APending Publication Date: 2025-03-14HONOR DEVICE CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311140851.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-05
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

When the electronic device is intelligently interconnected through the WiFi direct transmission channel, the operating system detects that the network signal becomes worse or the rate becomes lower, causing the WiFi module to be reset and thus interrupt data transmission.

Method used

An additional WiFi chip is embedded in the electronic device, which is used to establish point-to-point communication with the opposite device when the WiFi module is reset to ensure the continuity of data transmission.

Benefits of technology

It realizes that when the operating system resets the WiFi module, the data transmission between electronic devices and other devices is uninterrupted, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629658A_ABST
    Figure CN119629658A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a communication method, electronic equipment and a storage medium. The communication method comprises the following steps: if a reset instruction for a WiFi module in first electronic equipment is detected in the process of carrying out WiFi direct connection communication with second electronic equipment based on a first WiFi chip, switching to adopt a second WiFi chip in the first electronic equipment to establish WiFi direct connection communication with the second electronic equipment. Based on the method, the electronic devices of the two parties can continue to perform data transmission when the WiFi module is reset by the operating system, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method, electronic equipment and storage medium. Background Art

[0002] Currently, electronic devices (such as computers, mobile phones, etc.) can achieve data sharing, information exchange and other intelligent interconnection services by establishing wireless fidelity (WiFi) direct transmission channels. Among them, WiFi direct transmission channels refer to the transmission of data between two electronic devices directly through channels without the intervention of intermediate links and servers. For example, Figure 1 As shown, the computer 101 and the mobile phone 102 can establish a WiFi direct transmission channel to perform smart screen projection and achieve data sharing.

[0003] At present, when an electronic device is intelligently interconnected with other electronic devices through a WiFi direct transmission channel, the electronic device can also be used as a terminal device to establish a wireless connection with a wireless router to achieve functions such as surfing the Internet. However, there are some situations where, if the operating system of the electronic device detects that the network signal of the electronic device has deteriorated or the network rate has decreased when the electronic device is surfing the Internet, the operating system will reset the WiFi module in the electronic device to restore the wireless network. However, since the functional unit for implementing the WiFi direct transmission channel is also placed in the WiFi module, resetting the WiFi module will cause the functional unit for implementing the WiFi direct transmission channel to be reset as well, resulting in the disconnection of the WiFi direct transmission channel between the electronic device and other electronic devices, causing data transmission interruption.

[0004] Therefore, how to formulate a protection strategy so that electronic devices and other electronic devices can continue to transmit data when the operating system resets the WiFi module is an issue that needs to be solved urgently. Summary of the invention

[0005] To solve the above problems, the present application provides a communication method, an electronic device and a storage medium.

[0006] In a first aspect, the present application provides a communication method for a first electronic device, the method comprising: the first electronic device performs WiFi direct communication with a second electronic device based on a first WiFi chip; during the WiFi direct communication, a reset instruction for the first WiFi chip is detected; and switching to using a second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device.

[0007] In the present application, the first electronic device may be the local device mentioned in the present application, which may be any electronic device such as a computer, a mobile phone, a virtual reality device, a tablet computer, a laptop computer, etc.; the second electronic device may be the opposite device mentioned in the present application; the first WiFi chip may be the WiFi main chip in the first electronic device mentioned in the present application; the second WiFi chip may be the additional WiFi chip embedded in the first electronic device (i.e., a WiFi chiplet) mentioned in the present application; the reset instruction may be the reset operation of the WiFi module in the first electronic device mentioned in the present application.

[0008] It can be understood that in the present application, when the first electronic device uses the first WiFi chip (i.e., the WiFi main chip) to establish a WiFi direct transmission channel with the second electronic device, if the operating system of the first electronic device detects that the network environment has changed when accessing the Internet through the WiFi main chip, the operating system will reset the WiFi module, wherein the WiFi main chip is embedded in the WiFi module; in the process of resetting the WiFi module, the first electronic device can establish WiFi direct communication with the second electronic device through an additional embedded second WiFi chip (i.e., a small WiFi chip).

[0009] Based on the above method, it can be ensured that when the operating system resets the WiFi module, the electronic devices of both parties can continue to transmit data, thereby improving the user experience.

[0010] In one possible implementation, the method also includes: detecting that the first WiFi chip is successfully reset; if it is determined that the second WiFi chip can meet the network transmission requirements between the first electronic device and the second electronic device, maintaining the WiFi direct communication between the second WiFi chip and the second electronic device in a connected state; if it is determined that the second WiFi chip cannot meet the network transmission requirements between the first electronic device and the second electronic device, establishing WiFi direct communication between the first electronic device and the second electronic device based on the first WiFi chip.

[0011] It can be understood that in this application, when the first electronic device establishes a WiFi direct transmission channel with the second electronic device through the second WiFi chip (i.e., the WiFi chiplet), after detecting that the first electronic device successfully resets the WiFi module, if the second WiFi chip can meet the requirements of network transmission, such as only transmitting a small number of pictures, the second WiFi chip can meet the requirements of the time for data transmission from the sender to the receiver and the throughput (i.e., the amount of data transmitted per unit time), and the transmission channel can continue to be established on the second WiFi chip; if the second WiFi chip cannot meet the requirements of network transmission, the operating system of the first electronic device will switch to the first WiFi chip (i.e., the WiFi main chip) to establish a WiFi direct transmission channel with the second electronic device. In this way, the first electronic device and the second electronic device can have better data transmission performance.

[0012] In a possible implementation, the first electronic device includes an operating system and an application layer, wherein the application layer includes system applications; the first WiFi chip is controlled based on the operating system of the first electronic device, and the second WiFi chip is controlled based on the system application of the first electronic device.

[0013] In the present application, the system application may be the computer manager mentioned in the present application.

[0014] In some embodiments, an additional WiFi chiplet can be embedded in the first electronic device to support the smart interconnection service of the electronic device. The WiFi main chip is controlled by the operating system, and the WiFi chiplet is directly controlled by the computer manager, and the two do not interfere with each other.

[0015] In a possible implementation, the above-mentioned switching is to use the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device, including: using the second WiFi chip to create a group owner end for point-to-point communication on the first electronic device; sending a connection command to the second electronic device, wherein the connection command is used for the first electronic device to establish WiFi direct communication with the second electronic device.

[0016] It can be understood that in the present application, during the process of resetting the WiFi module of the first electronic device, a WiFi chip can be used to create a group owner (GO) end of peer-to-peer (P2P) communication on the first electronic device end, and establish P2P communication with the second electronic device.

[0017] In some embodiments, when the first electronic device establishes WiFi direct communication with the second electronic device, the first electronic device can directly create a GO end of P2P communication through the WiFi chiplet, and then the first electronic device sends a connection command to the second electronic device. After receiving the connection command, the second electronic device will establish a P2P connection with the GO end of the first electronic device. In this way, during the process of resetting the WiFi module, data transmission can continue between the two electronic devices.

[0018] In one possible implementation, the above-mentioned group owner end that uses the second WiFi chip to create point-to-point communication on the first electronic device includes: using first information to create the group owner end of point-to-point communication on the first electronic device, wherein the first information is communication information when the first electronic device performs WiFi direct communication with the second electronic device based on the first WiFi chip.

[0019] In a possible implementation, the communication information includes one or more information of a service set identifier, a password, and a working channel.

[0020] It can be understood that in the present application, when a first electronic device establishes WiFi direct communication with a second electronic device, the first electronic device can use the same service set identifier (SSID), that is, the WiFi name, as well as communication information such as the password and working channel, which was used when establishing a WiFi direct transmission channel with the second electronic device before resetting the WiFi module.

[0021] In a possible implementation, the connection command includes the first information and a basic service set identifier corresponding to the first electronic device.

[0022] It can be understood that in the present application, when a first electronic device establishes WiFi direct communication with a second electronic device, the first electronic device can send a connection command to the second electronic device, wherein the connection command includes the corresponding SSID, password, working channel, and Basic Service Set Identifier (BSSID), that is, the physical address of the first electronic device, etc., which are used by the first electronic device to establish WiFi direct communication with the second electronic device.

[0023] In some embodiments, the first electronic device may send a connection command to the second electronic device via Bluetooth; alternatively, the first electronic device may send a connection command to the second electronic device via near field communication methods such as near field communication technology (NFC), which is not limited in this embodiment of the present application.

[0024] In a possible implementation, the switching is to use the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device, including: the first electronic device is connected to the first wireless access device based on the first channel; the second electronic device is connected to the second wireless access device based on the second channel; the second WiFi chip in the first electronic device establishes WiFi direct communication with the second electronic device based on the second channel.

[0025] It can be understood that in this application, if the second electronic device is connected to the wireless router as a station (STA) device through the STA channel to access the wireless network, and the STA channel of the first electronic device is different from the STA channel of the second electronic device, when using the WiFi chip to establish WiFi direct communication, the working channel of the communication can be established on the STA channel of the second electronic device. In this way, the channel for communication between the second electronic device and the wireless router is the same as the channel for communication with the first electronic device, and the second electronic device does not need to switch channels back and forth between different channels, which can improve data transmission efficiency.

[0026] In a possible implementation, the method further includes: if the first electronic device does not include the second WiFi chip, when the first electronic device detects that the first WiFi chip is reset successfully, establishing WiFi direct communication with the second electronic device based on the first WiFi chip.

[0027] It can be understood that in the present application, the first electronic device does not need to embed an additional chip, that is, it can wait for the WiFi module to be reset successfully and then automatically re-establish the WiFi direct transmission channel with the second electronic device.

[0028] In a possible implementation, when the first electronic device detects that the first WiFi chip is successfully reset, it establishes WiFi direct communication with the second electronic device based on the first WiFi chip, including: using the first WiFi chip to create a soft access point on the first electronic device; sending a reconnection command to the second electronic device, wherein the reconnection command is used to establish WiFi direct communication between the first electronic device and the second electronic device.

[0029] It can be understood that in this application, after the WiFi module is successfully reset, the operating system of the first electronic device can automatically create a soft access point through the first WiFi chip, and send a fast reconnection command to the second electronic device, and wait for the second electronic device to access the soft access point of the first electronic device and reconnect successfully to communicate again. In this way, after resetting the WiFi module, the first electronic device and the second electronic device can successfully communicate again.

[0030] In a possible implementation, the reset duration of the first WiFi chip is greater than the first preset time, and the reset duration of the first WiFi chip is the minimum duration between a default recovery duration and an actual detection duration for resetting the first WiFi chip.

[0031] In the present application, the reset duration of the first WiFi chip may be the recovery duration of the reset WiFi module mentioned in the present application; the first preset time may be the preset time of the reset WiFi module mentioned in the present application whether an additional WiFi chip is embedded in the first electronic device.

[0032] It can be understood that in the present application, if the recovery time of the reset WiFi module corresponding to the WiFi main chip embedded in the first electronic device is longer (for example, greater than 1s), a small WiFi chip can be placed in the first electronic device to support the smart interconnection service of the first electronic device.

[0033] In some embodiments, the recovery time for resetting the WiFi module refers to the minimum value between the default recovery time and the actually detected recovery time. The default recovery time refers to the recovery time actually tested before the product leaves the factory; the actually detected recovery time refers to the recovery time counted when the operating system resets the WiFi module due to the deterioration of the WiFi network rate when the user uses the electronic device.

[0034] In a possible implementation, the method also includes: if it is detected that the first WiFi chip is reset successfully within the second preset time, after the first WiFi chip is reset successfully, WiFi direct communication is performed with the second electronic device based on the first WiFi chip; if it is detected that the first WiFi chip is not reset successfully within the second preset time, switching to using the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device.

[0035] In the present application, the first WiFi chip may be the WiFi main chip in the first electronic device mentioned in the present application; the second WiFi chip may be the additional embedded WiFi chip (i.e., WiFi chiplet) in the first electronic device mentioned in the present application; the second preset time may be the preset time for resetting the WiFi module of whether to use the second WiFi chip mentioned in the present application.

[0036] It can be understood that in this application, a small WiFi chip can be placed in the first electronic device to support the smart interconnection service of the first electronic device. When the first electronic device detects that the WiFi module needs to be reset, it needs to determine the recovery time when the first electronic device resets the WiFi module. If the recovery time of resetting the WiFi module is short, you can wait until the WiFi module is successfully reset, and then use the WiFi main chip to automatically establish a WiFi direct transmission channel with the second electronic device; if the recovery time of resetting the WiFi module is long, you can use the small WiFi chip to establish P2P communication with the second electronic device when resetting the WiFi module.

[0037] In a possible implementation, the method further includes: detecting that the wireless network connection of the first electronic device meets a network reset condition during a process in which the first electronic device performs WiFi direct communication with the second electronic device based on the first WiFi chip; and resetting the WiFi module of the first electronic device.

[0038] In the present application, the network reset condition may be the network connection restriction condition mentioned in the present application, such as the detection of a change in the network environment when the first electronic device is accessing the Internet as a STA device, such as a deterioration of the network signal, inability to access the Internet, or a low network speed.

[0039] In some embodiments, when the first electronic device establishes a WiFi direct transmission channel with the second electronic device, the first electronic device may also establish a connection with a wireless access point (e.g., a wireless router) as a STA device to access the wireless network to access the Internet, etc. When it is detected that the network environment of the first electronic device as a STA device has changed, such as the network signal has deteriorated, the Internet cannot be accessed, or the network rate has decreased, the operating system of the first electronic device will detect that the network connection is limited and attempt to automatically recover by resetting the WiFi module.

[0040] In a second aspect, the present application provides an electronic device, comprising: a memory and a processor, the memory being used to store instructions executed by one or more processors of the electronic device, and the processor being one of the one or more processors of the electronic device, and being used to execute the communication method mentioned in the present application.

[0041] In a third aspect, the present application provides a readable storage medium, wherein the readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the communication method mentioned in the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 According to some embodiments of the present application, a schematic diagram of a smart screen projection scenario is shown;

[0043] Figure 2AAccording to some embodiments of the present application, a schematic diagram of a smart interconnection service networking is shown;

[0044] Figure 2B According to some embodiments of the present application, a schematic structural diagram of a WiFi module is shown;

[0045] Figure 3 According to some embodiments of the present application, a schematic diagram of a computer-embedded WiFi chiplet is shown;

[0046] Figure 4 According to some embodiments of the present application, a schematic diagram of a scenario for establishing P2P communication is shown;

[0047] Figure 5 According to some embodiments of the present application, a specific flow diagram of establishing a communication connection with a peer device through a WiFi chiplet is shown;

[0048] Figure 6 According to some embodiments of the present application, a specific flow diagram of ensuring data transmission between two electronic devices is shown;

[0049] Figure 7 According to some embodiments of the present application, a first electronic device interaction process schematic diagram is shown;

[0050] Figure 8 According to some embodiments of the present application, a second electronic device interaction flow diagram is shown;

[0051] Fig. 9 According to some embodiments of the present application, a third electronic device interaction process diagram is shown;

[0052] Fig.10 According to some embodiments of the present application, a schematic diagram of an electronic device interaction process when establishing a WiFi direct transmission channel is shown;

[0053] Fig.11 According to some embodiments of the present application, a schematic diagram of the hardware structure of an electronic device is shown. DETAILED DESCRIPTION

[0054] The illustrative embodiments of the present application include, but are not limited to, a communication method, an electronic device, and a storage medium.

[0055] In order to more clearly understand the solution of the present application, the relevant field terms involved in the present application are first explained.

[0056] Soft Access Point (SoftAP): Using the wireless network card and software driver of an electronic device, the electronic device is turned into a wireless access point that can be connected by other electronic devices. Among them, SoftAP can create a wireless LAN and provide a connectable virtual WiFi, so that other electronic devices can connect to SoftAP via WiFi, realizing data transmission and sharing between electronic devices.

[0057] The following first briefly describes the background of the method provided in the embodiments of the present application.

[0058] Currently, electronic devices can establish a WiFi direct transmission channel, without the intervention of intermediate links and servers, to directly realize smart interconnection services such as data sharing and information exchange between two electronic devices. Figure 1 As shown, the computer 101 and the mobile phone 102 can establish a WiFi direct transmission channel to perform smart screen projection and achieve data sharing.

[0059] In some embodiments, when establishing a communication transmission link of a WiFi direct transmission channel between a first electronic device and a second electronic device, the first electronic device can usually act as a soft access point (Soft Access Point, SoftAP), and the second electronic device acts as a group client (Group Client, GC) to connect to the SoftAP to establish a transmission link. Among them, the role of the SoftAP is similar to the role of a wireless access point, the GC implements the function of a terminal device, and the connection of the GC to the SoftAP is similar to the connection of the terminal device to a wireless router.

[0060] In some embodiments, when establishing a communication transmission link of a WiFi direct transmission channel between a first electronic device and a second electronic device, the first electronic device may sometimes also serve as a group owner (Group Owner, GO), and the second electronic device may serve as a group client (Group Client, GC) to connect to the GO to establish the transmission link. The role of the GO is similar to that of a wireless access point, the GC implements the function of a terminal device, and the connection between the GC and the GO is similar to the connection between a terminal device and a wireless router.

[0061] In addition, when the first electronic device establishes a WiFi direct transmission channel with the second electronic device, the first electronic device can also establish a connection with a wireless access point (e.g., a wireless router) as a station (STA) device to access the wireless network to access the Internet. Figure 2AAs shown, a WiFi direct transmission channel can be established between the computer 201 and the mobile phone 202, wherein the computer 201 acts as a SoftAP, the mobile phone 202 acts as a GC, and the GC connects to the SoftAP to establish a WiFi direct transmission channel; in addition, the computer 201 can also act as a STA device to establish a wireless connection with a wireless access point (Access Point, AP) 203 to access the Internet.

[0062] In some embodiments, if the network environment changes when the electronic device is accessing the Internet as a STA device, such as the network signal becomes poor, the Internet cannot be accessed, or the network speed becomes low, the operating system of the electronic device will detect that the network connection is limited, and then restore the network status by resetting the WiFi module in the electronic device.

[0063] However, since the functional unit implementing the WiFi direct transmission channel is also placed in the WiFi module, resetting the WiFi module will cause the functional unit implementing the WiFi direct transmission channel to be reset as well, resulting in the disconnection of the WiFi direct transmission channel between the electronic device and other electronic devices, causing data transmission interruption. Figure 2B As shown, in computer 201, the SoftAP functional unit and the STA functional unit of computer 201 are both placed in the WiFi module of computer 201. If the network rate becomes low when computer 201 accesses the Internet as a STA device, the operating system of computer 201 will reset the entire WiFi module, causing the SoftAP functional unit embedded in the WiFi module to also be reset, resulting in the disconnection of the WiFi direct connection transmission channel between computer 201 and other electronic devices, causing data transmission interruption. The user needs to wait until the WiFi module is successfully reset and then manually start the smart interconnection configuration again, affecting the user experience.

[0064] It is understandable that in the process of resetting the WiFi module, the operating system needs to delete the driver related to the wireless local area network (WLAN) card in the WiFi module, and then the operating system will automatically reinstall and start the driver related to the WLAN card to restore the network settings. Among them, the driver is a software that enables the operating system to communicate and interact with hardware devices such as WLAN cards; the WLAN card has a built-in WiFi main chip.

[0065] In order to solve the above problems, the embodiment of the present application provides a communication method. In the method of the present application, an additional WiFi chip can be embedded in the electronic device to support the wireless communication and data transmission functions of the electronic device. When the electronic device uses the WiFi main chip (i.e., the chip embedded in the WLAN network card mentioned above) to establish a WiFi direct transmission channel with the opposite device, if the operating system detects that the network environment changes when surfing the Internet through the WiFi main chip, the operating system will reset the WiFi module; in the process of resetting the WiFi module, point-to-point communication can be established with the opposite device through the additional embedded WiFi chip; after that, when it is detected that the WiFi module of the electronic device is reset successfully, if the additional embedded WiFi chip can meet the requirements of network transmission, for example, only a small number of pictures are transmitted, the additional embedded WiFi chip can meet the requirements of the time and throughput (i.e., the amount of data transmitted per unit time) of data transmission from the sending end to the receiving end at this time, and the transmission channel can continue to be established on the additional embedded WiFi chip. If the additional embedded WiFi chip cannot meet the requirements of network transmission, the operating system of the electronic device will switch to the WiFi main chip to establish a WiFi direct transmission channel with the opposite device. In this way, it can be ensured that the electronic devices of both parties can continue to transmit data when the operating system resets the WiFi module, thereby improving the user experience.

[0066] It can be understood that the additional WiFi chip (i.e., WiFi chiplet) and WiFi main chip embedded in electronic devices can both provide wireless communication and data transmission functions for electronic devices, and realize wireless communication connection between electronic devices by receiving and sending wireless signals. Among them, the WiFi chiplet is inferior to the WiFi main chip in terms of data transmission performance (for example, data transmission speed, etc.) and signal quality.

[0067] In some embodiments, an additional WiFi chiplet may be embedded in the electronic device to support the smart interconnection service of the electronic device. Figure 3As shown, in the computer 201, two chips, a WiFi main chip and a WiFi small chip, are embedded. The WiFi main chip is the chip embedded in the WLAN network card mentioned above, which is controlled by the operating system, and the WiFi small chip is directly controlled by the system application in the application layer (for example, the computer manager), and the two do not interfere with each other. Specifically, in the process of resetting the WiFi module, the WiFi small chip can be used to create a group owner (Group Owner, GO) end of peer-to-peer (P2P) communication on the electronic device end, and establish P2P communication with the opposite device. Among them, P2P communication refers to the direct transmission of information between two electronic devices through the channel without the intervention of intermediate links and servers, which is a way of WiFi direct transmission channel; in P2P communication, the role of GO is similar to that of a wireless access device, GC realizes the function of a terminal device, and GC connects to GO similarly to the connection of a terminal device to a wireless router.

[0068] In some embodiments, if the peer device is a STA device connected to a wireless router through a STA channel to access a wireless network, and the STA channel of the electronic device is different from the STA channel of the peer device, when using the WiFi chiplet for P2P communication, the P2P communication channel can be established on the STA channel of the peer device. Figure 4 As shown, if mobile phone 402 connects to AP based on channel 36 to access the wireless network, the P2P communication channel between computer 401 and mobile phone 402 can be established on channel 36. In this way, the channel for communication between mobile phone 402 and AP is the same as the channel for P2P communication with computer 401. Mobile phone 402 does not need to switch channels back and forth between different channels, which can improve data transmission efficiency.

[0069] In some embodiments, after detecting that the WiFi module is successfully reset, if the WiFi chip can meet the requirements of the smart interconnection service for network transmission delay (i.e., the time it takes for data to be transmitted from the sender to the receiver) and throughput (i.e., the amount of data transmitted per unit time), the transmission channel can continue to be established on the WiFi chip. For example, if only a small number of pictures are transmitted between the computer and the mobile phone, P2P communication can continue to be established between the computer and the mobile phone by using the computer's WiFi chip.

[0070] In some embodiments, when the WiFi module is detected to be reset successfully, if the WiFi chiplet cannot meet the requirements of the smart interconnection service for network transmission delay and throughput, the operating system will switch to the WiFi main chip to establish a WiFi direct transmission channel with the peer device. For example, if a large amount of video needs to be transmitted between the computer and the mobile phone, and a high data transmission rate is required, the computer operating system will create a SoftAP through the WiFi main chip, and after the creation is successful, it will send a connection message to the mobile phone. After receiving the connection message, the mobile phone will disconnect the P2P GO connection with the computer and reconnect to the computer's SoftAP.

[0071] In some embodiments, when the electronic device re-establishes a communication connection with the peer device, the same service set identifier (SSID), that is, the WiFi name, password, working channel and other information, can be used as when establishing the WiFi direct transmission channel with the peer device before resetting the WiFi module.

[0072] In some embodiments, when the electronic device reestablishes a communication connection with the peer device, the electronic device can send a connection command to the peer device via Bluetooth, wherein the connection command includes the corresponding SSID, password, working channel used by the electronic device to establish WiFi direct communication with the peer device, and the basic service set identifier (BSSID) of the electronic device, i.e., the physical address of the electronic device and other information. In addition, the electronic device can also send a connection command to the peer device via near field communication methods such as near field communication (NFC), which is not limited in the embodiments of the present application.

[0073] It is understandable that due to certain differences in the design and architecture of WiFi chips from different manufacturers, the recovery time of resetting the WiFi module of the operating system of electronic devices equipped with WiFi chips from different manufacturers is different. For example, when computer 1 uses the WiFi chip of manufacturer A, the recovery time of resetting the WiFi module is 1s, and when computer 2 uses the WiFi chip of manufacturer B, the recovery time of resetting the WiFi module may be 6s. Among them, the recovery time of resetting the WiFi module refers to the minimum value between the default recovery time and the actual detected recovery time. The default recovery time refers to the recovery time actually tested before the product leaves the factory; the actual detected recovery time refers to the recovery time counted when the operating system resets the WiFi module due to the deterioration of the WiFi network rate when the user uses the electronic device.

[0074] Therefore, in some embodiments, different protection strategies can be formulated according to different recovery times of resetting the WiFi module, so that when the operating system of the electronic device resets the WiFi module, it can be restored in time to enable data transmission between the electronic device and other electronic devices to continue.

[0075] In some embodiments, if the recovery time of the reset WiFi module corresponding to the WiFi main chip (i.e., short-range communication chip) embedded in the electronic device is long (for example, greater than 1s), a small WiFi chip can be placed in the electronic device to support the smart interconnection service of the electronic device.

[0076] If the recovery time of resetting the WiFi module of the operating system of the electronic device is relatively short (for example, less than 1 second), there is no need to embed an additional chip, that is, the WiFi direct transmission channel can be automatically re-established with the opposite device after the WiFi module is successfully reset.

[0077] In some embodiments, a small WiFi chip may be placed in the electronic device to support the smart interconnection service of the electronic device. When the electronic device detects that the WiFi module needs to be reset, it needs to determine the recovery time of the current WiFi main chip. For example, the recovery time of the electronic device when resetting the WiFi module is determined through the attribute information of the WiFi main chip (for example, the default recovery time, etc.) or the historical recovery time when the electronic device is actually used. If the recovery time of resetting the WiFi module is short, you can wait until the WiFi module is successfully reset, and then use the WiFi main chip again to automatically establish a WiFi direct transmission channel with the opposite device; if the recovery time of resetting the WiFi module is long, you can use the WiFi chip to establish P2P communication with the opposite device when resetting the WiFi module.

[0078] The following is based on Figure 5 The flow chart shown in FIG. 1 is a flow chart that describes in detail the communication method for establishing a communication connection in the embodiment of the present application. Figure 5 Specifically, the method can be performed by an electronic device (or referred to as a local device), and the method includes the following steps:

[0079] S501: It is detected that the network connection is limited.

[0080] It can be understood that in the embodiments of the present application, when an electronic device establishes a WiFi direct transmission channel with other electronic devices, the electronic device can also establish a connection with a wireless access point (for example, a wireless router) as a STA device to access the wireless network to realize functions such as Internet access.

[0081] In some embodiments, when it is detected that the network environment of the electronic device as a STA device has changed, such as the network signal has deteriorated, the Internet cannot be accessed, or the network rate has decreased, the electronic device operating system will detect that the network connection is limited and attempt to recover automatically.

[0082] S502: Reset the WiFi module.

[0083] It can be understood that in the embodiment of the present application, after the operating system of the electronic device detects that the network connection is limited, the operating system will restore the network status by resetting the WiFi module in the electronic device.

[0084] S503: Create GO through the WiFi chiplet.

[0085] It can be understood that in the embodiment of the present application, an additional WiFi chip can be embedded in the electronic device to support the smart interconnection service of the electronic device. During the process of resetting the WiFi module, the GO end of the P2P communication can be directly created through the WiFi chip.

[0086] In some embodiments, when creating a GO, the same SSID, password, and working channel as those used when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module can be used to create the GO.

[0087] In some embodiments, in P2P communication, the role of GO is similar to that of a wireless access device, GC implements the function of a terminal device, and the connection between GC and GO is similar to the connection between a terminal device and a wireless router.

[0088] S504: Send a connection command to the peer device.

[0089] It can be understood that in the embodiment of the present application, after the electronic device completes the creation of the GO, it can send a connection command to the other device via Bluetooth, where the connection command includes information such as the SSID, password, working channel, BSSID, etc. of the GO.

[0090] S505: Establish a P2P connection with the peer device.

[0091] It can be understood that in the embodiment of the present application, after receiving the connection command, the peer device will establish a P2P connection with the GO end, wherein the P2P connection is a mode of WiFi direct transmission channel. In this way, data can be transmitted between two electronic devices.

[0092] In some embodiments, if the peer device is a STA device that connects to a wireless router through a STA channel to access a wireless network, and the STA channel of the electronic device is different from the STA channel of the peer device, when using the WiFi chiplet for P2P communication, the P2P communication channel can be established on the STA channel of the peer device. For example, when a mobile phone is connected to an AP through channel 36 and a computer is connected to an AP through channel 149, when a P2P connection is established between the computer and the mobile phone, a P2P communication can be created on the STA channel of the mobile phone (i.e., channel 36), so that the channel for communication between the mobile phone and the AP is the same as the channel for communication with the computer, and the mobile phone does not need to switch channels back and forth between different channels, which can improve data transmission efficiency.

[0093] In this way, during the process of resetting the WiFi module, data transmission between the two devices can still be maintained.

[0094] S506: Detecting that the WiFi module is reset successfully.

[0095] It can be understood that in the embodiment of the present application, the operating system needs to detect whether the reset of the WiFi module is successful.

[0096] S507: Determine whether the WiFi chip meets the network transmission requirements of the smart interconnection service. If yes, proceed to S508; if no, proceed to S509.

[0097] It can be understood that in the embodiment of the present application, when it is detected that the WiFi module is reset successfully, it is necessary to determine whether the WiFi chip meets the network transmission delay (i.e., the time for data to be transmitted from the sending end to the receiving end) and throughput (i.e., the amount of data transmitted per unit time) requirements of the smart interconnection service. If the requirements are met, go to S508 and keep establishing a transmission channel on the WiFi chip; if the requirements are not met, go to S509 and switch to the WiFi main chip to establish a WiFi direct transmission channel with the opposite device.

[0098] In some embodiments, for example, if only a small number of pictures are transmitted between the computer and the mobile phone, the network transmission rate requirement is relatively low; if a large number of videos need to be transmitted between the computer and the mobile phone, a higher data transmission rate requirement is placed on the data transmission rate.

[0099] S508: Keep establishing a transmission channel on the WiFi chiplet.

[0100] It can be understood that in the embodiments of the present application, if the WiFi chip can meet the requirements of the smart interconnection service for network transmission delay and throughput, the transmission channel can continue to be established on the WiFi chip. For example, if only a small number of pictures are transmitted between the computer and the mobile phone, the P2P communication established between the computer's WiFi chip and the mobile phone can continue to be maintained.

[0101] S509: Switch to the WiFi main chip to establish a WiFi direct connection transmission channel with the peer device.

[0102] It can be understood that in the embodiment of the present application, if the WiFi chip cannot meet the requirements of the smart interconnection service for network transmission delay and throughput, the operating system will switch to the WiFi main chip to establish a WiFi direct transmission channel with the peer device.

[0103] In some embodiments, the operating system of the electronic device can create a SoftAP in the operating system interface using the same SSID, password, and working channel as used when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module; then send a connection command to the peer device via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the SoftAP; after receiving the connection command, the peer device will first disconnect from the GO end of the electronic device, and then re-establish a WiFi direct transmission channel with the SoftAP.

[0104] In this way, through the above process, when the operating system resets the WiFi module, both electronic devices can continue to transmit data, thereby improving the user experience.

[0105] The following is based on Figure 6 The flow chart shown in the figure details the communication method in the embodiment of the present application. Figure 6 The method shown is Figure 5 The difference is that in the embodiment of the present application, it is necessary to determine the recovery time of the operating system resetting the WiFi module. Figure 6 Specifically, the method comprises the following steps:

[0106] S601: It is detected that the network connection is limited.

[0107] It can be understood that in the embodiments of the present application, when an electronic device establishes a WiFi direct transmission channel with other electronic devices, the electronic device can also establish a connection with a wireless access point (for example, a wireless router) as a STA device to access the wireless network to realize functions such as Internet access.

[0108] In some embodiments, when it is detected that the network environment of the electronic device as a STA device has changed, such as the network signal has deteriorated, the Internet cannot be accessed, or the network rate has decreased, the electronic device operating system will detect that the network connection is limited and attempt to recover automatically.

[0109] S602: Reset the WiFi module.

[0110] It can be understood that in the embodiment of the present application, after the operating system of the electronic device detects that the network connection is limited, the operating system will restore the network status by resetting the WiFi module in the electronic device.

[0111] S603: Obtain the recovery time of resetting the WiFi module.

[0112] It can be understood that in the embodiment of the present application, when the operating system resets the WiFi module, it is necessary to obtain the recovery time of resetting the WiFi module.

[0113] In some embodiments, the recovery time for resetting the WiFi module refers to the minimum value between the default recovery time and the actually detected recovery time, wherein the default recovery time refers to the recovery time actually tested before the product leaves the factory; the actually detected recovery time refers to the recovery time that can be counted when the user uses the electronic device, regardless of whether or not smart interconnection services are performed, as a result of changes in the WiFi Internet environment may cause the operating system to reset the WiFi module.

[0114] In some embodiments, the recovery time of resetting the WiFi module can be obtained after the task of resetting the WiFi module in step S602 is triggered; in addition, the recovery time of resetting the WiFi module can also be obtained while the task of resetting the WiFi module in step S602 is triggered.

[0115] S604: Determine whether the recovery time is greater than or equal to 1 second. If yes, proceed to S606; if no, proceed to S605.

[0116] It can be understood that in the embodiment of the present application, it is necessary to judge the recovery time of resetting the WiFi module. If the recovery time is greater than or equal to 1s, go to S606 to create a GO through the WiFi chip; if the recovery time is less than 1s, go to S605 and wait for the WiFi module to be reset successfully before establishing a WiFi direct transmission channel.

[0117] In some embodiments, due to certain differences in the design and architecture of WiFi chips from different manufacturers, the recovery time of resetting the WiFi module of the operating system of electronic devices equipped with WiFi chips from different manufacturers is different. For example, when computer 1 uses the WiFi chip of manufacturer A, the recovery time of resetting the WiFi module is 1s, and when computer 2 uses the WiFi chip of manufacturer B, the recovery time of resetting the WiFi module is 6s. Therefore, it is necessary to formulate different protection strategies according to different recovery times of resetting the WiFi module, so that when the operating system of the electronic device resets the WiFi module, the electronic device and other electronic devices can continue to perform data transmission.

[0118] S605: Wait for the WiFi module to be reset successfully before establishing a WiFi direct transmission channel.

[0119] It can be understood that in the embodiment of the present application, if the recovery time of the operating system resetting the WiFi module is relatively short (for example, less than 1s), you can wait for the WiFi module to be reset successfully, the operating system will automatically create a SoftAP and send a quick reconnect command to the other device, and wait for the other device to reconnect successfully before communicating again.

[0120] In some embodiments, after detecting that the WiFi module is successfully reset, the electronic device operating system can create a SoftAP using the same SSID, password, and working channel as when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module; then send a fast reconnect command to the peer device via Bluetooth, where the fast reconnect command includes the SSID, password, working channel, BSSID, and other information of the SoftAP; after receiving the fast reconnect command, the peer device will establish a WiFi direct transmission channel with the SoftAP. In this way, data can still be transmitted between the two electronic devices after resetting the WiFi module.

[0121] In some embodiments, the electronic device may also send a connection command to the peer device via near field communication methods such as NFC, which is not limited in this embodiment of the present application.

[0122] S606: Create a GO through the WiFi chiplet.

[0123] It can be understood that in the embodiment of the present application, if the recovery time of the operating system to reset the WiFi module is relatively long (for example, greater than or equal to 1s), during the process of resetting the WiFi module, the GO end of the P2P communication can be created through the WiFi chip.

[0124] In some embodiments, when creating a GO, the same SSID, password, and working channel as those used when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module can be used to create the GO.

[0125] In some embodiments, in P2P communication, the role of GO is similar to that of a wireless access device, GC implements the function of a terminal device, and the connection between GC and GO is similar to the connection between a terminal device and a wireless router.

[0126] S607: Send a connection command to the peer device.

[0127] It can be understood that in the embodiment of the present application, after the electronic device completes the creation of the GO, it can send a connection command to the other device via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the GO.

[0128] S608: Establish a P2P connection with the peer device.

[0129] It is understood that in the embodiment of the present application, after receiving the connection command, the peer device will establish a P2P connection with the GO end, so that data can be transmitted between the two electronic devices.

[0130] In some embodiments, if the peer device is a STA device that connects to a wireless router through a STA channel to access a wireless network, and the STA channel of the electronic device is different from the STA channel of the peer device, when using the WiFi chiplet for P2P communication, the P2P communication channel can be established on the STA channel of the peer device. For example, when a mobile phone is connected to an AP through channel 36 and a computer is connected to an AP through channel 149, when a P2P connection is established between the computer and the mobile phone, a P2P communication can be created on the STA channel of the mobile phone (i.e., channel 36), so that the channel for communication between the mobile phone and the AP is the same as the channel for communication with the computer, and the mobile phone does not need to switch channels back and forth between different channels, which can improve data transmission efficiency.

[0131] In this way, during the process of resetting the WiFi module, data transmission between the two devices can still be maintained.

[0132] S609: Detecting that the WiFi module is reset successfully.

[0133] It can be understood that in the embodiment of the present application, when the recovery time of the operating system resetting the WiFi module is relatively long (for example, greater than or equal to 1s), it is necessary to detect whether the reset of the WiFi module is successful.

[0134] S610: Determine whether the WiFi chip meets the network transmission requirements of the smart interconnection service. If yes, proceed to S611; if no, proceed to S612.

[0135] It can be understood that in the embodiment of the present application, when the recovery time of the operating system resetting the WiFi module is long (for example, greater than or equal to 1s), when it is detected that the WiFi module is reset successfully, it is necessary to determine whether the WiFi chip meets the network transmission delay (that is, the time for data to be transmitted from the sending end to the receiving end) and throughput (that is, the amount of data transmitted per unit time) requirements of the smart interconnection service. If the requirements are met, go to S611 and keep establishing a transmission channel on the WiFi chip; if the requirements are not met, go to S612 and switch to the WiFi main chip to establish a WiFi direct transmission channel with the opposite device.

[0136] In some embodiments, for example, if only a small number of pictures are transmitted between the computer and the mobile phone, the network transmission rate requirement is relatively low; if a large number of videos need to be transmitted between the computer and the mobile phone, a higher data transmission rate requirement is placed on the data transmission rate.

[0137] S611: Keep establishing a transmission channel on the WiFi chiplet.

[0138] It can be understood that in the embodiments of the present application, if the WiFi chip can meet the requirements of the smart interconnection service for network transmission delay and throughput, the transmission channel can continue to be established on the WiFi chip. For example, if only a small number of pictures are transmitted between the computer and the mobile phone, the P2P communication established between the computer's WiFi chip and the mobile phone can continue to be maintained.

[0139] S612: Switch to the WiFi main chip to establish a WiFi direct transmission channel with the peer device.

[0140] It can be understood that in the embodiment of the present application, if the WiFi chip cannot meet the requirements of the smart interconnection service for network transmission delay and throughput, the operating system will switch to the WiFi main chip to establish a WiFi direct transmission channel with the peer device.

[0141] In some embodiments, the operating system of the electronic device can create a SoftAP in the operating system interface using the same SSID, password, and working channel as used when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module; then send a connection command to the peer device via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the SoftAP; after receiving the connection command, the peer device will first disconnect from the GO end of the electronic device, and then re-establish a WiFi direct transmission channel with the SoftAP.

[0142] In this way, through the above process, when the operating system resets the WiFi module, both electronic devices can continue to transmit data, thereby improving the user experience.

[0143] The following takes the electronic device as a computer and the peer device as a mobile phone as an example to briefly introduce the device interaction when the recovery time of resetting the WiFi module is less than 1s. Figure 7 A schematic diagram of an interaction process in an embodiment of the present application is shown. Specifically, Figure 7 The method shown includes the following steps:

[0144] 701: A WiFi direct transmission channel is established between the computer and the mobile phone.

[0145] It can be understood that in the embodiment of the present application, the computer can be used as a SoftAP, and the mobile phone can be used as a GC to connect to the SoftAP to establish a transmission link of the WiFi direct transmission channel.

[0146] In some embodiments, the role of SoftAP is similar to that of a wireless access point, GC implements the function of a terminal device, and the connection between GC and SoftAP is similar to the connection between a terminal device and a wireless router.

[0147] 702: The computer detected an operating system 4003 event.

[0148] It can be understood that in the embodiment of the present application, when the 4003 event of the computer operating system is detected, that is, the network environment when the computer is accessing the Internet as a STA device changes, such as the network signal becomes worse, the Internet cannot be accessed, or the network rate becomes low, the computer operating system will detect that the network connection is limited and attempt to recover automatically.

[0149] 703: The computer detects that the WiFi module is reset successfully.

[0150] It is understandable that the computer operating system can detect that the operation of resetting the WiFi module is successful.

[0151] 704: The computer creates a SoftAP.

[0152] It can be understood that in the embodiment of the present application, after detecting that the WiFi module is successfully reset, the computer operating system can create a SoftAP using the same SSID, password, and working channel as when establishing a WiFi direct transmission channel with the peer device before resetting the WiFi module.

[0153] 705: The computer sends a quick reconnect command to the mobile phone via Bluetooth.

[0154] It can be understood that in the embodiment of the present application, after successfully creating the SoftAp, the computer can send a quick reconnection command to the mobile phone via Bluetooth, wherein the quick reconnection command includes information such as the SSID, password, working channel, and BSSID of the SoftAP.

[0155] 706: A WiFi direct transmission channel is established between the computer and the mobile phone.

[0156] It can be understood that in the embodiment of the present application, after receiving the fast reconnection command, the mobile phone will establish a WiFi direct transmission channel with the SoftAP.

[0157] In this way, through the above-mentioned interactive process, after resetting the WiFi module, the WiFi direct transmission channel between the two electronic devices can be automatically restored, so that data transmission can be performed between the two electronic devices.

[0158] The following takes the electronic device as a computer and the peer device as a mobile phone as an example to briefly introduce the device interaction when the recovery time of resetting the WiFi module is greater than or equal to 1s and the electronic device has a built-in WiFi chip. Figure 8 A schematic diagram of an interaction process in an embodiment of the present application is shown. Specifically, Figure 8 The method shown includes the following steps:

[0159] 801: A WiFi direct transmission channel is established between the computer and the mobile phone.

[0160] It can be understood that in the embodiment of the present application, the computer can be used as a SoftAP, and the mobile phone can be used as a GC to connect to the SoftAP to establish a transmission link of the WiFi direct transmission channel.

[0161] In some embodiments, the role of SoftAP is similar to that of a wireless access point, GC implements the function of a terminal device, and the connection between GC and SoftAP is similar to the connection between a terminal device and a wireless router.

[0162] 802: The computer detected an operating system 4003 event.

[0163] It can be understood that in the embodiment of the present application, when the 4003 event of the computer operating system is detected, that is, the network environment when the computer is accessing the Internet as a STA device changes, such as the network signal becomes worse, the Internet cannot be accessed, or the network rate becomes low, the computer operating system will detect that the network connection is limited and attempt to recover automatically.

[0164] 803: Computer creates GO using WiFi chiplet.

[0165] It can be understood that in the embodiment of the present application, if the recovery time of the operating system to reset the WiFi module is relatively long (for example, greater than or equal to 1s), during the process of resetting the WiFi module, the GO end of the P2P communication can be created through the WiFi chip.

[0166] In some embodiments, when creating a GO, the same SSID, password, and working channel as those used when establishing a WiFi direct transmission channel with the mobile phone before resetting the WiFi module can be used to create the GO.

[0167] In some embodiments, in P2P communication, the role of GO is similar to that of a wireless access device, GC implements the function of a terminal device, and the connection between GC and GO is similar to the connection between a terminal device and a wireless router.

[0168] 804: The computer sends a connection command to the mobile phone via Bluetooth.

[0169] It can be understood that in the embodiment of the present application, after the computer completes the creation of the GO, a connection command can be sent to the mobile phone via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the GO.

[0170] 805: A P2P connection is established between the computer and the mobile phone.

[0171] It can be understood that in the embodiment of the present application, after the mobile phone receives the connection command, it will establish a P2P connection with the GO end.

[0172] In this way, during the process of resetting the WiFi module, data transmission between the two devices can still be maintained.

[0173] 806: The computer detects that the WiFi module is successfully reset.

[0174] It is understandable that the computer operating system can detect that the operation of resetting the WiFi module is successful.

[0175] 807: The computer creates a SoftAP.

[0176] It can be understood that in the embodiment of the present application, after detecting that the WiFi module is successfully reset, if the WiFi chip cannot meet the requirements of the smart interconnection service for network transmission delay and throughput, the computer operating system can use the same SSID, password, and working channel as before resetting the WiFi module to establish a WiFi direct transmission channel with the mobile phone to create a SoftAP.

[0177] 808: The computer sends a connection command to the mobile phone via Bluetooth.

[0178] It can be understood that in the embodiment of the present application, after successfully creating the SoftAp, the computer can send a connection command to the mobile phone via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the SoftAP.

[0179] 809: A WiFi direct transmission channel is established between the computer and the mobile phone.

[0180] It can be understood that after receiving the connection command, the mobile phone will first disconnect from the computer GO end, and then re-establish the WiFi direct transmission channel with the SoftAP.

[0181] In this way, through the above interaction process, when the operating system resets the WiFi module, the electronic devices of both parties can continue to transmit data, thereby improving the user experience.

[0182] The following takes the electronic device as a computer and the counterpart device as a mobile phone as an example to briefly introduce the device interaction when the WiFi chip cannot meet the network transmission requirements of the smart interconnection business. Fig. 9 A schematic diagram of an interaction process in an embodiment of the present application is shown. Specifically, Fig. 9 The method shown includes the following steps:

[0183] 901: A P2P connection is established between the computer and the mobile phone.

[0184] It can be understood that in the embodiment of the present application, the computer can create a GO through the WiFi chiplet, and the mobile phone can connect to the GO as a GC to establish a P2P connection.

[0185] In some embodiments, in P2P communication, the role of GO is similar to that of a wireless access device, GC implements the function of a terminal device, and the connection between GC and GO is similar to the connection between a terminal device and a wireless router.

[0186] 902: The computer detects that the WiFi module is reset successfully.

[0187] It is understandable that the computer operating system can detect that the operation of resetting the WiFi module is successful.

[0188] 903: The computer creates a SoftAP.

[0189] It can be understood that in the embodiment of the present application, after detecting that the WiFi module is successfully reset, if the WiFi chip cannot meet the requirements of the smart interconnection service for network transmission delay and throughput, the computer operating system can use the same SSID, password, and working channel as before resetting the WiFi module to establish a WiFi direct transmission channel with the mobile phone to create a SoftAP.

[0190] 904: The computer sends a connection command to the mobile phone via Bluetooth.

[0191] It can be understood that in the embodiment of the present application, after successfully creating the SoftAp, the computer can send a connection command to the mobile phone via Bluetooth, wherein the connection command includes information such as the SSID, password, working channel, and BSSID of the SoftAP.

[0192] 905: GC connects to SoftAP.

[0193] It can be understood that after receiving the connection command, the mobile phone will first disconnect from the computer GO end, and then reconnect with the SoftAP.

[0194] 906: A WiFi direct transmission channel is established between the computer and the mobile phone.

[0195] It can be understood that after the mobile phone reconnects with the SoftAP, it can reestablish the WiFi direct transmission channel with the computer.

[0196] In this way, through the above-mentioned interactive process, after the operating system resets the WiFi module, the electronic devices of both parties can continue to transmit data, and at the same time can meet the network transmission requirements of the smart interconnection business and improve the user experience.

[0197] The following is based on Fig.10 The interaction process between electronic devices when establishing a WiFi direct transmission channel is described. Specifically, Fig.10 The method shown includes the following steps:

[0198] 1001: GC sends a probe request to SoftAP.

[0199] It can be understood that when a WiFi direct transmission channel needs to be established between two electronic devices, the GC will send a probe request broadcast message, which contains the identity information and related parameters of the GC. After receiving the probe request, the SoftAP can respond to or ignore the request according to its configuration and policy.

[0200] In some embodiments, for example, a computer can be used as a SoftAP, and a mobile phone can be used as a GC to connect to the SoftAP to establish a transmission link of a WiFi direct transmission channel. The role of the SoftAP is similar to that of a wireless access point, and the GC implements the function of a terminal device. The connection of the GC to the SoftAP is similar to the connection of a terminal device to a wireless router.

[0201] 1002: The SoftAP sends a probe response to the GC.

[0202] It can be understood that after SoftAP receives the probe request from GC, if SoftAP chooses to respond to the probe request, it will reply a probe response message to GC, where the probe response message contains the identity information of SoftAP, supported network features and related information. After that, after GC receives the probe response, it can determine the applicable conditions for establishing a connection with SoftAP through the response and further proceed with the connection process.

[0203] In addition, the above steps 1001 and 1002 are the processes of electronic devices scanning and discovering each other when establishing a WiFi direct transmission channel.

[0204] 1003: GC sends an authentication request to SoftAP.

[0205] It can be understood that after the GC receives the probe response information sent by the SoftAP, the GC will send an identity authentication request (auth request) information to the SoftAP, and the information may include the identity information, encryption algorithm and related parameters of the GC.

[0206] 1004: SoftAP replies with an authentication response to the GC.

[0207] It is understood that after receiving the GC's auth request, the SoftAP can use a pre-shared key or other authentication mechanism to verify the GC's identity. If the GC's identity authentication is successful, the SoftAP will reply with an authentication response (authresponse) to the GC to confirm that the GC has passed the identity authentication.

[0208] In addition, the above steps 1003 and 1004 are the process of identity authentication of the electronic device when establishing the WiFi direct transmission channel.

[0209] 1005: GC sends an association request to SoftAP.

[0210] It can be understood that after the GC receives the auth response information sent by the SoftAP, the GC will send an association request (assoc request) to the SoftAP to request to establish a connection with the SoftAP. The assoc request may include the identity information of the GC, network parameters and other information.

[0211] 1006: The SoftAP sends an association response to the GC.

[0212] It can be understood that after receiving the assoc request from GC, SoftAP will perform relevant identity authentication and parameter confirmation based on the identity information and parameters therein. If everything is normal, SoftAP will reply to GC with an assocresponse message, indicating that the association is successful, ensuring that GC obtains network access rights.

[0213] In addition, the above steps 1005 and 1006 are the process of associating electronic devices when establishing a WiFi direct transmission channel.

[0214] 1007: SoftAP sends the first part of the extended authentication protocol local area network key (Eapol Key) (M1: Eapol Key (ANonce)) to the GC.

[0215] It can be understood that after SoftAP sends the association response information to GC, SoftAP will continue to send the first part of authentication information (M1: Eapol Key (ANonce)) to GC, where Eapol is a protocol used for authentication on the local area network. In the process of establishing a WiFi direct transmission channel, Eapol messages are used for authentication and key exchange between GC and SoftAP; ANonce is a random number. SoftAP passes ANonce to GC so that GC can generate a shared key and perform subsequent authentication and encryption operations to ensure the communication security and reliability between SoftAP and GC.

[0216] 1008: GC sends the second part of the Eapol Key information (M2: Eapol Key (SNonce, message integrity code)) to the SoftAP.

[0217] It can be understood that after GC receives the first part of Eapol authentication information sent by SoftAP, GC will send the second part of Eapol authentication information (M2: Eapol Key (SNonce, message integrity code)) to SoftAP for identity authentication and key negotiation between GC and SoftAP. Among them, SNonce is a random number; the message integrity code is used to verify the integrity of the message during transmission to prevent tampering or damage.

[0218] 1009: SoftAP sends the third part of the Eapol Key information (M3: Eapol Key (encryption key, message integrity code)) to the GC.

[0219] It can be understood that after SoftAP receives the M2 authentication information sent by GC, SoftAP will send the third part of Eapol authentication information (M3: Eapol Key (encryption key, message integrity code)) to GC. Among them, the encryption key is used for encryption and decryption operations of subsequent data transmission. The message integrity code is used to verify the integrity of the message during transmission to prevent tampering or damage.

[0220] 1010: GC sends the fourth part of the Eapol Key information (M4: Eapol Key (message integrity code)) to the SoftAP.

[0221] It can be understood that after GC receives the M3 authentication information sent by SoftAP, if it successfully verifies the received encryption key and message integrity code, it will send the fourth part of Eapol's authentication information (M4: Eapol Key (message integrity code)) to SoftAP as the final confirmation.

[0222] In some embodiments, after receiving the M4 message, the SoftAP will verify the message integrity code to ensure that the message integrity code is consistent with the previously sent message. If the verification passes, the SoftAP will confirm the success of the four authentications and mark the establishment of a secure connection between the two electronic devices.

[0223] 1011: Dynamic Host Configuration Protocol (DHCP) interaction is performed between the GC and the SoftAP.

[0224] It can be understood that after the GC and the SoftAP complete four authentications, the GC requests an Internet Protocol (IP) address and other network configuration information from the SoftAP by using DHCP so that it can successfully connect to the network and communicate with other devices.

[0225] 1012: Address Resolution Protocol (ARP) interaction is performed between the GC and the SoftAP.

[0226] It can be understood that when a WiFi direct transmission channel is established between the GC and the SoftAP, the physical address of the other electronic device can be obtained by using the ARP protocol to achieve correct transmission of data packets on the local area network.

[0227] Based on the above interaction process, a WiFi direct transmission channel can be successfully established between two electronic devices.

[0228] It can be understood that the electronic devices (local devices and peer devices) in the embodiments of the present application can be any electronic devices such as computers, mobile phones, virtual reality (VR) devices, tablet computers, wearable devices, augmented reality (AR) devices, laptop computers, etc. The form of the electronic devices is not specifically limited in the embodiments of the present application.

[0229] like Fig.11 As shown, a hardware structure diagram of an electronic device 1100 according to an embodiment of the present application is exemplified. Fig.11 As shown, the electronic device 1100 may include a processor 110, a power module 140, a memory 180, a mobile communication module 130, a wireless communication module 120, a sensor module 190, an audio module 150, a camera 170, an interface module 160, a button 101, a display screen 102, and a touch screen 103, etc.

[0230] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute the only possible implementation method for the electronic device 1100. In other embodiments of the present application, the electronic device 1100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0231] The processor 110 may include one or more processing units, for example, a processing module or processing circuit including a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor, a microprocessor (MCU), an artificial intelligence (AI) processor, or a programmable logic device (FPGA). Among them, different processing units may be independent devices or integrated into one or more processors. A storage unit may also be provided in the processor 110 for storing instructions and data. In some embodiments, the storage unit in the processor 110 is a cache memory 180, which may store instructions or data that the processor 110 has just used or circulated. If the processor 110 needs to use the instruction or data again, it may be directly called from the storage unit, thereby avoiding repeated access, reducing the waiting time of the processor 110, and thus improving the efficiency of the system.

[0232] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0233] It can be understood that in the embodiment of the present application, the processor can be used to execute the method steps performed by the local device and the opposite device in the communication method of the present application.

[0234] The power module 140 may include a power source, a power management component, etc. The power source may be a battery. The power management component is used to manage the charging of the power source and the power supply of the power source to other modules. In some embodiments, the power management component includes a charging management module and a power management module. The charging management module is used to receive charging input from the charger; the power management module is used to connect the power source, and the charging management module is connected to the processor 110. The power management module receives input from the power source and / or the charging management module, and supplies power to the processor 110, the display screen 102, the camera 170, and the wireless communication module 120.

[0235] The mobile communication module 130 may include, but is not limited to, an antenna, a power amplifier, a filter, a low noise amplifier (LAN), etc. The mobile communication module 130 may provide a solution for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 1100. The mobile communication module 130 may receive electromagnetic waves by an antenna, filter, amplify, and process the received electromagnetic waves, and transmit them to a modulation and demodulation processor for demodulation. The mobile communication module 130 may also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 130 may be arranged in the same device as at least some of the modules of the processor 110.

[0236] The wireless communication module 120 may include an antenna, and transmit and receive electromagnetic waves via the antenna. The wireless communication module 120 may provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (WiFi) networks), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to the electronic device 1100. The electronic device 1100 may communicate with the network and other devices through wireless communication technology.

[0237] In some embodiments, the mobile communication module 130 and the wireless communication module 120 of the electronic device 1100 may also be located in the same module.

[0238] The display screen 102 is used to display a human-computer interaction interface, images, videos, etc. The display screen 102 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light emitting diode (QLED), etc.

[0239] The sensor module 190 may include a proximity light sensor, a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, an electromagnetic wave absorption rate sensor, a sound sensor, and the like.

[0240] The audio module 150 is used to convert a digital audio signal into an analog audio signal output, or to convert an analog audio input into a digital audio signal. The audio module 150 can also be used to encode and decode an audio signal. In some embodiments, the audio module 150 can be arranged in the processor 110, or some functional modules of the audio module 150 can be arranged in the processor 110. In some embodiments, the audio module 150 can include a speaker, an earpiece, a microphone, and an earphone interface.

[0241] The camera 170 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the image signal processing (ISP) to be converted into a digital image signal. The electronic device 1100 can implement the shooting function through the ISP, the camera 170, the video codec, the graphics processor, the display screen 102, and the application processor.

[0242] The interface module 160 includes an external memory interface, a universal serial bus (USB) interface, etc. The external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 1100. The external memory card communicates with the processor 110 through the external memory interface to implement a data storage function. The universal serial bus interface is used for the electronic device 1100 to communicate with other electronic devices.

[0243] In some embodiments, the electronic device 1100 further includes a button 101, a motor, and an indicator. The button 101 may include a volume button, an on / off button, etc. The motor is used to make the electronic device 1100 produce a vibration effect, and different application scenarios (e.g., time reminder, receiving information, alarm clock, game, etc.) may correspond to different vibration feedback effects. The indicator may include a laser indicator, a radio frequency indicator, a light emitting diode (LED) indicator, etc.

[0244] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0245] Program code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor, a microcontroller, an application specific integrated circuit, or a microprocessor.

[0246] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0247] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or by other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, a floppy disk, an optical disk, an optical disk, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier wave, infrared signal digital signal, etc.) using the Internet in an electrical, optical, acoustic or other form of propagation signal. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.

[0248] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

[0249] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.

[0250] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the above elements.

[0251] Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.

Claims

1. A communication method, used in a first electronic device, characterized in that: The method comprises: The first electronic device performs WiFi direct communication with the second electronic device based on the first WiFi chip; During the WiFi direct communication, a reset instruction for the first WiFi chip is detected; The method switches to using the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device.

2. The method according to claim 1, characterized in that The method further comprises: Detecting that the first WiFi chip is successfully reset; If it is determined that the second WiFi chip can meet the network transmission requirements between the first electronic device and the second electronic device, maintaining the WiFi direct communication between the second WiFi chip and the second electronic device in a connected state; If it is determined that the second WiFi chip cannot meet the network transmission requirement between the first electronic device and the second electronic device, WiFi direct communication between the first electronic device and the second electronic device is established based on the first WiFi chip.

3. The method according to claim 2, characterized in that The first electronic device includes an operating system and an application layer, and the application layer includes system applications; The first WiFi chip is controlled based on an operating system of the first electronic device, and the second WiFi chip is controlled based on a system application of the first electronic device.

4. The method according to any one of claims 1 to 3, characterized in that: The switching is to use the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device, including: Using the second WiFi chip to create a group owner end of peer-to-peer communication on the first electronic device; A connection command is sent to the second electronic device, where the connection command is used for the first electronic device to establish WiFi direct communication with the second electronic device.

5. The method according to claim 4, characterized in that The group owner end that uses the second WiFi chip to create a point-to-point communication on the first electronic device includes: A group owner end for point-to-point communication is created on the first electronic device using first information, wherein the first information is communication information when the first electronic device performs WiFi direct communication with a second electronic device based on a first WiFi chip.

6. The method according to claim 5, characterized in that The communication information includes one or more information of a service set identifier, a password, and a working channel.

7. The method according to claim 6, characterized in that The connection command includes the first information and a basic service set identifier corresponding to the first electronic device.

8. The method according to claim 1, characterized in that The switching is to use the second WiFi chip in the first electronic device to establish WiFi direct communication with the second electronic device, including: The first electronic device is connected to the first wireless access device based on the first channel; The second electronic device is connected to the second wireless access device based on the second channel; The second WiFi chip in the first electronic device establishes WiFi direct communication with the second electronic device based on the second channel.

9. The method according to claim 1, characterized in that: The method further comprises: If the first electronic device does not include the second WiFi chip, the first electronic device establishes WiFi direct communication with the second electronic device based on the first WiFi chip when detecting that the first WiFi chip is successfully reset.

10. The method according to claim 9, characterized in that When the first electronic device detects that the first WiFi chip is successfully reset, the first electronic device establishes WiFi direct communication with the second electronic device based on the first WiFi chip, including: Using the first WiFi chip to create a soft access point on the first electronic device; A reconnection command is sent to the second electronic device, where the reconnection command is used for the first electronic device to establish WiFi direct communication with the second electronic device.

11. The method according to any one of claims 1 to 3, characterized in that: The reset time of the first WiFi chip is greater than a first preset time, and the reset time of the first WiFi chip is a minimum time between a default recovery time and an actual detection time for resetting the first WiFi chip.

12. The method according to claim 1, characterized in that The method further comprises: If it is detected within the second preset time that the first WiFi chip is successfully reset, after the first WiFi chip is successfully reset, WiFi direct communication is performed with the second electronic device based on the first WiFi chip; If it is detected within the second preset time that the first WiFi chip has not been reset successfully, the second WiFi chip in the first electronic device is switched to establish WiFi direct communication with the second electronic device.

13. The method according to claim 1, characterized in that The method further comprises: During the process in which the first electronic device performs WiFi direct communication with the second electronic device based on the first WiFi chip, it is detected that the wireless network connection of the first electronic device meets the network reset condition; Reset the WiFi module of the first electronic device.

14. An electronic device, characterized in that: include: A memory and a processor, wherein the memory is used to store instructions executed by one or more processors of the electronic device, and the processor is one of the one or more processors of the electronic device, and is used to execute the communication method described in any one of claims 1-13.

15. A readable storage medium, characterized in that: The readable storage medium stores instructions, and when the instructions are executed on an electronic device, the electronic device executes the communication method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • WIFI (Wireless Fidelity) device and working method and device of WIFI chips in the WIFI device

    CN105848231A

  • Electronic device and operating method thereof

    CN113133134A

  • Mode switching method, device and equipment for WiFi (Wireless Fidelity) chip

    CN113709713A

  • WiFi scanning control method and related device

    CN114867035A

  • Equipment connection method and system, electronic equipment and storage medium

    CN115835416A