A method, apparatus and electronic device for short-range communication

By flexibly switching the working mode according to the antenna isolation, the interference problem when WIFI and Bluetooth share an antenna is solved, improving the system's flexibility and stability and ensuring transmission performance.

CN116321085BActive Publication Date: 2026-04-03HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-19
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

When Wi-Fi and Bluetooth share an antenna, there are issues such as communication lag, latency, and reduced transmission speed, which can negatively impact user experience, especially in scenarios with high real-time requirements.

Method used

Depending on the isolation between the first and second antennas, different operating modes can be flexibly adopted for Bluetooth and WIFI communication, including parallel mode and time-division mode, to reduce interference and maintain transmission performance.

Benefits of technology

This improves the system's flexibility and stability, reduces interference between Wi-Fi and Bluetooth communications, and ensures better transmission performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116321085B_ABST
    Figure CN116321085B_ABST
Patent Text Reader

Abstract

This application applies to the field of communications, providing a method, apparatus, and electronic device for short-range communication. In scenarios where the operating frequency bands of Wi-Fi and Bluetooth communication overlap, different operating modes are flexibly adopted for Bluetooth and Wi-Fi communication based on the isolation degree of the first and second antennas. Specifically, when the isolation degree of the first and second antennas is less than a first isolation threshold, a first parallel mode of communication is used; when the isolation degree of the first and second antennas is less than a second isolation threshold, a time-division mode of communication is used. By employing different operating modes under different isolation degrees, interference between Wi-Fi and Bluetooth communication can be minimized to maintain good transmission performance, thereby improving both system flexibility and system stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communications, and more specifically, to a method, apparatus, and electronic device for short-range communication in the field of communications. Background Technology

[0002] With the development of communication, most current electronic devices support short-range communication with Wireless Fidelity (WIFI) and Bluetooth, and WIFI and Bluetooth share an antenna. During communication, WIFI and Bluetooth compete for the shared antenna and use time-division multiplexing to perform WIFI communication and Bluetooth communication separately, which can cause communication stuttering, latency, and reduced speed.

[0003] Based on this, related technologies propose allowing Bluetooth to use an antenna independent of the Wi-Fi antenna (e.g., a cellular antenna), enabling simultaneous Bluetooth and Wi-Fi communication. Currently, Bluetooth operates at 2.4 GHz. When Wi-Fi and Bluetooth communication occur simultaneously, their operating frequencies largely overlap. Furthermore, with Wi-Fi operating at 2.4 GHz and a bandwidth of only 40 MHz, plus isolation protection bandwidth, the available frequency points for Bluetooth communication are limited, impacting its transmission performance. Additionally, simultaneous Wi-Fi and Bluetooth communication can interfere with each other, affecting their transmission performance, especially in scenarios with high real-time requirements such as video calls or gaming, significantly impacting user experience.

[0004] Therefore, there is an urgent need to provide a technology that can simultaneously meet the transmission requirements of both Wi-Fi and Bluetooth communication. Summary of the Invention

[0005] This application provides a method, apparatus, and electronic device for short-range communication. Under different isolation levels, different working modes can be flexibly adopted for Bluetooth and WIFI communication, which can minimize interference between WIFI and Bluetooth communication and maintain good transmission performance. This not only improves system flexibility but also enhances system stability.

[0006] In a first aspect, a short-range communication method is provided, applied to an electronic device, the electronic device being configured with a first antenna and a second antenna, the first antenna and the second antenna being different, the method comprising:

[0007] It is determined that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication. The parallel mode means using different antennas to perform Bluetooth communication and Wi-Fi communication respectively, and the Bluetooth communication and Wi-Fi communication operate on the same frequency band.

[0008] The operating bandwidth of the electronic device currently using the second antenna for WIFI communication is determined to be the second operating bandwidth;

[0009] When the isolation between the first antenna and the second antenna is less than a first isolation threshold, a first parallel communication mode is used. This first parallel mode indicates that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is a first operating bandwidth, which is less than the second operating bandwidth; or...

[0010] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division mode communication is adopted. The time-division mode means that the second antenna is used to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth. The second isolation threshold is less than the first isolation threshold.

[0011] The short-range communication method provided in this application, when the operating frequency bands of Wi-Fi and Bluetooth communication overlap (e.g., both Wi-Fi and Bluetooth operate at 2.4 GHz), flexibly employs different operating modes for Bluetooth and Wi-Fi communication based on the isolation degree of the first and second antennas. Specifically, when the isolation degree between the first and second antennas is less than a first isolation threshold, a first parallel mode is used for communication; when the isolation degree is less than a second isolation threshold, a time-division mode is used. Since the isolation degree between antennas significantly affects the transmission performance of communication, determining the operating modes of Bluetooth and Wi-Fi communication based on the antenna isolation degree and employing different operating modes under different isolation levels can minimize interference between Wi-Fi and Bluetooth communication to maintain good transmission performance. This not only improves system flexibility but also enhances system stability.

[0012] Furthermore, determining the appropriate operating mode based on isolation when it is determined that the electronic device needs to enter parallel mode can avoid ineffective operations and improve practicality.

[0013] Optionally, the method further includes:

[0014] When the isolation between the first antenna and the second antenna is greater than the first isolation threshold, a second parallel mode of communication is adopted. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the working bandwidth of the WIFI communication is the second working bandwidth.

[0015] The short-range communication method provided in this application embodiment, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, means that the isolation between the first antenna and the second antenna is sufficiently large, and the protection isolation bandwidth will be relatively small. Thus, even if the operating bandwidth of Wi-Fi communication is a large second operating bandwidth, it can still provide suitable bandwidth for Bluetooth communication. Therefore, when electronic devices use the second parallel mode communication, they can effectively reduce interference while meeting the transmission requirements of both Wi-Fi and Bluetooth communication, and Wi-Fi communication can benefit from the large bandwidth.

[0016] Optionally, the step of using a first parallel mode for communication when the isolation between the first antenna and the second antenna is less than a first isolation threshold includes:

[0017] When the isolation between the first antenna and the second antenna is less than the first isolation threshold but greater than the second isolation threshold, the first parallel mode communication is used.

[0018] The short-range communication method provided in this application embodiment designs two isolation thresholds. When the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, a first parallel mode communication is adopted. This avoids the interference problem that may occur when the isolation between the first antenna and the second antenna is too small, and further improves the transmission performance.

[0019] Optionally, determining that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication includes:

[0020] When the communication state of the electronic device meets a first preset condition, it is determined that the electronic device needs to enter the parallel mode; wherein, the first preset condition includes any one of the following:

[0021] The electronic device uses the second antenna for the WIFI communication and is about to conduct the Bluetooth communication; or...

[0022] The electronic device uses the second antenna in a time-division multiplexing manner to perform the WIFI communication and the Bluetooth communication; or...

[0023] The electronic device reuses the second antenna to perform the WIFI communication and the Bluetooth communication in a time-division manner, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

[0024] The short-range communication method provided in this application determines that the electronic device needs to enter parallel mode when the communication state of the electronic device meets the first preset condition, based on the judgment of the first preset condition. This method takes into account common application scenarios and has good applicability.

[0025] Optionally, after adopting a first parallel mode communication when the isolation between the first antenna and the second antenna is less than a first isolation threshold, the method further includes:

[0026] When the communication status of the electronic device meets the second preset condition, it is determined to exit the first parallel mode;

[0027] Set the operating bandwidth of the WIFI communication to the second operating bandwidth.

[0028] The short-range communication method provided in this application embodiment uses a first parallel mode communication method. Since the Wi-Fi communication operates at a first operating bandwidth (e.g., 20MHz), once the first parallel mode is exited, Bluetooth communication has little or no need to compete for resources with Wi-Fi communication, and therefore does not affect Wi-Fi transmission. To maximize the bandwidth benefits for Wi-Fi communication, the operating bandwidth is set from the first operating bandwidth (e.g., 20MHz) to a second operating bandwidth (e.g., 40MHz), allowing continued Wi-Fi communication to benefit from the increased bandwidth.

[0029] Optionally, the second preset condition includes any one of the following:

[0030] The electronic device stops Bluetooth communication; or,

[0031] The electronic device communicates using the first parallel mode, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

[0032] The short-range communication method provided in this application determines that the electronic device needs to exit the first parallel mode when the communication state of the electronic device meets the second preset condition by judging the second preset condition. This method takes into account common application scenarios and has good applicability.

[0033] Optionally, the method further includes:

[0034] Based on the configuration information, the isolation degree between the first antenna and the second antenna is determined, wherein the configuration information is used to indicate the isolation degree between the various antennas configured in the electronic device.

[0035] The short-range communication method provided in this application embodiment can conveniently and quickly determine the antenna isolation degree based on the pre-configured configuration information in the electronic device, thereby improving the processing speed.

[0036] Optionally, the electronic device includes a WIFI module and a first processing module, wherein the WIFI module is configured with the configuration information; and the method further includes:

[0037] The first processing module receives the configuration information sent by the WIFI module;

[0038] Determining the isolation between the first antenna and the second antenna based on the configuration information includes:

[0039] The first processing module determines the isolation degree between the first antenna and the second antenna based on the configuration information.

[0040] Optionally, the step of using a first parallel mode for communication when the isolation between the first antenna and the second antenna is less than a first isolation threshold includes:

[0041] When the isolation between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0042] The first processing module sends first bandwidth information to the WIFI module, the first bandwidth information being used to indicate the first working bandwidth;

[0043] The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can communicate in the first parallel mode.

[0044] Optionally, the step of using time-division communication when the isolation between the first antenna and the second antenna is less than a second isolation threshold includes:

[0045] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode;

[0046] The first processing module sends second bandwidth information to the WIFI module, the second bandwidth information being used to indicate the second working bandwidth;

[0047] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0048] Optionally, the electronic device includes a WIFI module and a first processing module, wherein the first processing module is configured with the configuration information; and the method further includes:

[0049] The WIFI module receives the configuration information sent by the first processing module;

[0050] Determining the isolation between the first antenna and the second antenna based on the configuration information includes:

[0051] The WIFI module determines the isolation between the first antenna and the second antenna based on the configuration information.

[0052] Optionally, the step of using a first parallel mode for communication when the isolation between the first antenna and the second antenna is less than a first isolation threshold includes:

[0053] When the isolation between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode;

[0054] The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can use the first parallel mode for communication.

[0055] Optionally, the step of using time-division communication when the isolation between the first antenna and the second antenna is less than a second isolation threshold includes:

[0056] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode;

[0057] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0058] Optionally, the first antenna can also be used for cellular communication.

[0059] Because existing mobile phones have a large number of cellular antennas in their cellular modules, Bluetooth can reuse these antennas for communication. This allows Bluetooth and Wi-Fi communication to operate in parallel without adding additional antennas; in other words, the electronic device can perform Bluetooth and Wi-Fi communication simultaneously. This design not only saves costs but also eliminates the need for additional space in the electronic device, without affecting its appearance or stability.

[0060] Optionally, the first operating bandwidth is 20MHz and the second operating bandwidth is 40MHz.

[0061] Optionally, the operating frequency band for the WIFI communication and the Bluetooth communication is the 2.4GHz operating frequency band.

[0062] Secondly, a short-range communication method is provided, applied to an electronic device, the electronic device being configured with a first antenna and a second antenna, the first antenna and the second antenna being different, the method comprising:

[0063] Determine whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist. The first Bluetooth service is a service that is about to be launched or is in progress. The first router is used to provide a WIFI network.

[0064] When the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist, the whitelist is searched based on the isolation between the first antenna and the second antenna, the first Bluetooth service, and the first router to determine the target operating mode of Bluetooth communication and Wi-Fi communication, wherein the Wi-Fi communication and the Bluetooth communication operate on the same frequency band; wherein...

[0065] The whitelist includes four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations, each combination including one Bluetooth service, one router, one isolation range, and one operating mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding operating mode, and the target operating mode is any one of the three operating modes.

[0066] The three operating modes include: time-division mode, first parallel mode, and second parallel mode. The time-division mode means that the second antenna is used in a time-division manner for Bluetooth communication and WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth. The first parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the first operating bandwidth. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth, which is greater than the first operating bandwidth.

[0067] The short-range communication method provided in this application introduces a whitelist, which contains M combinations. Each combination includes a Bluetooth service, a router, an isolation range, and a working mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding working mode. Thus, if the first Bluetooth service and the first router are recorded in the whitelist, the electronic device can determine the corresponding target working mode from the whitelist based on the isolation of the first Bluetooth service, the first router, and the first and second antennas. This target working mode, determined based on multiple dimensions (router, Bluetooth service, isolation), can minimize interference between Wi-Fi and Bluetooth communication to maintain good transmission performance, improving both system flexibility and stability. Furthermore, since the corresponding target working mode can be quickly found based on the whitelist content, the processing procedure is effectively simplified, improving processing efficiency.

[0068] Optionally, before determining whether the first Bluetooth service and the first router belong to the Bluetooth services and routers recorded in the whitelist, the method further includes:

[0069] The communication state of the electronic device is determined to meet a first preset condition, wherein the first preset condition includes any one of the following:

[0070] The electronic device uses the second antenna for the WIFI communication and is about to conduct the Bluetooth communication; or...

[0071] The electronic device uses the second antenna in a time-division multiplexing manner to perform the WIFI communication and the Bluetooth communication; or...

[0072] The electronic device reuses the second antenna to perform the WIFI communication and the Bluetooth communication in a time-division manner, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

[0073] The short-range communication method provided in this application determines whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist when the communication status of the electronic device meets the first preset condition, by judging the first preset condition. This can avoid invalid operations and improve practicality. In addition, the first preset condition takes into account common application scenarios and has good applicability.

[0074] Optionally, the target operating mode is the first parallel mode; and the method further includes:

[0075] When the communication status of the electronic device meets the second preset condition, it is determined to exit the first parallel mode;

[0076] Set the operating bandwidth of the WIFI communication to the second operating bandwidth.

[0077] The short-range communication method provided in this application embodiment uses a first parallel mode communication method. Since the Wi-Fi communication operates at a first operating bandwidth (e.g., 20MHz), once the first parallel mode is exited, Bluetooth communication has little or no need to compete for resources with Wi-Fi communication, and therefore does not affect Wi-Fi transmission. To maximize the bandwidth benefits for Wi-Fi communication, the operating bandwidth is set from the first operating bandwidth (e.g., 20MHz) to a second operating bandwidth (e.g., 40MHz), allowing continued Wi-Fi communication to benefit from the increased bandwidth.

[0078] Optionally, the second preset condition includes any one of the following:

[0079] The electronic device stops Bluetooth communication; or,

[0080] The electronic device communicates using the first parallel mode, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

[0081] The short-range communication method provided in this application determines that the electronic device needs to exit the first parallel mode when the communication state of the electronic device meets the second preset condition by judging the second preset condition. This method takes into account common application scenarios and has good applicability.

[0082] Optionally, the method further includes:

[0083] Obtain the whitelist from the server.

[0084] Optionally, the first operating bandwidth is 20MHz and the second operating bandwidth is 40MHz.

[0085] Thirdly, a short-range communication method is provided, applied in a chip, said chip being configured in an electronic device, said electronic device being configured with a first antenna and a second antenna, the first antenna and the second antenna being different, the method comprising:

[0086] When the electronic device needs to enter a parallel mode of Bluetooth and Wi-Fi communication, and the current operating bandwidth of the electronic device using the second antenna for Wi-Fi communication is the second operating bandwidth, if the isolation between the first antenna and the second antenna is less than a first isolation threshold, the electronic device is controlled to use a first parallel mode for communication. The first parallel mode indicates using the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the first operating bandwidth, which is less than the second operating bandwidth; or...

[0087] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the electronic device is controlled to use time-division mode communication. The time-division mode means that the second antenna is reused to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth, and the second isolation threshold is less than the first isolation threshold.

[0088] The parallel mode means using different antennas for Bluetooth communication and WIFI communication respectively.

[0089] Optionally, the method further includes:

[0090] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the first working bandwidth, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device is controlled to use a second parallel mode for communication. The second parallel mode means using the first antenna for Bluetooth communication and using the second antenna for WIFI communication, and the working bandwidth of the WIFI communication is the second working bandwidth.

[0091] Optionally, the control of the electronic device employs a first parallel mode communication, including:

[0092] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, if the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, the electronic device is controlled to use the first parallel mode for communication.

[0093] Optionally, the method further includes:

[0094] Based on the configuration information, the isolation degree between the first antenna and the second antenna is determined, wherein the configuration information is used to indicate the isolation degree between the various antennas configured in the electronic device.

[0095] Optionally, the chip includes a first processing module, the electronic device includes a WIFI module; and the method further includes:

[0096] The first processing module receives the configuration information sent by the WIFI module;

[0097] Determining the isolation between the first antenna and the second antenna based on the configuration information includes:

[0098] The first processing module determines the isolation degree between the first antenna and the second antenna based on the configuration information.

[0099] Optionally, the control of the electronic device employs a first parallel mode communication, including:

[0100] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0101] The first processing module sends first bandwidth information to the WIFI module. The first bandwidth information is used to indicate the first working bandwidth so that the WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, thereby controlling the electronic device to use the first parallel mode for communication.

[0102] Optionally, the control of the electronic device employs time-division communication, including:

[0103] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode.

[0104] The first processing module sends second bandwidth information to the WIFI module. The second bandwidth information is used to indicate the second working bandwidth so that the WIFI module maintains the working bandwidth of the WIFI communication at the second working bandwidth, thereby controlling the electronic device to use the time-division mode for communication.

[0105] Optionally, the chip includes a WIFI module, the electronic device includes a first processing module; and the method further includes:

[0106] The WIFI module receives the configuration information sent by the first processing module;

[0107] Determining the isolation between the first antenna and the second antenna based on the configuration information includes:

[0108] The WIFI module determines the isolation between the first antenna and the second antenna based on the configuration information.

[0109] Optionally, the control of the electronic device employs a first parallel mode communication, including:

[0110] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0111] The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can use the first parallel mode for communication.

[0112] Optionally, the control of the electronic device employs time-division communication, including:

[0113] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode.

[0114] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0115] Optionally, the first operating bandwidth is 20MHz and the second operating bandwidth is 40MHz.

[0116] Fourthly, an electronic device is provided for performing the methods provided in the first, second, or third aspects described above. Specifically, the electronic device may include modules for performing any possible implementation of the first, second, or third aspects described above.

[0117] Fifthly, an electronic device is provided, including a processor. The processor is coupled to a memory and can be used to execute instructions in the memory to implement the methods in any of the possible implementations of the first, second, or third aspects described above. Optionally, the electronic device further includes a memory. Optionally, the device further includes a communication interface, to which the processor is coupled.

[0118] In a sixth aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a device, causes the device to implement the method in any one of the possible implementations of the first, second, or third aspects described above.

[0119] In a seventh aspect, a computer program product comprising instructions is provided, which, when executed by a computer, cause a device to implement the method in any of the possible implementations of the first, second, or third aspects described above.

[0120] Eighthly, a chip is provided, comprising: an input interface, an output interface, a processor, and a memory, wherein the input interface, the output interface, the processor, and the memory are connected via an internal connection path, and the processor is configured to execute code in the memory, wherein when the code is executed, the processor is configured to execute a method in any of the possible implementations of the first, second, or third aspects described above. Attached Figure Description

[0121] Figure 1 This is a schematic block diagram of the electronic device provided in the embodiments of this application.

[0122] Figure 2 This application provides a schematic block diagram of a communication system.

[0123] Figure 3 This is a schematic block diagram of an electronic device with shared antenna for WIFI and Bluetooth provided in the embodiments of this application.

[0124] Figure 4 This is a timing diagram of WIFI and Bluetooth communication when sharing an antenna, as provided in the embodiments of this application.

[0125] Figure 5 This is a schematic block diagram of an electronic device using an independent antenna for WIFI and Bluetooth, as provided in the embodiments of this application.

[0126] Figure 6 This is a schematic flowchart illustrating a short-range communication method provided in an embodiment of this application.

[0127] Figure 7 This is an exemplary flowchart illustrating the process by which an electronic device connects to a Bluetooth module and a first antenna, as provided in an embodiment of this application.

[0128] Figure 8 and Figure 9 These are schematic diagrams showing the states of various devices within the electronic device before and after the switching, as provided in the embodiments of this application.

[0129] Figure 10 This is another schematic flowchart of a short-range communication method provided in an embodiment of this application.

[0130] Figure 11 This is another exemplary flowchart of a short-range communication method provided in the embodiments of this application.

[0131] Figure 12 This is another schematic flowchart of a short-range communication method provided in an embodiment of this application.

[0132] Figure 13 This is another schematic flowchart of a short-range communication method provided in an embodiment of this application.

[0133] Figure 14 This is another schematic flowchart of a short-range communication method provided in an embodiment of this application.

[0134] Figure 15 This is another schematic flowchart of a short-range communication method provided in an embodiment of this application.

[0135] Figure 16 This is another illustrative flowchart of a short-range communication method provided in the embodiments of this application.

[0136] Figure 17 This is an exemplary block diagram of the electronic device provided in the embodiments of this application.

[0137] Figure 18 A schematic structural diagram of an electronic device provided in the embodiments of this application. Detailed Implementation

[0138] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0139] The technical solutions of this application are applicable to various electronic devices that support Wi-Fi and Bluetooth. For example, the electronic device may be a mobile phone, smartwatch, smart bracelet, tablet computer, desktop computer, laptop computer, etc. This application does not limit the specific type of electronic device.

[0140] Figure 1 This is an exemplary block diagram of the electronic device 100 provided in this application embodiment. The electronic device 100 may include a processor 110, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and sensor module 180. Optionally, the electronic device 100 may further include: an external memory interface, internal memory, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, and other components.

[0141] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0142] Processor 110 may include one or more processing modules, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing modules may be independent devices or integrated into one or more processors.

[0143] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0144] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0145] In this embodiment of the application, when the operating frequency bands of WIFI communication and Bluetooth communication overlap (for example, the operating frequency bands of both WIFI communication and Bluetooth communication are 2.4GHz), the processor 110 can flexibly determine the operating mode of WIFI communication and Bluetooth communication according to actual needs. For example, in some scenarios, WIFI communication and Bluetooth communication work in a time-sharing manner, while in other scenarios, Bluetooth communication and WIFI communication work in parallel using different antennas, and the operating bandwidth of WIFI communication is 40MHz or 20MHz.

[0146] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0147] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0148] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0149] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0150] In the embodiments of the application, the mobile communication module may also be referred to as a cellular module, and the two can be described interchangeably.

[0151] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0152] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (WIFI) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2. In some embodiments, at least some functional modules of the wireless communication module 160 can be housed in processor 110. This application mainly relates to Bluetooth communication and WIFI communication, which are described in detail below.

[0153] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0154] In some embodiments, the Bluetooth module of the wireless communication module 160 can share an antenna with the WIFI module, and realize Bluetooth communication and WIFI communication through time-division multiplexing.

[0155] In some embodiments, the Bluetooth module and the mobile communication module 150 in the wireless communication module 160 share a common antenna to enable simultaneous Bluetooth and WIFI communication.

[0156] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0157] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0158] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0159] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0160] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0161] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0162] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0163] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0164] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0165] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0166] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0167] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0168] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0169] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0170] Figure 2 This is a communication system applied in an embodiment of this application. (Reference) Figure 2 The communication system includes an electronic device 100, a router 200, and a Bluetooth device 300. The electronic device 100 connects to the router 200 via a Wi-Fi network, and simultaneously connects to the Bluetooth device 300 via Bluetooth. The Bluetooth device 300 can be any device capable of Bluetooth connectivity, such as a mobile phone, smartwatch, smart bracelet, tablet computer, desktop computer, laptop computer, Bluetooth gamepad, Bluetooth headset or speaker, Bluetooth lamp, or Bluetooth augmented reality (AR) glasses.

[0171] Taking electronic device 100 as a mobile phone and Bluetooth device 300 as a Bluetooth headset or Bluetooth gamepad as examples. In one possible scenario, Bluetooth device 300 is a Bluetooth headset, and the user is making a video call via Wi-Fi. In this video call scenario, the mobile phone is receiving audio and video data via Wi-Fi, and the mobile phone needs to transmit audio data to the Bluetooth headset. In another possible scenario, Bluetooth device 300 is a Bluetooth gamepad, and the user is playing a game via Wi-Fi. In this game scenario, the control data of the Bluetooth gamepad needs to be transmitted to the mobile phone via Bluetooth, and the game screen data needs to be transmitted to the mobile phone via Wi-Fi.

[0172] Figure 3This is a schematic block diagram of an electronic device with shared antenna for WIFI and Bluetooth, as provided in an embodiment of this application. (Reference) Figure 3 The Bluetooth and Wi-Fi modules are connected via a time-division multiplexed antenna. When the switch is open to the Bluetooth module, the antenna transmits and receives Bluetooth signals; when the switch is open to the Wi-Fi module, the antenna transmits and receives Wi-Fi signals.

[0173] Figure 4 This is a timing diagram of WIFI and Bluetooth communication when sharing an antenna, as provided in an embodiment of this application. (Reference) Figure 4 Bluetooth and Wi-Fi only transmit data during their respective designated time slots; they do not transmit data at other times. In other words, Bluetooth and Wi-Fi operate in a time-sharing manner. Within a given time period, only Bluetooth data or Wi-Fi data can be transmitted, with Bluetooth and Wi-Fi taking turns using time-domain resources.

[0174] Continue with Figure 2 Taking the communication system shown as an example, when Wi-Fi and Bluetooth share an antenna, both audio and video data are transmitted at high speed in video calls or games. Both Bluetooth and Wi-Fi communication have high requirements for transmission service quality, especially real-time performance. In video call scenarios, when the phone is receiving audio and video data via Wi-Fi, and the phone needs to transmit data to the Bluetooth headset, the Wi-Fi audio and video data transmission will be interrupted, causing the user to experience audio or video stuttering. In gaming scenarios, the controller's control data needs to be transmitted to the phone via Bluetooth, while the game screen data is transmitted to the phone via Wi-Fi. There is a conflict between the Wi-Fi transmission between the phone and the router and the Bluetooth transmission between the controller and the phone, resulting in stuttering in the game from the user's perspective.

[0175] It is evident that the existing antenna layout cannot meet users' requirements for wireless performance, because the time-division multiplexing of antennas for Wi-Fi and Bluetooth will lead to the problem of antenna resource contention.

[0176] Based on this, related technologies propose allowing Bluetooth to use an antenna independent of the Wi-Fi antenna. This allows electronic devices to perform Bluetooth and Wi-Fi communication in parallel using different antennas. (Reference) Figure 5 The WIFI module uses antenna 1a for WIFI communication, and the Bluetooth module uses antenna 1b for Bluetooth communication. This significantly increases the available time-domain resources since there is no need for time-sharing between Bluetooth and WIFI communication, thus helping to resolve resource contention issues.

[0177] In some embodiments, if there is sufficient space in the electronic device, a separate antenna can be provided for Bluetooth, which is a Bluetooth-only antenna dedicated to Bluetooth communication.

[0178] In other embodiments, since existing mobile phones have a large number of cellular antennas in their cellular modules, Bluetooth can reuse these antennas for communication. This allows Bluetooth and Wi-Fi communication to operate in parallel without adding additional antennas; that is, the electronic device can perform Bluetooth and Wi-Fi communication simultaneously. This design not only saves costs but also eliminates the need for additional space in the electronic device, without affecting its appearance or stability.

[0179] However, since Bluetooth communication operates at 2.4GHz, when electronic devices use different antennas to conduct Wi-Fi and Bluetooth communication in parallel, and Wi-Fi also operates at 2.4GHz, their operating frequency bands largely overlap. Furthermore, when the bandwidth of Wi-Fi communication at 2.4GHz is 40MHz, if the isolation protection bandwidth is large, there are not many available frequency points for Bluetooth communication, affecting the transmission performance of Bluetooth. In addition, using different antennas to conduct Wi-Fi and Bluetooth communication in parallel can cause mutual interference, affecting the transmission performance of Bluetooth and Wi-Fi, especially in scenarios with high real-time requirements such as video calls or games, which greatly impacts the user experience.

[0180] Based on this, this application proposes that when the operating frequency bands of WIFI communication and Bluetooth communication overlap (for example, both WIFI communication and Bluetooth communication operate at 2.4 GHz), the operating mode of WIFI communication and Bluetooth communication can be flexibly determined according to actual needs. For example, in some scenarios, WIFI communication and Bluetooth communication are performed in a time-division multiplexing manner using multiple antennas, while in other scenarios, Bluetooth communication and WIFI communication are performed in parallel using different antennas. The operating bandwidth of WIFI communication is 40 MHz or 20 MHz.

[0181] It should be noted that the 2.4GHz mentioned in the embodiments of this application refers to an operating frequency band with a bandwidth range of approximately 2.4GHz to 2.48GHz. Currently, both Bluetooth and Wi-Fi communication can operate in the 2.4GHz frequency band.

[0182] In addition, this application also defines three working modes for WIFI communication and Bluetooth communication.

[0183] Time-sharing mode: This mode combines Bluetooth and Wi-Fi communication. The operating bandwidth for Wi-Fi communication is not limited; for example, it can be 40MHz or 20MHz. In this mode, the electronic device reuses antennas for time-sharing Wi-Fi and Bluetooth communication. Alternatively, the electronic device can use different antennas for time-sharing Wi-Fi and Bluetooth communication.

[0184] First parallel mode: A parallel mode for Wi-Fi and Bluetooth communication, with the Wi-Fi communication operating bandwidth being the first operating bandwidth. In this mode, the electronic device uses different antennas to perform Wi-Fi and Bluetooth communication in parallel. For example, the first operating bandwidth is 20MHz.

[0185] Second parallel mode: A parallel mode for Wi-Fi and Bluetooth communication, where the operating bandwidth for Wi-Fi communication is the second operating bandwidth. In this mode, the electronic device uses different antennas to perform Wi-Fi and Bluetooth communication in parallel. For example, the second operating bandwidth is 40MHz.

[0186] In the parallel mode described above, the Bluetooth communication bandwidth generally includes all bandwidth in the operating frequency band except for the Wi-Fi communication bandwidth (20MHz or 40MHz). However, in special cases, the Bluetooth communication bandwidth may also include a small amount of the Wi-Fi communication bandwidth.

[0187] It should be noted that the operating bandwidth for Wi-Fi communication in the three operating modes mentioned above represents the maximum operating bandwidth that Wi-Fi communication can utilize. The actual operating bandwidth used during subsequent Wi-Fi communication may not necessarily be the maximum operating bandwidth; the specific situation depends on the router's configuration. If the router supports bandwidth including the maximum operating bandwidth for Wi-Fi communication, then the actual operating bandwidth used during Wi-Fi communication can be the maximum operating bandwidth. If the router supports bandwidth less than the maximum operating bandwidth, then the actual operating bandwidth used during Wi-Fi communication will be less than the maximum operating bandwidth. For example, if the electronic device specifies a Wi-Fi communication operating bandwidth of 40MHz, but the router only supports a 20MHz operating bandwidth, then the actual operating bandwidth used during Wi-Fi communication will be 20MHz. As another example, if the electronic device specifies a maximum operating bandwidth of 40MHz for Wi-Fi communication, and the router also supports a 40MHz operating bandwidth, then the actual operating bandwidth used during Wi-Fi communication can be 40MHz.

[0188] It should be understood that although the above embodiments of this application are proposed with a 2.4 GHz operating frequency band and a 40 MHz or 20 MHz operating bandwidth, they should not be construed as limiting the embodiments of this application. For example, the operating frequency bands of WIFI communication and Bluetooth communication are not necessarily limited to 2.4 GHz; for future technologies, as long as the operating frequency bands of the two overlap, it is acceptable. Furthermore, the operating bandwidth of WIFI communication is not necessarily limited to 40 MHz or 20 MHz; for future technologies, the operating bandwidth of WIFI communication can also include various possible bandwidths (e.g., 30 MHz, 50 MHz).

[0189] For ease of description, the following text will continue to use the 2.4 GHz operating frequency band and the WIFI communication operating bandwidth including 40 MHz and 20 MHz as examples to provide a detailed description of the embodiments of this application.

[0190] Figure 6 This is a schematic flowchart of a short-range communication method 400 provided in an embodiment of this application. The execution subject of method 400 can be an electronic device, or a processor or chip in the electronic device. For ease of description, an electronic device is used as an example to describe method 400 in detail.

[0191] In step S410, the electronic device determines that it needs to enter Bluetooth standalone transmission mode.

[0192] Bluetooth standalone transmission mode means that the electronic device uses a different antenna for Bluetooth communication than Wi-Fi communication. If the electronic device can be allowed to enter Bluetooth standalone transmission mode based on actual conditions, then the electronic device operates in a parallel mode of Wi-Fi and Bluetooth communication. The parallel mode can be either the first parallel mode or the second parallel mode mentioned above, which will be explained in detail below.

[0193] In this step, the electronic device can determine whether it needs to enter Bluetooth independent transmission mode based on different scenarios.

[0194] In some embodiments, the electronic device is currently conducting Wi-Fi communication but not Bluetooth communication. When Bluetooth communication is required, it determines that it needs to enter the Bluetooth independent transmission state.

[0195] In other embodiments, the electronic device is currently performing time-sharing Bluetooth and Wi-Fi communication. For example, in this embodiment, the electronic device's transmission performance is not very good; therefore, in order to attempt to obtain better transmission performance, the electronic device determines that it needs to enter a Bluetooth-only transmission state.

[0196] In other embodiments, when an electronic device is currently performing time-sharing WIFI and Bluetooth communication, and the priority of the currently executed Bluetooth service (denoted as Bluetooth service A) is lower than the priority of the Bluetooth service to be executed (denoted as Bluetooth service B), the electronic device determines that it has a need to enter the Bluetooth independent transmission state.

[0197] It should be understood that Bluetooth services can be of various types. For example, a Bluetooth service can be any of the following types: a service where an electronic device scans for Bluetooth devices; a service where an electronic device maintains a communication connection with a Bluetooth device but does not transmit Bluetooth data; a service where an electronic device transmits Bluetooth data to a Bluetooth device, wherein the Bluetooth data can be any of the following formats: sub-band coding (SBC), advanced audio coding (AAC), APTX, LDAC, or low-latency hi-definition audio codec (LHDC).

[0198] In one example, the priority of Bluetooth services can be defined by the bitrate of the Bluetooth data. A higher bitrate corresponds to a higher priority, and vice versa. For instance, considering the SBC, AAC, APTX, LDAC, and LHDC formats of Bluetooth data, the bitrate increases sequentially from SBC to LHDC, and the priority of the Bluetooth services increases accordingly. In other words, the SBC format has the lowest bitrate and the corresponding Bluetooth service has the lowest priority, while the LHDC format has the highest bitrate and the corresponding Bluetooth service has the highest priority.

[0199] It is understood that in this embodiment, when the priority of Bluetooth services is low, the requirements for Bluetooth communication in terms of speed and real-time performance are not high, and the impact of Bluetooth communication on Wi-Fi communication is minimal. Therefore, electronic devices can perform Bluetooth and Wi-Fi communication in a time-sharing manner. As the priority of Bluetooth services increases, the requirements for Bluetooth communication in terms of speed and real-time performance also increase. Therefore, ideally, Bluetooth communication can be performed in parallel with Wi-Fi communication, thus creating a need for electronic devices to enter a Bluetooth independent transmission state.

[0200] For example, Bluetooth service A can be a service where electronic devices maintain a communication connection with Bluetooth devices but do not transmit Bluetooth data, while Bluetooth service B can be a service where electronic devices transmit Bluetooth data to Bluetooth devices. Bluetooth data can be in various formats; please refer to the relevant descriptions above for information on Bluetooth data formats. As another example, Bluetooth service A can be Bluetooth data in format A, and Bluetooth service B can be Bluetooth data in format B. For instance, Bluetooth data in format A can be SBC, AAC, or APTX format, while Bluetooth data in format B can be LDAC format.

[0201] It should be understood that the above examples are merely illustrative. Bluetooth service A and Bluetooth service B can be any type of service, as long as Bluetooth service B has a higher priority than Bluetooth service A.

[0202] In step S420, the electronic device determines whether the operating bandwidth of the WIFI communication is 40MHz.

[0203] If the electronic device determines that the operating bandwidth of the WIFI communication is 40MHz, then the electronic device executes step S430.

[0204] If the electronic device determines that the operating bandwidth of the WIFI communication is not 40MHz, then it means that the operating bandwidth of the WIFI communication is 20MHz. It can further determine whether the isolation between the antennas meets the second isolation threshold related to the 20MHz bandwidth. Therefore, the electronic device executes step S440.

[0205] It should be understood that the working bandwidth of WIFI communication mentioned here refers to the current working bandwidth of WIFI communication, which is the bandwidth actually used by the electronic device when it is currently conducting WIFI communication.

[0206] In step S430, the electronic device determines whether the isolation between the first antenna and the second antenna is greater than a first isolation threshold.

[0207] The first antenna is an antenna designated by the electronic device for Bluetooth communication, including one or more antennas; the second antenna is an antenna for Wi-Fi communication, including one or more antennas.

[0208] It should be understood that the first isolation threshold is related to the 40MHz operating bandwidth of WIFI communication.

[0209] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, it means that, within this large threshold, the isolation between the first antenna and the second antenna is sufficiently high to meet the requirements of the second parallel mode. Specifically, it meets the requirement that the electronic device can use different antennas to perform parallel Wi-Fi and Bluetooth communication with a Wi-Fi bandwidth of 40MHz. Thus, the interference to the transmission of these two types of communication is not significant, or in other words, the interference is within an acceptable range. Therefore, when the electronic device determines that the operating mode is the second parallel mode, it can execute steps S460 and S472.

[0210] If the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, it means that the isolation between the first antenna and the second antenna is still not large enough under the threshold of the first isolation threshold, which is a large value, and cannot meet the requirements of the second parallel mode. Therefore, the electronic device executes step S440.

[0211] It should be understood that the electronic device has already determined the first antenna before performing step S430.

[0212] In some embodiments, the first antenna is a cellular antenna. Since cellular communication and Bluetooth communication share an antenna, and the electronic device includes multiple cellular antennas, the first antenna can be determined from multiple cellular antennas based on the idle level of cellular communication and the isolation between the multiple cellular antennas and the second antenna.

[0213] In one example, when cellular communication is not busy, an electronic device can identify the antenna with the highest isolation from the second antenna among multiple cellular antennas as the first antenna.

[0214] In another example, when cellular communication is not busy, if N out of multiple cellular antennas meet the isolation requirement (i.e., the isolation to the second antenna is greater than a preset value), the electronic device can also use the N antennas that meet the isolation requirement as the first antenna, where N is greater than 1. For example, when N = 2, the electronic device has two cellular antennas and the second antenna whose isolation meets the requirement, so both of these cellular antennas can be used as the first antenna.

[0215] In other embodiments, the first antenna is a Bluetooth-only antenna (or simply, a Bluetooth antenna).

[0216] If an electronic device has only one Bluetooth antenna, then that antenna is the first antenna.

[0217] If an electronic device includes multiple Bluetooth antennas, then the electronic device can determine the first antenna from the multiple Bluetooth antennas based on the isolation between the multiple Bluetooth antennas and the second antenna.

[0218] In one example, an electronic device can identify the first antenna as the one with the highest isolation from the second antenna among multiple Bluetooth antennas.

[0219] In another example, an electronic device can use N antennas that meet the isolation requirements from a plurality of Bluetooth antennas as the first antenna.

[0220] It should be understood that the above example of determining the first antenna is only illustrative, and any method that can determine the first antenna is feasible. This application does not limit the embodiments in any way.

[0221] In step S440, if it is determined that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, the electronic device determines whether the isolation between the first antenna and the second antenna is greater than the second isolation threshold.

[0222] The second isolation threshold is less than the first isolation threshold, and the second isolation threshold is related to the 20MHz operating bandwidth of WIFI communication.

[0223] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the second isolation threshold, it means that within the small threshold of the second isolation threshold, the isolation between the first antenna and the second antenna is relatively large, which can meet the requirements of the first parallel mode. That is, it meets the requirement of using different antennas to perform WIFI communication and Bluetooth communication in parallel, and the working bandwidth of WIFI communication is 20MHz. In this way, the interference between the two communications is not significant, or in other words, the interference is within an acceptable range. Therefore, when the electronic device determines that the working mode is the first parallel mode, the electronic device can execute steps S450, S460, and S471.

[0224] It is understandable that when the isolation between antennas is small, there will be greater interference in the transmission process. Therefore, reducing the operating bandwidth of WIFI communication can still provide suitable bandwidth for Bluetooth communication while maintaining a larger isolation protection bandwidth, effectively reducing interference.

[0225] If the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the second isolation threshold, it means that at this small threshold, the isolation between the first antenna and the second antenna is still very small, which cannot meet the requirement of using different antennas to perform WIFI communication and Bluetooth communication in parallel, and the WIFI communication operating bandwidth is 20MHz. Therefore, the electronic device determines that the operating mode is time-division mode, and the electronic device can execute step S473.

[0226] In step S450, if it is determined that the isolation between the first antenna and the second antenna is greater than the second isolation, the electronic device sets the operating bandwidth of WIFI communication to 20MHz.

[0227] If the operating bandwidth of the WIFI communication determined in step S420 is 20MHz, the electronic device continues to maintain the operating bandwidth of WIFI communication at 20MHz. In this case, the electronic device does not need to execute step S450, and directly executes step S460.

[0228] If the working bandwidth of WIFI communication determined in step S420 is 40MHz, the electronic device executes step S450 to change the working bandwidth of WIFI communication from 40MHz to 20MHz.

[0229] It should be understood that the working bandwidth of the WIFI communication set in this step is the maximum bandwidth that WIFI communication can use.

[0230] In step S460, the electronic device connects the Bluetooth module to the first antenna.

[0231] In the embodiments of this application, the way the electronic device connects the Bluetooth module and the first antenna varies slightly depending on the scenario.

[0232] In some embodiments, if the electronic device is currently conducting time-division multiplexing Bluetooth and Wi-Fi communication via the second antenna, or if the electronic device is currently conducting Wi-Fi communication but not Bluetooth communication, and the Bluetooth module is connected to the second antenna by default, then the electronic device connects the Bluetooth module to the first antenna and disconnects the Bluetooth module from the second antenna. Furthermore, if the first antenna is a cellular antenna, the electronic device will disconnect the cellular module from the first antenna simultaneously with connecting the Bluetooth module to the first antenna.

[0233] In other embodiments, if the electronic device is currently performing Wi-Fi communication but not Bluetooth communication, and the Bluetooth module is connected by default to antennas other than the first and second antennas, then the electronic device connects the Bluetooth module to the first antenna and disconnects the Bluetooth module from other antennas. Furthermore, if the other antennas are cellular antennas, the electronic device will also disconnect the cellular module from other antennas while connecting the Bluetooth module to the first antenna.

[0234] Of course, in other embodiments, if the electronic device is currently conducting WIFI communication but not Bluetooth communication, and the Bluetooth module is connected to the first antenna by default, then the electronic device does not need to execute step S460, and can directly execute step S470.

[0235] For ease of description, we will take an example of a Bluetooth module connected to a second antenna, where the first antenna is a cellular antenna. Figure 7 and Figure 8 The process of step S460 is described in detail through the interaction between various components within the electronic device. Other embodiments can be referred to in the following description, and will not be repeated here.

[0236] Figure 7 This is an exemplary flowchart illustrating the process of connecting an electronic device to a Bluetooth module and a first antenna, as provided in an embodiment of this application. This method is a detailed description of step S460 in method 400.

[0237] refer to Figure 7 The electronic device includes a processor, a cellular module, a Bluetooth / Wi-Fi module, and a switch array. Exemplarily, the processor can be an access point (AP). Exemplarily, the cellular module can include a modem or an RF integrated circuit, or it can include a cellular front-end module. The Bluetooth / Wi-Fi module includes a Bluetooth module and a Wi-Fi module, which perform Bluetooth communication and Wi-Fi communication respectively. The switch array is used to connect and switch the antennas corresponding to each module. It should be understood that the cellular module, Bluetooth module, and Wi-Fi module can belong to the same chip or different chips; this example illustrates the integration of the Bluetooth and Wi-Fi modules into a single chip.

[0238] In step S461, the processor generates a first instruction and sends the first instruction to the cellular module to instruct the cellular module to stop cellular communication on the first antenna.

[0239] In step S462, the cellular module generates a second instruction and sends the second instruction to the switch array to instruct the switch array to connect the path from the first antenna to the Bluetooth WIFI module.

[0240] In step S463, the processor generates a third instruction and sends the third instruction to the Bluetooth WIFI module to instruct the Bluetooth WIFI module to switch to Bluetooth independent transmission mode. As a result, the Bluetooth WIFI module changes its internal software, hardware and algorithm configurations to Bluetooth independent transmission mode.

[0241] In step S464, the Bluetooth / Wi-Fi module generates a fourth instruction and sends this fourth instruction to the switch array, instructing the switch array to activate the path from the Bluetooth module to the first antenna. It is understood that in steps S462 and S464, the switch array can also be controlled by a processor.

[0242] Figure 8 and Figure 9 These are schematic diagrams illustrating the states of various components within the electronic device before and after the antenna switching, as provided in the embodiments of this application. The initial states of each internal component of the electronic device before antenna switching are as follows: Figure 8 As shown, for reference Figure 8 The electronic device includes a Bluetooth / Wi-Fi module, a cellular module, a front-end module, a filter, switches 11, 12, and 13, and antennas 21, 22, and 23. Switch 13 is used for time-division multiplexing of antenna 23 for Bluetooth and Wi-Fi communication in the initial state. Switch 13 can be located inside or outside the front-end module. Antenna 21 can be one or more cellular antennas not selected as the first antenna, and antenna 22 is the cellular antenna determined by the electronic device for Bluetooth communication, i.e., the first antenna.

[0243] pass Figure 8 As can be seen from the conduction directions of switches 11 and 12, in the initial state, the cellular module performs cellular communication through antennas 21 and 22, while Bluetooth and Wi-Fi communication use switch 13 to time-division multiplex antenna 23. During step S462, switch 11 connects to the filter and the Bluetooth / Wi-Fi module, and disconnects from the cellular module. During step S464, switch 12 connects to antenna 22 and disconnects from antenna 23. Switch 13 stops the time-division multiplexing switching. Thus, the internal state of the electronic device changes from... Figure 8 Switch to Figure 9 .

[0244] It should be understood that the above example of connecting the Bluetooth module and the first antenna is merely an illustrative example and should not be construed as limiting the embodiments of this application. Any other methods are within the protection scope of the embodiments of this application.

[0245] For ease of description, it is assumed that the routers support bandwidths of 20MHz and 40MHz. After the electronic device determines the final working mode, the working bandwidth used for actual WIFI communication is the same as the working bandwidth in the determined working mode. Then, the electronic device can execute step S471, step S472 or step S473.

[0246] In step S471, the electronic device uses different antennas to perform Bluetooth communication and WIFI communication in parallel, and the operating bandwidth of WIFI communication is 20MHz.

[0247] In this step, the electronic device uses the first antenna for Bluetooth communication and the second antenna for WIFI communication, with the WIFI communication operating at a bandwidth of 20MHz.

[0248] It should be understood that the working mode of WIFI communication and Bluetooth communication in this step is the first parallel mode mentioned above.

[0249] Combining steps S440 to S460 above, if in step S440 the electronic device determines that the isolation between the first antenna and the second antenna is greater than the second isolation threshold, then the electronic device continues to execute steps S450, S460 and S471.

[0250] When the isolation between the first and second antennas is low, there will be significant interference during transmission. Therefore, reducing the operating bandwidth of Wi-Fi communication to 20MHz can still provide suitable bandwidth for Bluetooth communication while maintaining a larger isolation protection bandwidth. This effectively reduces interference when Wi-Fi and Bluetooth communication are performed in parallel, balances the transmission performance of the two communication methods to a certain extent, and maintains the stability of the transmission process as much as possible.

[0251] In step S472, the electronic device uses different antennas to perform Bluetooth and WIFI communication in parallel, and the operating bandwidth of WIFI communication is 40MHz.

[0252] In this step, the electronic device uses the first antenna for Bluetooth communication and the second antenna for WIFI communication, with the WIFI communication operating at a bandwidth of 40MHz.

[0253] It should be understood that the working mode of WIFI communication and Bluetooth communication in this step is the second parallel mode mentioned above.

[0254] In conjunction with step S430 above, if the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, it means that the isolation between the first antenna and the second antenna is large enough. Then, the electronic device executes step S472.

[0255] It should be understood that although the operating bandwidth of Wi-Fi communication is 40MHz, the isolation between the first and second antennas is sufficiently large. Therefore, the isolation protection bandwidth within the 2.4GHz bandwidth range is small. For Bluetooth communication, based on Bluetooth's frequency modulation principle, electronic devices will prioritize bandwidth outside the 40MHz operating bandwidth of Wi-Fi communication, ensuring sufficient bandwidth for Bluetooth communication without affecting its performance. This allows for better transmission performance for both Wi-Fi and Bluetooth communication when they are conducted in parallel, while also allowing Wi-Fi to benefit from the larger bandwidth. For example, the 2.4GHz bandwidth is approximately 80MHz. If the isolation between the antennas is sufficiently large, the isolation protection bandwidth can be 5MHz. Adding this to the 40MHz Wi-Fi operating bandwidth, the available bandwidth for Bluetooth communication can be (80-40-5x2=30(MHz)), sufficient for Bluetooth transmission.

[0256] In step S473, if the isolation between the first antenna and the second antenna is determined to be less than or equal to the second isolation, the electronic device performs WIFI communication and Bluetooth communication in a time-division manner.

[0257] It should be understood that the working mode of WIFI communication and Bluetooth communication in this step is the time-sharing mode mentioned above.

[0258] In this step, because the isolation between the first and second antennas does not meet the requirements for parallel Wi-Fi and Bluetooth communication using different antennas, the interference in Wi-Fi and Bluetooth transmissions is significant, which will greatly affect Wi-Fi and Bluetooth communication. Therefore, in order to minimize the interference to the two communications, Wi-Fi and Bluetooth communication are performed in a time-division manner. Thus, compared to the impact of parallel Wi-Fi and Bluetooth communication, the impact of time-division Wi-Fi and Bluetooth communication is relatively smaller.

[0259] In this step, the operating bandwidth of the Wi-Fi communication is not limited in any way; it can be either 40MHz or 20MHz. However, it is understandable that designing the operating bandwidth of the Wi-Fi communication to be 40MHz allows the Wi-Fi communication to enjoy the benefits of a larger bandwidth and improve the transmission rate.

[0260] In some embodiments, combining steps S420 and S440, in step S420, if the electronic device determines that the operating bandwidth of the WIFI communication is not 40MHz, then the operating bandwidth of the WIFI communication is 20MHz. Therefore, the electronic device executes step S440. If the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the second isolation, then step S473 is executed. At this time, the operating bandwidth of the electronic device for WIFI communication is still 20MHz. In this case, the electronic device can continue to maintain the operating bandwidth of 20MHz for WIFI communication, or, in order to improve the transmission rate, the electronic device can set the operating bandwidth of WIFI communication from 20MHz to 40MHz, so that the operating bandwidth of WIFI communication ultimately becomes 40MHz.

[0261] In some other embodiments, in conjunction with steps S420, S430 and S440, the current operating bandwidth of the WIFI communication is 40MHz. Therefore, in S473, the electronic device can continue to maintain the 40MHz operating bandwidth of the WIFI communication to enjoy the benefits of a large bandwidth.

[0262] Regarding the process of electronic devices performing time-sharing Wi-Fi and Bluetooth communication, in one example, the electronic device uses the same antenna (Wi-Fi antenna) to perform both Wi-Fi and Bluetooth communication in a time-sharing manner. This is a common approach, sharing the antenna through time-sharing multiplexing (e.g., ...). Figure 3 and Figure 4 (As shown).

[0263] In another example, electronic devices use different antennas for time-sharing Wi-Fi and Bluetooth communication. For example... Figure 5 As shown, the WIFI module of the electronic device uses antenna 11 for WIFI communication, and the Bluetooth module uses antenna 12 for Bluetooth communication. WIFI communication and Bluetooth communication are executed in a time-sharing manner, alternately occupying time domain resources.

[0264] In this embodiment of the application, for example, the electronic device is pre-configured with configuration information, which is used to indicate the isolation degree of each antenna. Optionally, the configuration information is also used to indicate a first isolation threshold and a second isolation threshold. For example, the electronic device is pre-configured with this configuration information when it leaves the factory. In implementation, the electronic device can determine the first antenna by obtaining the isolation degree between each antenna based on the configuration information, and obtain the first isolation threshold and the second isolation threshold according to the configuration information, thereby determining the working mode of WIFI communication and Bluetooth communication.

[0265] In some embodiments, if the executing entity of steps S430 and S440 in method 400 is a first processing module (e.g., AP) in an electronic device other than the WIFI module, then the first processing module (e.g., AP) can determine the isolation between each antenna based on the configuration information to determine the first antenna, and determine the first isolation threshold and the second isolation threshold according to the configuration information, thereby determining the operating modes of WIFI communication and Bluetooth communication. After determining the operating modes of WIFI communication and Bluetooth communication, the first processing module (e.g., AP) sends bandwidth information to the WIFI module. This bandwidth information is used to indicate the operating bandwidth of WIFI communication in the finally determined operating mode, so that the WIFI module sets the operating bandwidth of WIFI communication. In step S450, the WIFI module sets the operating bandwidth of WIFI communication to 20MHz based on the above bandwidth information.

[0266] If the first processing module mentioned above is an access point (AP), in one example, if the configuration information is configured in the Wi-Fi module, the Wi-Fi module sends the configuration information to the AP so that the AP can obtain the configuration information. For example, if the Wi-Fi module and the Bluetooth module are integrated into a single chip (hereinafter referred to as the Wi-Fi / Bluetooth chip), the Wi-Fi / Bluetooth chip sends the configuration information to the AP.

[0267] In another example, if the configuration information is configured in the AP, the AP itself can read the configuration information from the AP.

[0268] In another example, if part of the configuration information (e.g., the second isolation threshold) is configured in the WIFI module, and another part of the information (e.g., the isolation of each antenna and the first isolation threshold) is configured in the AP, then the WIFI module sends part of the configuration information to the AP, and the AP reads the other part of the configuration information from the AP itself to obtain the complete configuration information.

[0269] In other embodiments, if the executing entity of steps S430 and S440 in method 400 is a WIFI module in an electronic device, the WIFI module can determine the isolation between each antenna based on the configuration information to determine the first antenna, and determine the first isolation threshold and the second isolation threshold based on the configuration information, thereby determining the working mode of WIFI communication and Bluetooth communication. After determining the working mode of WIFI communication and Bluetooth communication, the working bandwidth of WIFI communication is also determined, and the WIFI module sets the working bandwidth of WIFI communication. Specifically, in step S450, after determining the bandwidth in each step, the WIFI module sets the working bandwidth of WIFI communication to 20MHz.

[0270] For example, if the WIFI module and the Bluetooth module are integrated into a single chip (hereinafter referred to as the WIFI Bluetooth chip), then the execution subject of steps S430 and S440 in method 400 is the WIFI Bluetooth chip.

[0271] In one example, if the configuration information is configured in a first processing module (e.g., AP), the first processing module (e.g., AP) sends the configuration information to the WIFI module so that the WIFI module can obtain the configuration information.

[0272] In another example, if the configuration information is configured in the WIFI module, the WIFI module can read the configuration information itself from the WIFI module.

[0273] In another example, if part of the configuration information (e.g., the second isolation threshold) is configured in the WIFI module, and another part of the information (e.g., the isolation of each antenna and the first isolation threshold) is configured in the AP, then the AP sends the other part of the configuration information to the WIFI module, and the WIFI module reads part of the configuration information from the WIFI module itself to obtain the complete configuration information.

[0274] The process of determining the isolation degree and isolation threshold between antennas based on configuration information to determine the working mode of WIFI communication and Bluetooth communication in other embodiments below is similar to that here, and will not be described again for the sake of brevity.

[0275] It should be understood that the sequence numbers of the above steps do not represent the order in which they are executed; the execution order of each step should be determined by its internal logic. For example, step S460 can be executed in any process after step S440.

[0276] The short-range communication method provided in this application allows for flexible adjustment of the operating modes of Wi-Fi and Bluetooth communication when their operating frequency bands overlap (e.g., both Wi-Fi and Bluetooth operate at 2.4 GHz). This adjustment is based on the isolation between the antennas. Specifically, Wi-Fi and Bluetooth communication can be performed in a time-division multiplexing manner; alternatively, different antennas can be used for parallel Wi-Fi and Bluetooth communication with a Wi-Fi bandwidth of 40 MHz; or, different antennas can be used for parallel Wi-Fi and Bluetooth communication with a Wi-Fi bandwidth of 20 MHz. This flexible adjustment of the operating modes in different scenarios minimizes interference between Wi-Fi and Bluetooth communication and maintains a good transmission rate, thereby ensuring good transmission performance. This not only improves system flexibility but also enhances system stability.

[0277] When electronic devices perform time-division multiplexing of Wi-Fi and Bluetooth communication, for small electronic devices (such as mobile phones and watches), where the isolation between antennas is insufficient, time-division multiplexing of antennas is considered to reduce interference. Furthermore, small electronic devices cannot accommodate more antennas; in most cases, time-division multiplexing of antennas for Wi-Fi and Bluetooth communication is very suitable for small electronic devices.

[0278] When electronic devices use different antennas for parallel Wi-Fi and Bluetooth communication, and the Wi-Fi operating bandwidth is 40MHz, the isolation between the first antenna used for Bluetooth and the second antenna used for Wi-Fi is sufficiently high, resulting in a smaller protection isolation bandwidth. Therefore, even though the Wi-Fi operating bandwidth is 40MHz, it can still provide suitable bandwidth for Bluetooth communication. Thus, while effectively reducing interference, the transmission requirements of both Wi-Fi and Bluetooth communication can be met, and Wi-Fi communication can benefit from its larger bandwidth.

[0279] When electronic devices use different antennas for parallel Wi-Fi and Bluetooth communication, and the Wi-Fi operating bandwidth is 20MHz, the isolation between the first antenna used for Bluetooth communication and the second antenna used for Wi-Fi communication is insufficient but still acceptable. To reduce interference, a larger isolation bandwidth is needed. Thus, by reducing the Wi-Fi operating bandwidth, more bandwidth can be provided for Bluetooth. Therefore, while effectively reducing interference, the transmission requirements of both Wi-Fi and Bluetooth communication can be met.

[0280] Figure 10 This is a schematic flowchart of a short-range communication method 500 provided in an embodiment of this application. Method 500 describes the process of an electronic device exiting Bluetooth independent transmission mode. The main idea is that, when an electronic device is performing both Wi-Fi and Bluetooth communication in parallel, and the Wi-Fi communication bandwidth is 20MHz, the electronic device exits Bluetooth independent transmission mode and restores the Wi-Fi communication bandwidth to 40MHz, so that Wi-Fi communication can enjoy the benefits of higher bandwidth.

[0281] In step S510, the electronic device determines that it is exiting the Bluetooth standalone transmission state.

[0282] In this step, the electronic device can determine whether to exit the Bluetooth standalone transmission state based on different scenarios.

[0283] In some embodiments, the electronic device is no longer conducting Bluetooth communication or has stopped Bluetooth communication.

[0284] In other embodiments, the electronic device is currently performing Bluetooth service C and Wi-Fi service in parallel. When Bluetooth service D needs to be executed, it is determined that it needs to exit the Bluetooth independent transmission state. Here, Bluetooth service C has a higher priority than Bluetooth service D. For a detailed description of the Bluetooth services, please refer to the relevant description above, which will not be repeated here.

[0285] It is understood that in this embodiment, when the priority of Bluetooth services is high, the requirements for Bluetooth communication speed and real-time performance are also high. Therefore, when conditions permit, electronic devices can perform Bluetooth and Wi-Fi communication in parallel, simultaneously meeting the needs of both. When the priority of Bluetooth services decreases, the requirements for Bluetooth communication speed and real-time performance also decrease, and Bluetooth communication has little impact on Wi-Fi communication. Therefore, to avoid consuming unnecessary resources, electronic devices can exit the independent Bluetooth transmission state and perform Bluetooth and Wi-Fi communication in a time-sharing manner.

[0286] In one example, Bluetooth service C can be a service where electronic devices transmit Bluetooth data to Bluetooth devices, and Bluetooth service D can be a service where electronic devices maintain a communication connection with Bluetooth devices but do not transmit Bluetooth data. Bluetooth data can be data in various formats, and the relevant description above can be used as an example for information on Bluetooth data formats.

[0287] In another example, Bluetooth service C transmits Bluetooth data in format C, and Bluetooth service D transmits Bluetooth data in format D. For example, Bluetooth data in format C can be Bluetooth data in LDAC, AAC, or APTX format, while Bluetooth data in format D can be Bluetooth data in SBC format.

[0288] It should be understood that the above examples are merely illustrative, and Bluetooth service C and Bluetooth service D can be any form of service, as long as Bluetooth service C has a higher priority than Bluetooth service D.

[0289] In step S520, the electronic device determines whether the operating bandwidth of the WIFI communication is 20MHz.

[0290] If the electronic device determines that the operating bandwidth of the WIFI communication is 20MHz, then the electronic device executes step S530.

[0291] If the electronic device determines that the working bandwidth of the WIFI communication is not 20MHz, then it means that the working bandwidth of the WIFI communication is 40MHz, and the electronic device executes step S540.

[0292] It should be understood that the working bandwidth of WIFI communication mentioned here refers to the actual bandwidth used by the electronic device when performing WIFI communication.

[0293] In step S530, the electronic device sets the operating bandwidth of WIFI communication to 40MHz.

[0294] Since the current operating bandwidth of Wi-Fi communication is 20MHz, when an electronic device exits Bluetooth independent transmission mode, it means that Bluetooth has no need to compete with Wi-Fi for resources, or only competes for very few resources, and thus does not affect Wi-Fi transmission. Therefore, in order to maximize the benefits of higher bandwidth for Wi-Fi communication, the operating bandwidth of Wi-Fi communication will be changed from 20MHz to 40MHz.

[0295] For a detailed description of how the processor and the Wi-Fi module interact to achieve Wi-Fi communication, please refer to the relevant description of step S450 above. For the sake of brevity, it will not be repeated here. The only difference is that step S450 sets the Wi-Fi communication bandwidth to 20MHz, while here it is set to 40MHz.

[0296] It should be understood that the working bandwidth of the WIFI communication set in this step is the maximum bandwidth that WIFI communication can use.

[0297] In step S540, the electronic device disconnects the Bluetooth module and the second antenna.

[0298] When an electronic device performs both Wi-Fi and Bluetooth communication in parallel, it uses the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication. Therefore, when exiting the Bluetooth independent transmission state, it is necessary to disconnect the Bluetooth module and the second antenna.

[0299] When disconnecting the Bluetooth module and the second antenna, if Bluetooth communication is not to be performed again, the electronic device may not connect the Bluetooth module to any antenna.

[0300] If Bluetooth communication continues after disconnecting the Bluetooth module and the second antenna, or if the electronic device requires the Bluetooth module to maintain a connection with other antennas by default when not in independent Bluetooth transmission mode, then the Bluetooth module needs to be connected to the other antennas again.

[0301] In one example, the electronic device disconnects the Bluetooth module from the second antenna and connects the Bluetooth module to the second antenna. In other words, the electronic device switches the Bluetooth module from the first antenna to the second antenna.

[0302] In this way, if Bluetooth communication continues subsequently, the electronic device will use the second antenna to perform both Wi-Fi and Bluetooth communication in a time-sharing manner. Alternatively, even if Bluetooth communication is not subsequently performed, the electronic device's Bluetooth module will need to maintain a connection with the second antenna by default.

[0303] If the first antenna is a cellular antenna, a detailed description of the process by which the electronic device needs to switch the Bluetooth module from the first antenna to the second antenna can be found in the section above. Figure 8 and Figure 9 The description. Figure 9 This indicates the state in which the Bluetooth module is connected to the first antenna (e.g., antenna 22). Figure 8 Switch the Bluetooth module to the second antenna (e.g., antenna 23) state.

[0304] The short-range communication method provided in this application embodiment, when the electronic device is in Bluetooth independent transmission state, that is, when WIFI communication and Bluetooth communication are executed in parallel and the working bandwidth of WIFI communication is 20MHz, after the electronic device determines to exit the Bluetooth independent transmission state, restores the working bandwidth of WIFI communication to 40MHz, so as to improve the transmission rate of WIFI communication and enable WIFI communication to enjoy the benefits of large bandwidth.

[0305] It should be understood that the sequence numbers of the above steps do not represent the order in which they are executed; the execution order of each step should be determined by its internal logic. For example, step S530 may be executed after step S540.

[0306] Figure 11 This is an exemplary flowchart of a short-range communication method 600 provided in an embodiment of this application. The difference from method 400 is that method 600 prioritizes considering whether the transmission performance of time-division multiplexing of Wi-Fi and Bluetooth communication meets the requirements. If the requirements are not met, it then considers whether the transmission performance of parallel Wi-Fi and Bluetooth communication meets the requirements in conjunction with operating bandwidth and isolation, thereby determining the most suitable operating mode for Wi-Fi and Bluetooth communication.

[0307] In step S610, the electronic device determines that it needs to enter Bluetooth standalone transmission mode.

[0308] For a detailed description of step S610, please refer to the description of step S410 above. For the sake of brevity, it will not be repeated here.

[0309] In step S620, the electronic device determines whether the operating bandwidth of the WIFI communication is 40MHz.

[0310] If the electronic device determines that the working bandwidth of the WIFI communication is 40MHz, then the electronic device executes step S630.

[0311] If the electronic device determines that the working bandwidth of the WIFI communication is not 40MHz, then it means that the working bandwidth of the WIFI communication is 20MHz. Therefore, the electronic device executes step S650.

[0312] In step S630, the electronic device determines whether the transmission performance meets the performance requirements when performing time-division multiplexing of WIFI communication and Bluetooth communication, and the working bandwidth of WIFI communication is 40MHz.

[0313] For example, transmission performance can be characterized by parameters such as the device's transmission rate and transmission latency.

[0314] As mentioned earlier, in the current state, the electronic device may be conducting Wi-Fi communication but not Bluetooth communication, or it may be conducting both Bluetooth and Wi-Fi communication in a time-sharing manner. Considering that in most scenarios, the electronic device may be conducting both Bluetooth and Wi-Fi communication in a time-sharing manner, and the Wi-Fi communication bandwidth is 40MHz, therefore, we will first assess the transmission performance when the electronic device is conducting both types of communication in a time-sharing manner, and the Wi-Fi communication bandwidth is 40MHz.

[0315] If it is determined that the transmission performance of the two types of communication, performed in a time-division manner, meets the performance requirements when the operating bandwidth of the WIFI communication is 40MHz, the electronic device executes step S683. If it is determined that the transmission performance of the two types of communication, performed in a time-division manner, does not meet the performance requirements when the operating bandwidth of the WIFI communication is 40MHz, the electronic device executes step S640.

[0316] In one example, transmission performance is characterized by transmission rate. Correspondingly, the performance requirement can be: the transmission rate is greater than the rate threshold when WIFI communication and Bluetooth communication are performed in a time-division manner and the working bandwidth of WIFI service is 40MHz.

[0317] In another example, transmission performance is characterized by transmission latency. Correspondingly, the performance requirement can be: the transmission latency is greater than the latency threshold when WIFI communication and Bluetooth communication are performed in a time-division multiplexing manner and the WIFI communication bandwidth is 40MHz.

[0318] In this embodiment, considering that in most scenarios, electronic devices may perform Bluetooth communication and WIFI communication in a time-sharing manner, and the working bandwidth of WIFI communication is 40MHz, the transmission performance of the electronic device performing the two communications in a time-sharing manner with the working bandwidth of WIFI communication of 40MHz is compared with the performance requirements. In this way, if the performance requirements are met, the electronic device can continue to perform the two communications in a time-sharing manner according to the current state. Since no additional judgment processing is required, processing time and computing resources are effectively saved. Moreover, the problem of temporary communication disruption caused by switching between the two communication working modes is avoided.

[0319] In step S640, the electronic device determines whether the isolation between the first antenna and the second antenna is greater than a first isolation threshold.

[0320] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device executes steps S670 and S682.

[0321] If the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, the electronic device executes step S650.

[0322] For a detailed description of step S640, please refer to the relevant description in step S430 above, which will not be repeated here.

[0323] In step S650, if it is determined that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, the electronic device determines whether the isolation between the first antenna and the second antenna is greater than the second isolation threshold.

[0324] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the second isolation threshold, the electronic device executes steps S660, S670 and S681.

[0325] If the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the second isolation threshold, the electronic device executes step S683, that is, performs WIFI communication and Bluetooth communication in a time-division manner.

[0326] For a detailed description of step S650, please refer to the relevant description of step S440 above, which will not be repeated here.

[0327] In step S660, if it is determined that the isolation between the first antenna and the second antenna is greater than the second isolation, the electronic device sets the operating bandwidth of WIFI communication to 20MHz.

[0328] For further details regarding step S660, please refer to the description of step S450 above, which will not be repeated here.

[0329] In step S670, the electronic device connects the Bluetooth module to the first antenna.

[0330] For a detailed description of step S670, please refer to the relevant description of step S460 above, which will not be repeated here.

[0331] Similar to method 400, for ease of description, it is assumed that the routers support bandwidths of 20MHz and 40MHz. After the electronic device determines the final working mode, the working bandwidth used for actual WIFI communication is the same as the working bandwidth in the determined working mode. Then, the electronic device can execute step S681, step S682 or step S683.

[0332] In step S681, the electronic device uses different antennas to perform Bluetooth communication and WIFI communication in parallel, and the operating bandwidth of WIFI communication is 20MHz.

[0333] In step S682, the electronic device uses different antennas to perform Bluetooth communication and WIFI communication in parallel, and the operating bandwidth of WIFI communication is 40MHz.

[0334] For a detailed description of steps S681 and S682, please refer to the relevant descriptions of steps S471 and S472 above, which will not be repeated here.

[0335] In step S683, if the isolation between the first antenna and the second antenna is determined to be less than or equal to the second isolation, the electronic device performs WIFI communication and Bluetooth communication in a time-division manner.

[0336] It should be noted that, in conjunction with step S630, if step S683 is determined to be executed in S630, then the working bandwidth of WIFI communication is 40MHz when performing time-sharing WIFI communication and Bluetooth communication.

[0337] For further details regarding step S683, please refer to the description of step S473 above, which will not be repeated here.

[0338] Figure 12 This is an exemplary flowchart of a short-range communication method 700 provided in an embodiment of this application. The difference from method 400 is that in method 700, when an electronic device determines that it needs to enter a Bluetooth independent transmission state, it determines any parallel mode based on the isolation level.

[0339] In step S710, the electronic device determines that it needs to enter Bluetooth independent transmission mode.

[0340] For a detailed description of this step, please refer to the relevant description of step S410, which will not be repeated here.

[0341] In step S720, the electronic device determines whether the isolation between the first antenna and the second antenna is greater than a first isolation threshold.

[0342] It should be understood that steps S720 and S710 can be executed in a different order, and this application embodiment does not impose any limitations.

[0343] As mentioned earlier, the first isolation threshold is related to the 40MHz operating bandwidth of WIFI communication.

[0344] If the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, it means that, within the threshold of the first isolation threshold, the isolation between the first antenna and the second antenna is large enough to meet the requirements of the second parallel mode, that is, to meet the requirement that the electronic device can use different antennas to perform WIFI communication and Bluetooth communication in parallel, and that the working bandwidth of WIFI communication is 40MHz. Therefore, when the electronic device determines that the working mode is the second parallel mode, the electronic device can execute step S731.

[0345] If the electronic device determines that the isolation between the first antenna and the second antenna is less than the first isolation threshold, it means that the isolation between the first antenna and the second antenna is insufficient to meet the requirements of the second parallel mode. Therefore, when the isolation between the first antenna and the second antenna is limited, by reducing the operating bandwidth of the WIFI communication, a suitable bandwidth can be provided for Bluetooth communication as much as possible within a larger isolation protection bandwidth, effectively reducing interference. Therefore, if the electronic device determines that the isolation between the first antenna and the second antenna is less than the first isolation threshold, the operating mode of the electronic device is determined to be the first parallel mode, that is, the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, and the operating bandwidth of WIFI communication is 20MHz. The electronic device can then execute step S732.

[0346] When the isolation between the first antenna and the second antenna is equal to the first isolation threshold, the determined working mode of WIFI communication and Bluetooth communication can be either the first parallel mode or the second parallel mode. No restrictions are imposed here, and it can be flexibly adjusted according to the actual situation.

[0347] In some embodiments, prior to step S720, method 700 may further include: the electronic device determining whether the current operating bandwidth of the WIFI communication is 40MHz.

[0348] If the electronic device determines that the current operating bandwidth of the WIFI communication is 40MHz, then the electronic device executes step S720.

[0349] If the electronic device determines that the current working bandwidth of the WIFI communication is not 40MHz, then it means that the current working bandwidth of the WIFI communication is 20MHz. In this case, the electronic device can skip step S720 and execute step 732.

[0350] In other embodiments, the electronic device may not need to determine the current operating bandwidth of the WIFI communication. After step S710, step S720 is executed to determine a suitable operating mode based on the determination result of step S720.

[0351] In some embodiments, method 700 may further include: connecting an electronic device to a Bluetooth module and a first antenna.

[0352] It should be understood that this step only needs to be performed after step S710 and before step S731 or step S732, and there are no restrictions here. For example, this step can be performed before or after step S720.

[0353] For a detailed description of this step, please refer to the description of step S460 above, which will not be repeated here.

[0354] It should be noted that in some embodiments, if the electronic device is currently conducting WIFI communication but not Bluetooth communication, and the Bluetooth module is connected to the first antenna by default, then the electronic device does not need to connect the Bluetooth module to the first antenna, and can directly execute step S731 or step S732.

[0355] For ease of description, it is assumed that the routers support bandwidths of 20MHz and 40MHz. After the electronic device finally determines the working mode, the working bandwidth used for actual WIFI communication is the same as the working bandwidth in the determined working mode. Then, the electronic device can execute step S731 or step S732.

[0356] In step S731, the electronic device uses different antennas to perform Bluetooth communication and WIFI communication in parallel, and the operating bandwidth of WIFI communication is 40MHz.

[0357] In this step, if the electronic device determines that the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device uses the first antenna for Bluetooth communication and the second antenna for WIFI communication, and the operating bandwidth of the WIFI communication is 40MHz.

[0358] For a detailed description of this step, please refer to the description of step S472 above, which will not be repeated here.

[0359] In step S732, the electronic device uses different antennas to perform WIFI communication and Bluetooth communication in parallel, and the operating bandwidth of WIFI communication is 20MHz.

[0360] In this step, if the electronic device determines that the isolation between the first antenna and the second antenna is less than or equal to the first isolation threshold, the electronic device uses the first antenna for Bluetooth communication and the second antenna for WIFI communication, and the operating bandwidth of the WIFI communication is 20MHz.

[0361] For a detailed description of this step, please refer to the description of step S471 above, which will not be repeated here.

[0362] It is understood that before executing steps S731 and S732, the working bandwidth of WIFI communication has been set to 40MHz corresponding to step S731 or 20MHz corresponding to step S732.

[0363] Since the current working bandwidth of WIFI communication may or may not be the same as the working bandwidth of WIFI communication in the working mode determined by the isolation degree, in fact, when the current working bandwidth of WIFI communication is the same as the working bandwidth of WIFI communication in the working mode determined by the isolation degree, the electronic device does not need to reset the working bandwidth of WIFI communication and can continue to use the previous working bandwidth, which can reduce the processing process.

[0364] Based on this, in conjunction with method 700, which includes the step of the electronic device determining whether the current working bandwidth of the WIFI communication is 40MHz, if the electronic device determines that the current working bandwidth of the WIFI communication is 40MHz, and the final determined working mode is the second parallel mode of step S731 (where the working bandwidth of the WIFI communication is 40MHz), then the electronic device does not need to reset the working bandwidth of the WIFI communication; if the electronic device determines that the current working bandwidth of the WIFI communication is 40MHz, and the determined working mode is the first parallel mode of step S732 (where the working bandwidth of the WIFI communication is 20MHz), then the electronic device needs to modify the working bandwidth of the WIFI communication to 20MHz.

[0365] In method 700, exemplarily, the electronic device is pre-configured with configuration information indicating the isolation degree of each antenna. Optionally, the configuration information also indicates a first isolation threshold. For example, this configuration information is pre-configured within the electronic device at the time of manufacture. In implementation, the electronic device can determine the first antenna based on the isolation degree indicated by the configuration information and obtain the first isolation threshold according to the configuration information, thereby determining the operating modes of Wi-Fi communication and Bluetooth communication.

[0366] In some embodiments, if the executing entity of step S720 in method 700 is a first processing module (e.g., AP) in an electronic device other than the WIFI module, then the first processing module (e.g., AP) can determine the isolation between each antenna based on the configuration information to determine the first antenna, and determine the first isolation threshold and the second isolation threshold according to the configuration information, thereby determining the operating modes of WIFI communication and Bluetooth communication. After determining the operating modes of WIFI communication and Bluetooth communication, the first processing module (e.g., AP) sends bandwidth information to the WIFI module, which is used to indicate the operating bandwidth of WIFI communication in the finally determined operating mode, so that the WIFI module can set the operating bandwidth of WIFI communication.

[0367] In other embodiments, if the execution entity of step S720 in method 700 is a WIFI module in an electronic device, the WIFI module can determine the isolation between each antenna based on the configuration information to determine the first antenna, and determine the first isolation threshold and the second isolation threshold based on the configuration information, thereby determining the operating modes of WIFI communication and Bluetooth communication. After determining the operating modes of WIFI communication and Bluetooth communication, the operating bandwidth of WIFI communication is also determined, and the WIFI module sets the operating bandwidth of WIFI communication.

[0368] For a detailed description of the process by which each module in an electronic device determines the isolation degree between antennas and the first isolation degree threshold based on configuration information to determine the working mode of WIFI communication and Bluetooth communication, please refer to the relevant description in Method 400, which will not be repeated here.

[0369] Electronic devices can connect to different models of routers to perform Wi-Fi communication. The performance of different models of routers varies, which can directly affect the working mode of Wi-Fi and Bluetooth.

[0370] Table 1 shows the data rates of electronic devices performing Wi-Fi and Bluetooth communication under different routers and different Bluetooth services, as provided in the embodiments of this application. In the first scenario (Bluetooth enabled but not scanning (Wi-Fi exclusively using the antenna)), the electronic device performs Wi-Fi communication but not Bluetooth communication; Wi-Fi communication exclusively uses the antenna. This scenario is analogous to using different antennas for parallel Wi-Fi and Bluetooth communication. Therefore, the transmission performance in this scenario is also comparable to the transmission performance when the electronic device uses different antennas for parallel Wi-Fi and Bluetooth communication. In other scenarios, the data shown in the table represents the data rates of the electronic device when it uses multiple antennas for time-division multiplexing of Wi-Fi and Bluetooth communication.

[0371] Table 1

[0372]

[0373]

[0374] As shown in Table 1, for example, under router A, when the data format of the Bluetooth service is AAC, comparing the two bolded columns of data in Table 1, it can be seen that the data rate of the electronic device when performing time-division multiplexing of WIFI and Bluetooth communication with a working bandwidth of 40MHz for WIFI communication (bolded data in the second column: 248, 283) is higher than the data rate of the electronic device when performing both communications in parallel with a working bandwidth of 20MHz for WIFI communication (bolded data in the first column: 138, 148). This means that in this scenario, the working mode of performing time-division multiplexing of WIFI and Bluetooth communication with a working bandwidth of 40MHz for WIFI communication is optimal.

[0375] For example, under router A, when the data format of the Bluetooth service is LDAC, the rate of time-division multiplexing of Wi-Fi and Bluetooth communication is very low. Therefore, it can be inferred that the rate of parallel Wi-Fi and Bluetooth communication is high.

[0376] For example, under router C, regardless of the form of Bluetooth service, the speed of time-sharing WIFI communication and Bluetooth communication is poor. Therefore, it can be inferred that the speed of parallel WIFI communication and Bluetooth communication is high.

[0377] Therefore, based on the above analysis, different router models affect the operating modes of Wi-Fi and Bluetooth. In some scenarios, under the same service conditions, the optimal operating mode for transmission performance of electronic devices will differ depending on the router used. For example, for the same service, electronic devices perform well when using time-sharing mode for both Wi-Fi and Bluetooth communication under router A, but perform well when using parallel Wi-Fi and Bluetooth communication under router B (either the first parallel mode or the second parallel mode). In other scenarios, even with the same router, the optimal operating mode for transmission performance of electronic devices will differ depending on the Bluetooth service used. For example, with the same router, electronic devices perform well when using time-sharing mode for both Wi-Fi and Bluetooth communication and the Bluetooth service is Bluetooth service A, but perform well when using parallel Wi-Fi and Bluetooth communication (either the first parallel mode or the second parallel mode) and the Bluetooth service is Bluetooth service B.

[0378] Therefore, considering the different transmission performance of different types of routers and electronic devices under Bluetooth services, this application proposes to provide a whitelist. For example, the whitelist may include four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations, each including one Bluetooth service, one router, one isolation range, and a corresponding operating mode. In implementation, when it is determined that an electronic device needs to enter Bluetooth independent transmission mode, the type of Bluetooth service and whether the router belongs to the whitelist are given priority. If they belong to the whitelist, the operating modes of Wi-Fi and Bluetooth communication are directly determined based on the whitelist content. If they do not belong to the whitelist, the operating modes of Wi-Fi and Bluetooth communication can be determined according to method 600 or other methods.

[0379] Table 2 shows the contents of the whitelist provided in the embodiments of this application. In Table 2, "time-division" means that WIFI communication and Bluetooth communication are performed in time-division manner. Similarly, "parallel" means that WIFI communication and Bluetooth communication are performed in parallel. "40MHz" means that the working bandwidth of WIFI communication is 40MHz, and "20MHz" means that the working bandwidth of WIFI communication is 20MHz. "a" represents the isolation degree between antennas, a1 is the first isolation degree threshold, and a2 is the second isolation degree threshold. Each row forms a combination, and each combination includes a Bluetooth service, a router, an isolation degree range, and a corresponding working mode. Given the Bluetooth service, router, and isolation degree, the corresponding working mode can be directly determined based on each combination. Taking the combination in the first row as an example, when the Bluetooth service is Bluetooth data in AAC format, the model is router A, and the isolation degree "a" is less than a2, the working mode is: time-division WIFI communication and Bluetooth communication are performed, and the working bandwidth of WIFI communication is 40MHz.

[0380] Table 2

[0381] Serial Number Bluetooth service router Isolation Work mode 1 AAC A a2 < a < a1 Time-sharing +40MHz 2 SBC A a2 < a < a1 Time-sharing +40MHz 2 LDAC A a2 < a < a1 Parallel +20MHz 3 LDAC C a2 < a < a1 Parallel +20MHz 4 SBC C a2 < a < a1 Parallel +20MHz 5 AAC C a2 < a < a1 Parallel +20MHz 6 LDAC A a>a1 Parallel +40MHz … … … … …

[0382] In one example, the whitelist can be pre-configured within the electronic device. For instance, the electronic device has a whitelist pre-configured within it when it leaves the factory.

[0383] In another example, the whitelist could also be obtained by the electronic device from a server. For instance, the electronic device could periodically send requests to the server to obtain the whitelist. Alternatively, the server could periodically send the whitelist proactively to the electronic device.

[0384] The following, combined with Figure 13 The schematic flowchart shown is a short-range communication method 800 provided in an embodiment of this application, which will be described in detail with reference to the above embodiment.

[0385] In step S810, the electronic device determines that it needs to enter Bluetooth independent transmission mode.

[0386] For a detailed description of this step, please refer to the relevant description of step S410 above, which will not be repeated here.

[0387] In step S820, the electronic device determines whether Bluetooth service 1 and router 1 belong to the Bluetooth service and router recorded in the whitelist.

[0388] Bluetooth Service 1 is a service that an electronic device is preparing to execute or will continue to execute. For example, if the electronic device is not currently executing Bluetooth Service 1, or if the priority of the currently executing Bluetooth Service 2 is lower than the priority of the Bluetooth Service 1 that will be executed, then Bluetooth Service 1 is a service that the electronic device is preparing to execute. As another example, if the electronic device is currently executing Bluetooth Service 1, and Bluetooth Service 1 will be executed subsequently, then Bluetooth Service 1 is a service that the electronic device will continue to execute.

[0389] Router 1 is the router that the electronic device is currently connected to, used to provide a WIFI network.

[0390] For a detailed description of the whitelist, please refer to the relevant description above, which will not be repeated here.

[0391] If the electronic device determines that Bluetooth service 1 and router 1 belong to the Bluetooth service and router recorded in the whitelist, the electronic device executes step S830.

[0392] If the electronic device determines that Bluetooth service 1 and router 1 are not among the Bluetooth services and routers recorded in the whitelist, the electronic device executes step S840.

[0393] In step S830, the electronic device determines the target operating mode based on the contents of the whitelist.

[0394] In this step, specifically, the electronic device determines the working mode corresponding to the isolation of Bluetooth service 1, router 1, first antenna and second antenna from the contents of the whitelist, i.e., the target working mode, based on the isolation of Bluetooth service 1, router 1, first antenna and second antenna.

[0395] Taking Table 2 as an example, assuming that Bluetooth service 1 is Bluetooth data in LDAC format, router 1 is router A, and the isolation degree 'a' of the first antenna and the second antenna is greater than the second isolation degree threshold 'a21' and less than the first isolation degree threshold 'a1', then the final determined target working mode is: parallel WIFI communication and Bluetooth communication with a working bandwidth of 40MHz for WIFI communication.

[0396] In step S840, the electronic device executes method 600 to determine a target operating mode, or to determine the operating mode with the best performance among three operating modes as the target operating mode.

[0397] In an embodiment where the electronic device performs method 600 to determine a target operating mode, since step S610 is the same as step S710, execution can begin from step S620 until the final target operating mode is determined.

[0398] It's understandable that the router and Bluetooth services significantly impact time-sharing and parallel modes. If the transmission performance of time-sharing mode doesn't meet requirements, it's temporarily disregarded, and parallel mode is considered instead. Under parallel mode, the operating mode for Bluetooth and Wi-Fi communication—either the first parallel mode or the second parallel mode—is further determined based on the isolation between the first and second antennas. If the isolation doesn't meet the minimum threshold (the second isolation threshold), time-sharing mode is ultimately chosen.

[0399] In an embodiment where the operating mode with the best transmission performance among the three operating modes is determined as the target operating mode, the electronic device executes the three operating modes respectively under router 1 and Bluetooth service 1, and determines the operating mode with the best transmission performance as the target operating mode.

[0400] Specifically, under Router 1 and Bluetooth Service 1, the electronic device uses the second antenna for time-division multiplexing of Bluetooth and Wi-Fi communication, i.e., it executes time-division mode, obtaining the transmission performance under time-division mode; the electronic device uses the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, with the Wi-Fi communication operating bandwidth being 20MHz, i.e., it executes the first parallel mode, obtaining the transmission performance under the first parallel mode; the electronic device uses the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, with the Wi-Fi communication operating bandwidth being 40MHz, i.e., it executes the second parallel mode, obtaining the transmission performance under the second parallel mode. The transmission performance of the three operating modes is compared, and the operating mode with the optimal transmission performance is determined as the target operating mode.

[0401] In one example, transmission performance is characterized by transmission rate. Correspondingly, the operating mode with the best transmission rate among the three operating modes of the electronic device can be determined as the target operating mode.

[0402] In another example, transmission performance is characterized by transmission delay. Correspondingly, the operating mode with the shortest transmission delay among the three operating modes can be determined as the target operating mode.

[0403] In step S850, the electronic device adds Bluetooth service 1, router 1, the isolation range of the first antenna and the second antenna, and the determined target operating mode to the whitelist to update the whitelist.

[0404] In this way, by adding new combinations to the whitelist and updating the whitelist, it becomes easier to quickly and effectively find the corresponding working mode from the whitelist when determining the working mode again in the future.

[0405] In step S860, the electronic device uploads the updated whitelist to the server.

[0406] In this way, other electronic devices can obtain the updated whitelist from the server and quickly find the corresponding working mode from the updated whitelist. This eliminates the need for other electronic devices to determine the working mode based on factors such as isolation and bandwidth according to various judgment logics, effectively simplifying the processing process and improving processing efficiency.

[0407] For example, an electronic device can periodically upload the updated whitelist to the server. That is, in this example, the electronic device will upload the whitelist intermittently. Within a period, the whitelist may be updated multiple times. In this way, periodically uploading the updated whitelist avoids the resource overhead of uploading the whitelist after each update.

[0408] It should be understood that the content of the whitelist described above is only illustrative and should not be construed as limiting the embodiments of this application.

[0409] In other embodiments, the whitelist may not include Bluetooth services. That is, the whitelist may include three categories: multiple routers, multiple isolation ranges, and three operating modes. These three categories form N combinations. Each combination includes a router, an isolation range, and a corresponding operating mode. The router and isolation range in each combination are used to determine the corresponding operating mode. In implementation, when it is determined that the electronic device needs to enter Bluetooth independent transmission mode, in step S820, the electronic device determines whether router 1 belongs to the whitelist. If router 1 belongs to the whitelist, the electronic device executes step S830, whereby the electronic device searches for the corresponding operating mode from the whitelist based on the isolation of the first antenna and the second antenna and the first router to obtain the target operating mode. If router 1 does not belong to the whitelist, the electronic device executes step S840, executing method 600 to determine the target operating mode, or determining the operating mode with the best transmission performance among the three operating modes as the target operating mode.

[0410] Figure 14This is a schematic flowchart of a short-range communication method 900 provided in an embodiment of this application. Method 900 is applied to an electronic device equipped with a first antenna and a second antenna. The first antenna and the second antenna are different; the first antenna is used for Bluetooth communication, and the second antenna is used for Wi-Fi communication. The first antenna may include one or more antennas, and the second antenna may include one or more antennas.

[0411] In step S910, the electronic device determines that it needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication. This parallel mode means that different antennas are used to perform Bluetooth communication and Wi-Fi communication respectively, and the Bluetooth communication and Wi-Fi communication operate on the same frequency band.

[0412] It should be understood that parallel mode means that electronic devices can use different antennas to perform Bluetooth and WIFI communication simultaneously. Parallel mode includes first parallel mode and second parallel mode.

[0413] It should also be understood that when an electronic device determines that it needs to enter a parallel mode of Bluetooth and Wi-Fi communication, it can also be understood as the electronic device determining that it needs to enter a Bluetooth independent transmission state. Bluetooth independent transmission state means that the electronic device uses a different antenna for Bluetooth communication than Wi-Fi communication. If, based on actual circumstances, the electronic device can be allowed to enter Bluetooth independent transmission state, then the electronic device's operating mode is a parallel mode of Wi-Fi and Bluetooth communication. For a detailed description of the Bluetooth independent transmission state, please refer to the relevant description in step S410, which will not be repeated here.

[0414] For example, the operating frequency band for Bluetooth and WIFI communication is 2.4 GHz.

[0415] It is understood that in other examples and in future technologies, the operating frequency bands of Bluetooth communication and WIFI communication may be other frequency bands. This application embodiment does not impose any limitations, as long as the operating frequency bands of Bluetooth communication and WIFI communication are the same.

[0416] In step S920, the electronic device determines that the operating bandwidth for the current WIFI communication using the second antenna is the second operating bandwidth.

[0417] In other words, before the final operating mode is determined, the electronic device is using the second antenna for WIFI communication, and the operating bandwidth of the WIFI communication is the second operating bandwidth.

[0418] It should be noted that before the final working mode is determined, if the electronic device communicates not only via WIFI but also via Bluetooth, the electronic device will use a time-division multiplexing mode for communication, that is, it will reuse the second antenna for both Bluetooth and WIFI communication, and the working bandwidth of WIFI communication will be the second working bandwidth.

[0419] In step S930, when the isolation between the first antenna and the second antenna is less than a first isolation threshold, a first parallel communication mode is adopted. This first parallel mode indicates that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is a first operating bandwidth, which is less than a second operating bandwidth; or...

[0420] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division mode communication is adopted. The time-division mode means that the second antenna is used to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth. The second isolation threshold is less than the first isolation threshold.

[0421] If the system requires electronic devices to enter parallel mode (as in method 700), then when the isolation between the first and second antennas is less than the first isolation threshold, it means the isolation between the first and second antennas is insufficient. Therefore, the operating mode for Bluetooth and Wi-Fi communication is determined to be the first parallel mode, and the electronic devices communicate using this mode. It can be understood that when the isolation between the first and second antennas is insufficient, a larger isolation bandwidth is needed to reduce interference. Therefore, the operating bandwidth of Wi-Fi communication can be reduced to provide suitable bandwidth for Bluetooth communication. Thus, the electronic devices can use the first parallel mode. This effectively reduces interference while still meeting the transmission requirements of both Wi-Fi and Bluetooth communication.

[0422] If the system is configured to allow electronic devices to use time-division multiplexing (e.g., method 400 or method 600) when parallel mode requirements cannot be met, then when the isolation between the first and second antennas is less than the second isolation threshold, it means that the isolation between the first and second antennas is very small and cannot meet the requirements of parallel mode. Therefore, to reduce interference, time-division multiplexing is used. Furthermore, small electronic devices (e.g., mobile phones, watches, etc.) cannot accommodate more antennas; in most cases, time-division multiplexing antennas for Wi-Fi and Bluetooth communication is also very suitable for small electronic devices.

[0423] In some embodiments, the second operating bandwidth is a 40MHz operating bandwidth, and the first operating bandwidth is a 20MHz operating bandwidth.

[0424] It is understood that the first working bandwidth and the second working bandwidth can be other bandwidth values. This application embodiment does not limit them in any way, as long as the first working bandwidth is less than the second working bandwidth.

[0425] It should be noted that in method 900, the router can support a first working bandwidth and a second working bandwidth, so the electronic device can communicate in time-division mode and any parallel mode.

[0426] The short-range communication method provided in this application, when the operating frequency bands of Wi-Fi and Bluetooth communication overlap (e.g., both Wi-Fi and Bluetooth operate at 2.4 GHz), flexibly employs different operating modes for Bluetooth and Wi-Fi communication based on the isolation degree of the first and second antennas. Specifically, when the isolation degree between the first and second antennas is less than a first isolation threshold, a first parallel mode is used for communication; when the isolation degree is less than a second isolation threshold, a time-division mode is used. Since the isolation degree between antennas significantly affects the transmission performance, determining the operating modes of Bluetooth and Wi-Fi communication based on the antenna isolation degree, and using different operating modes for different isolation degrees, can minimize interference between Wi-Fi and Bluetooth communication to maintain good transmission performance. This not only improves system flexibility but also enhances system stability. Furthermore, determining the appropriate operating mode based on the isolation degree only when it is determined that the electronic device needs to enter parallel mode avoids unnecessary operations and improves practicality.

[0427] In some embodiments, method 900 further includes: when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device uses a second parallel mode for communication, the second parallel mode indicating that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of the WIFI communication is the second operating bandwidth.

[0428] It is understandable that, regardless of whether the system is configured to require electronic devices to enter parallel mode or the system is configured to allow electronic devices to communicate in parallel or time-division mode based on actual conditions, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic devices will use the second parallel mode for communication.

[0429] When the isolation between the first antenna and the second antenna is equal to the first isolation threshold, the electronic device can communicate in either the second parallel mode or the first parallel mode, without any limitation.

[0430] In this embodiment, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, it means that the isolation between the first antenna and the second antenna is sufficiently large. Therefore, the operating mode for Bluetooth communication and Wi-Fi communication is determined to be the second parallel mode, and the electronic device uses the second parallel mode for communication. It can be understood that when the isolation between the first antenna and the second antenna is sufficiently large, the protection isolation bandwidth will be smaller. Thus, even if the operating bandwidth of Wi-Fi communication is the large second operating bandwidth, it can still provide suitable bandwidth for Bluetooth communication. Therefore, while effectively reducing interference, the transmission requirements of Wi-Fi communication and Bluetooth communication can be met, and Wi-Fi communication can enjoy the benefits of large bandwidth.

[0431] In some embodiments where the electronic device uses a first parallel mode for communication in step S930, the first parallel mode for communication is used when the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold.

[0432] In this embodiment, the electronic device is configured with a first isolation threshold and a second isolation threshold. When the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, the electronic device determines that the working mode of Bluetooth communication and WIFI communication is the first parallel mode and adopts the first parallel mode for communication.

[0433] In an embodiment where the isolation between the first antenna and the second antenna is less than the second isolation threshold, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the electronic device determines that the working mode of Bluetooth communication and WIFI communication is time-division mode and adopts time-division mode communication.

[0434] In an embodiment where the isolation between the first antenna and the second antenna is greater than the first isolation threshold, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device determines that the working mode of Bluetooth communication and WIFI communication is the second parallel mode, and uses the second parallel mode for communication.

[0435] When the isolation between the first antenna and the second antenna is equal to the second isolation threshold, the electronic device can use either the first parallel mode communication or the time-division mode communication, without any restrictions.

[0436] For a detailed description of the relationship between the isolation of the first antenna and the second antenna and the first isolation threshold and the second isolation threshold, please refer to the relevant description in Method 400, which will not be repeated here.

[0437] The short-range communication method provided in this application embodiment designs two isolation thresholds. When the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, a first parallel mode communication is adopted. This avoids the interference problem that may occur when the isolation between the first antenna and the second antenna is too small, and further improves the transmission performance.

[0438] In step S910, in some embodiments, when the communication state of the electronic device meets a first preset condition, the electronic device determines that it needs to enter the parallel mode; wherein, the first preset condition includes any one of the following:

[0439] The electronic device uses this second antenna for the Wi-Fi communication and is about to conduct the Bluetooth communication; or,

[0440] The electronic device reuses the second antenna for time-sharing WIFI and Bluetooth communication; or,

[0441] The electronic device reuses the second antenna for time-sharing of the WIFI communication and the Bluetooth communication, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

[0442] When an electronic device uses a second antenna for Wi-Fi communication and is about to conduct Bluetooth communication, it means that the electronic device will subsequently conduct both Bluetooth and Wi-Fi communication. Therefore, it can be determined that it needs to enter parallel mode.

[0443] When an electronic device uses time-sharing technology for both Wi-Fi and Bluetooth communication, it can determine that it needs to enter parallel mode. Generally, if isolation allows, transmission performance in parallel mode is better than in time-sharing mode. Therefore, to achieve better transmission performance, the electronic device determines that it needs to enter parallel mode.

[0444] When an electronic device reuses antenna time-division multiplexing for Wi-Fi and Bluetooth communication, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed, the electronic device can determine that it needs to enter parallel mode. For a detailed description of Bluetooth services and their priorities, please refer to the relevant description in step S410, which will not be repeated here.

[0445] The short-range communication method provided in this application determines that the electronic device needs to enter parallel mode when the communication state of the electronic device meets the first preset condition, based on the judgment of the first preset condition. This method takes into account common application scenarios and has good applicability.

[0446] In some embodiments, after step S930, method 900 further includes:

[0447] When the communication status of the electronic device meets the second preset condition, the electronic device determines to exit the first parallel mode;

[0448] The electronic device sets the operating bandwidth of the WIFI communication to the second operating bandwidth.

[0449] When using the first parallel communication mode, the operating bandwidth of Wi-Fi communication is the first operating bandwidth (e.g., 20MHz). Once exiting the first parallel mode, it means that Bluetooth communication has little or no need to compete with Wi-Fi communication for resources, and therefore does not affect Wi-Fi transmission. Therefore, to maximize the bandwidth benefits for Wi-Fi communication, the operating bandwidth is changed from the first operating bandwidth (e.g., 20MHz) to the second operating bandwidth (e.g., 40MHz), allowing continued Wi-Fi communication to benefit from the increased bandwidth.

[0450] For a detailed description of how the electronic device sets the operating bandwidth of the WIFI communication to the second operating bandwidth, please refer to the relevant description of step S450 above. For the sake of brevity, it will not be repeated here. The only difference is that step S450 sets the operating bandwidth of the WIFI communication to the first operating bandwidth (e.g., 20MHz), while here the operating bandwidth of the WIFI communication is set to the second operating bandwidth (e.g., 40MHz).

[0451] In some embodiments, the second preset condition includes any one of the following:

[0452] The electronic device stops Bluetooth communication; or,

[0453] The electronic device uses the first parallel mode for communication, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

[0454] In other embodiments, the second preset condition may include any other content. This application embodiment does not impose any limitations, as long as it can trigger the electronic device to exit the first parallel mode.

[0455] In an embodiment where the electronic device determines to exit the first parallel mode when Bluetooth communication stops, the electronic device will no longer conduct Bluetooth communication after exiting the first parallel mode, and can subsequently continue to use the second antenna on the second working bandwidth for WIFI communication.

[0456] In an embodiment where the electronic device uses the first parallel mode for communication and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed, and the electronic device determines to exit the first parallel mode, the electronic device can continue to perform WIFI communication and Bluetooth communication after exiting the first parallel mode, and can use time-division mode communication.

[0457] In some embodiments, method 900 further includes: an electronic device determining the isolation degree between the first antenna and the second antenna based on configuration information, the configuration information being used to indicate the isolation degree between various antennas configured in the electronic device.

[0458] In this embodiment, the electronic device includes a WIFI module and a first processing module. Depending on the situation, either the WIFI module or the first processing module can determine the isolation degree of the first antenna and the second antenna according to the configuration information, so as to determine the working mode of WIFI communication and Bluetooth communication, so that the electronic device can communicate using different working modes.

[0459] It should be understood that the first processing module is a processing module other than the WIF module, such as AP.

[0460] In one example, as described above, the Wi-Fi module and the Bluetooth module are integrated into a single chip, which may be referred to as a Wi-Fi / Bluetooth chip. In other embodiments, the Wi-Fi module may also be integrated independently into a single chip.

[0461] The following section, based on scenarios 1 and 2, details the process by which the WIFI module or the first processing module determines the isolation between the first antenna and the second antenna according to the configuration information, so that the electronic device can communicate using different operating modes.

[0462] Scenario 1: The first processing module (e.g., AP) determines the isolation between the first antenna and the second antenna based on the configuration information, so that the electronic device can communicate using different operating modes.

[0463] In one example, the WIFI module is configured with configuration information; and method 900 also includes:

[0464] The first processing module receives the configuration information sent by the WIFI module;

[0465] Based on the configuration information, the isolation between the first antenna and the second antenna is determined, including:

[0466] The first processing module determines the isolation between the first antenna and the second antenna based on the configuration information.

[0467] In other words, the first processing module obtains configuration information from the WIFI module to determine the isolation between the first antenna and the second antenna.

[0468] In other examples, the first processing module is configured with configuration information, and the first processing module can read the configuration information to determine the isolation between the first antenna and the second antenna.

[0469] In the embodiment where the electronic device communicates in a first parallel mode according to the isolation degree in step S930, for example, when the isolation degree between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0470] The first processing module sends first bandwidth information to the WIFI module, and the first bandwidth information is used to indicate the first working bandwidth;

[0471] The WIFI module sets the operating bandwidth of the WIFI communication to the first operating bandwidth so that the electronic device can communicate in the first parallel mode.

[0472] In other words, in this embodiment, after the first processing module determines the first parallel mode, it sends the first bandwidth information, which indicates the first working bandwidth of the first parallel mode, to the WIFI module. The WIFI module then modifies the original second working bandwidth to the first working bandwidth, so that the electronic device can communicate in the first parallel mode.

[0473] In the embodiment where the electronic device uses time-division mode communication based on isolation in step S930, for example, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode;

[0474] The first processing module sends second bandwidth information to the WIFI module, and the second bandwidth information is used to indicate the second working bandwidth.

[0475] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0476] In other words, in this embodiment, after the first processing module determines the time-sharing mode, it sends the second bandwidth information, which is used to indicate the second working bandwidth of the time-sharing mode, to the WIFI module. Since the current working bandwidth of WIFI communication is already the second working bandwidth, there is no need to set the working bandwidth of WIFI communication. The second working bandwidth is maintained as the working bandwidth of WIFI communication. In this way, the electronic device can communicate in the time-sharing mode.

[0477] In an embodiment where electronic devices communicate in a second parallel mode based on isolation, for example, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the second parallel mode.

[0478] The first processing module sends second bandwidth information to the WIFI module, and the second bandwidth information is used to indicate the second working bandwidth.

[0479] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the second parallel mode for communication.

[0480] In other words, in this embodiment, after the first processing module determines the second parallel mode, it sends the second bandwidth information, which is used to indicate the second working bandwidth of the second parallel mode, to the WIFI module. Since the current working bandwidth of WIFI communication is already the second working bandwidth, there is no need to set the working bandwidth of WIFI communication. The second working bandwidth is maintained as the working bandwidth of WIFI communication. In this way, the electronic device can communicate in the second parallel mode.

[0481] Scenario 2: The WIFI module determines the isolation between the first and second antennas based on the configuration information, so that the electronic device can communicate using different working modes.

[0482] In one example, the first processing module is configured with configuration information; and method 900 also includes:

[0483] The WIFI module receives the configuration information sent by the first processing module;

[0484] Based on the configuration information, the isolation between the first antenna and the second antenna is determined, including:

[0485] Based on the configuration information, the WIFI module determines the isolation between the first antenna and the second antenna.

[0486] In other words, the WIFI module obtains configuration information from the first processing module to determine the isolation between the first antenna and the second antenna.

[0487] In other examples, the WIFI module is configured with configuration information, which can then be read to determine the isolation between the first and second antennas.

[0488] In the embodiment where the electronic device communicates in a first parallel mode according to the isolation degree in step S930, for example, when the isolation degree between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0489] The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth so that the electronic device can use the first parallel mode for communication.

[0490] In other words, in this embodiment, after the WIFI module determines the first parallel mode, the WIFI module modifies the original second working bandwidth to the first working bandwidth, so that the electronic device can communicate in the first parallel mode.

[0491] In the embodiment where the electronic device uses time-division mode communication based on isolation degree in step S930, for example, when the isolation degree between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode.

[0492] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0493] In other words, in this embodiment, after the WIFI module determines the time-sharing mode, since the current working bandwidth of WIFI communication is already the second working bandwidth, there is no need to set the working bandwidth of WIFI communication. The second working bandwidth is maintained as the working bandwidth of WIFI communication, so that the electronic device can communicate in the time-sharing mode.

[0494] In an embodiment where the electronic device communicates in a second parallel mode based on isolation, for example, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the WIFI communication determines that the working mode of the Bluetooth communication and the WIFI communication is the second parallel mode.

[0495] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the second parallel mode for communication.

[0496] In other words, in this embodiment, after the WIFI module determines the second parallel mode, since the current working bandwidth of WIFI communication is already the second working bandwidth, there is no need to set the working bandwidth of WIFI communication. The second working bandwidth is maintained as the working bandwidth of WIFI communication, so that the electronic device can communicate in the second parallel mode.

[0497] It should be understood that the above method of determining the isolation of the first and second antennas based on configuration information is merely illustrative and should not be construed as limiting the embodiments of this application. In other embodiments, the electronic device may also determine the isolation based on the ratio of the signal power transmitted by one of the first and second antennas to the signal power received by the other antenna. The larger the ratio of the attenuation of the transmitted signal from one antenna to the output of the other antenna, the better the isolation.

[0498] In some embodiments, the first antenna is also used for cellular communication.

[0499] Because existing mobile phones have a large number of cellular antennas in their cellular modules, Bluetooth can reuse these antennas for communication. This allows Bluetooth and Wi-Fi communication to operate in parallel without adding additional antennas; in other words, the electronic device can perform Bluetooth and Wi-Fi communication simultaneously. This design not only saves costs but also eliminates the need for additional space in the electronic device, without affecting its appearance or stability.

[0500] In other embodiments, the first antenna is a Bluetooth communication-only antenna, dedicated to Bluetooth communication.

[0501] This design is suitable for devices with relatively large space, and uses a dedicated Bluetooth antenna for communication, which can avoid the problem of competing for the resources of other antennas.

[0502] Figure 15 This is a schematic flowchart of a short-range communication method 1000 provided in an embodiment of this application. Method 1000 is applied to a chip configured in an electronic device, which is equipped with a first antenna and a second antenna. The first antenna and the second antenna are different. For a detailed description of the first antenna and the second antenna, please refer to the relevant description of method 900, which will not be repeated here.

[0503] In step S1010, when the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication, and the current working bandwidth of the electronic device using the second antenna for Wi-Fi communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the chip controls the electronic device to use a first parallel mode for communication. This first parallel mode indicates using the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, and the working bandwidth of the Wi-Fi communication is the first working bandwidth, which is less than the second working bandwidth; or...

[0504] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the chip controls the electronic device to use time-division mode communication. The time-division mode means that the second antenna is reused to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth, and the second isolation threshold is less than the first isolation threshold.

[0505] This parallel mode means that different antennas are used for Bluetooth communication and Wi-Fi communication respectively.

[0506] It is understood that the process of determining whether an electronic device needs to enter the parallel mode of Bluetooth communication and Wi-Fi communication, and determining that the working bandwidth of the electronic device currently using the second antenna for Wi-Fi communication is the second working bandwidth, can be the aforementioned chip, or other chips or processing modules. This application embodiment does not make any limitation.

[0507] In some embodiments, the first operating bandwidth is 20MHz and the second operating bandwidth is 40MHz.

[0508] In some embodiments, method 1000 further includes:

[0509] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the first working bandwidth, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the chip controls the electronic device to use the second parallel mode for communication. The second parallel mode means using the first antenna for Bluetooth communication and using the second antenna for WIFI communication, and the working bandwidth of the WIFI communication is the second working bandwidth.

[0510] In some embodiments, the control of the electronic device employs a first parallel mode of communication, including:

[0511] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, the chip controls the electronic device to use the first parallel mode for communication.

[0512] In some embodiments, method 1000 further includes:

[0513] Based on the configuration information, the isolation between the first antenna and the second antenna is determined. The configuration information is used to indicate the isolation between the various antennas configured in the electronic device.

[0514] In some embodiments, the chip includes a first processing module, the electronic device includes a WIFI module; and the method 1000 further includes:

[0515] The first processing module receives the configuration information sent by the WIFI module;

[0516] Based on the configuration information, the isolation between the first antenna and the second antenna is determined, including:

[0517] The first processing module determines the isolation between the first antenna and the second antenna based on the configuration information.

[0518] In some embodiments, the control of the electronic device employs a first parallel mode of communication, including:

[0519] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for the WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0520] The first processing module sends first bandwidth information to the WIFI module. The first bandwidth information is used to indicate the first working bandwidth so that the WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, thereby controlling the electronic device to use the first parallel mode for communication.

[0521] In some embodiments, the control of the electronic device employs time-division multiplexing communication, including:

[0522] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for the WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode.

[0523] The first processing module sends second bandwidth information to the WIFI module. The second bandwidth information is used to indicate the second working bandwidth so that the WIFI module maintains the working bandwidth of the WIFI communication at the second working bandwidth, thereby controlling the electronic device to use the time-division mode communication.

[0524] In some embodiments, the chip includes a WIFI module, the electronic device includes a first processing module; and the method 1000 further includes:

[0525] The WIFI module receives the configuration information sent by the first processing module;

[0526] Based on the configuration information, the isolation between the first antenna and the second antenna is determined, including:

[0527] Based on the configuration information, the WIFI module determines the isolation between the first antenna and the second antenna.

[0528] In some embodiments, the control of the electronic device employs a first parallel mode of communication, including:

[0529] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for the WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode.

[0530] The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth so that the electronic device can use the first parallel mode for communication.

[0531] In some embodiments, controlling the electronic device to communicate using time-division multiplexing includes:

[0532] When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for the WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode.

[0533] The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

[0534] In the above-described embodiments, the chip can be, for example, an access point (AP). The WIFI module can be, for example, a WIFI module within a WIFI / Bluetooth chip that integrates both a WIFI module and a Bluetooth module.

[0535] It should be noted that the first processing module and the WIFI module of method 1000 can be compared with the first processing module and the WIFI module of method 900, respectively. For a detailed description, please refer to the relevant description of method 900, which will not be repeated here.

[0536] Figure 16 This is a schematic flowchart of a short-range communication method 1100 provided in an embodiment of this application. Method 1100 is applied to an electronic device equipped with a first antenna and a second antenna. The first antenna and the second antenna are different. For a detailed description of the first antenna and the second antenna, please refer to the relevant description of method 900, which will not be repeated here.

[0537] In step S1110, the electronic device determines whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist. The first Bluetooth service is a service that is about to be launched or is in progress, and the first router is used to provide a WIFI network. For a detailed description of this step, please refer to the relevant description of step S820, which will not be repeated here. In this step, the first Bluetooth service is analogous to Bluetooth service 1, and the first router is analogous to router 1.

[0538] In step S1120, when the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist, the electronic device searches the whitelist based on the isolation between the first antenna and the second antenna, the first Bluetooth service, and the first router to determine the target operating mode of Bluetooth communication and WIFI communication, wherein the WIFI communication and the Bluetooth communication operate on the same frequency band; wherein,

[0539] The whitelist includes four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations. Each combination includes one Bluetooth service, one router, one isolation range, and one operating mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding operating mode. The target operating mode is any one of the three operating modes.

[0540] The three operating modes include: time-division mode, first parallel mode, and second parallel mode. The time-division mode means that the second antenna is used to perform Bluetooth communication and Wi-Fi communication in a time-division manner, and the operating bandwidth of the Wi-Fi communication is the second operating bandwidth. The first parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the first operating bandwidth. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the second operating bandwidth, which is greater than the first operating bandwidth.

[0541] For a detailed description of this step, please refer to the relevant description of step S830, which will not be repeated here.

[0542] After the electronic device determines the target operating mode for Bluetooth and Wi-Fi communication, it can use the target operating mode to communicate.

[0543] The short-range communication method provided in this application introduces a whitelist, which contains M combinations. Each combination includes a Bluetooth service, a router, an isolation range, and a working mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding working mode. Thus, if the first Bluetooth service and the first router are recorded in the whitelist, the electronic device can find the target working mode corresponding to its current state from the whitelist based on the isolation of the first Bluetooth service, the first router, and the first and second antennas. This target working mode, determined based on multiple dimensions (router, Bluetooth service, isolation), can minimize interference between Wi-Fi and Bluetooth communication to maintain good transmission performance, improving both system flexibility and stability. Furthermore, since the target working mode can be quickly found based on the whitelist content, the processing procedure is effectively simplified, improving processing efficiency.

[0544] In some embodiments, prior to step S1110, method 1100 further includes:

[0545] The electronic device determines that its communication state meets a first preset condition, which includes any one of the following:

[0546] The electronic device uses this second antenna for the Wi-Fi communication and is about to conduct the Bluetooth communication; or,

[0547] The electronic device reuses the second antenna for time-sharing WIFI and Bluetooth communication; or,

[0548] The electronic device reuses the second antenna for time-sharing of the WIFI communication and the Bluetooth communication, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

[0549] For a detailed description of the first preset condition, please refer to the relevant description of the first preset condition in Method 900, which will not be repeated here.

[0550] In some embodiments, the target operating mode is the first parallel mode; and method 1100 further includes:

[0551] When the communication status of the electronic device meets the second preset condition, the electronic device determines to exit the first parallel mode;

[0552] The electronic device sets the operating bandwidth of the WIFI communication to the second operating bandwidth.

[0553] For a detailed description of this step, please refer to the relevant description of the electronic device in Method 900, which will not be repeated here.

[0554] In some embodiments, the second preset condition includes any one of the following:

[0555] The electronic device stops Bluetooth communication; or,

[0556] The electronic device uses the first parallel mode for communication, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

[0557] For a detailed description of the second preset condition, please refer to the relevant description of the second preset condition in Method 900, which will not be repeated here.

[0558] In some embodiments, method 1100 further includes: an electronic device obtaining the whitelist from a server.

[0559] In some embodiments, the first operating bandwidth is 20MHz and the second operating bandwidth is 40MHz.

[0560] In some embodiments, if the first Bluetooth service and the first router are not included in the whitelist, the electronic device executes method 600 to determine the target operating mode, or the electronic device determines the operating mode with the best performance among the three operating modes as the target operating mode.

[0561] For a detailed description of this embodiment, please refer to the relevant description of S840, which will not be repeated here.

[0562] In the embodiments described above where the first Bluetooth service and the first router are not included in the whitelist, method 900 further includes:

[0563] The electronic device adds the first Bluetooth service, the first router, the isolation range of the first antenna and the second antenna, and the target operating mode to the whitelist to update the whitelist.

[0564] It should be understood that the isolation range of the first Bluetooth service, the first router, the first antenna, and the second antenna, as well as the target operating mode, are added to the whitelist as a new combination, forming the updated whitelist.

[0565] For a detailed description of this step, please refer to the relevant description of step S850 above, which will not be repeated here.

[0566] The short-range communication method provided in this application adds relevant content to a whitelist after determining the target working mode. Since a new combination is added to the whitelist and the whitelist is updated, when the electronic device determines the working mode again, if the Bluetooth service is the first Bluetooth service and the router is the first router, the electronic device can quickly find the corresponding working mode from the whitelist, which further simplifies the processing process and improves processing efficiency.

[0567] In the above embodiment of updating the whitelist, method 900 further includes: the electronic device sending the updated whitelist to the server. For a detailed description of this step, please refer to the relevant description of step S860 above, which will not be repeated here.

[0568] The short-range communication method provided in this application allows electronic devices to upload an updated whitelist to a server. Other electronic devices can then retrieve the updated whitelist from the server and quickly find the corresponding operating mode using the updated whitelist. This eliminates the need for other electronic devices to determine the operating mode based on factors such as isolation and bandwidth using various judgment logics, effectively simplifying the processing and improving efficiency. (The above is in conjunction with...) Figures 1 to 16 This application provides a detailed description of the short-range communication method provided in its embodiments. The following will combine... Figures 17 to 18 This application provides a detailed description of the electronic device provided according to embodiments thereof.

[0569] Figure 17 This is an exemplary block diagram of an electronic device 1200 provided in an embodiment of this application. The electronic device 1200 includes a processing module 1210.

[0570] In one possible implementation, electronic device 1200 is used to execute the various processes and steps corresponding to the electronic device in method 900 described above. Processing module 1210 is used to control the electronic device to perform the following steps:

[0571] It is determined that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication. The parallel mode means using different antennas to perform Bluetooth communication and Wi-Fi communication respectively, and the Bluetooth communication and Wi-Fi communication operate on the same frequency band.

[0572] The operating bandwidth of the electronic device currently using the second antenna for WIFI communication is determined to be the second operating bandwidth;

[0573] When the isolation between the first antenna and the second antenna is less than a first isolation threshold, a first parallel communication mode is used. This first parallel mode indicates that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is a first operating bandwidth, which is less than the second operating bandwidth; or...

[0574] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division mode communication is adopted. The time-division mode means that the second antenna is used to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth. The second isolation threshold is less than the first isolation threshold.

[0575] It should be understood that the processing module 1210 can be used to execute various steps performed by the electronic device in method 900. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0576] It should be noted that the first processing module or the WIFI module in method 900 can be the processing module 1210 here.

[0577] In another possible implementation, electronic device 1200 is used to execute the various processes and steps corresponding to the chip in method 1000 described above. Processing module 1210 is used to execute the following steps:

[0578] When the electronic device needs to enter a parallel mode of Bluetooth and Wi-Fi communication, and the current operating bandwidth of the electronic device using the second antenna for Wi-Fi communication is the second operating bandwidth, if the isolation between the first antenna and the second antenna is less than a first isolation threshold, the electronic device is controlled to use a first parallel mode for communication. The first parallel mode indicates using the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the first operating bandwidth, which is less than the second operating bandwidth; or...

[0579] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the electronic device is controlled to use time-division mode communication. The time-division mode means that the second antenna is reused to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth, and the second isolation threshold is less than the first isolation threshold.

[0580] The parallel mode means using different antennas for Bluetooth communication and WIFI communication respectively.

[0581] It should be understood that the processing module 1210 can be used to execute various steps of the chip execution in method 1000. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0582] It should be noted that the first processing module or the WIFI module in method 1000 can be the processing module 1210 here.

[0583] In another possible implementation, electronic device 1200 is used to execute the various processes and steps corresponding to the electronic device in method 1100 described above. Processing module 1210 is used to control the electronic device to perform the following steps:

[0584] Determine whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist. The first Bluetooth service is a service that is about to be launched or is in progress. The first router is used to provide a WIFI network.

[0585] When the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist, the whitelist is searched based on the isolation between the first antenna and the second antenna, the first Bluetooth service, and the first router to determine the target operating mode of Bluetooth communication and Wi-Fi communication, wherein the Wi-Fi communication and the Bluetooth communication operate on the same frequency band; wherein...

[0586] The whitelist includes four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations, each combination including one Bluetooth service, one router, one isolation range, and one operating mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding operating mode, and the target operating mode is any one of the three operating modes.

[0587] The three operating modes include: time-division mode, first parallel mode, and second parallel mode. The time-division mode means that the second antenna is used in a time-division manner for Bluetooth communication and WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth. The first parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the first operating bandwidth. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth, which is greater than the first operating bandwidth.

[0588] It should be understood that the processing module 1210 can be used to execute various steps performed by the electronic device in method 1100. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0589] It should be understood that the electronic device 1200 here is embodied in the form of a functional unit. The term "unit" here may refer to application-specific integrated circuits (ASICs), electronic circuits, processors (e.g., shared processors, proprietary processors, or group processors) and memories for executing one or more software or firmware programs, integrated logic circuits, and / or other suitable components that support the described functions.

[0590] In the embodiments of this application, Figure 17 The electronic devices in the text can also be chips or chip systems, such as system on chip (SoC).

[0591] Figure 18 This application provides a schematic structural diagram of an electronic device 1300. The electronic device 1300 includes a processor 1310, a transceiver 1320, and a memory 1330. The processor 1310, transceiver 1320, and memory 1330 communicate with each other via internal interconnection paths. The processor 1310 can implement the functions of the processor 1310 in various possible implementations of the electronic device 1300. The memory 1330 is used to store instructions, and the processor 1310 is used to execute the instructions stored in the memory 1330. In other words, the processor 1310 can call these stored instructions to implement the functions of the processor 1310 in the electronic device 1300.

[0592] Optionally, the memory 1330 may include read-only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store device type information. The processor 1310 may be used to execute instructions stored in the memory, and when the processor 1310 executes instructions stored in the memory, the processor 1310 is used to perform the various steps and / or processes of the method embodiments corresponding to the terminal device described above.

[0593] In one possible implementation, electronic device 1300 is used to execute the various processes and steps corresponding to the electronic device in method 900 described above. Processor 1310 is used to control the electronic device to perform the following steps:

[0594] It is determined that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication. The parallel mode means using different antennas to perform Bluetooth communication and Wi-Fi communication respectively, and the Bluetooth communication and Wi-Fi communication operate on the same frequency band.

[0595] The operating bandwidth of the electronic device currently using the second antenna for WIFI communication is determined to be the second operating bandwidth;

[0596] When the isolation between the first antenna and the second antenna is less than a first isolation threshold, a first parallel communication mode is used. This first parallel mode indicates that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is a first operating bandwidth, which is less than the second operating bandwidth; or...

[0597] When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division mode communication is adopted. The time-division mode means that the second antenna is used to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth. The second isolation threshold is less than the first isolation threshold.

[0598] It should be understood that the processor 1310 can be used to execute various steps performed by the electronic device in method 900. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0599] It should be noted that the first processing module or WIFI module in method 900 can be some or all of the functional modules in the processor 1310 here.

[0600] In another possible implementation, electronic device 1300 is used to execute the various processes and steps corresponding to the chip in method 1000 described above. Processor 1310 is used to execute the following steps:

[0601] When the electronic device needs to enter a parallel mode of Bluetooth and Wi-Fi communication, and the current operating bandwidth of the electronic device using the second antenna for Wi-Fi communication is the second operating bandwidth, if the isolation between the first antenna and the second antenna is less than a first isolation threshold, the electronic device is controlled to use a first parallel mode for communication. The first parallel mode indicates using the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the first operating bandwidth, which is less than the second operating bandwidth; or...

[0602] When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the electronic device is controlled to use time-division mode communication. The time-division mode means that the second antenna is reused to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth, and the second isolation threshold is less than the first isolation threshold.

[0603] The parallel mode means using different antennas for Bluetooth communication and WIFI communication respectively.

[0604] It should be understood that the processor 1310 can be used to execute various steps performed by the electronic device in method 1000. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0605] It should be noted that the first processing module or WIFI module in method 1000 can be some or all of the functional modules in the processor 1310 here.

[0606] In another possible implementation, electronic device 1300 is used to execute the various processes and steps corresponding to the electronic device in method 1100 described above. Processor 1310 is used to control the electronic device to perform the following steps:

[0607] Determine whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist. The first Bluetooth service is a service that is about to be launched or is in progress. The first router is used to provide a WIFI network.

[0608] When the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist, the whitelist is searched based on the isolation between the first antenna and the second antenna, the first Bluetooth service, and the first router to determine the target operating mode of Bluetooth communication and Wi-Fi communication, wherein the Wi-Fi communication and the Bluetooth communication operate on the same frequency band; wherein...

[0609] The whitelist includes four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations, each combination including one Bluetooth service, one router, one isolation range, and one operating mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding operating mode, and the target operating mode is any one of the three operating modes.

[0610] The three operating modes include: time-division mode, first parallel mode, and second parallel mode. The time-division mode means that the second antenna is used in a time-division manner for Bluetooth communication and WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth. The first parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the first operating bandwidth. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth, which is greater than the first operating bandwidth.

[0611] It should be understood that the processor 1310 can be used to execute various steps performed by the electronic device in method 1000. For a detailed description, please refer to the relevant description above, which will not be repeated here.

[0612] It should be understood that the specific process of each device performing the corresponding steps in the above methods has been described in detail in the above method embodiments, and will not be repeated here for the sake of brevity.

[0613] It should be understood that, in the embodiments of this application, the processor of the above-described device can be a central processing unit (CPU), which can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0614] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or as a combination of hardware and software units within the processor. The software units can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are omitted here.

[0615] This application provides a computer program product that, when run on a terminal device, causes the terminal device to execute the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar to those of the related embodiments described above, and will not be repeated here.

[0616] This application provides a readable storage medium containing instructions that, when executed by a terminal device, cause the terminal device to perform the technical solution described in the above embodiments. The implementation principle and technical effects are similar and will not be repeated here.

[0617] This application provides a chip for executing instructions. When the chip is running, it executes the technical solutions described in the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0618] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., high-density digital video discs (DVDs)), or semiconductor media (e.g., solid-state disks (SSDs)).

[0619] It should be understood that the term "embodiment" used throughout the specification means that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, various embodiments throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above processes do not imply a sequential order of execution; the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0620] It should also be understood that in this application, “when…”, “if” and “if” all refer to the UE or base station taking corresponding actions under certain objective circumstances, and are not time-limited, nor do they require the UE or base station to perform a judgment action, nor do they imply any other limitations.

[0621] Those skilled in the art will understand that the various numerical designations such as "first," "second," etc., involved in this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application, nor do they indicate the order of sequence.

[0622] In this application, the use of singular pronouns to denote "one or more" rather than "one and only one," unless otherwise specified. In this application, unless otherwise specified, "at least one" is intended to mean "one or more," and "more than" is intended to mean "two or more."

[0623] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist simultaneously, and B exists alone. Here, A can be singular or plural, and B can be singular or plural.

[0624] In this document, the terms "at least one of..." or "at least one of..." refer to all or any combination of the listed items. For example, "at least one of A, B, and C" can mean: A exists alone, B exists alone, C exists alone, A and B exist simultaneously, B and C exist simultaneously, and A, B, and C exist simultaneously. A can be singular or plural, B can be singular or plural, and C can be singular or plural.

[0625] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0626] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0627] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0628] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0629] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0630] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0631] The same or similar parts between the various embodiments in this application can be referred to mutually. In the various embodiments of this application, and in the various implementation methods / methods / implementations within each embodiment, unless otherwise specified or logically conflicting, the terminology and / or descriptions between different embodiments and between the various implementation methods / methods / implementations within each embodiment are consistent and can be mutually referenced. The technical features in different embodiments and the various implementation methods / methods / implementations within each embodiment can be combined according to their inherent logical relationships to form new embodiments, implementation methods, methods, or implementation approaches. The above-described embodiments of this application do not constitute a limitation on the scope of protection of this application.

[0632] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims. In conclusion, the above description is merely a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A short-range communication method applied to an electronic device, the electronic device being configured with a first antenna and a second antenna, the first antenna and the second antenna being different, characterized in that, The method includes: It is determined that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication. The parallel mode means using different antennas to perform Bluetooth communication and Wi-Fi communication respectively, and the Bluetooth communication and Wi-Fi communication operate on the same frequency band. The operating bandwidth of the electronic device currently using the second antenna for WIFI communication is determined to be the second operating bandwidth; When the isolation between the first antenna and the second antenna is less than a first isolation threshold, a first parallel communication mode is used. This first parallel mode indicates that the first antenna is used for Bluetooth communication and the second antenna is used for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is a first operating bandwidth, which is less than the second operating bandwidth; or... When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division mode communication is adopted. The time-division mode means that the second antenna is used to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth. The second isolation threshold is less than the first isolation threshold.

2. The method according to claim 1, characterized in that, The method further includes: When the isolation between the first antenna and the second antenna is greater than the first isolation threshold, a second parallel mode of communication is adopted. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the working bandwidth of the WIFI communication is the second working bandwidth.

3. The method according to claim 1 or 2, characterized in that, When the isolation between the first antenna and the second antenna is less than a first isolation threshold, the first parallel mode communication is adopted, including: When the isolation between the first antenna and the second antenna is less than the first isolation threshold but greater than the second isolation threshold, the first parallel mode communication is used.

4. The method according to any one of claims 1 to 3, characterized in that, The determination that the electronic device needs to enter a parallel mode of Bluetooth communication and Wi-Fi communication includes: When the communication state of the electronic device meets a first preset condition, it is determined that the electronic device needs to enter the parallel mode; wherein, the first preset condition includes any one of the following: The electronic device uses the second antenna to perform the WIFI communication and is about to perform the Bluetooth communication; or The electronic device uses the second antenna in a time-division multiplexing manner to perform the WIFI communication and the Bluetooth communication; or... The electronic device reuses the second antenna to perform the WIFI communication and the Bluetooth communication in a time-division manner, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

5. The method according to any one of claims 1 to 4, characterized in that, After the method employs a first parallel mode communication when the isolation between the first antenna and the second antenna is less than a first isolation threshold, the method further includes: When the communication status of the electronic device meets the second preset condition, it is determined to exit the first parallel mode; Set the operating bandwidth of the WIFI communication to the second operating bandwidth.

6. The method according to claim 5, characterized in that, The second preset condition includes any one of the following: The electronic device stops Bluetooth communication; or, The electronic device communicates using the first parallel mode, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Based on the configuration information, the isolation degree between the first antenna and the second antenna is determined, wherein the configuration information is used to indicate the isolation degree between the various antennas configured in the electronic device.

8. The method according to claim 7, characterized in that, The electronic device includes a WIFI module and a first processing module, wherein the WIFI module is configured with the configuration information; and the method further includes: The first processing module receives the configuration information sent by the WIFI module; Determining the isolation between the first antenna and the second antenna based on the configuration information includes: The first processing module determines the isolation degree between the first antenna and the second antenna based on the configuration information.

9. The method according to claim 8, characterized in that, When the isolation between the first antenna and the second antenna is less than a first isolation threshold, the first parallel mode communication is adopted, including: When the isolation between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode. The first processing module sends first bandwidth information to the WIFI module, the first bandwidth information being used to indicate the first working bandwidth; The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can use the first parallel mode for communication.

10. The method according to claim 8, characterized in that, When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division communication is adopted, including: When the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode; The first processing module sends second bandwidth information to the WIFI module, the second bandwidth information being used to indicate the second working bandwidth; The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

11. The method according to claim 7, characterized in that, The electronic device includes a WIFI module and a first processing module, wherein the first processing module is configured with the configuration information; and the method further includes: The WIFI module receives the configuration information sent by the first processing module; Determining the isolation between the first antenna and the second antenna based on the configuration information includes: The WIFI module determines the isolation between the first antenna and the second antenna based on the configuration information.

12. The method according to claim 10, characterized in that, When the isolation between the first antenna and the second antenna is less than a first isolation threshold, the first parallel mode communication is adopted, including: When the isolation between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode; The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can use the first parallel mode for communication.

13. The method according to claim 10, characterized in that, When the isolation between the first antenna and the second antenna is less than the second isolation threshold, time-division communication is adopted, including: When the isolation between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode; The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

14. The method according to any one of claims 1 to 13, characterized in that, The first antenna is also used for cellular communication.

15. The method according to any one of claims 1 to 14, characterized in that, The first operating bandwidth is 20MHz, and the second operating bandwidth is 40MHz.

16. The method according to any one of claims 1 to 15, characterized in that, The operating frequency band for both the WIFI and Bluetooth communication is 2.4 GHz.

17. A short-range communication method applied to an electronic device, the electronic device being configured with a first antenna and a second antenna, the first antenna and the second antenna being different, characterized in that... The method includes: Determine whether the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist. The first Bluetooth service is a service that is about to be launched or is in progress. The first router is used to provide a WIFI network. When the first Bluetooth service and the first router belong to the Bluetooth service and router recorded in the whitelist, the whitelist is searched based on the isolation between the first antenna and the second antenna, the first Bluetooth service, and the first router to determine the target operating mode of Bluetooth communication and Wi-Fi communication, wherein the Wi-Fi communication and the Bluetooth communication operate on the same frequency band; wherein... The whitelist includes four categories: multiple Bluetooth services, multiple routers, multiple isolation ranges, and three operating modes. These four categories form M combinations, each combination including one Bluetooth service, one router, one isolation range, and one operating mode. The Bluetooth service, router, and isolation range in each combination are used to determine the corresponding operating mode, and the target operating mode is any one of the three operating modes. The three operating modes include: time-division mode, first parallel mode, and second parallel mode. The time-division mode means that the second antenna is used in a time-division manner for Bluetooth communication and WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth. The first parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the first operating bandwidth. The second parallel mode means that the first antenna is used for Bluetooth communication and the second antenna is used for WIFI communication, and the operating bandwidth of WIFI communication is the second operating bandwidth, which is greater than the first operating bandwidth.

18. The method according to claim 17, characterized in that, Before determining whether the first Bluetooth service and the first router belong to the Bluetooth services and routers recorded in the whitelist, the method further includes: The communication state of the electronic device is determined to meet a first preset condition, wherein the first preset condition includes any one of the following: The electronic device uses the second antenna for the WIFI communication and is about to conduct the Bluetooth communication; or... The electronic device uses the second antenna in a time-division multiplexing manner to perform the WIFI communication and the Bluetooth communication; or... The electronic device reuses the second antenna to perform the WIFI communication and the Bluetooth communication in a time-division manner, and the priority of the currently executed Bluetooth service is lower than the priority of the Bluetooth service to be executed.

19. The method according to claim 17 or 18, characterized in that, The target operating mode is the first parallel mode; and the method further includes: When the communication status of the electronic device meets the second preset condition, it is determined to exit the first parallel mode; Set the operating bandwidth of the WIFI communication to the second operating bandwidth.

20. The method according to claim 19, characterized in that, The second preset condition includes any one of the following: The electronic device stops Bluetooth communication; or, The electronic device communicates using the first parallel mode, and the priority of the currently executed Bluetooth service is higher than the priority of the Bluetooth service to be executed.

21. The method according to any one of claims 17 to 20, characterized in that, The method further includes: Obtain the whitelist from the server.

22. The method according to any one of claims 17 to 21, characterized in that: The first operating bandwidth is 20MHz, and the second operating bandwidth is 40MHz.

23. A short-range communication method applied in a chip, said chip being disposed in an electronic device, said electronic device being disposed of a first antenna and a second antenna, the first antenna and the second antenna being different, characterized in that, The method includes: When the electronic device needs to enter a parallel mode of Bluetooth and Wi-Fi communication, and the current operating bandwidth of the electronic device using the second antenna for Wi-Fi communication is the second operating bandwidth, if the isolation between the first antenna and the second antenna is less than a first isolation threshold, the electronic device is controlled to use a first parallel mode for communication. The first parallel mode indicates using the first antenna for Bluetooth communication and the second antenna for Wi-Fi communication, and the operating bandwidth of the Wi-Fi communication is the first operating bandwidth, which is less than the second operating bandwidth; or... When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the electronic device is controlled to use time-division mode communication. The time-division mode means that the second antenna is reused to perform Bluetooth communication and WIFI communication in a time-division manner, and the working bandwidth of the WIFI communication is the second working bandwidth, and the second isolation threshold is less than the first isolation threshold. The parallel mode means using different antennas for Bluetooth communication and WIFI communication respectively.

24. The method according to claim 23, characterized in that, The method further includes: When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the first working bandwidth, when the isolation between the first antenna and the second antenna is greater than the first isolation threshold, the electronic device is controlled to use a second parallel mode for communication. The second parallel mode means using the first antenna for Bluetooth communication and using the second antenna for WIFI communication, and the working bandwidth of the WIFI communication is the second working bandwidth.

25. The method according to claim 23 or 24, characterized in that, The control of the electronic device to communicate in a first parallel mode includes: When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, if the isolation between the first antenna and the second antenna is less than the first isolation threshold and greater than the second isolation threshold, the electronic device is controlled to use the first parallel mode for communication.

26. The method according to any one of claims 23 to 25, characterized in that, The method further includes: Based on the configuration information, the isolation degree between the first antenna and the second antenna is determined, wherein the configuration information is used to indicate the isolation degree between the various antennas configured in the electronic device.

27. The method according to claim 26, characterized in that, The chip includes a first processing module, the electronic device includes a WIFI module; and the method further includes: The first processing module receives the configuration information sent by the WIFI module; Determining the isolation between the first antenna and the second antenna based on the configuration information includes: The first processing module determines the isolation degree between the first antenna and the second antenna based on the configuration information.

28. The method according to claim 27, characterized in that, The control of the electronic device to communicate in a first parallel mode includes: When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode. The first processing module sends first bandwidth information to the WIFI module. The first bandwidth information is used to indicate the first working bandwidth so that the WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, thereby controlling the electronic device to use the first parallel mode for communication.

29. The method according to claim 27, characterized in that, The control of the electronic device to communicate in a time-division mode includes: When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the first processing module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode. The first processing module sends second bandwidth information to the WIFI module. The second bandwidth information is used to indicate the second working bandwidth so that the WIFI module maintains the working bandwidth of the WIFI communication at the second working bandwidth, thereby controlling the electronic device to use the time-division mode for communication.

30. The method according to claim 26, characterized in that, The chip includes a WIFI module, and the electronic device includes a first processing module; Furthermore, the method further includes: The WIFI module receives the configuration information sent by the first processing module; Determining the isolation between the first antenna and the second antenna based on the configuration information includes: The WIFI module determines the isolation between the first antenna and the second antenna based on the configuration information.

31. The method according to claim 30, characterized in that, The control of the electronic device to communicate in a first parallel mode includes: When the electronic device needs to enter the parallel mode and the working bandwidth of the electronic device currently using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the first isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the first parallel mode. The WIFI module sets the working bandwidth of the WIFI communication to the first working bandwidth, so that the electronic device can use the first parallel mode for communication.

32. The method according to claim 30, characterized in that, The control of the electronic device to communicate in a time-division mode includes: When the electronic device needs to enter the parallel mode and the current working bandwidth of the electronic device using the second antenna for WIFI communication is the second working bandwidth, when the isolation between the first antenna and the second antenna is less than the second isolation threshold, the WIFI module determines that the working mode of the Bluetooth communication and the WIFI communication is the time-division mode. The WIFI module maintains the WIFI communication operating bandwidth at the second operating bandwidth so that the electronic device can use the time-division mode for communication.

33. The method according to any one of claims 23 to 32, characterized in that, The first operating bandwidth is 20MHz, and the second operating bandwidth is 40MHz.

34. A device for short-range communication, characterized in that, It includes a processing module for performing the method as described in any one of claims 1 to 16, 17 to 22, and 23 to 33.

35. An electronic device, characterized in that, include: Memory, used to store computer instructions; A processor for invoking computer instructions stored in the memory to perform the method as described in any one of claims 1 to 16, 17 to 22, and 23 to 33.

36. A computer-readable storage medium, characterized in that, Used to store computer instructions for implementing the method as described in any one of claims 1 to 16, 17 to 22, and 23 to 33.

37. A chip, characterized in that, The chip includes: Memory: Used to store instructions; A processor for retrieving and executing the instructions from the memory, causing an electronic device on which the chip is mounted to perform the method as described in any one of claims 1 to 16, 17 to 22, and 23 to 33.

Citation Information

Patent Citations

  • WIFI and Bluetooth coexisting data transmission method and device, and storage medium

    CN114286448A

  • Wireless communication device and operation method of the same

    US20190238240A1