This application claims priority to Chinese Patent Application No. 202210993102.2, filed with the China National Intellectual Property Administration on Aug. 18, 2022 and entitled “WIRELESS COMMUNICATION CIRCUIT, BLUETOOTH COMMUNICATION SWITCHING METHOD, AND ELECTRONIC DEVICE”, which is incorporated herein by reference in its entirety.
This application relates to the field of communication, and in particular to a wireless communication circuit, a Bluetooth communication switching method, and an electronic device.
Among existing electronic devices such as mobile phones, Bluetooth (bluetooth, BT) and wireless fidelity (wireless fidelity, Wi-Fi) share an antenna in a time division manner. When the amount of data transmitted by Wi-Fi is large, it will reduce the communication rate of Bluetooth, thus influencing the communication quality of Bluetooth.
Embodiments of this application disclose a wireless communication circuit, a Bluetooth communication switching method, and an electronic device, which are used for improving a communication quality of Bluetooth communication.
To achieve the foregoing objective, the following technical solutions are used in the embodiments of this application:
According to a first aspect, a wireless communication circuit is provided. The wireless communication circuit includes: a processor, a switching circuit, a modulator demodulator (modulator demodulator, MDM), a first front-end module (front-end modules, FEM), and a second FEM. The processor is coupled to the switching circuit, the modulator demodulator and the first FEM, the modulator demodulator is coupled to the second FEM through the switching circuit, the first FEM supports wireless fidelity Wi-Fi communication or Bluetooth communication, and the second FEM supports cellular communication or Bluetooth communication; and the processor is configured to: acquire communication state information of the first FEM, where the communication state information is used for indicating whether the first FEM performs Wi-Fi communication: when the communication state information indicates that the first FEM performs Wi-Fi communication, transmit a first control command to the switching circuit, where the first control command is used for controlling the switching circuit to detect whether the modulator demodulator transmits a mobile industry processor interface (mobile industry processor interface, MIPI) command to the second FEM, and when the modulator demodulator does not transmit an MIPI command to the second FEM, control the second FEM to perform Bluetooth communication; and when the communication state information indicates that the first FEM does not perform Wi-Fi communication, transmit a second control command to the switching circuit, where the second control command is used for controlling the switching circuit to detect whether the modulator demodulator transmits an MIPI command to the second FEM, and when the modulator demodulator does not transmit an MIPI command to the second FEM, directly conduct the modulator demodulator with the second FEM so as to enable the modulator demodulator to control the second FEM to perform cellular communication.
In the wireless communication circuit provided in this embodiment of this application, the first FEM supports wireless fidelity Wi-Fi communication or Bluetooth communication: when the first FEM performs Wi-Fi communication and the MDM does not transmit an MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication, thus switching some or all of Bluetooth communication of the first FEM to a relatively idle second FEM, preventing time-division multiplexing of Wi-Fi communication and Bluetooth communication from occupying resources for Bluetooth communication, and improving the communication quality of Bluetooth communication.
In a possible implementation, the switching circuit includes a controller, an MIPI slave module, an MIPI master module, and a bypass gating circuit: the controller is coupled to the modulator demodulator through the MIPI slave module and the bypass gating circuit, and the controller is further coupled to the second FEM through the MIPI master module and the bypass gating circuit: the MIPI slave module is configured to convert an MIPI command from the modulator demodulator from a MIPI bus format to an on-chip bus format and transmit same to the controller: the MIPI master module is configured to convert an MIPI command from the controller from the on-chip bus format to the MIPI bus format and transmit same to the second FEM through the bypass gating circuit: the controller is configured to: when the first control command is received, control the bypass gating circuit to conduct the MIPI slave module with the modulator demodulator and conduct the MIPI master module with the second FEM, and detect whether the modulator demodulator transmits an MIPI command to the second FEM through the MIPI slave module, and when the modulator demodulator does not transmit an MIPI command to the second FEM, transmit a first MIPI command to the second FEM through the MIPI master module, where the first MIPI command is used for instructing the second FEM to perform Bluetooth communication: the controller is further configured to: when the second control command is received, detect whether the modulator demodulator transmits an MIPI command to the second FEM through the MIPI slave module, and when the modulator demodulator does not transmit an MIPI command to the second FEM, control the bypass gating circuit to directly conduct the modulator demodulator with the second FEM, and transmit a second MIPI command to the second FEM through the MIPI master module, where the second MIPI command is used for instructing the second FEM to perform cellular communication.
This implementation discloses a possible implementation of how to implement a switching circuit.
In a possible implementation, the controller is further configured to: after the first MIPI command is transmitted to the second FEM through the MIPI master module, receive and cache an MIPI command from the MDM through the MIPI slave module; and after the second MIPI command is transmitted to the second FEM through the MIPI master module, transmit the cached MIPI command from the modulator demodulator to the second FEM through the MIPI master module.
This implementation ensures that the control logic between the modulator demodulator and the second FEM remains consistent before and after switching.
In a possible implementation, the processor is specifically configured to: when the communication state information indicates that the first FEM performs Wi-Fi communication, transmit the first control command to the switching circuit after preset time.
This implementation can prevent frequent switching of Bluetooth communication between the first FEM and the second FEM. The advantage of this solution is that determination conditions are simple and there will be no frequent switching from beginning to end.
In a possible implementation, the processor is specifically configured to: when the communication state information indicates that the first FEM performs Wi-Fi communication and the number of times that the first FEM switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within first preset time is less than a number threshold, transmit the first control command to the switching circuit.
This implementation can prevent frequent switching of Bluetooth communication between the first FEM and the second FEM. The advantage of this solution is that it can detect more quickly, switch the state as soon as possible after connecting to Wi-Fi, and provide a better experience.
In a possible implementation, the processor is further configured to: when the number of times that the first FEM switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within the first preset time is greater than or equal to the number threshold, acquire the communication state information of the first FEM after second preset time.
This implementation can avoid never switching the state, and can switch the state normally when the Wi-Fi connection is stable.
According to a second aspect, a Bluetooth communication switching method is provided. The Bluetooth communication switching method includes: acquiring communication state information of a first FEM, where the first FEM supports wireless fidelity Wi-Fi communication or Bluetooth communication, and the communication state information is used for indicating whether the first FEM performs Wi-Fi communication: transmitting a first control command to a switching circuit when the communication state information indicates that the first FEM performs Wi-Fi communication, where the first control command is used for controlling the switching circuit to detect whether a modulator demodulator transmits a mobile industry processor interface MIPI command to a second FEM, and when the modulator demodulator does not transmit an MIPI command to the second FEM, controlling the second FEM to perform Bluetooth communication, where the second FEM supports cellular communication or Bluetooth communication; and when the communication state information indicates that the first FEM does not perform Wi-Fi communication, transmitting a second control command to the switching circuit, where the second control command is used for controlling the switching circuit to detect whether the modulator demodulator transmits an MIPI command to the second FEM, and when the modulator demodulator does not transmit an MIPI command to the second FEM, directly conducting the modulator demodulator with the second FEM so as to enable the modulator demodulator to control the second FEM to perform cellular communication.
In a possible implementation, the method further includes: when the first control command is received, controlling a bypass gating circuit to conduct an MIPI slave module with the modulator demodulator and conduct an MIPI master module with the second FEM, and detecting whether the modulator demodulator transmits an MIPI command to the second FEM through the MIPI slave module, and when the modulator demodulator does not transmit an MIPI command to the second FEM, transmitting a first MIPI command to the second FEM through the MIPI master module, where the first MIPI command is used for instructing the second FEM to perform Bluetooth communication; and when the second control command is received, detecting whether the modulator demodulator transmits an MIPI command to the second FEM through the MIPI slave module, and when the modulator demodulator does not transmit an MIPI command to the second FEM, controlling the bypass gating circuit to directly conduct the modulator demodulator with the second FEM, and transmitting a second MIPI command to the second FEM through the MIPI master module, where the second MIPI command is used for instructing the second FEM to perform cellular communication.
In a possible implementation, the method further includes: after the first MIPI command is transmitted to the second FEM through the MIPI master module, receiving and caching an MIPI command from the MDM through the MIPI slave module; and after the second MIPI command is transmitted to the second FEM through the MIPI master module, transmitting the cached MIPI command from the MDM to the second FEM through the MIPI master module.
In a possible implementation, the transmitting a first control command to a switching circuit when the communication state information indicates that the first FEM performs Wi-Fi communication includes: when the communication state information indicates that the first FEM performs Wi-Fi communication, transmitting the first control command to the switching circuit after preset time.
In a possible implementation, the transmitting a first control command to a switching circuit when the communication state information indicates that the first FEM performs Wi-Fi communication includes: when the communication state information indicates that the first FEM performs Wi-Fi communication and the number of times that the first FEM switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within first preset time is less than a number threshold, transmitting the first control command to the switching circuit.
In a possible implementation, the method further includes: when the number of times that the first FEM switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within the first preset time is greater than or equal to the number threshold, acquiring the communication state information of the first FEM after second preset time.
According to a third aspect, an electronic device is provided. The electronic device includes the wireless communication circuit according to the first aspect and any implementation thereof, or includes a processor and a memory. The memory stores instructions, and the method according to the second aspect or any implementation is performed when the processor executes the instructions.
According to a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes instructions. The instructions, when executed on an electronic device, cause an electronic device to perform the method according to the second aspect and any implementation thereof.
According to a fifth aspect, a computer program product including instructions is provided. The instructions, when executed on an electronic device, cause the electronic device to perform the method according to the second aspect and any implementation thereof.
According to a sixth aspect, a chip system is provided. The chip system includes a processor configured to support an electronic device to implement a function involved in the second aspect. In a possible design, the apparatus further includes an interface circuit. The interface circuit may be configured to receive signals from another apparatus (such as a memory) or transmit signals to another apparatus (such as a communication interface). The chip system may include a chip, or may include other discrete devices.
For technical effects brought by the second aspect to the sixth aspect, refer to technical effects brought by the first aspect and any implementation thereof, which will not be repeated here.
First, some concepts involved in this application will be described below.
In the embodiments of this application, terms such as “first” and “second” are merely used for distinguishing features of the same type, and cannot be understood as an indication of relative importance, a quantity, or a sequence.
In the embodiments of this application, the terms “exemplary” or “for example” is used to represent giving an example, an illustration, or a description. Any embodiment or design scheme described as an “exemplary” or “for example” in this application should not be explained as being more preferred or having more advantages than another embodiment or design scheme. In particular, the terms such as “exemplary” and “for example” as used herein are intended to present the related concept in a specific implementation.
In the embodiments of this application, the terms “couple” or “connection” should be understood in a broad sense. For example, the connection may be a physically direct connection, or an indirect connection realized through an electronic device, such as a connection realized through a resistor, an inductor, a capacitor, or other electronic devices.
An embodiment of this application provides an electronic device. The electronic device may be a device with a display function. The electronic device may be mobile or fixed. The electronic device may be deployed on land (such as indoors or outdoors, either hand-held or vehicle-mounted, etc.), on water (such as ships, etc.), and in air (such as airplanes, balloons or satellites, etc.). The electronic device may be referred to as a user equipment (user equipment, UE), access terminal, terminal unit, subscriber unit (subscriber unit), terminal station, mobile station (mobile station, MS), movable station, terminal agent or terminal device, etc. For example, the terminal device may be a mobile phone, a tablet computer, a notebook computer, a smart bracelet, a smart watch, a headset, a smart speaker, a virtual reality (virtual reality; VR) device, an augmented reality (augmented reality, AR) device, a terminal related to industrial control (industrial control), a terminal related to self-driving (self-driving), a terminal related to remote medical (remote medical), a terminal related to a smart grid (smart grid), a terminal related to transportation safety (transportation safety), a terminal related to a smart city (smart city), a terminal related to a smart home (smart home), or the like. The specific type and structure of the electronic device are not limited in the embodiments of this application. A possible structure of the electronic device will be described below:
Taking the electronic device being a mobile phone as an example,
The sensor module 280 may include a pressure sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, an optical proximity sensor, a fingerprint sensor, a temperature sensor, and a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
It may be understood that a schematic structure in this embodiment of this application does not constitute a specific limitation on the electronic device 101. In some other embodiments of this application, the electronic device 101 may include more or fewer components than those shown in the figure, or some components may be combined, or some components may be divided, or different component arrangements may be used. The components illustrated may be implemented by hardware, software, or a combination of software and hardware.
The processor 210 may include one or more processing units. For example, the processor 210 may be a field programmable gate array (field programmable gate array; FPGA), an application specific integrated circuit (application specific integrated circuit, ASIC), a system on chip (system on chip, SoC), a central processing unit (central processing unit, CPU), an application processor (application processor, AP), a network processor (network processor, NP), a digital signal processor (digital signal processor, DSP), a micro controller unit (micro controller unit, MCU), a programmable logic device (programmable logic device, PLD), a modulation and demodulation processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a baseband processor, a neural-network processing unit (neural-network processing unit, NPU), or the like. Different processing units may be separate devices, or may be integrated into one or more processors. For example, the processor 210 may be an application processor AP. Alternatively, the processor 210 may be integrated into a system on chip (system on chip, SoC). Alternatively, the processor 210 may be integrated into an integrated circuit (integrated circuit, IC) chip. The processor 210 may include an analog front end (analog front end, AFE) and a micro-controller unit (micro-controller unit, MCU) in an IC chip.
The controller may be a nerve center and a command center of the electronic device 101. The controller may generate an operation control signal according to an instruction operation code and a time-sequence signal, and control obtaining and execution of instructions.
A memory may be further provided in the processor 210 to store instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that is just used or cyclically used by the processor 210. If the processor 210 needs to use the instructions or data again, the processor may directly call the instructions or data from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thus improving the system efficiency.
In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (inter-integrated circuit, I2C) interface, an inter-integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (general-purpose input/output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a USB interface.
It may be understood that an interface connection relationship between the modules illustrated in this embodiment of this application is merely an example for description, and does not constitute a limitation on a structure of the electronic device 101. In some other embodiments of this application, the electronic device 101 may alternatively use an interface connection manner different from that in the foregoing embodiment, or use a combination of a plurality of the interface connection manners.
The power management module 240 is configured to receive a charging input from a charger. The charger may be a wireless charger (such as a wireless charging dock of the electronic device 101 or other devices that can charge the electronic device 101 wirelessly), or a wired charger. For example, the power management module 240 may receive a charging input from the wired charger through the USB interface 230. The power management module 240 may receive a wireless charging input through the wireless charging coil 242 of the electronic device.
While charging the battery 241, the power management module 240 may further supply power to the electronic device. The power management module 240 receives an input from the battery 241 to supply power to the processor 210, the internal memory 221, the external memory interface 220, the display screen 294, the camera 293, the wireless communication module 260, and the like. The power management module 240 may be further configured to monitor parameters such as the battery capacity; cycle count, health state (leakage and impedance) of the battery 241. In some other embodiments, the power management module 240 may also be provided in the processor 210.
The wireless communication function of the electronic device 101 may be implemented by using the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modulation and demodulation processor, the baseband processor, and the like.
The electronic device 101 implements a display function by using the GPU, the display screen 294, the application processor, and the like. The GPU is a microprocessor for image processing and connects the display screen 294 and the application processor. The GPU is configured to perform mathematical and geometric calculation, and is configured to render graphics. The processor 210 may include one or more GPUs, and execute program instructions to generate or change display information.
The display screen 294 is configured to display an image, a video and the like. The display screen 294 includes a display panel and a touch screen. In some embodiments, the electronic device 101 may include one or N display screens 294, where N is a positive integer greater than one.
The electronic device 101 can implement a photographing function by using the ISP, the camera 293, the video codec, the GPU, the display screen 294, the application processor, and the like. The ISP is configured to process data fed back by the camera 293. In some embodiments, the ISP may be provided in the camera 293. The camera 293 is configured to capture a still image or video. In some embodiments, the electronic device 101 may include one or N cameras 293, where N is a positive integer greater than one.
The external memory interface 220 may be configured to connect to an external storage card, for example, a micro SanDisk (micro SanDisk, Micro SD) card, to expand the storage capability of the electronic device 101. The external storage card communicates with the processor 210 by using the external memory interface 220, to implement a data storage function, for example, storing files such as music and videos into the external storage card.
The internal memory 221 may be configured to store a computer-executable program code. The computer-executable program code includes instructions. The processor 210 runs the instructions stored in the internal memory 221, to implement various functional applications and data processing of the electronic device 101. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, a universal flash storage (universal flash storage, UFS), and the like.
The memory involved in the embodiments of this application may be a volatile memory or the non-volatile memory; or may include both the volatile memory and the non-volatile memory: The non-volatile memory may be a read-only memory (read-only memory; ROM), a programmable ROM (programmable ROM, PROM), an erasable PROM (erasable PROM, EPROM), an electrically EPROM (electrically EPROM, EEPROM) or a flash memory: The volatile memory may be a random access memory (random access memory; RAM), and is used as an external cache. Through exemplary but non-restrictive description, many forms of RAMs, such as static RAM (static RAM, SRAM), dynamic RAM (dynamic RAM, DRAM), synchronous DRAM (synchronous DRAM, SDRAM), double data rate SDRAM (double data rate SDRAM, DDR SDRAM), enhanced SDRAM (enhanced SDRAM, ESDRAM), synchlink DRAM (synchlink DRAM, SLDRAM), and direct rambus RAM (direct rambus RAM, DR RAM), may be used. It is to be understood that the memories involved in the systems and methods described herein are intended to include, but not limited to, these memories and memories of any other suitable type.
The electronic device 101 may implement an audio function by using the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headset jack 270D, the application processor, and the like, for example, playing music or recording sounds.
The audio module 270 is configured to convert digital audio information into analog audio signal outputs, and is also configured to convert analog audio inputs into digital audio signals. In some embodiments, the audio module 270 may be provided in the processor 210, or some functional modules of the audio module 270 may be provided in the processor 210. The speaker 270A, also referred to as “horn”, is configured to convert an audio electrical signal into a sound signal. The phone receiver 270B, also referred to as “receiver”, is configured to convert an audio electrical signal into a sound signal. The microphone 270C, also referred to as “voice tube” or “mike”, is configured to convert a sound signal into an electrical signal. At least one microphone 270C may be arranged in the electronic device 101. The headset jack 270D is configured to be connected to a wired headset. The headset jack 270D may be a USB interface 230, or may be a 3.5 mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, or a cellular telecommunications industry association of the USA (cellular telecommunications industry association of the USA, CTIA) standard interface.
The key 290 includes a power key, a volume key, and the like. The button 290 may be a mechanical button. It may also be a touch button. The electronic device 101 may receive a button input, and generate a button signal input related to user setting and function control of the electronic device 101. The motor 291 may generate a vibration prompt. The motor 291 may be used for an incoming call vibration prompt and touch vibration feedback. The indicator 292 may be an indicator light, and may be configured to indicate a charging state or a battery change, or may be configured to indicate a message, a missed call, a notification, or the like. The SIM card interface 295 is configured to connect an SIM card. The SIM card may be inserted into the SIM card interface 295 or plugged from the SIM card interface 295, to come into contact with or be separated from the electronic device 101. The electronic device 101 may support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface 295 can support a Nano SIM (Nano SIM) card, a Micro SIM (Micro SIM) card, an SIM card, and the like. In some embodiments, the electronic device 101 uses an embedded SIM (embedded SIM, eSIM) card. The eSIM card may be embedded in the electronic device 101 and cannot be separated from the electronic device 101.
The antenna 1 and the antenna 2 are configured to transmit and receive an electromagnetic wave signal. Each antenna in the electronic device 101 may be configured to cover one or more communication frequency bands. Different antennas may further be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In some other embodiments, the antennas may be used with a tuning switch.
The mobile communication module 250 may provide a solution to wireless communication including 2G/3G/4G/5G applied to the electronic device 101. The wireless communication module 260 may provide a solution to wireless communication including wireless local area network (wireless local area networks, WLAN) (for example, wireless fidelity (wireless fidelity; Wi-Fi) network), Bluetooth (Bluetooth, BT), and global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC) technology, infrared (infrared, IR) technology, and the like applied to the electronic device 101. In some embodiments, the antenna 1 and the mobile communication module 250 of the electronic device 101 are coupled, and the antenna 2 and the wireless communication module 260 are coupled, so that the electronic device 101 can communicate with networks and another device through a wireless communication technology.
As shown in
In regard to this, an embodiment of this application provides a wireless communication circuit applied to the electronic devices, which can reduce or prevent the influence on the communication rate of Bluetooth by occupying the FEM and antenna of cellular communication through Bluetooth.
As shown in
The first FEM 34 and the second FEM 35 are configured to amplify a transmitted or received radio-frequency signal. The first FEM 34 can support time-division multiplexing of Wi-Fi communication or Bluetooth communication, while the second FEM 35 can support cellular communication or Bluetooth communication.
The MDM 33 is configured to transmit an MIPI command to the second FEM 35 to control the second FEM 35 to perform cellular communication. The MDM 33 is further configured to generate a radio-frequency signal from a baseband signal through digital signal modulation, transmit same to the outside through the second FEM 35, and demodulate a radio-frequency signal received through the second FEM 35 to obtain a digital signal. The MDM 33 is further configured to transmit the communication state information of the second FEM 35 to the processor 31.
The SPI module 321 is configured to implement serial communication between the processor 31 and the controller 322.
The bypass gating circuit 325 is controlled by the controller 322, and is configured to directly conduct the MDM 33 with the second FEM 35 (a path indicated by the dashed arrow in the figure), or conduct the MDM 33 with the controller 322 through the MIPI slave module 323, and conduct the controller 322 with the second FEM 35 through the MIPI master module 324 (a path indicated by the solid arrow in the figure). The bypass gating circuit 325 can be implemented through an analog circuit such as complementary metal oxide semiconductor (complementary metal oxide semiconductor, CMOS) or through a Verilog register transfer level (register transfer level, RTL) code, which is not limited here.
The MIPI slave module 323 is connected with the MDM 33 by using an MIPI bus. The MIPI slave module 323 is connected with the controller 322 by using an on-chip bus (such as an advanced high performance bus (advanced high performance bus, AHB) bus). The MIPI slave module 323 is configured to convert an MIPI command (such as a first MIPI command involved later) from the MDM 33 from the MIPI bus format to the on-chip bus format and transmit same to the controller 322.
The MIPI master module 324 is connected with the second FEM 35 through the MIPI bus. The MIPI master module 324 is connected with the controller 322 through the on-chip bus. The MIPI master module 324 is configured to convert an MIPI command (such as a second MIPI command involved later) from the controller 322 from the on-chip bus format to the MIPI bus format and transmit same to the second FEM 35.
The processor 31 can acquire communication state information of the first FEM 34, such as whether it performs Wi-Fi communication (or performs Wi-Fi communication or Bluetooth communication). The processor 31 can also acquire communication state information of the second FEM 35, such as whether it performs cellular communication. The processor 31 can also transmit a first control command or a second control command (as specifically described later) to the controller 322 in the switching circuit 32 through the SPI module 321 according to the communication state information of the first FEM 34, to control the second FEM 35 to switch between a cellular communication state and a Bluetooth communication state through the switching circuit 32.
The controller 322 is configured to control the bypass gating circuit 325 to switch between a bypass mode and a non-bypass mode according to the first control command or second control command from the processor 31.
Specifically, the wireless communication circuit can perform a Bluetooth communication switching method described in this application, and as shown in
In S101, a processor 31 acquires communication state information of a first FEM 34.
The communication state information of the first FEM 34 is used for indicating whether the first FEM 34 performs Wi-Fi communication, or the communication state information of the first FEM 34 is used for indicating whether the first FEM 34 performs Wi-Fi communication or performing Bluetooth communication.
In S102, when the communication state information of the first FEM 34 indicates that the first FEM 34 performs Wi-Fi communication (or referred to as establishing a Wi-Fi connection), the processor 31 transmits a first control command to a controller 322 in a switching circuit 32.
The first control command is used for controlling the switching circuit 32 to detect whether an MDM 33 transmits an MIPI command to a second FEM 35. When the MDM 33 does not transmit an MIPI command to the second FEM 35, the switching circuit 32 controls the second FEM 35 to perform Bluetooth communication.
As shown in S1021-S1025 in
After the controller 322 transmits the first MIPI command to the second FEM 35 through the MIPI master module 324 to instruct the second FEM 35 to perform Bluetooth communication, the controller 322 continues to receive and cache an MIPI command from the MDM 251 through the MIPI slave module 323. When the controller 322 controls the second FEM 35 to switch back to the Bluetooth communication state, the cached MIPI command from the MDM 251 is transmitted to the second FEM 35 through the MIPI master module 324, so that the control logic between the MDM 251 and the second FEM 35 remains consistent before and after switching.
In addition, due to unstable Wi-Fi connections in certain scenarios, in order to prevent frequent switching of Bluetooth communication between the first FEM 34 and the second FEM 35, the processor 31 may determine whether to switch Bluetooth communication according to the time that the first FEM 34 performs Wi Fi communication. Alternatively; the processor 31 may determine whether to switch Bluetooth communication according to the number of times that the first FEM 34 switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within preset time.
In a possible implementation, when the communication state information of the first FEM 34 indicates that the first FEM 34 performs Wi-Fi communication, the processor 31 transmits a first control command to the controller 322 in the switching circuit 32 after preset time (for example, one minute). That is, after the electronic device is stably connected to the Wi-Fi connection for preset time, the processor 31 transmits a first control command to the controller 322 in the switching circuit 32. The advantages of this solution are that determination conditions are simple and frequent switching will not occur from beginning to end.
In another possible implementation, when the communication state information of the first FEM 34 indicates that the first FEM 34 performs Wi-Fi communication and the number of times that the first FEM 34 switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within first preset time (for example, 10 seconds) is less than a number threshold (for example, three times), the processor 31 transmits the first control command to the controller 322 in the switching circuit 32. When the number of times that the first FEM 34 switches between performing Wi-Fi communication and skipping performing Wi-Fi communication within the first preset time is greater than or equal to the number threshold, the processor 31 acquires the communication state information of the first FEM 34 after second preset time (for example, five minutes), so as to determine again whether to transmit the first control command. The advantage of this solution is that it can detect more quickly, switch the state as soon as possible after connecting to Wi-Fi, and provide a better experience.
Since the electronic device can support Bluetooth communication (or pairing) with multiple other devices, the processor 31 can switch all or some of Bluetooth communication from the first FEM 34 to the second FEM 35 to improve the quality of Bluetooth communication. Exemplarily, as shown in
In S103, when the communication state information of the first FEM 34 indicates that the first FEM 34 does not perform Wi-Fi communication (or referred to as disconnecting a Wi-Fi connection), the processor 31 transmits a second control command to the controller 322 in the switching circuit 32.
The second control command is used for controlling the switching circuit 32 to detect whether the MDM 33 transmits an MIPI command to the second FEM 35. When the MDM 33 does not transmit an MIPI command to the second FEM 35, the switching circuit 32 directly conducts the MDM 33 with the second FEM 35, so that the MDM 33 controls the second FEM 35 to perform cellular communication.
As shown in S1031-S1034 in
After the controller 322 transmits the second MIPI command to the second FEM 35 through the MIPI master module 324 to instruct the second FEM 35 to perform cellular communication, it also needs to transmit the previously cached MIPI command from the MDM 251 to the second FEM 35 through the MIPI master module 324, so that the control logic between the MDM 251 and the second FEM 35 remains consistent before and after switching.
In the wireless communication circuit, the Bluetooth communication switching method and the electronic device provided in the embodiments of this application, the first FEM supports wireless fidelity Wi-Fi communication or Bluetooth communication; when the first FEM performs Wi-Fi communication and the MDM does not transmit an MIPI command to the second FEM, the second FEM is controlled to perform Bluetooth communication, thus switching some or all of Bluetooth communication of the first FEM to a relatively idle second FEM, preventing time-division multiplexing of Wi-Fi communication and Bluetooth communication from occupying resources for Bluetooth communication, and improving the communication quality of Bluetooth communication.
As shown in
An embodiment of this application further provides a computer-readable storage medium, and the computer-readable storage medium includes instructions. The instructions, when run on an electronic device, cause the electronic device to perform various steps in the foregoing method embodiments, such as the methods shown in
An embodiment of this application further provides a computer program product including instructions. The instructions, when run on an electronic device, cause the electronic device to perform various steps in the foregoing method embodiments, such as the methods shown in
For the technical effects of the chip system, the computer-readable storage medium and the computer program product, a reference may be made to the technical effects of the above-mentioned method embodiments.
It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in various embodiments of this application. The execution sequences of the processes should be determined according to functions and internal logic of the processes, and should not constitute any limitation on the implementation processes of the embodiments of this application.
A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, modules and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in the form of hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
A person skilled in the art may clearly understand that, for the objective of convenient and brief description, for a detailed working process of the system, apparatus, and module described above, refer to a corresponding process in the method embodiments, and details are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed system, device and method may be implemented in other manners. For example, the described device embodiments are merely exemplary. For example, division of the modules is merely logical function division and there may be other division manners during actual implementation. For example, a plurality of modules or components may be combined or integrated into another device, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the devices or modules may be implemented in electronic, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, may be located in one device, or may be distributed on a plurality of devices. Some or all of the modules may be selected according to the actual needs to achieve the objectives of the solutions of the embodiments.
In addition, functional modules in the embodiments of this application may be integrated into one device, or each of the modules may exist alone physically, or two or more modules may be integrated into one device.
All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When a software program is used to implement the embodiments, the embodiments may be implemented in whole or in part in a form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or some of the processes or functions according to the embodiments of this application are produced. The computer may be a general-purpose computer, a dedicated computer, a computer network, or any of other programmable apparatuses. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center in a wired (for example, a coaxial cable, an optical fiber or a digital subscriber line (digital subscriber line, DSL)) or wireless (for example, infrared, wireless or microwave, etc.) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid-state drive (Solid-State Drive, SSD)), or the like.
The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the scope of protection of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the scope of protection of this application. Therefore, the scope of protection of this application shall be subject to the scope of protection of the claims.
Number | Date | Country | Kind |
---|---|---|---|
202210993102.2 | Aug 2022 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2023/090369 | 4/24/2023 | WO |