CN115065369A - Antenna switching method and device and electronic equipment - Google Patents

Antenna switching method and device and electronic equipment Download PDF

Info

Publication number
CN115065369A
CN115065369A CN202210647517.4A CN202210647517A CN115065369A CN 115065369 A CN115065369 A CN 115065369A CN 202210647517 A CN202210647517 A CN 202210647517A CN 115065369 A CN115065369 A CN 115065369A
Authority
CN
China
Prior art keywords
radio frequency
antenna
frequency circuit
target data
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202210647517.4A
Other languages
Chinese (zh)
Inventor
李庆海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202210647517.4A priority Critical patent/CN115065369A/en
Publication of CN115065369A publication Critical patent/CN115065369A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/02Transmitters
    • H04B1/04Circuits
    • H04B1/0458Arrangements for matching and coupling between power amplifier and antenna or between amplifying stages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/06Receivers
    • H04B1/16Circuits
    • H04B1/18Input circuits, e.g. for coupling to an antenna or a transmission line
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits
    • H04B1/401Circuits for selecting or indicating operating mode

Abstract

The application discloses antenna switching method, device and electronic equipment, is applied to the controller of electronic equipment, and electronic equipment still includes first antenna, second antenna and radio frequency circuit, and the controller is connected with radio frequency circuit, and radio frequency circuit is used for being connected with first antenna or second antenna, and the method includes: under the condition that the radio frequency circuit is connected with the first antenna, acquiring the working state of the radio frequency circuit; and if the working state is a first state, controlling the radio frequency circuit to execute antenna switching operation, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state. According to the antenna switching method and device, before the antenna connected with the radio frequency circuit is switched, when the working state of the radio frequency circuit is judged to be the first state, the antenna switching operation is executed, the risk that the radio frequency circuit is damaged due to antenna switching is avoided, and the working reliability of the electronic equipment is improved.

Description

Antenna switching method and device and electronic equipment
Technical Field
The present application relates to the field of antenna technologies, and in particular, to an antenna switching method and apparatus, and an electronic device.
Background
At present, with the rapid development of electronic information technology, electronic devices are generally provided with a plurality of antennas, wherein the antennas connected to a radio frequency circuit can be switched by the electronic devices. However, the reliability of the current method for switching the connection between the rf circuit and the antenna is not sufficient.
Disclosure of Invention
The application provides an antenna switching method, an antenna switching device and electronic equipment, so as to overcome the defects.
In a first aspect, an embodiment of the present application provides an antenna switching method, which is applied to a controller of an electronic device, where the electronic device further includes a first antenna, a second antenna, and a radio frequency circuit, the controller is connected to the radio frequency circuit, and the radio frequency circuit is used to be connected to the first antenna or the second antenna, and the method includes: under the condition that the radio frequency circuit is connected with the first antenna, acquiring the working state of the radio frequency circuit; and if the working state is a first state, controlling the radio frequency circuit to execute antenna switching operation, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
In a second aspect, an embodiment of the present application further provides an antenna switching apparatus, which is applied to a controller of an electronic device, where the electronic device further includes a first antenna, a second antenna, and a radio frequency circuit, the controller is connected to the radio frequency circuit, and the radio frequency circuit is used to be connected to the first antenna or the second antenna, and the apparatus includes: the detection unit is used for acquiring the working state of the radio frequency circuit under the condition that the radio frequency circuit is connected with the first antenna; and the switching unit is used for controlling the radio frequency circuit to execute antenna switching operation if the working state is a first state, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes: the antenna comprises a controller, a radio frequency circuit, a first antenna and a second antenna; the controller is connected to the radio frequency circuit, the radio frequency circuit being configured to be connected to the first antenna or the second antenna, the controller being configured to perform the method of the first aspect.
According to the antenna switching method, the antenna switching device and the electronic equipment, before the radio frequency circuit is controlled to execute the antenna switching operation, the working state of the radio frequency circuit needs to be acquired, and the radio frequency circuit is controlled to execute the antenna switching operation only when the working state is the first state, wherein the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state. When the rf circuit is in the rf signal transmitting state, the antenna switching operation is performed, which may cause an excessive current in the rf circuit or an excessive energy of the high-frequency signal reflected back to the rf circuit, thereby causing damage to the rf circuit. Therefore, the antenna switching operation is executed only when the radio frequency circuit is in the first state, namely the radio frequency circuit is not in the radio frequency signal sending state, and the phenomenon that the current in the radio frequency circuit is too large or the energy of the high-frequency signal reflected back to the radio frequency circuit is too large is avoided, so that the radio frequency circuit is prevented from being damaged, and the overall reliability of the electronic equipment is improved.
Additional features and advantages of embodiments of the present application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of embodiments of the present application. The objectives and other advantages of the embodiments of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of antenna switching;
fig. 2 shows a block diagram of an electronic device according to an embodiment of the present application;
fig. 3 is a diagram illustrating an application scenario of an antenna switching method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method of an antenna switching method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a method for antenna switching according to another embodiment of the present application;
FIG. 6 is a diagram illustrating an embodiment of step S240 in FIG. 5;
FIG. 7 is a diagram illustrating another embodiment of step S240 in FIG. 5;
fig. 8 is a flowchart illustrating a method for antenna switching according to still another embodiment of the present application;
fig. 9 is a block diagram illustrating a structure of an antenna switching apparatus according to an embodiment of the present application;
fig. 10 is a block diagram illustrating an electronic device according to yet another embodiment of the present application;
FIG. 11 is a block diagram illustrating a structure of a computer-readable storage medium provided by an embodiment of the present application;
fig. 12 shows a block diagram of a computer program product provided in an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
At present, with the rapid development of electronic information technology, electronic devices are generally provided with a plurality of antennas, wherein the antennas connected to a radio frequency circuit can be switched by the electronic devices. However, the reliability of the current method for switching the connection between the rf circuit and the antenna is not sufficient. How to realize reliable switching of the antenna is a problem to be solved urgently.
At present, the connection between the radio frequency circuit of the electronic device and the plurality of antennas can be generally realized through a switch. For example, referring to fig. 1, if there are two antennas, antenna 0 and antenna 1, respectively, in fig. 1, the rf circuit 120 can be selectively connected to any one of the antennas through the single-pole double-throw switch 130. Therefore, the controller 110 can control the single-pole double-throw switch 130 to switch when necessary, so as to connect the rf circuit 120 to the desired antenna 0 or antenna 1.
However, in the above method, when the antenna needs to be switched, the switching is generally performed directly. As shown in fig. 1 above, the controller 110 can directly control the single pole double throw switch 130 to switch at any time. However, if the rf circuit 120 is in the rf signal transmitting state, the single-pole double-throw switch 130 is controlled to switch, which may cause some chips or modules in the rf circuit 120 to enter the idle state, so that the current of the chip or module is too large, and the chip or module is damaged.
Therefore, further, by using a timing control method, before the controller 110 needs to control the single-pole double-throw switch 130 to switch, the transmission state of the rf signal of the rf circuit 120 is limited, and then the antenna is switched. However, due to different software timing definitions of different platform manufacturers, the possibility still exists that the controller 110 controls the single-pole double-throw switch 130 to perform the switching operation when the rf circuit 120 is in the rf signal transmitting state, and the chip or module may also be damaged, thereby reducing the reliability of the electronic device.
Therefore, in order to overcome the above-mentioned drawbacks, the present application provides an antenna switching method, an apparatus and an electronic device.
Referring to fig. 2, fig. 2 illustrates an electronic device 200 according to an embodiment of the present disclosure. The electronic device 200 includes a controller 210, a radio frequency circuit 220, a first antenna 231, and a second antenna 232. The controller 210 is connected to the rf circuit 220, and the rf circuit 220 is configured to be connected to the first antenna 231 or the second antenna 232.
For some embodiments, the controller 210 may be configured to send a signal to the rf circuit 220 to instruct the rf circuit 220 to perform an antenna switching operation to switch the rf circuit 220 from being connected to the first antenna 231 to being connected to the second antenna 232. The controller 210 may be further configured to obtain a current operating state of the rf circuit 220, where the operating state may include that the rf circuit 220 is in an rf signal receiving state, an rf signal transmitting state, or a high isolation state. If the rf circuit 220 is in a high isolation state, the insertion loss of different ports of the rf circuit is large, and thus mutual interference between different ports is not formed. Further, after obtaining the working state of the rf circuit 220, the controller 210 may determine whether to control the rf circuit 220 to execute the antenna switching operation according to the obtained working state; or, it may be determined whether the antenna switching operation is successfully executed according to the obtained working state of the radio frequency circuit 220, that is, whether the radio frequency circuit 220 is connected to a target antenna corresponding to the antenna switching operation is determined.
The controller 210 may be a processor, which may include one or more processing cores. The controller 210 is connected to various portions of the rf circuit 220 using various interfaces and lines to communicate with the rf circuit 220 to control the rf circuit 220 to perform an antenna switching operation. Alternatively, the controller 210 may be implemented in the form of at least one hardware of a Micro Control Unit (MCU), a baseband chip (BB) Digital Signal Processing (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA).
For some embodiments, the rf circuit 220 may transmit or receive information by connecting to the first antenna 231 or the second antenna 232. Specifically, if the rf circuit 220 is in the rf signal receiving state, the rf circuit 220 may be connected to the first antenna 231 or the second antenna 232 to receive information; if the rf circuit 220 is in an rf signal transmitting state, the rf circuit 220 may be connected to the first antenna 231 or the second antenna 232 to transmit information. The rf circuit 220 may be an integrated chip combined with a corresponding rf transceiver, such as a WLAN7205C chip and a corresponding WiFi rf transceiver.
For some embodiments, the first antenna 231 and the second antenna 232 may be respectively connected to the rf circuit 220, so that the rf circuit 220 may receive or transmit information through the first antenna 231 or the second antenna 232. Specifically, the first antenna 231 and the second antenna 232 may have different shapes or sizes, so that the first antenna 231 and the second antenna 232 may have different center frequencies. When the antenna works near a central frequency point corresponding to the antenna, the impedance of the antenna is small, the efficiency is high, the standing-wave ratio is small, the power consumption is low, and signals are strong. For example, the center frequency of the first antenna 231 may be 5.5Ghz, and the center frequency of the second antenna 232 may be 6.5 Ghz. Therefore, when receiving or transmitting signals with a frequency around 5.5Ghz, the rf circuit 220 may connect with the first antenna 231 and then implement receiving or transmitting; when receiving or transmitting signals around the 6.5Ghz frequency, the reception or transmission can be performed by connecting with the second antenna 232.
Further, the electronic device 200 may be a smart phone, a notebook computer, a smart tablet, or the like. A specific method for controlling the rf circuit 220 to perform the antenna switching operation by the controller 210 may be referred to as the following embodiments.
Referring to fig. 3, fig. 3 is a diagram illustrating an application scenario of an antenna switching method according to an embodiment of the present application, that is, an antenna switching scenario 300. As in fig. 3, the electronic device 200 is a smartphone, and the user 310 is watching a video using the electronic device 200. At this time, the electronic device 200 is connected to the first antenna 231 through the radio frequency circuit 220, so as to realize communication with the WiFi router. In the scenario corresponding to fig. 3, the center frequency corresponding to the first antenna 231 is 5GHz, and the center frequency corresponding to the second antenna 232 is 2.4 GHz. At this time, since the position of the user 310 and the position of the router 320 are separated by a wall obstacle, the penetration capability of the center frequency 5GHz corresponding to the first antenna 231 is weak, and the first antenna is easily interfered by the obstacle, and at this time, the radio frequency circuit 220 in the electronic device 200 may be switched to be connected with the second antenna 232 through the controller 210, so that the radio frequency circuit 220 realizes connection communication with the router 320 through the second antenna 232.
Further, the method for controlling the rf circuit 220 to perform the antenna switching operation by the controller 210 can be referred to the following embodiments.
Referring to fig. 4, fig. 4 illustrates an antenna switching method provided in an embodiment of the present application, which can be applied to the controller 210 in the electronic device 200 in the foregoing embodiment, where the electronic device further includes a radio frequency circuit 220, a first antenna 231, and a second antenna 232. The controller 210 is connected to the rf circuit 220, and the rf circuit 220 is configured to be connected to the first antenna 231 or the second antenna 232. Specifically, the method includes step S110 and step S120.
Step S110: and acquiring the working state of the radio frequency circuit under the condition that the radio frequency circuit is connected with the first antenna.
For some embodiments, because the radio frequency circuit has a plurality of different operating states, if the radio frequency circuit is in some specific operating states, the antenna switching operation is executed, which may cause some chips or modules inside the radio frequency circuit to have no load, so that the current of the chip or module inside the radio frequency circuit that has no load is too large, which may damage the chip or module, which may affect the operating stability of the radio frequency circuit, thereby reducing the operating reliability of the whole electronic device. For example, the module inside the electronic device may include a Power Amplifier (PA), one end of the PA is connected to the rf signal transmitting port of the rf circuit, and the other end of the PA is connected to the first antenna or the second antenna. When the radio frequency circuit is in a radio frequency signal transmission state, the radio frequency signal can be transmitted from the first antenna or the second antenna after being subjected to power amplification through the power amplifier PA. At this time, if the rf circuit is in the rf signal transmitting state, and the antenna connected to the PA is switched, there may be no load at the end of the PA connected to the antenna, so that the entire load at the end of the PA is only the trace and some filters in the rf circuit, resulting in a large instantaneous Voltage Standing Wave Ratio (VSWR), which may result in a large rf signal reflected back to the PA and possibly burn out the PA. The voltage standing wave ratio VSWR is the ratio of the antinode voltage of the standing wave to the node voltage amplitude, and the smaller the voltage standing wave ratio VSWR is, the more the radio frequency energy is radiated by the antenna, and the smaller the reflected energy is; the larger the VSWR, the less the rf energy is radiated by the antenna and the more energy is radiated.
Therefore, under the condition that the radio frequency circuit is connected with the first antenna, the working state of the radio frequency circuit can be firstly acquired, and support is provided for subsequently executing antenna switching operation, namely, the antenna switching operation is executed only under the condition that the working state of the radio frequency circuit meets certain conditions, so that damage to some chips or modules in the radio frequency circuit is avoided, and meanwhile, the reliability of the electronic equipment can be improved.
The working state of the radio frequency circuit may include a radio frequency signal transmitting state, a radio frequency signal receiving state, and a high isolation state. The radio frequency signal sending state is used for transmitting the radio frequency signal through the first antenna or the second antenna connected with the radio frequency circuit. The radio frequency signal receiving state is used for receiving radio frequency signals through a first antenna or a second antenna connected with the radio frequency circuit. The high isolation state is used for entering a working state when the radio frequency circuit does not receive radio frequency signals and does not send the radio frequency signals, and when the radio frequency circuit is in the high isolation state, the insertion loss of each port in the radio frequency circuit is large, so that interference among the ports cannot be caused.
Further, the operating state of the rf circuit may also characterize which antenna the rf circuit is currently connected to. For example, the radio frequency circuit is currently in a radio frequency signal transmission state and is connected with the first antenna; or the radio frequency circuit is currently in a radio frequency signal sending state and is connected with the second antenna; or the radio frequency circuit is currently in a radio frequency signal receiving state and connected with the first antenna, or the radio frequency circuit is currently in a radio frequency signal receiving state and connected with the second antenna.
The first antenna and the second antenna may have different shapes or sizes, so that the first antenna and the second antenna may have different center frequencies.
For some embodiments, the controller may be connected to a control port of the rf circuit, and the operating state of the rf circuit is determined by obtaining a value of the control port of the rf circuit. The control port of the radio frequency circuit can have different values according to different current working states of the radio frequency circuit, so that the controller can acquire the working state of the radio frequency circuit by acquiring the values.
Step S120: and if the working state is a first state, controlling the radio frequency circuit to execute antenna switching operation, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
It will be readily appreciated that the rf circuitry may be connected to the first antenna before the antenna switching operation is performed, and thus the antenna switching operation may be to connect the rf circuitry to the second antenna. The rf circuit may be generally connected to the first antenna or the second antenna through a switching device, for example, the switching device may be a single-pole double-throw switch, and the single-pole double-throw switch may include a first connection mode and a second connection mode, where the first connection mode is that a first port of a single-pole side of the single-pole double-throw switch is conducted with a first port of a double-throw side, and the second connection mode is that the single-pole side of the single-pole double-throw switch is conducted with a second port of the double-throw side. A radio frequency circuit may be connected to the single pole side of the single pole double throw switch, a first antenna may be connected to a first port in the double throw side of the single pole double throw switch, and a second antenna may be connected to a second port in the double throw side of the single pole double throw switch. When the single-pole double-throw switch is in the first connection mode, the radio frequency circuit is connected with the first antenna; when the single-pole double-throw switch is in the second connection mode, the radio frequency circuit is connected with the second antenna. Furthermore, when the connection relationship between the radio frequency circuit and the antenna needs to be switched, the connection mode of the single-pole double-throw switch needs to be switched from the first connection mode to the second connection mode, that is, the first connection mode needs to be exited first, and then the second connection mode needs to be entered. Therefore, when the rf circuit needs to perform an antenna switching operation, the rf circuit needs to be disconnected from the currently connected antenna first and then connected to the antenna to be connected. For example, if the rf circuit is currently connected to the first antenna, and an antenna switching operation needs to be performed at this time, that is, the rf circuit needs to be switched to be connected to the second antenna, the rf circuit may be disconnected from the first antenna first, and then the rf circuit may be connected to the second antenna.
It should be noted that, for different switching devices, the antenna switching operation may also be to connect the radio frequency circuit and the antenna to be connected first, and then disconnect the radio frequency circuit and the previous antenna. For example, if the rf circuit is currently connected to the first antenna, and an antenna switching operation needs to be performed at this time, the rf circuit may be connected to the second antenna first, and then the rf circuit may be disconnected from the first antenna. For other embodiments, the antenna switching operation may be to disconnect the rf circuit from the currently connected antenna and connect the rf circuit to the antenna to be connected. For example, if the rf circuit is currently connected to the first antenna, an antenna switching operation needs to be performed, and the rf circuit may be connected to the second antenna while the rf circuit is disconnected from the first antenna.
For some embodiments, whether the working state is the first state may be determined according to the working state of the radio frequency circuit acquired in the foregoing step. As can be seen from the foregoing analysis, it is desirable to avoid performing the antenna switching operation when the rf circuit is in the rf transmitting state. Therefore, the first state may include that the radio frequency circuit is not in a radio frequency signal transmission state, and at this time, the antenna switching operation is performed on the radio frequency circuit, so that the chip or the module is not damaged, and the reliability of the electronic device can be ensured. As can be seen from the foregoing embodiments, the first state may include a radio frequency signal receiving state or a high isolation state.
Specifically, the working state of the radio frequency circuit can be represented by the control end of the radio frequency circuit, that is, for different working states, the control end can have different numbers to correspond to each other. Therefore, the controller can determine whether the working state corresponding to the number belongs to the first state according to the acquired number of the control terminal. For example, the numbers of the control terminal corresponding to all the operating states of the rf circuit may be classified in advance, for example, the operating states indicated by the numbers 0 to 5 are that the rf circuit is in an rf signal transmitting state, the operating states indicated by the numbers 6 to 10 are that the rf circuit is in an rf signal receiving state, and the operating states indicated by the numbers 11 to 15 are that the rf circuit is in a high isolation state. Since the first state is that the rf circuit is not in the rf signal transmitting state, i.e. the first state corresponds to the rf receiving state or the high isolation state, the first state may correspond to the numbers 6-15. Therefore, when the number acquired by the controller to the control end is in the range of 6-15, the radio frequency circuit can be judged to be in the first state. The correspondence between the numbers and the operating states is merely to illustrate the embodiment and is not limiting.
Further, after the radio frequency circuit is determined to be in the first state, the radio frequency circuit may be controlled to perform an antenna switching operation. The antenna switching operation can be an antenna switching instruction, the controller sends the antenna switching instruction to the radio frequency circuit, and the radio frequency circuit switches the antenna based on the antenna switching instruction. For other embodiments, the controller may also directly control the radio frequency circuit to switch the antenna, for example, the controller may directly control a switching module in the radio frequency circuit to switch the state, so that the antenna connected to the radio frequency circuit through the switching module is changed.
Optionally, after the radio frequency circuit is controlled to perform the antenna switching operation, it may be further detected whether the antenna connected to the radio frequency circuit is consistent with the antenna to be connected to the antenna switching operation. If the antenna connected with the radio frequency circuit is detected to be consistent with the antenna to be connected for the antenna switching operation, the antenna switching operation is successfully executed; if the antenna connected with the radio frequency circuit is detected to be inconsistent with the antenna required to be connected for the antenna switching operation, the antenna switching operation is not executed successfully, and at the moment, the antenna switching operation can be executed again until the antenna connected with the radio frequency circuit is detected to be consistent with the antenna required to be connected for the antenna switching operation. For example, if the radio frequency circuit is currently connected to the first antenna and the antenna switching operation is required to be connected to the second antenna, after the antenna switching operation is performed, it may be determined that the antenna switching operation is successful by detecting that the antenna connected to the radio frequency circuit is the second antenna, and it may be determined that the antenna switching operation is unsuccessful by detecting that the antenna connected to the radio frequency circuit is the first antenna. The controller can confirm that the radio frequency circuit is connected with the first antenna or the second antenna by acquiring data of the control end of the radio frequency circuit.
According to the antenna switching method, the antenna switching device and the electronic equipment, before the radio frequency circuit is controlled to execute the antenna switching operation, the working state of the radio frequency circuit needs to be obtained, and the radio frequency circuit is controlled to execute the antenna switching operation only when the working state is the first state, wherein the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state. When the rf circuit is in the rf signal transmitting state, the antenna switching operation is performed, which may cause an excessive current in the rf circuit or an excessive energy of the high-frequency signal reflected back to the rf circuit, thereby causing damage to the rf circuit. Therefore, the antenna switching operation is executed only when the radio frequency circuit is in the first state, namely the radio frequency circuit is not in the radio frequency signal sending state, and the phenomenon that the current in the radio frequency circuit is too large or the energy of the high-frequency signal reflected back to the radio frequency circuit is too large is avoided, so that the damage to the radio frequency circuit is avoided, and the reliability of the whole electronic equipment is improved.
Referring to fig. 5, fig. 5 illustrates an antenna switching method provided in an embodiment of the present application, which can be applied to the controller 210 in the electronic device 200 in the foregoing embodiment, where the electronic device further includes a radio frequency circuit 220, a first antenna 231, and a second antenna 232. The controller 210 is connected to the rf circuit 220, and the rf circuit 220 is configured to be connected to the first antenna 231 or the second antenna 232. Specifically, the method includes step S210 and step S240.
Step S210: and acquiring the working state of the radio frequency circuit under the condition that the radio frequency circuit is connected with the first antenna.
Step S220: and if the working state is a first state, controlling the radio frequency circuit to execute antenna switching operation, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
The steps S210 and S220 have already been described in detail in the foregoing embodiments, and are not described herein again.
Step S230: and if the working state is a second state, acquiring the target data to be transmitted currently by the radio frequency circuit, wherein the second state is used for representing that the radio frequency circuit is in the radio frequency signal transmitting state.
For some embodiments, it can be known from the analysis of the foregoing embodiment that, if the radio frequency circuit is in the radio frequency signal transmission state, directly performing the antenna switching operation may cause some chips or modules inside the radio frequency circuit to be idle, so that the current of the chip or module inside the radio frequency circuit that generates idle is too large, which damages the chip or module, affects the working stability of the radio frequency circuit, and reduces the working reliability of the whole electronic device. Therefore, when the radio frequency circuit is in a radio frequency signal transmission state, the mode of executing the antenna switching operation can be selected according to the target data transmitted by the current radio frequency circuit. The target data may be data to be sent by the radio frequency circuit, and the target data may be provided by a different application program in the electronic device, for example, the target data provided by the call application program may be voice data, the target data provided by the video application program may be video data, and the target data provided by the text chat application program may be text data. And wherein target data provided by different applications may have different characteristics. For example, the target data provided by the call application has a characteristic of a high degree of importance, the target data provided by the video application has a characteristic of a large data volume, the target data provided by the text chat application has a characteristic of a small data volume, and the like.
For some embodiments, the controller may directly obtain the target data in the radio frequency circuit. For example, the controller may send a data request command to the rf circuit, and the rf circuit may send the target data to the controller in response to the data request command after receiving the data request command. For other embodiments, the controller may further pre-define a header file of the target data with the radio frequency circuit, place the header file in front of the target data as an identity, and when the controller detects the pre-defined header file, it may be known that the data behind the header file is the target data. For example, a header file may be defined as a in advance, and if the target data is B, the controller may know that the following data B is the target data when detecting the file a.
For some embodiments, it may be determined whether the operating state of the radio frequency circuit is the second state based on the operating state acquired in the foregoing step. And the second state is that the radio frequency circuit is in a radio frequency signal sending state. Specifically, the controller may determine whether the working state corresponding to the number belongs to the second state according to the acquired number of the control terminal of the radio frequency circuit. As described in the foregoing examples of the embodiment, the numbers of the control terminals corresponding to all the operating states of the rf circuit may be classified in advance, for example, the operating states indicated by the numbers 0 to 5 are that the rf circuit is in an rf signal transmitting state, the operating states indicated by the numbers 6 to 10 are that the rf circuit is in an rf signal receiving state, and the operating states indicated by the numbers 11 to 15 are that the rf circuit is in a high isolation state. Since the first state is when the rf circuit is in an rf signaling state, the second state may correspond to a number 0-5. Therefore, when the controller acquires that the number of the control end is in the range of 0-5, the radio frequency circuit can be judged to be in the second state. The correspondence between the numbers and the operating states is merely to illustrate the embodiment and is not limiting.
Step S240: controlling the radio frequency circuit to perform the antenna switching operation based on the target data.
For some embodiments, when the rf circuit is in the rf signal transmitting state, the manner in which the antenna switching operation is performed may be selected according to target data currently transmitted by the rf circuit. For example, the manner of performing the antenna switching operation may be determined according to the data size of the target data. For example, if the data size of the target data is small, which means that the rf circuit can complete the transmission of the target data in a short time, the antenna switching operation may be performed after the rf circuit completes the transmission of the target data. If the data size of the target data is large, which means that the radio frequency circuit may take a long time to complete the transmission of the target data, the radio frequency circuit may be controlled to temporarily stop transmitting the target data, then perform the antenna switching operation, and continue to transmit the target data after the antenna switching operation is completed.
As another example, the manner in which the antenna switching operation is performed may also be confirmed according to the importance degree of the target data. For example, if the importance of the target data is higher, the antenna switching operation may be performed after the rf circuit completes transmitting the target data. If the importance degree of the target data is lower, the radio frequency circuit can be controlled to temporarily stop sending the target data, then the antenna switching operation is executed, and after the antenna switching operation is completed, the target data is continuously sent.
Specifically, referring to fig. 6, fig. 6 is a diagram illustrating an implementation of step S240, and fig. 6 includes step S241.
Step S241: and if the data volume of the target data meets a first condition, controlling the radio frequency circuit to execute the antenna switching operation after the target data is completely transmitted.
For some embodiments, as can be seen from the foregoing description, the data amount of the target data may include a data amount of the target data, or an importance degree of the target data, and when the target data satisfies that the amount is small or the importance degree of the target data is large, it indicates that the target data can be transmitted in a short time, or the target data is important, and at this time, the transmitting circuit may be controlled to perform the antenna switching operation after waiting for the target data to be transmitted. Therefore, the first condition may be that the target data has a small amount of data or a large data importance, and the radio frequency circuit is controlled to perform the antenna switching operation after the target data needs to be transmitted. The antenna switching operation can be executed after waiting for a short time for target data with a small data volume, and the transmission of the target data is ensured on the premise that the execution efficiency of the antenna switching operation is not influenced greatly. For target data with higher data importance, for example, the target data is voice data generated by a call application program, a user is making a call by sending the voice data, and if the transmission of the target data is interrupted, the use experience of the user may be affected, so that after the transmission of the target data is completed, the switching operation of the antenna is performed, that is, the use experience of the user is ensured.
Optionally, the data amount of the target data satisfying the first condition may be that the data amount of the target data is greater than a first threshold. Specifically, the data amount of the target data may be confirmed by the target data acquired in the foregoing steps, and then the data amount may be compared with the first threshold. If the data volume of the target data is smaller, the radio frequency circuit can finish the transmission of the target data in a shorter time; if the data amount of the target data is large, it means that the radio frequency circuit may take a long time to complete the transmission of the target data, and therefore the first threshold may be determined based on the characteristic that the data amount smaller than the first threshold can be transmitted in a short time. At this time, when the data amount is smaller than the first threshold, the radio frequency circuit may be controlled to perform the antenna switching operation after the target data is completely transmitted.
The data volume of the target data can be calculated based on the target data after the controller acquires the target data, and the data volume of the target data can be directly sent to the controller by the radio frequency circuit.
Further, the radio frequency circuit and the controller may agree with a trailer file in advance, and when the controller detects the trailer file, it may be determined that the target data has been transmitted, and may control the radio frequency circuit to perform an antenna switching operation. For other embodiments, the radio frequency circuit may further send an interrupt instruction to the controller after the target data is sent, where the interrupt instruction is used to inform the controller that the target data is sent, and the controller may control the radio frequency circuit to perform the antenna switching operation after receiving the interrupt instruction.
Optionally, the data amount of the target data satisfies the first condition, and the data importance degree of the target data may be greater than a second threshold. Specifically, the data importance degree of the target data may be determined through the target data acquired in the foregoing steps, and then the importance degree of the data is compared with the second threshold. If the data importance degree of the target data is smaller, the target data is represented to be less urgent or less important; if the data importance degree is larger, the target data is more urgent or important. The second threshold may therefore be determined based on the characteristic that the target data is more urgent or important, when the target data is more important than the second threshold. Therefore, when the importance degree of the data is greater than the second threshold, the radio frequency circuit may be controlled to perform the antenna switching operation after the target data is completely transmitted.
The data importance degree of the target data can be determined according to the type of the target data. That is, the target data acquired by the controller, the data importance level of the target data can be confirmed according to the type of the target data. For example, if the target data is of a key type, the data importance level of the target data is high, and if the target data is of a broadcast type, the data importance level of the target data is low. Further, a first score may be generated based on the type of the target data, and the first score may be used to characterize the data importance of the target data. For example, if the target data is of the key type, the data importance level of the target data is higher, and the first score may be higher, and if the target data is of the broadcast type, the data importance level of the target data is lower, and the first score may be lower. And comparing the generated first score with a second threshold, and when the first score is greater than the second threshold, namely the importance degree of data representing the target data is greater, waiting for the completion of the transmission of the target data, and then controlling the radio frequency circuit to execute the antenna switching operation.
Further, whether the target data is sent completely may be determined based on the method described above, and will not be described herein again. After the target data is confirmed to be sent, the radio frequency circuit can be controlled to execute antenna switching operation.
Optionally, referring to fig. 7, fig. 7 shows another implementation diagram of step S240, and fig. 7 includes step S242 to step S244.
Step S242: and if the data volume of the target data meets a second condition, controlling the radio frequency circuit to enter an idle mode, wherein the idle mode is used for representing that the radio frequency circuit does not transmit or receive radio frequency signals.
Step S243: controlling the radio frequency circuitry to perform the antenna switching operation while the radio frequency circuitry is in the idle mode.
Step S244: and after the antenna switching operation is successfully completed, the target data which is not sent is sent through the radio frequency circuit and the second antenna.
For some embodiments, as can be seen from the foregoing description, the data amount of the target data may include a data amount of the target data, or an importance level of the target data, and when the target data has a large amount or a small importance level, it indicates that the target data may take a long time to complete transmission, or the importance level of the target data is not high, and the radio frequency circuit may be controlled to suspend sending the target data first, and then be controlled to perform an antenna switching operation. Therefore, the second condition may be that the target data has a large amount of data or a small data importance level, and the radio frequency circuit may be controlled to suspend sending the target data first and then be controlled to perform the antenna switching operation. Specifically, the target data can be suspended by controlling the radio frequency circuit to enter an Idle (Idle) mode. The radio frequency circuit in the Idle mode does not transmit or receive a radio frequency signal, i.e., does not transmit or receive data, can maintain a low-power operating state, and can be woken up at any time to enter a radio frequency signal transmitting state to transmit data or a radio frequency signal receiving state to receive data. For target data with a large data volume, the target data may need to wait for a long time to be sent, so that the sending of the target data can be suspended first, and target data which is not sent can be sent continuously after the antenna switching operation is completed, thereby ensuring the efficiency of the weather switching operation. For target data with low data importance degree, for example, the target data is text data generated by a text chat application program, a user chats by sending the text data, if the transmission of the target data is interrupted for a short time, the influence on the use experience of the user is small, after the switching operation of the antenna is completed, the target data which is not sent is sent again, and on the premise that the influence on the use experience is small, the efficiency and the stability of the antenna switching operation are ensured.
Furthermore, the method for the controller to control the radio frequency circuit to enter the Idle mode can be used for directly sending the command for the controller to enter the Idle mode to the radio frequency circuit; or the controller may send a request for entering the Idle mode to the radio frequency circuit, and the radio frequency circuit automatically enters the Idle mode after acquiring the request.
Optionally, since it is necessary to suspend sending the target data meeting the second condition, after the antenna switching operation is completed, the target data that is not sent may be sent continuously through the radio frequency circuit and the antenna connected to the switched radio frequency circuit. For the embodiment provided by the present application, the antenna switching operation is to connect the radio frequency circuit to the second antenna and disconnect the radio frequency circuit from the first antenna, so that after the antenna switching operation is completed, target data that is not transmitted can be continuously transmitted through the radio frequency circuit and the second antenna. It is easy to understand that, because it takes a certain time for the controller to control the rf circuit to enter the Idle mode, and the rf circuit may still transmit the target data in the first time, after transmitting a part of the target data, the rf circuit successfully enters the Idle mode, and at this time, the transmission of the remaining target data is suspended, so that the target data that is not transmitted may be the remaining target data that is not transmitted after the transmission is suspended. That is, the target data may be temporarily stopped after a part of the target data is transmitted, and therefore, after the antenna switching operation is completed, the target data that is not transmitted may be retransmitted. For other embodiments, in order to ensure the integrity of data and improve the stability of the rf circuit, all target data may be retransmitted after the antenna switching operation is completed.
Furthermore, after the antenna switching operation is executed, it may be detected whether the radio frequency circuit is connected to the second antenna, that is, whether the switching is successful, and if the switching is not successful, the radio frequency circuit may be controlled to execute the antenna switching operation again. The controller can judge whether the radio frequency circuit is connected with the first antenna or the second antenna by acquiring data of a control end of the radio frequency circuit.
Optionally, after the antenna switching operation is completed, the controller may control the radio frequency circuit to re-enter the radio frequency signal transmission state from the Idle mode to transmit the target data that is not transmitted.
Optionally, the data amount of the target data satisfying the second condition may be that the data amount of the target data is greater than a third threshold. Specifically, the data amount of the target data may be confirmed by the target data acquired in the foregoing steps, and then the data amount may be compared with the third threshold. If the data volume of the target data is smaller, the radio frequency circuit can finish the transmission of the target data in a shorter time; if the data amount of the target data is larger, it means that the radio frequency circuit may take longer to complete the transmission of the target data, and therefore, the third threshold may be determined based on the characteristic that the data amount larger than the third threshold may take longer to complete the transmission. At this time, when the data amount is greater than the third threshold, the sending of the target data by the radio frequency circuit may be suspended first, that is, the radio frequency circuit may be controlled to enter the Idle mode, and the radio frequency circuit is controlled to execute the antenna switching operation under the condition that the radio frequency circuit is in the Idle mode. And after the antenna switching operation is finished, the target data which is not transmitted is transmitted through the radio frequency circuit and the second antenna.
Optionally, the data amount of the target data satisfying the second condition may be that the data importance degree of the target data is greater than a fourth threshold. Specifically, the data importance degree of the target data may be confirmed by the target data acquired in the foregoing steps, and then the importance degree of the data is compared with the fourth threshold. If the data importance degree of the target data is smaller, the target data is represented to be less urgent or less important; if the importance of the data is greater, it means that the target data is more urgent or more important, and therefore, the fourth threshold may be determined based on the characteristic that the target data is less urgent or less important when the importance of the target data is less than the fourth threshold. Therefore, when the importance degree of the data is smaller than the fourth threshold, the sending of the target data by the radio frequency circuit may be suspended first, that is, the radio frequency circuit may be controlled to enter the Idle mode, and the radio frequency circuit is controlled to execute the antenna switching operation under the condition that the radio frequency circuit is in the Idle mode. And after the antenna switching operation is finished, the target data which is not transmitted is transmitted through the radio frequency circuit and the second antenna.
The data importance degree can be judged according to the type of the target data, a first score can be generated according to the type of the target data, and the data importance degree of the target data is represented through the first score. Specifically, the details are already described in the foregoing embodiments, and thus the details are not repeated here.
Further, the method for detecting whether the antenna switching operation is successfully executed and continuing to send the target data that is not sent after the antenna switching operation is successfully executed is described in detail in the foregoing embodiments, and is not described herein again.
Optionally, the controller may further count a first time when the radio frequency circuit is connected to the first antenna and a second time when the radio frequency circuit is connected to the second antenna within a certain time period, and may use the antenna corresponding to the longer time as the antenna connected by default when the radio frequency circuit is initialized, so as to reduce the number of times of performing the antenna switching operation, and improve the user experience to a certain extent. Further, the first time and the second time can also be used to provide guidance for subsequent system design.
According to the antenna switching method, the antenna switching device and the electronic equipment, before the radio frequency circuit is controlled to execute the antenna switching operation, the working state of the radio frequency circuit needs to be obtained, when the radio frequency circuit is in the second working state, the target data to be transmitted currently of the radio frequency circuit is obtained, then the radio frequency circuit is controlled to execute the antenna switching operation based on the target data, wherein the second state is used for representing that the radio frequency circuit is in the radio frequency signal sending state. When the rf circuit is in the rf signal transmitting state, the antenna switching operation is performed, which may cause an excessive current in the rf circuit or an excessive energy of the high-frequency signal reflected back to the rf circuit, thereby causing damage to the rf circuit. Therefore, in the embodiment of the application, the target data of the radio frequency circuit in the second working state is acquired, and the antenna switching operation is executed after the transmission of the target data is finished is judged based on the data volume or the importance degree of the target data, or the target data is suspended to be transmitted first, and the target data which is not transmitted is continuously transmitted after the antenna switching operation is finished, so that the antenna switching operation can be safely executed when the radio frequency circuit is in the second working state on the basis of the previous embodiment, and the efficiency and the stability of the radio frequency circuit in executing the antenna switching operation are improved.
Referring to fig. 8, fig. 8 shows an antenna switching method provided in an embodiment of the present application, where the method can be applied to the controller 210 in the electronic device 200 in the foregoing embodiment, and the electronic device further includes the controller 210, the radio frequency circuit 220, the first antenna 231, and the second antenna 232. The controller 210 is connected to the rf circuit 220, and the rf circuit 220 is configured to be connected to the first antenna 231 or the second antenna 232. Specifically, the method includes steps S301 to S312.
Step S301: and (5) initializing.
For some embodiments, the initialization may be to power up the electronic device to connect the radio frequency circuit to the first antenna.
Step S302: the radio frequency circuit works normally.
At this time, the radio frequency circuit can realize radio frequency signal transmission or radio frequency signal reception through the first antenna.
Step S303: whether the antenna needs to be switched.
When the antenna needs to be switched, step S304 may be skipped, and when the antenna does not need to be switched, step S312 may be skipped.
Step S304: whether in the second state.
Before performing the antenna switching operation, the working state of the radio frequency circuit may be obtained and determined, and specific methods for obtaining and determining may refer to the foregoing embodiments, which are not described herein again. When the radio frequency circuit is in the second state, the step S305 is executed by jumping, and when the radio frequency circuit is not in the second state, the step S308 is executed by jumping.
Step S305: whether the amount of data is small or the importance of the data is high.
If the data size of the target data is small or the importance of the data is high, the step S306 may be skipped, otherwise, the step S307 is skipped. The method for obtaining and determining whether the data size of the target data is small or the importance of the data is high is described in the foregoing embodiments, and is not described here again.
Step S306: and waiting for the target data transmission to complete.
Step S307: transmission of the target data is suspended.
The method for suspending the transmission of the target data may refer to the foregoing embodiments.
Step S308: an antenna switching operation is performed.
After waiting for the completion of the transmission of the target data, or after suspending the transmission of the target data, an antenna switching operation may be performed.
Step S309: whether the handover was successful.
If the switching is successful, the step S310 is executed, otherwise, the step S308 is executed.
Step S310: whether to transmit unsent target data.
And when the target data which is not sent needs to be sent, skipping to execute the step S311, otherwise, entering the step S312.
Step S311: and sending the target data which is not sent.
The method of transmitting unsent target data can refer to the foregoing embodiment.
Step S312: the radio frequency circuit works normally.
Referring to fig. 9, fig. 9 is a block diagram of an antenna switching apparatus 900 according to an embodiment of the present application, which is applied to a controller of an electronic device, where the electronic device further includes a first antenna, a second antenna, and a radio frequency circuit, the controller is connected to the radio frequency circuit, and the radio frequency circuit is used to be connected to the first antenna or the second antenna, and the apparatus includes: a detection unit 910 and a switching unit 920.
A detecting unit 910, configured to obtain a working state of the radio frequency circuit when the radio frequency circuit is connected to the first antenna;
a switching unit 920, configured to control the radio frequency circuit to execute an antenna switching operation if the working state is a first state, where the antenna switching operation is to be connected to the second antenna and disconnected from the first antenna, and the first state is used to indicate that the radio frequency circuit is not in a radio frequency signal sending state.
Further, the switching unit 920 is further configured to obtain target data to be currently transmitted by the radio frequency circuit if the working state is a second state, where the second state is used to represent that the radio frequency circuit is in the radio frequency signal sending state; controlling the radio frequency circuit to perform the antenna switching operation based on the target data.
Further, the switching unit 920 is further configured to control the radio frequency circuit to execute the antenna switching operation when the data amount of the target data meets a first condition and the target data transmission is finished.
Optionally, the data amount of the target data satisfies a first condition that the data amount of the target data is smaller than a first threshold.
Optionally, the data size of the target data satisfies a first condition that the data importance degree of the target data is greater than a second threshold.
Further, the switching unit 920 is further configured to control the radio frequency circuit to enter an idle mode if the data amount of the target data meets a second condition, where the idle mode is used to characterize that the radio frequency circuit does not transmit or receive a radio frequency signal; controlling the radio frequency circuitry to perform the antenna switching operation while the radio frequency circuitry is in the idle mode.
Further, the switching unit 920 is further configured to send the target data that is not sent through the radio frequency circuit and the second antenna after the antenna switching operation is successfully completed.
Optionally, the data amount of the target data satisfies a second condition that the data amount of the target data is greater than a third threshold.
Optionally, the data size of the target data satisfies a second condition that the data importance degree of the target data is smaller than a fourth threshold.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the connection between the units may be electrical, mechanical or other connection.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
Referring to fig. 10, fig. 10 shows an electronic device 200 according to an embodiment of the present application. The electronic device 200 includes a controller 210, a radio frequency circuit 220, a first antenna 231, and a second antenna 232. Specifically, the controller 210 is connected to the rf circuit 220, and the rf circuit 220 is configured to be connected to a first antenna 231 or a second antenna 232. The controller 210 may control the rf circuit 220 to perform the antenna switching operation by using the antenna switching method in the foregoing embodiment, and the specific method may refer to the description in the foregoing embodiment, which is not described herein again.
With reference to fig. 10, the rf circuit 220 further includes an rf transceiver 222 and a communication chip 221, wherein the controller 210 is connected to the rf transceiver 222, a first terminal of the rf transceiver 222 is connected to a first control terminal of the communication chip 221, an output terminal of the communication chip 221 is connected to the first antenna 231 or the second antenna 232, and the controller 210 is further connected to the first terminal of the rf transceiver 222.
The communication chip 221 may be an integrated chip, such as a WLAN7205C chip. The communication chip has a radio frequency signal transmitting state, a radio frequency signal receiving state or a high isolation state. It is easy to understand that the operating state of the rf circuit is the operating state of the communication chip. It is easy to understand that the communication chip 221 can transmit or receive the radio frequency signal through the connection antenna, but the received or transmitted radio frequency signal cannot be directly subjected to analog-to-digital conversion and subsequent data processing, and at this time, the radio frequency signal received by the communication chip 221 through the antenna needs to be down-converted to a low-frequency signal that can be used for data processing through the radio frequency transceiver 222; or up-convert the low frequency signal to be transmitted to a high frequency signal that can be used for radio frequency signal transmission.
For some embodiments, the first control terminal of the communication chip 221 may be configured to receive a first signal transmitted by the first terminal of the rf transceiver 222, and according to the first signal, the communication chip 221 may enter a corresponding operating state. Specifically, the first control terminal may be a port, the first signal may be a serial port signal, for example, may be a character string, and the communication chip 221 identifies a working state corresponding to the character string and switches the working state according to the obtained character string. For other embodiments, the first control end of the communication chip 221 may also be a plurality of ports, and the first end of the radio frequency transceiver 222 may also be a plurality of ports, where each first end is in one-to-one correspondence with each first control end, and the first signal may be a set of signals sent by each first end. For example, each first terminal sends a character to each first control terminal, the first signal may be a character string composed of a plurality of characters, and the communication chip 221 switches the operating state according to the character received by each first control terminal.
For example, the first control terminal of the communication chip 221 may be 4 ports, which are C0, C1, C2 and C3, wherein C0 is high and C3 is low. The first end of the rf transceiver 222 is also 4 ports, and is respectively connected to the 4 ports of the first control end. At this time, the first signal may be a parallel port signal, and which working state should be entered may be determined according to data received by each port in the first control port. In particular, please refer to table 1.
TABLE 1
C0 C1 C2 C3 Mode of operation Remarks for note
0 0 0 0 \ High isolation
1 0 0 0 First sending Low bandwidth
1 0 0 1 Second sending High bandwidth
0 1 1 0 First receiving Low bandwidth
0 1 1 1 Second receiving High bandwidth
0 0 0 1 \ Retention
Table 1 shows the operating state of the communication chip 221 corresponding to the partial value in the first control terminal, that is, the operating state of the rf circuit 220 in the embodiment of the present application. Specifically, if the first control terminal is "0000", the rf circuit 220 may be in a high isolation state; if the first control end is "1000", the rf circuit 220 may be in a transmitting state, and at this time, the rf circuit 220 is connected to the first antenna 231, so as to transmit the rf signal with a lower bandwidth; if the first control terminal is "1001", the rf circuit 220 may be in a transmitting state, and at this time, the rf circuit 220 is connected to the second antenna 232, so as to transmit a higher bandwidth rf signal; if the first control end is "0110", the rf circuit 220 may be in a receiving state, and at this time, the rf circuit 220 is connected to the first antenna 231, so as to receive the rf signal with a lower bandwidth; if the first control terminal is "0111", the rf circuit 220 may be in a receiving state, and at this time, the rf circuit 220 is connected to the second antenna 231, so as to receive the rf signal with a higher bandwidth. Further, table 1 also includes a case where the first control terminal is "0001", and this case is a reserved state, that is, a value of "0001" may be assigned to other operating states for correspondence. Wherein, each port value "1" may represent that the port is at a high level; each port has a value of "0", which may represent that the port is low. It is easy to understand that the correspondence between the specific numerical values and the operating states shown in table 1 is only for illustrating the present embodiment, and is not limited thereto, and the specific implementation can be flexibly set as needed.
Further, the controller 210 may be configured to obtain a level state of a first signal output by the first end of the radio frequency transceiver 222, determine an operating state of the communication chip 220 based on the level state of the first signal, and control the communication chip to perform an antenna switching operation if the operating state is the first state. As shown in table 1, the first state may correspond to the value of the first control terminal being "1000" or "1001", that is, when the controller 210 detects that the first signal is "1000" or "1001", it may be determined that the operating state of the communication chip 220 is the first state, and at this time, the communication chip 221 may be controlled to perform the antenna switching operation. Specifically, the controller 210 may be a microprocessor, and the controller 210 has a plurality of General Purpose Input/Output (GPIO) interfaces, each of which is connected to a first terminal of the rf transceiver 222, that is, a first control terminal of the communication chip 221. For example, the controller 210 has a gpio interface 0, a gpio interface 1, a gpio interface 2, and a gpio interface 3, the gpio interface 0 may be connected to C0, the gpio interface 1 may be connected to C1, the gpio interface 2 may be connected to C2, and the gpio interface 3 may be connected to C3. The controller 210 may obtain the level state of the first signal output from the first terminal based on the value of each gpio interface.
Optionally, with continued reference to fig. 10, the rf circuit 220 may further include a switch 223. Wherein the second terminal of the rf transceiver 222 is connected to the second control terminal of the switch.
For some embodiments, the controller 220 is configured to send an antenna switching command to the rf transceiver 222; the rf transceiver is further configured to output a second signal to the second control terminal of the switch 223 in response to the antenna switching command; the switch is configured to connect the communication chip 221 and the second antenna 232 based on the second signal.
The switch 223 may have two communication modes, for example, the switch 223 may be a single-pole double-throw switch. The switch 223 may connect the output of the communication chip 221 to the first antenna 231 or the output of the communication chip 221 to the second antenna 232. Therefore, the second control terminal of the switch 223 may be a port, the second terminal of the rf transceiver 222 is also a port, and the second signal may be a character "0" or "1", where the character "0" may represent a low level, i.e., the switch 223 connects the output terminal of the communication chip 221 with the first antenna 231; the character "1" may represent a high level, i.e., the switch 223 connects the output terminal of the communication chip 221 to the second antenna 232.
For other embodiments, the switch 223 may further have multiple communication modes, where the second control end of the switch 223 may be multiple ports, the second end of the radio frequency transceiver 222 may also be multiple ports, and the second end sends the second signal to the second control end to control the switch 223. In the specific method, the first terminal sends the first signal to the first control terminal to realize control of the communication chip 221, which is not described herein again.
Referring to fig. 11, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 1100 has stored therein program code that can be called by a processor to perform the method described in the above-described method embodiments.
The computer-readable storage medium 1100 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 1100 includes a non-volatile computer-readable storage medium. The computer readable storage medium 1100 has storage space for program code 1110 for performing any of the method steps of the method described above. The program code can be read from and written to one or more computer program products. The program code 1110 may be compressed, for example, in a suitable form.
Referring to fig. 12, a block diagram of a computer program product 1200 provided in an embodiment of the present application is shown. Included in the computer program product 1200 are computer programs/instructions 1210, which computer programs/instructions 1210, when executed by a processor, implement the steps of the above-described methods.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. An antenna switching method is applied to a controller of an electronic device, wherein the electronic device further includes a first antenna, a second antenna and a radio frequency circuit, the controller is connected to the radio frequency circuit, and the radio frequency circuit is configured to be connected to the first antenna or the second antenna, and the method includes:
under the condition that the radio frequency circuit is connected with the first antenna, acquiring the working state of the radio frequency circuit;
and if the working state is a first state, controlling the radio frequency circuit to execute antenna switching operation, wherein the antenna switching operation is to be connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
2. The method of claim 1, further comprising:
if the working state is a second state, acquiring target data to be transmitted currently by the radio frequency circuit, wherein the second state is used for representing that the radio frequency circuit is in the radio frequency signal transmitting state;
controlling the radio frequency circuit to perform the antenna switching operation based on the target data.
3. The method of claim 2, wherein the controlling the radio frequency circuit to perform the antenna switching operation based on the target data comprises:
and if the data volume of the target data meets a first condition, controlling the radio frequency circuit to execute the antenna switching operation after the target data is completely transmitted.
4. The method of claim 3, wherein the first condition that the amount of data of the target data satisfies is that the amount of data of the target data is greater than a first threshold.
5. The method of claim 3, wherein the data volume of the target data satisfies a first condition that the data importance of the target data is greater than a second threshold.
6. The method of claim 2, wherein the controlling the radio frequency circuit to perform the antenna switching operation based on the target data comprises:
if the data volume of the target data meets a second condition, controlling the radio frequency circuit to enter an idle mode, wherein the idle mode is used for representing that the radio frequency circuit does not transmit or receive radio frequency signals;
controlling the radio frequency circuitry to perform the antenna switching operation while the radio frequency circuitry is in the idle mode.
7. The method of claim 6, further comprising:
and after the antenna switching operation is successfully completed, the target data which is not sent is sent through the radio frequency circuit and the second antenna.
8. The method of claim 6, wherein the second condition that the data amount of the target data satisfies is that the data amount of the target data is less than a third threshold.
9. The method according to claim 6, wherein the second condition that the data amount of the target data satisfies is that the data importance degree of the target data is less than a fourth threshold.
10. An antenna switching apparatus, applied to a controller of an electronic device, wherein the electronic device further includes a first antenna, a second antenna and a radio frequency circuit, the controller is connected to the radio frequency circuit, and the radio frequency circuit is configured to be connected to the first antenna or the second antenna, the apparatus includes:
the detection unit is used for acquiring the working state of the radio frequency circuit under the condition that the radio frequency circuit is connected with the first antenna;
and the switching unit is used for controlling the radio frequency circuit to execute antenna switching operation if the working state is a first state, wherein the antenna switching operation is that the antenna switching operation is connected with the second antenna and disconnected with the first antenna, and the first state is used for representing that the radio frequency circuit is not in a radio frequency signal sending state.
11. An electronic device, characterized in that the electronic device comprises: the antenna comprises a controller, a radio frequency circuit, a first antenna and a second antenna;
the controller is coupled to the radio frequency circuitry for coupling to either the first antenna or the second antenna, the controller being configured to perform the method of claims 1-9.
12. The electronic device of claim 11, wherein the radio frequency circuitry comprises: the controller is connected with the radio frequency transceiver, a first end of the radio frequency transceiver is connected with a first control end of the communication chip, an output end of the communication chip is connected with the first antenna or the second antenna, the working state of the radio frequency circuit is the working state of the communication chip, and the working state of the communication chip is a radio frequency signal sending state under the condition that the first control end of the communication chip is in a first level state;
the controller is configured to acquire a level state of a first signal output by the first end of the radio frequency transceiver, determine a working state of the communication chip based on the level state of the first signal, and control the communication chip to perform an antenna switching operation if the working state is the first state.
13. The electronic device of claim 12, wherein the radio frequency circuit further comprises a switch, and wherein the second terminal of the radio frequency transceiver is connected to the second control terminal of the switch;
the controller is used for sending an antenna switching instruction to the radio frequency transceiver;
the radio frequency transceiver is also used for responding to the antenna switching instruction and outputting a second signal to a second control end of the switch;
the switch is used for connecting the communication chip with the second antenna based on the second signal.
CN202210647517.4A 2022-06-08 2022-06-08 Antenna switching method and device and electronic equipment Withdrawn CN115065369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210647517.4A CN115065369A (en) 2022-06-08 2022-06-08 Antenna switching method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210647517.4A CN115065369A (en) 2022-06-08 2022-06-08 Antenna switching method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115065369A true CN115065369A (en) 2022-09-16

Family

ID=83199805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210647517.4A Withdrawn CN115065369A (en) 2022-06-08 2022-06-08 Antenna switching method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115065369A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01120107A (en) * 1987-11-02 1989-05-12 Kokusai Electric Co Ltd Switching method for directional antenna for data transmission
US20120106671A1 (en) * 2008-12-19 2012-05-03 Nokia Corporation Two power control loops for antenna switching transmit diversity
US20150094003A1 (en) * 2013-09-30 2015-04-02 Qualcomm Incorporated Systems and methods for transmit antenna switching
US20170359113A1 (en) * 2016-06-14 2017-12-14 Samsung Electronics Co., Ltd. Method for controlling antenna and electronic device using the same
US10574316B1 (en) * 2018-05-23 2020-02-25 Amazon Technologies, Inc. Antenna switching for device with multiple antennas
CN114258712A (en) * 2019-08-30 2022-03-29 高通股份有限公司 Antenna switching scheduling

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01120107A (en) * 1987-11-02 1989-05-12 Kokusai Electric Co Ltd Switching method for directional antenna for data transmission
US20120106671A1 (en) * 2008-12-19 2012-05-03 Nokia Corporation Two power control loops for antenna switching transmit diversity
US20150094003A1 (en) * 2013-09-30 2015-04-02 Qualcomm Incorporated Systems and methods for transmit antenna switching
US20170359113A1 (en) * 2016-06-14 2017-12-14 Samsung Electronics Co., Ltd. Method for controlling antenna and electronic device using the same
US10574316B1 (en) * 2018-05-23 2020-02-25 Amazon Technologies, Inc. Antenna switching for device with multiple antennas
CN114258712A (en) * 2019-08-30 2022-03-29 高通股份有限公司 Antenna switching scheduling

Similar Documents

Publication Publication Date Title
CN111654316B (en) Antenna switching method and device, storage medium and electronic equipment
CN111770559B (en) Network connection method, terminal, base station, and computer storage medium
US10129832B2 (en) Wireless communication control method and wireless network device
CN106230492B (en) Terminal antenna switching method and device and mobile terminal
EP3011779A1 (en) Low energy wireless proximity pairing
CN103516879B (en) The radiation based reminding method of mobile terminal and mobile terminal
CN112769445B (en) Radio frequency circuit, signal transmitting method and electronic equipment
CN106130572A (en) Method, device and the mobile terminal of a kind of switching terminal antenna
CN103178868A (en) Radio-frequency transmission circuit, electronic device thereof and method for saving power
CN111756396A (en) Radio frequency circuit, electronic device, and control method
US20090129324A1 (en) Communication system and communication method
CN113395690B (en) Bluetooth equipment automatic connection method, device, equipment and storage medium
CN113783994A (en) Prompt information display method and device, electronic equipment and storage medium
CN113114300A (en) Electronic equipment and control method
CN107431524A (en) A kind of antenna allocation method and terminal
CN115065369A (en) Antenna switching method and device and electronic equipment
CN112153712A (en) Communication method and device of terminal and base station
CN110797985B (en) Coil switching method and device, storage medium and electronic equipment
CN110603749B (en) Wireless communication module supporting short-distance wireless communication and long-distance wireless communication
CN104467881A (en) Communication device and relevant signal receiving device thereof
CN110417422B (en) Communication control method, communication control circuit and related device
CN105406891A (en) Carrier aggregation mode setting method for communication terminal and communication terminal
CN104283592A (en) Information processing method and electronic device
US8731481B2 (en) Device, device base, and system for data sending and receiving processing
CN214591349U (en) Radio frequency circuit and communication terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20220916

WW01 Invention patent application withdrawn after publication