Bluetooth frequency offset calibration method, Bluetooth connection method, Bluetooth chip and Bluetooth device
By using external data packets to calibrate the frequency offset of the internal clock source in the target state of the Bluetooth device and using software algorithms for dynamic compensation, the high cost of traditional Bluetooth devices is solved, dynamic self-calibration of frequency accuracy is achieved, and material costs and PCB area are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI JIELI TECH
- Filing Date
- 2026-01-13
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional Bluetooth devices require an external high-precision crystal oscillator, which increases material costs and circuit board area, resulting in high production costs.
By using external data packets to calibrate the frequency offset of the internal clock source of the Bluetooth chip when the Bluetooth device is in target state, and using software algorithms to dynamically compensate and calibrate the frequency offset of the internal clock source, the external crystal oscillator and related peripheral components are eliminated.
It reduces the material cost and PCB area of Bluetooth devices, enables dynamic self-calibration of frequency accuracy, and reduces hardware dependence.
Smart Images

Figure CN121888349A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of radio frequency communication technology, and in particular to a Bluetooth frequency offset calibration method, a Bluetooth connection method, a Bluetooth chip, and a Bluetooth device. Background Technology
[0002] For Bluetooth devices to communicate reliably in the 2.4GHz band, they must have a highly accurate and stable clock source to generate a precise radio frequency carrier. The accuracy of this clock source directly determines the frequency tolerance of the radio frequency signal and is fundamental to ensuring normal data transmission and reception between devices, stable connections, and frequency hopping interference immunity.
[0003] Traditional solutions involve connecting a high-precision crystal oscillator externally to the Bluetooth chip and then utilizing the inherent physical characteristics of the external crystal oscillator to provide a stable and accurate reference clock signal for the system.
[0004] However, the external crystal oscillator and its associated load capacitor in traditional solutions significantly increase the material cost and circuit board area of electronic devices, thereby increasing the production cost of Bluetooth devices. Summary of the Invention
[0005] Therefore, it is necessary to provide a Bluetooth frequency offset calibration method, Bluetooth connection method, Bluetooth chip, and Bluetooth device that can reduce the production cost of Bluetooth devices, addressing the aforementioned technical problems.
[0006] Firstly, this application provides a Bluetooth frequency offset calibration method, applied to the Bluetooth chip of a Bluetooth device, the method comprising:
[0007] When the Bluetooth device is in target state, the frequency offset of the internal clock source of the Bluetooth chip is calibrated according to the external data packet;
[0008] The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with an external device; the source device of the external data packet includes the external device.
[0009] In one embodiment, the target state includes a searchable and connectable state during the power-on phase and a reconnection state;
[0010] Searchable and connectable states include high and low frequency point calibration state, crystal oscillator-free interrogation scan state, and crystal oscillator-free paging scan state; reconnection states include crystal oscillator-free paging state;
[0011] The external data packets include Bluetooth communication data for external devices in the crystal-free paging scan state, ID data packets for the crystal-free polling scan state, Bluetooth communication data for external devices in the crystal-free paging state, and air data packets, high-frequency data packets, and low-frequency data packets for the high and low frequency calibration states.
[0012] In one embodiment, when the target state is a high / low frequency calibration state, and the Bluetooth device is in the target state, calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets includes:
[0013] Acquire over-the-air data packets;
[0014] Based on the frequency offset of over-the-air data packets, calibrate the fractional deviation of the internal clock source;
[0015] Acquire low-frequency data packets and high-frequency data packets;
[0016] The integer frequency offset of the internal clock source is calibrated based on the frequency offset of low-frequency data packets and high-frequency data packets.
[0017] In one embodiment, calibrating the integer frequency offset of the internal clock source based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets includes:
[0018] Based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets, the difference between the reference clock frequency and the actual clock frequency is determined.
[0019] The integer frequency offset of the internal clock source is determined and compensated based on the difference between the reference clock frequency and the actual clock frequency.
[0020] In one embodiment, when the target state is a crystal-free polling scan state, and the Bluetooth device is in the target state, calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets includes:
[0021] Retrieve ID data packet;
[0022] Based on ID data packets, it compensates for fractional deviations in the internal clock source.
[0023] In one embodiment, the method further includes:
[0024] A multi-frequency transmission strategy is used to send probe data packets.
[0025] In one embodiment, when the target state is a crystal-free paging scan state; when the Bluetooth device is in the target state, calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets includes:
[0026] If a first device ID packet is received from an external device, the fractional deviation of the internal clock source is calibrated based on the first device ID packet, and a first chip ID packet is sent back to the external device using a multi-frequency transmission strategy.
[0027] If a first device FHS packet is received in response from an external device based on the first chip ID packet, a second chip ID packet is sent back to the external device using a multi-frequency transmission strategy.
[0028] If a first device POLL packet is received in response from an external device based on the second chip ID packet, then the entire frequency offset of the internal clock source is calibrated based on the first device POLL packet.
[0029] In one embodiment, after the step of calibrating the entire frequency offset of the internal clock source based on the first device POLL packet, the method further includes:
[0030] A multi-frequency transmission strategy is used to reply with a chip NULL packet to an external device in order to establish a Bluetooth connection with the external device.
[0031] In one embodiment, when the target state is a crystal-free paging state, and the Bluetooth device is in the target state, calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets includes:
[0032] The third chip ID packet is transmitted using a multi-frequency transmission strategy.
[0033] If a second device ID packet is received from an external device in response based on a third chip ID packet, the frequency offset of the internal clock source is calibrated based on the second device ID packet.
[0034] In one embodiment, after the step of calibrating the frequency offset of the internal clock source based on the second device ID packet, the method further includes:
[0035] Reply to the external device with the first chip FHS packet;
[0036] If a third device ID packet is received from an external device in response to a first chip FHS packet, then a first chip POLL packet is sent back to the external device.
[0037] If a first device NULL packet is received in response from an external device based on a first chip POLL packet, a Bluetooth connection with the external device is established.
[0038] In one embodiment, the method further includes:
[0039] If no third device ID packet is received from the external device based on the first chip FHS packet, a fourth chip ID packet is sent according to the radio frequency offset scanning strategy. The radio frequency offset scanning strategy includes adjusting the radio frequency offset of the Bluetooth chip while combining multiple transmission frequency points to enable the Bluetooth chip to send ID data packets in the multiple transmission state.
[0040] If a fourth device ID packet is received from an external device in response based on the fourth chip ID packet, the frequency offset adjustment based on the RF frequency offset scanning strategy is stopped, and the current multi-transmission state of the Bluetooth chip is maintained to send the second chip FHS packet.
[0041] If a fifth device ID packet is received from an external device in response to the second chip's FHS packet, the current multi-transmission state of the Bluetooth chip is maintained and the second chip's POLL packet is sent.
[0042] If a second device NULL packet is received in response from an external device based on a second chip POLL packet, the frequency offset of the internal clock source is calibrated based on the second device NULL packet.
[0043] Secondly, this application provides a Bluetooth connection method applied to a Bluetooth device, wherein the Bluetooth chip in the Bluetooth device uses the Bluetooth frequency offset calibration method described in any one of the first aspects to perform frequency offset calibration of its internal clock source; the method includes:
[0044] Establish a Bluetooth connection with external devices.
[0045] Thirdly, this application provides a Bluetooth chip, comprising: a processor for retrieving and running a computer program from a memory, causing a Bluetooth device equipped with the Bluetooth chip to perform the steps of the methods of any one of the first and / or second aspects.
[0046] Fourthly, this application provides a Bluetooth device, including the Bluetooth chip as described in the third aspect.
[0047] In one embodiment, the Bluetooth device has high-bandwidth reception and multi-frequency transmission capabilities;
[0048] Among them, the high-bandwidth reception function is used to receive data packets within the ±2MHz bandwidth range of the current frequency point of the Bluetooth chip; the multi-frequency transmission function is used to simultaneously transmit the same data packet on the current frequency point, the frequency point ±1MHz of the current frequency point, and the frequency point ±2MHz of the current frequency point.
[0049] The aforementioned Bluetooth frequency offset calibration method, Bluetooth connection method, Bluetooth chip, and Bluetooth device, when the Bluetooth device is in the target state, can calibrate the frequency offset of the internal clock source of the Bluetooth chip according to external data packets. Through the above method, this application enables the Bluetooth device to change from relying on the inherent high precision of hardware (external crystal oscillator) to dynamically and in real-time compensating for and calibrating the defects of the internal clock source through software algorithms. This transforms the frequency accuracy problem of the Bluetooth chip from a static hardware specification problem into a dynamic system control problem that can be solved by the communication process itself. As a result, the external crystal oscillator and related peripheral components of the Bluetooth chip are successfully eliminated, directly reducing the material cost and PCB (Printed Circuit Board) area of Bluetooth products. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is an application environment diagram of the Bluetooth frequency offset calibration method in one embodiment;
[0052] Figure 2 This is a flowchart illustrating a Bluetooth frequency offset calibration method in one embodiment;
[0053] Figure 3 This is a schematic diagram illustrating the switching of the operating state of a Bluetooth chip in one embodiment;
[0054] Figure 4 This is a schematic diagram of the frequency offset calibration process in one embodiment, showing the calibration states at high and low frequencies.
[0055] Figure 5 This is a schematic diagram of the integer frequency offset calibration process in one embodiment of the high and low frequency point calibration states;
[0056] Figure 6 This is a schematic diagram of the frequency offset calibration process in another embodiment, showing the calibration states at high and low frequencies.
[0057] Figure 7 This is a schematic diagram of the frequency offset calibration process for crystal oscillator-free probing scan state in one embodiment;
[0058] Figure 8 This is a schematic diagram of the frequency offset calibration process for crystal-free paging scanning state in one embodiment;
[0059] Figure 9 This is a schematic diagram illustrating the process of establishing a Bluetooth communication connection between an external device and a Bluetooth chip in one embodiment.
[0060] Figure 10 This is a schematic diagram of the frequency offset calibration process for crystal-free paging scanning state in another embodiment;
[0061] Figure 11 This is a schematic diagram of the frequency offset calibration process for crystal-free paging in one embodiment;
[0062] Figure 12 This is a schematic diagram of the frequency offset calibration process for the crystal-free paging state in another embodiment;
[0063] Figure 13This is a schematic diagram of the frequency offset calibration process for the crystal-free paging state in another embodiment;
[0064] Figure 14 This is a schematic diagram of the radio frequency point distribution of a radio frequency offset scanning strategy in one embodiment;
[0065] Figure 15 This is a schematic diagram of the frequency offset calibration process for crystal-free paging in another embodiment;
[0066] Figure 16 This is a structural block diagram of a Bluetooth frequency offset calibration device in one embodiment;
[0067] Figure 17 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0069] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0070] The Bluetooth frequency offset calibration method provided in this application embodiment can be applied to, for example... Figure 1 The application environment shown illustrates this. In traditional Bluetooth solutions, due to the low accuracy and temperature sensitivity of the internal clock source of the Bluetooth chip, a high-precision crystal oscillator needs to be connected externally to the Bluetooth chip to provide a stable and accurate reference clock signal using its inherent physical characteristics. However, the external crystal oscillator and its associated load capacitor significantly increase the material costs and circuit board area of the Bluetooth device, increasing the complexity of the product design. In practical applications, using traditional Bluetooth communication solutions also incurs additional component procurement and inventory management costs.
[0071] In one exemplary embodiment, such as Figure 2 As shown, a Bluetooth frequency offset calibration method is provided, which can be applied to... Figure 1Taking the Bluetooth chip 102 of the Bluetooth device 100 as an example, the explanation includes the following steps S202. Wherein:
[0072] Step S202: When the Bluetooth device is in target state, calibrate the frequency offset of the internal clock source of the Bluetooth chip according to the external data packet.
[0073] The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with an external device; the source device of the external data packet includes the external device.
[0074] For example, the target state may include a searchable and connectable state and a reconnect state. The searchable and connectable state may indicate that the Bluetooth chip is currently in a state where it can be searched by external devices and / or establish a Bluetooth connection; the reconnect state may indicate that the Bluetooth chip is currently in a state where it can perform paging.
[0075] Optionally, the Bluetooth chip can cycle between a searchable and connectable state and a reconnect state according to a preset period.
[0076] In some examples, external data packets may include over-the-air data packets broadcast by external devices, such as ID packets sent when the external device is in a discoverable and connectable state. External data packets may also include various data packets during the process of establishing a Bluetooth connection between the Bluetooth device's Bluetooth chip and the external device, such as ID (Identity) packets, FHS (Frequency Hopping Synchronization) packets, and POLL packets during the communication and interaction between the Bluetooth device and the external device.
[0077] In practical applications, Bluetooth chips can execute frequency offset calibration strategies that match the current target state based on received external data packets. For example, when the Bluetooth chip is in a discoverable and connectable state, it can calibrate the deviation of its internal clock source based on the currently received over-the-air data packets, so that the Bluetooth chip's internal clock source can serve as an accurate clock reference for the system and radio frequency.
[0078] The aforementioned Bluetooth frequency offset calibration method, when the Bluetooth device is in target mode, can calibrate the frequency offset of the Bluetooth chip's internal clock source based on external data packets, so that the Bluetooth chip's internal clock source can serve as an accurate clock reference for the system and radio frequency. Through this method, this application transforms the Bluetooth device's reliance on the inherent high precision of hardware (external crystal oscillator) into a dynamic, real-time compensation and calibration of the internal clock source's defects via software algorithms. This transforms the Bluetooth chip's frequency accuracy problem from a static hardware specification issue into a dynamic system control problem that can be resolved automatically through the communication process. Consequently, it eliminates the need for an external crystal oscillator and related peripheral components, directly reducing the material cost and PCB area of Bluetooth products.
[0079] In one embodiment, the target state includes a searchable and connectable state during the power-on phase and a reconnection state;
[0080] Searchable and connectable states include high and low frequency point calibration state, crystal oscillator-free interrogation scan state, and crystal oscillator-free paging scan state; reconnection states include crystal oscillator-free paging state;
[0081] The external data packets include Bluetooth communication data for external devices in the crystal-free paging scan state, ID data packets for the crystal-free polling scan state, Bluetooth communication data for external devices in the crystal-free paging state, and air data packets, high-frequency data packets, and low-frequency data packets for the high and low frequency calibration states.
[0082] Among them, the high and low frequency calibration state refers to the operating state of the Bluetooth chip performing frequency difference calibration based on air data packets, high frequency data packets, and low frequency data packets without an external crystal oscillator; the crystal-free inquiry scan state refers to the operating state of the Bluetooth chip performing inquiry scan without an external crystal oscillator; the crystal-free paging scan state refers to the operating state of the Bluetooth chip performing paging scan without an external crystal oscillator; and the crystal-free paging state refers to the operating state of paging without an external crystal oscillator.
[0083] For example, the high and low frequency calibration states may include an Inquiry Scan high and low frequency calibration state and a PageScan high and low frequency calibration state. These two states are executed at different times, but the frequency difference calibration principle is the same. Figure 3 As shown, Figure 3 This diagram illustrates the timing of Bluetooth chip switching between various states. IS represents Bluetooth crystal-free inquiry scan state, PS represents crystal-free paging scan state, ISF represents Inquiry Scan high / low frequency calibration state, PSF represents PageScan high / low frequency calibration state, and PAGE represents crystal-free paging state.
[0084] In some instances, such as Figure 3 As shown, the Bluetooth chip can switch between the searchable and connectable state and the reconnect state every 6 seconds; while in the searchable and connectable state, the Bluetooth chip can cycle through the high and low frequency calibration state, the crystal-free interrogation scan state, and the crystal-free paging scan state every 50ms until the searchable and connectable state ends.
[0085] In one embodiment, such as Figure 4 As shown, when the target state is a high / low frequency calibration state, and the Bluetooth device is in the target state, the frequency offset of the internal clock source of the Bluetooth chip is calibrated according to the external data packet, including the following steps S302 to S308. Wherein:
[0086] Step S302: Obtain over-the-air data packets.
[0087] Among them, air packets can be data packets broadcast in the air by external devices, such as ID packets sent when an external device is in a searchable and connectable state.
[0088] For example, Bluetooth devices can support wide bandwidth reception (receiving data packets within ±2MHz of the current frequency) and multi-frequency transmission (simultaneously transmitting the same data packet on the current frequency and five other frequencies, including ±1MHz and ±2MHz) in their hardware systems.
[0089] Specifically, Bluetooth chips can acquire over-the-air data packets through high-bandwidth reception capabilities.
[0090] Step S304: Based on the frequency offset of the air data packets, calibrate the fractional deviation of the internal clock source.
[0091] It is understandable that when a Bluetooth device has not established a Bluetooth connection (e.g., in Inquiry Scan or Page Scan state), the Bluetooth chip can perform self-calibration using received over-the-air data packets. Since the frequencies at different points are all obtained by multiplying the same reference clock of the Bluetooth chip by different coefficients, the frequency deviation at different points can be used to deduce the deviation of the clock source.
[0092] For example, the Bluetooth chip can detect the frequency offset of the received air packets and then calibrate the decimal frequency offset by rounding, with a calibration range of (-0.5MHz, 0.5MHz), so that the frequency offset can be calibrated to the nearest integer frequency point.
[0093] For example, taking a reference frequency of 2405MHz (the frequency of airborne data packets) as an example, suppose the Bluetooth chip's frequency at this point is inaccurate due to a deviation in its internal clock source, and the actual frequency is 2406.4MHz. That is, the Bluetooth chip believes its frequency is 2405MHz, but the actual deviation is 1.4MHz. In this case, if the Bluetooth chip receives packets at its perceived 2405MHz frequency (which is actually 2406.4MHz), the following situation may occur:
[0094] ① If a packet at frequency 2405MHz is received, a frequency offset of -1.4MHz will be detected;
[0095] ②If a packet at frequency 2406MHz is received, a frequency offset of -0.4MHz will be detected;
[0096] ③ If a packet at frequency 2407MHz is received, a frequency offset of 0.6MHz will be detected;
[0097] ④ If a packet at the 2408MHz frequency point is received in the air, a frequency offset of 1.6MHz will be detected.
[0098] Regardless of which of the above situations applies, after rounding to the nearest integer frequency, the final calculated frequency offset is -0.4MHz.
[0099] Specifically, the Bluetooth chip can compensate for and calibrate the fractional deviation of its internal clock source based on the frequency offset of the received air data packets.
[0100] Step S306: Obtain low-frequency data packets and high-frequency data packets.
[0101] Among them, low-frequency data packets and high-frequency data packets can be air data packets received at low-frequency and high-frequency points in the Bluetooth band, respectively.
[0102] Specifically, the Bluetooth chip can acquire low-frequency data packets at low frequencies within the Bluetooth band and high-frequency data packets at high frequencies within the Bluetooth band.
[0103] Step S308: Based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets, calibrate the integer frequency offset of the internal clock source.
[0104] Specifically, the Bluetooth chip can calibrate the integer frequency offset of the Bluetooth internal clock source based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets, thereby realizing the internal clock source deviation calibration of the Bluetooth chip in high and low frequency calibration states.
[0105] In one embodiment, such as Figure 5As shown, the integer frequency offset of the internal clock source is calibrated based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets, including the following steps S402 to S404. Wherein:
[0106] Step S402: Based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets, determine the difference between the reference clock frequency and the actual clock frequency.
[0107] For example, at the low frequency point of the Bluetooth band (e.g., frequency points between 2402-2412MHz) and high-frequency points (For example, frequencies between 2468-2480MHz) receive data packets respectively, thereby calculating the fractional frequency offset of the low-frequency data packets. Fractional frequency offset of high-frequency data packets Furthermore, based on the fractional frequency offset of low-frequency data packets, using the following formula 1, Fractional frequency offset of high-frequency data packets The reference clock frequency can be calculated. The difference between the actual clock frequency and the actual clock frequency :
[0108] (Formula 1)
[0109] Specifically, the Bluetooth chip can determine the difference between the reference clock frequency and the actual clock frequency based on the frequency offset of low-frequency data packets and the frequency offset of high-frequency data packets.
[0110] Step S404: Determine and compensate for the integer frequency offset of the internal clock source based on the difference between the reference clock frequency and the actual clock frequency.
[0111] For example, due to calculation errors, the result obtained through Formula 1 cannot be directly compensated. The value, and because the Bluetooth chip has actually calibrated the fractional frequency offset before calibrating the integer frequency offset, can be based on... The calculated deviation at 2.4GHz radio frequency offset is rounded to the nearest integer (MHz) and discarded for integer frequency offset calibration.
[0112] Specifically, the Bluetooth chip can determine and compensate for the integer frequency offset of the internal clock source based on the difference between the reference clock frequency and the actual clock frequency.
[0113] To further illustrate the frequency offset calibration scheme in high and low frequency calibration states, this application provides, as follows: Figure 6 The frequency offset calibration process shown in the high and low frequency calibration states can include two stages, as detailed below:
[0114] Phase 1 (Fractional Frequency Offset Calibration): The Bluetooth device enables high-bandwidth reception mode, detects the frequency offset of the received data packets, and then calibrates the fractional frequency offset by rounding. The calibration range is (-0.5MHz, 0.5MHz), so that the frequency offset can be calibrated to the nearest integer frequency point.
[0115] Phase Two (Integer Frequency Offset Calibration): Low-frequency point of the Bluetooth chip in the Bluetooth band (such as frequency points between 2402-2412MHz) and high-frequency points (e.g., frequencies between 2468-2480MHz) receive data packets respectively, and obtain two decimal frequency offsets. and Then, the reference clock frequency is calculated using Formula 1. The difference between the actual frequency and the actual frequency Because calculation errors exist, they cannot be directly compensated for. The value, and because the fractional frequency offset has already been calibrated in stage one, is now obtained through... The deviation at the 2.4GHz radio frequency offset is calculated, then rounded to the nearest integer in MHz and calibrated. It should be noted that in practical applications, stage two will be repeated to ensure that the final error of the Bluetooth chip's internal clock source is within ±1MHz, and there is no fractional frequency offset in MHz (meaning the frequency offset is less than 100KHz).
[0116] In one embodiment, such as Figure 7 As shown, when the target state is a crystal oscillator-free polling scan state, and the Bluetooth device is in the target state, the frequency offset of the Bluetooth chip's internal clock source is calibrated according to the external data packet, including the following steps S502 to S504. Wherein:
[0117] Step S502: Obtain the ID data packet.
[0118] Step S504: Based on the ID data packet, compensate for the fractional deviation of the internal clock source.
[0119] Specifically, in the crystal-free polling scan state (i.e., the state where the Bluetooth device can be discovered), the Bluetooth device first enables the high-bandwidth reception function. After receiving the ID data packet sent by the external device, it can detect the frequency offset corresponding to the ID data packet and calibrate the fractional frequency offset of the current internal clock source in MHz. It should be noted that the steps for compensating for the fractional offset of the internal clock source in the crystal-free polling scan state are exactly the same as the steps for calibrating the fractional offset of the internal clock source in the high and low frequency calibration state, and will not be repeated here.
[0120] In one embodiment, the method further includes the following step S506. Wherein:
[0121] Step S506: Use a multi-frequency transmission strategy to send a probe data packet.
[0122] It should be noted that Bluetooth devices can support wide bandwidth reception (receiving data packets within ±2MHz of the current frequency) and multi-frequency transmission (simultaneously transmitting the same data packet on the current frequency and five other frequencies, including ±1MHz and ±2MHz).
[0123] For example, a multi-frequency transmission strategy may include a Bluetooth device transmitting the same data packet simultaneously on five frequency points: the current frequency point, a frequency point ±1MHz of the current frequency point, and a frequency point ±2MHz of the current frequency point, using the multi-frequency transmission function.
[0124] Specifically, Bluetooth devices can enable multi-frequency transmission, simultaneously sending polling data packets to remote devices at the current frequency, ±1MHz, ±2MHz, and five other frequencies, ensuring that all remote devices with a frequency offset within ±2MHz can search for the Bluetooth chip's Bluetooth address and name.
[0125] In one embodiment, such as Figure 8 As shown, when the target state is a crystal-free paging scan state; and when the Bluetooth device is in the target state, the frequency offset of the Bluetooth chip's internal clock source is calibrated according to the external data packet, including the following steps S602 to S606. Wherein:
[0126] In step S602, if a first device ID packet is received from an external device, the fractional deviation of the internal clock source is calibrated based on the first device ID packet, and a first chip ID packet is sent back to the external device using a multi-frequency transmission strategy.
[0127] For example, after obtaining the Bluetooth address and name, a remote external device will send a large number of ID packets in the Page state to attempt to establish a Bluetooth communication connection with the Bluetooth chip in the Page Scan state. The specific process is as follows: Figure 9 As shown.
[0128] in, Figure 9 In the three stages shown, the blue boxes correspond to packets sent by the device in Page state, and the red boxes correspond to packets sent by the device in Page Scan state. It can be understood that the red box corresponds to the Bluetooth chip being in Page Scan state, and the blue box corresponds to the Bluetooth chip being in Page state. It should be noted that the "312us" between blue boxes represents the packet transmission time interval; the time interval between blue and red boxes or between red and blue boxes indicates that packets are received at fixed intervals after transmission.
[0129] It should be noted that the steps for compensating for the fractional deviation of the internal clock source in the crystal-free paging scan state are exactly the same as the steps for calibrating the fractional deviation of the internal clock source in the high and low frequency calibration state, and will not be repeated here. In some examples, the multi-frequency transmission strategy may include the Bluetooth device transmitting the same data packet simultaneously on five frequency points: the current frequency point, the frequency point ±1MHz of the current frequency point, and the frequency point ±2MHz of the current frequency point.
[0130] Specifically, the Bluetooth chip is in a crystal-free paging scan state. Figure 9 In stage 1, as shown, the Bluetooth device enables high-bandwidth reception and multi-frequency transmission. If it receives a first device ID packet from an external device, it calibrates the MHz fractional deviation of its internal clock source based on the first device ID packet and simultaneously replies with the first chip ID packet to the external device on multiple frequencies using the multi-frequency transmission strategy, then enters... Figure 9 Stages 2 and 3 are shown.
[0131] Step S604: If a first device FHS packet is received from an external device based on the first chip ID packet, then a second chip ID packet is sent back to the external device using a multi-frequency transmission strategy.
[0132] Specifically, if the Bluetooth chip receives a first device FHS packet from an external device based on the first chip ID packet, it will again use the multi-frequency transmission strategy to reply to the external device with a second chip ID packet on multiple frequencies.
[0133] Step S606: If a first device POLL packet is received from an external device based on the second chip ID packet, then the entire frequency offset of the internal clock source is calibrated based on the first device POLL packet.
[0134] Specifically, if the Bluetooth chip receives a first device POLL packet in response from an external device based on a second chip ID packet, it calibrates the entire frequency offset of its internal clock source based on the first device POLL packet. It should be noted that... Figure 9 In stage 1, the Bluetooth chip only calibrates the fractional frequency offset in MHz (consistent with the fractional calibration process in stage 1 of the high and low frequency calibration process). However, in stage 3, it directly calibrates all detected frequency offsets (without distinguishing between fractional and integer values; for example, if 0.1MHz is detected, 0.1MHz is calibrated, and if -1.8MHz is detected, -1.8MHz is calibrated).
[0135] In one embodiment, after the step of calibrating the entire frequency offset of the internal clock source based on the first device POLL packet, the following step S608 is further included. Wherein:
[0136] Step S608: Use a multi-frequency transmission strategy to reply with a chip NULL packet to an external device to establish a Bluetooth connection with the external device.
[0137] Specifically, after calibrating the entire frequency offset of the internal clock source based on the first device's POLL packet, the Bluetooth chip can reply with a chip NULL packet to the external device using a multi-frequency sending strategy to establish a Bluetooth connection with the external device.
[0138] To further illustrate the frequency offset calibration scheme in crystal-free paging scan mode (also known as crystal-free page scan mode), this application provides the following... Figure 10 The Bluetooth connection process in the crystal-free paging scan state is shown below. This process can include three stages, as detailed below:
[0139] like Figure 10 As shown, the Bluetooth chip enables high-bandwidth reception and multi-frequency transmission in phase 1. After receiving the ID packet, the Bluetooth chip detects the frequency offset, adjusts the MHz fractional frequency offset, and replies with another ID packet, then proceeds to phases 2 and 3. If the Bluetooth chip successfully receives the POLL packet in phase 3, it then detects and calibrates the detected frequency offset value. After calibration, the Bluetooth chip replies with a NULL packet to establish a Bluetooth connection with the external device.
[0140] It should be noted that, because the Bluetooth chip has its high-bandwidth reception function enabled, in Figure 10 The stage 1 shown may receive adjacent error frequencies when receiving ID packets, so in Figure 10 In stage 1, only the fractional MHz frequency offset is calibrated. The system waits until stage 3 receives the POLL packet before considering the current frequency point correct and the detected frequency offset correct, at which point the entire frequency offset is calibrated. This means that when the Bluetooth chip's RF frequency offset is within ±2MHz, a connection can be established directly through the aforementioned crystal-free paging scan Bluetooth connection process.
[0141] In one embodiment, such as Figure 11 As shown, when the target state is a crystal-free paging state, and the Bluetooth device is in the target state, the frequency offset of the Bluetooth chip's internal clock source is calibrated according to the external data packet, including the following steps S702 to S704. Wherein:
[0142] Step S702: Send the third chip ID packet using a multi-frequency transmission strategy.
[0143] Understandably, when in Page mode, the Bluetooth chip needs to send a packet first and have it received by the remote external device before the chip can receive the data packet from the remote device to calibrate the frequency offset.
[0144] For example, in the crystal-free paging state, before the Bluetooth chip receives the third chip ID packet, in addition to enabling the high-bandwidth reception function and the multi-frequency transmission function, it also needs to adjust the Bluetooth radio frequency offset every once in a while. The adjustment range can be set to ±500KHz, and the adjustment step can be set to 150KHz, so as to ensure that the ID packet sent by the Bluetooth chip has a chance to be received by the remote external device at any frequency offset within ±2.5MHz.
[0145] Specifically, Bluetooth chips can utilize a multi-frequency transmission strategy to transmit third-chip ID packets on multiple frequency points.
[0146] Step S704: If a second device ID packet is received from an external device in response to a third chip ID packet, the frequency offset of the internal clock source is calibrated based on the second device ID packet.
[0147] Specifically, after receiving the second device ID packet from the remote external device, the Bluetooth chip adjusts the detected frequency offset and disables the high-bandwidth reception function and the multi-frequency transmission function.
[0148] In one embodiment, such as Figure 12 As shown, after the step of calibrating the frequency offset of the internal clock source based on the second device ID packet, the method further includes steps S802 to S806. Wherein:
[0149] Step S802: Reply to the external device with the first chip FHS packet.
[0150] Specifically, after calibrating the frequency offset of its internal clock source based on the second device ID packet, the Bluetooth chip replies to the external device with the first chip FHS packet based on the calibrated internal clock source.
[0151] In step S804, if the Bluetooth chip receives a third device ID packet from an external device based on the first chip FHS packet, it replies to the external device with a first chip POLL packet.
[0152] Specifically, if a third device ID packet is received from an external device based on the first chip FHS packet, it indicates that the frequency offset calibration of the internal clock source is correct. At this time, the first chip POLL packet is then sent back to the external device.
[0153] In step S806, if the Bluetooth chip receives a first device NULL packet in response from the external device based on the first chip POLL packet, a Bluetooth connection with the external device is established.
[0154] Specifically, if the Bluetooth chip receives a NULL packet from the external device in response to the first chip POLL packet, it can proceed with the Bluetooth connection process normally and establish a Bluetooth connection with the external device.
[0155] In one embodiment, such as Figure 13 As shown, the method further includes the following steps S902 to S908. Wherein:
[0156] In step S902, if no third device ID packet is received from the external device in response to the first chip FHS packet, a fourth chip ID packet is sent according to the RF frequency offset scanning strategy.
[0157] Among them, the radio frequency offset scanning strategy includes adjusting the radio frequency offset of the Bluetooth chip while combining multiple transmission frequency points to enable the Bluetooth chip to send ID data packets in a multi-transmission state.
[0158] It should be noted that after receiving the ID packet from the remote device, the Bluetooth chip adjusts the detected frequency offset and disables high-bandwidth reception and multi-frequency transmission. If the frequency offset calibration is correct, as shown in steps S802 to S806, the Bluetooth connection process will proceed normally after completing the Page process.
[0159] However, taking the multi-frequency transmission function as an example—which simultaneously transmits the same data packet on the current frequency, a frequency ±1MHz of the current frequency, and a frequency ±2MHz of the current frequency—as an example, due to the multi-frequency transmission strategy, the multiple packets transmitted by the Bluetooth chip on adjacent 2MHz frequency points may also be received by remote external devices, and the data packets replied by the external devices may also fall within the Bluetooth chip's large bandwidth reception range. In this case, the Bluetooth chip will receive the wrong frequency, resulting in a detected frequency offset error and failure to connect normally.
[0160] In response to the aforementioned frequency offset adjustment error, the Bluetooth chip will enter the frequency offset recalibration stage after receiving the ID packet from the external device for the first time and without further direct connection to the external device.
[0161] For example, taking the Bluetooth chip's high-bandwidth reception function to receive data packets within a ±2MHz bandwidth range of the current frequency, and its multi-frequency transmission function to simultaneously transmit the same data packet at the current frequency, a frequency point ±1MHz of the current frequency, and a frequency point ±2MHz of the current frequency, as an example, since both the multi-frequency transmission and high-bandwidth reception are within a ±2MHz range, the maximum possible frequency deviation after the Bluetooth chip receives the wrong frequency is ±4MHz. Furthermore, because the interval between adjacent frequency points in a Page packet is an integer multiple of 2MHz, the Bluetooth chip's frequency deviation at this point must be near an integer frequency deviation of 0, ±2, or ±4MHz. Based on the above analysis, when recalibrating the frequency deviation, the Bluetooth chip only needs to send ID packets at the aforementioned five frequency points (i.e., 0, ±2, and ±4MHz) to attempt to connect to external devices.
[0162] Furthermore, the RF frequency offset scanning strategy can use adjusting the RF frequency offset and simultaneous transmission of multiple frequency points to send ID packets. For example, such as Figure 14 As shown, two frequency points are selected each time, and a total of 6 modes are switched periodically to traverse all 5 frequency points, ensuring that a connection to the mobile phone can be established after multiple attempts. It is understandable that after entering the frequency offset recalibration stage, the Bluetooth chip only needs to adjust the ±2MHz frequency offset. Combined with multiple transmission frequency points, this allows for traversing and transmitting at the frequency points corresponding to the 5 frequency offsets: 0, ±2MHz, and ±4MHz. For example, adjusting the RF frequency offset to 2MHz, with the multiple transmission frequency point offset being (0, 2MHz), the Bluetooth chip actually transmits at the frequency points 2 + (0, 2)MHz, which corresponds to the 2MHz and 4MHz frequency offsets. Similarly, adjusting the frequency offset to -2MHz plus the multiple transmission frequency point offset to (-2, 2)MHz, the Bluetooth chip actually transmits at the frequency points corresponding to -4MHz and 0MHz. This RF frequency offset scanning strategy avoids repeatedly hitting the wrong frequency point during frequency offset adjustment, effectively improving frequency offset calibration efficiency.
[0163] Specifically, if the Bluetooth chip does not receive a third device ID packet from an external device in response to the first chip FHS packet, it sends a fourth chip ID packet according to the RF frequency offset scanning strategy.
[0164] In step S904, if a fourth device ID packet is received from an external device in response based on the fourth chip ID packet, the frequency offset adjustment based on the RF frequency offset scanning strategy is stopped, and the second chip FHS packet is sent while maintaining the current multi-transmission state of the Bluetooth chip.
[0165] For example, after receiving the fourth device ID packet in response from the external device based on the fourth chip ID packet, the Bluetooth chip will not recalibrate the frequency offset (i.e., it will no longer traverse and transmit on the five frequency points corresponding to "0, ±2MHz, ±4MHz"), and will maintain the current multi-transmission state until it receives the NULL packet in response from the external device.
[0166] Specifically, if the Bluetooth chip receives a fourth device ID packet in response from an external device based on the fourth chip ID packet, it stops frequency offset adjustment based on the RF frequency offset scanning strategy and maintains the current multi-transmission state of the Bluetooth chip to send the second chip FHS packet; if no fourth device ID packet in response from an external device based on the fourth chip ID packet is received after a preset time interval, the frequency offset adjustment of the RF frequency offset scanning strategy is resumed to resend the fourth chip ID packet at a new frequency.
[0167] Step S906: If a fifth device ID packet is received from an external device based on the second chip's FHS packet, then the current multi-transmission state of the Bluetooth chip is maintained and the second chip's POLL packet is sent.
[0168] Specifically, if the Bluetooth chip receives a fifth device ID packet in response from an external device based on the second chip's FHS packet, it maintains the current multi-transmission state of the Bluetooth chip and sends the second chip's POLL packet. If, after a preset time interval, it still does not receive a fifth device ID packet in response from an external device based on the second chip's FHS packet, it resumes the frequency offset adjustment of the RF frequency offset scanning strategy to retransmit the fourth chip ID packet at a new frequency.
[0169] Step S908: If a second device NULL packet is received from an external device in response to a second chip POLL packet, then the frequency offset of the internal clock source is calibrated based on the second device NULL packet.
[0170] It is understandable that if the Bluetooth chip receives a POLL packet from the second chip and a NULL packet from the second device in response to the POLL packet from the second chip, it will determine that the currently detected frequency offset is correct, calibrate the frequency offset of the current Bluetooth chip, and finally disable the high-bandwidth reception function and the multi-packet transmission function, and enter the Bluetooth connection state.
[0171] Specifically, if the Bluetooth chip receives a second device NULL packet in response to the external device based on the second chip POLL packet, it calibrates the frequency offset of the internal clock source based on the second device NULL packet; if no second device NULL packet in response to the external device based on the second chip POLL packet is received after a preset time interval, the frequency offset adjustment of the RF frequency offset scanning strategy is restored to retransmit the fourth chip ID packet at the new frequency point.
[0172] To further illustrate the frequency offset calibration scheme in crystal-free paging mode (also known as crystal-free page mode), this application provides the following... Figure 15 The illustrated example of a Bluetooth connection process in a crystal-free paging state may include two phases, as follows:
[0173] In the first phase, the Bluetooth chip enables high-bandwidth reception and multi-frequency transmission. It also needs to periodically adjust the RF frequency offset within a range of ±500kHz, with adjustments in 150kHz steps. This ensures that any ID packet transmitted by the chip within ±2.5MHz has a chance of being received by the remote device. After receiving an ID packet from the remote device, the chip adjusts the detected frequency offset and disables high-bandwidth reception and multi-frequency transmission. If the frequency offset calibration is correct, it will proceed normally into the connection process after completing the page process. However, multiple packets transmitted by the chip at adjacent 2MHz frequencies may be received by the remote device, and the reply packet may fall within the chip's high-bandwidth reception range. This can lead to incorrect frequency reception and a detected frequency offset error, preventing a proper connection. To address this, the second phase begins after the first ID packet is received but a direct connection is not established.
[0174] In the second phase, the main focus is on correcting the frequency offset to the incorrect value when receiving the wrong frequency. Both multi-frequency transmission and wide-bandwidth reception operate within a ±2MHz range. Therefore, the maximum possible frequency offset after receiving the wrong frequency is ±4MHz. Since the interval between adjacent frequency points in a page packet is an integer multiple of 2MHz, the frequency offset at this point will definitely be near integer offsets of 0, ±2, and ±4MHz. Therefore, in the second phase, only ID packets need to be sent on these five frequency points to attempt a connection. To improve efficiency and avoid repeatedly hitting the wrong frequency, the Bluetooth chip can use adjusted RF frequency offset and simultaneous transmission on multiple frequency points to send ID packets, such as... Figure 14 As shown, two frequency points are selected each time, and a total of 6 modes are switched periodically to traverse all 5 frequency points, ensuring that a connection to the mobile phone can be established after multiple attempts. After receiving the first ID packet in stage two, the frequency offset is not recalibrated; the current multi-transmission state is maintained until a NULL packet is received. At this point, the detected frequency offset is considered correct, and the frequency offset is calibrated. Finally, high-bandwidth reception and simultaneous multi-packet transmission are disabled, entering the connection state, and the page state ends. When the chip's RF frequency offset is within ±2MHz, a connection can be established directly through the page process.
[0175] In one exemplary embodiment, this application provides a Bluetooth connection method applied to a Bluetooth device. The Bluetooth chip in the Bluetooth device performs frequency offset calibration of its internal clock source using the Bluetooth frequency offset calibration method described in any of the preceding embodiments. The Bluetooth connection method includes the following steps: establishing a Bluetooth connection with an external device.
[0176] It is understood that the solution to the problem provided in this application is similar to the solution from the perspective of the Bluetooth frequency offset calibration method described above. Therefore, the specific limitations of this application can be found in the limitations of the Bluetooth frequency offset calibration method embodiments described above, and will not be repeated here.
[0177] It should be noted that, compared with traditional Bluetooth solutions, the above-mentioned Bluetooth frequency offset calibration method and Bluetooth connection method have at least the following beneficial technical effects:
[0178] ①Significantly reduce costs: Successfully eliminates the need for external crystal oscillators and related peripheral components, directly reducing the material cost and PCB area of Bluetooth products.
[0179] ② Maintaining connectivity performance: Through innovative software calibration processes and hardware assistance functions, even when the internal clock source accuracy is low, the radio frequency offset can be effectively controlled within the allowable range, ensuring the stability, reliability, and communication distance of the Bluetooth connection and meeting standard protocol requirements.
[0180] ③ Achieving technical feasibility: To resolve the contradiction between low-cost internal clock sources and high-precision RF requirements, a complete, feasible, and efficient engineering solution is provided, making low-cost, high-performance crystal-free Bluetooth devices a reality.
[0181] Understandably, the inventive thinking behind this application lies in shifting from relying on the inherent high precision of hardware (external crystal oscillator) to dynamically and in real-time compensating for and calibrating the defects of the chip's internal clock source through software algorithms and enhanced hardware functions (high bandwidth / multiple transmissions). In other words, this application transforms the frequency accuracy problem from a static hardware specification issue into a dynamic system control problem that can be resolved automatically through the communication process.
[0182] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0183] Based on the same inventive concept, this application also provides a Bluetooth frequency offset calibration device for implementing the Bluetooth frequency offset calibration method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more Bluetooth frequency offset calibration device embodiments provided below can be found in the limitations of the Bluetooth frequency offset calibration method described above, and will not be repeated here.
[0184] In one exemplary embodiment, such as Figure 16 As shown, a Bluetooth frequency offset calibration device is provided, applied to the Bluetooth chip of a Bluetooth device. The device 1000 includes:
[0185] The frequency offset calibration module 1002 is used to calibrate the frequency offset of the internal clock source of the Bluetooth chip based on external data packets when the Bluetooth device is in target state.
[0186] The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with an external device; the source device of the external data packet includes the external device.
[0187] In one embodiment, the target state includes a searchable and connectable state and a reconnection state during the power-on phase; the searchable and connectable state includes a high-frequency / low-frequency calibration state, a crystal-free interrogation scan state, and a crystal-free paging scan state; the reconnection state includes a crystal-free paging state; the external data packets include Bluetooth communication data of the external device corresponding to the crystal-free paging scan state, ID data packets corresponding to the crystal-free interrogation scan state, Bluetooth communication data of the external device corresponding to the crystal-free paging state, and over-the-air data packets, high-frequency data packets, and low-frequency data packets corresponding to the high-frequency / low-frequency calibration state.
[0188] In one embodiment, the frequency offset calibration module 1002 is further configured to acquire air data packets; calibrate the fractional deviation of the internal clock source based on the frequency offset of the air data packets; acquire low-frequency data packets and high-frequency data packets; and calibrate the integer frequency offset of the internal clock source based on the frequency offset of the low-frequency data packets and the frequency offset of the high-frequency data packets.
[0189] In one embodiment, the frequency offset calibration module 1002 is further configured to: determine the difference between the reference clock frequency and the actual clock frequency based on the frequency offset of the low-frequency data packet and the frequency offset of the high-frequency data packet; and determine and compensate for the integer frequency offset of the internal clock source based on the difference between the reference clock frequency and the actual clock frequency.
[0190] In one embodiment, the frequency offset calibration module 1002 is also used to acquire ID data packets; and based on the ID data packets, to compensate for the fractional deviation of the internal clock source.
[0191] In one embodiment, the frequency offset calibration module 1002 is also used to send a probing data packet using a multi-frequency transmission strategy.
[0192] In one embodiment, the frequency offset calibration module 1002 is further configured to, if a first device ID packet is received from an external device, calibrate the fractional offset of the internal clock source based on the first device ID packet and reply to the external device with a first chip ID packet using a multi-frequency transmission strategy; if a first device FHS packet is received from the external device based on the first chip ID packet, reply to the external device with a second chip ID packet using a multi-frequency transmission strategy; and if a first device POLL packet is received from the external device based on the second chip ID packet, calibrate the entire frequency offset of the internal clock source based on the first device POLL packet.
[0193] In one embodiment, the frequency offset calibration module 1002 is also used to reply with a chip NULL packet to an external device using a multi-frequency transmission strategy to establish a Bluetooth connection with the external device.
[0194] In one embodiment, the frequency offset calibration module 1002 is further configured to send a third chip ID packet using a multi-frequency transmission strategy; if a second device ID packet is received from an external device based on the third chip ID packet, the frequency offset of the internal clock source is calibrated based on the second device ID packet.
[0195] In one embodiment, the frequency offset calibration module 1002 is further configured to reply to the external device with a first chip FHS packet; if a third device ID packet is received from the external device based on the first chip FHS packet, then a first chip POLL packet is replied to the external device; if a first device NULL packet is received from the external device based on the first chip POLL packet, then a Bluetooth connection with the external device is established.
[0196] In one embodiment, the frequency offset calibration module 1002 is further configured to, if it does not receive a third device ID packet in response from an external device based on the first chip FHS packet, send a fourth chip ID packet according to the RF frequency offset scanning strategy; wherein, the RF frequency offset scanning strategy includes adjusting the RF frequency offset of the Bluetooth chip while combining multiple transmission frequency points to enable the Bluetooth chip to send ID data packets in the multiple transmission state; if it receives a fourth device ID packet in response from an external device based on the fourth chip ID packet, it stops the frequency offset adjustment based on the RF frequency offset scanning strategy and maintains the current multiple transmission state of the Bluetooth chip to send a second chip FHS packet; if it receives a fifth device ID packet in response from an external device based on the second chip FHS packet, it maintains the current multiple transmission state of the Bluetooth chip to send a second chip POLL packet; if it receives a second device NULL packet in response from an external device based on the second chip POLL packet, it calibrates the frequency offset of the internal clock source based on the second device NULL packet.
[0197] Each module in the aforementioned Bluetooth frequency offset calibration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0198] In one exemplary embodiment, this application provides a Bluetooth chip, including: a processor for calling and running a computer program from a memory, causing a Bluetooth device equipped with the Bluetooth chip to perform the steps of the method as described in any of the preceding method embodiments.
[0199] In one exemplary embodiment, this application provides a Bluetooth device including the Bluetooth chip described in the above embodiments.
[0200] In one embodiment, the Bluetooth device has high-bandwidth reception and multi-frequency transmission capabilities;
[0201] Among them, the high-bandwidth reception function is used to receive data packets within the ±2MHz bandwidth range of the current frequency point of the Bluetooth chip; the multi-frequency transmission function is used to simultaneously transmit the same data packet on the current frequency point, the frequency point ±1MHz of the current frequency point, and the frequency point ±2MHz of the current frequency point.
[0202] In one exemplary embodiment, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 17 As shown, this electronic device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores Bluetooth communication data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a Bluetooth frequency offset calibration method and / or a Bluetooth connection method.
[0203] Those skilled in the art will understand that Figure 17 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0204] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0205] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0206] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A Bluetooth frequency offset calibration method, characterized in that, The method, which is applied to a Bluetooth chip in a Bluetooth device, includes: When the Bluetooth device is in target state, the frequency offset of the internal clock source of the Bluetooth chip is calibrated according to the external data packet; The target state refers to the state in which the Bluetooth device is preparing or establishing a Bluetooth connection with an external device; the source device of the external data packet includes the external device.
2. The method according to claim 1, characterized in that, The target state includes the searchable and connectable state during the power-on phase and the reconnection state; The searchable and connectable states include high and low frequency point calibration state, crystal oscillator-free interrogation scan state, and crystal oscillator-free paging scan state; the reconnection state includes crystal oscillator-free paging state. The external data packets include Bluetooth communication data of the external device corresponding to the crystal-free paging scan state, ID data packets corresponding to the crystal-free interrogation scan state, Bluetooth communication data of the external device corresponding to the crystal-free paging state, and air data packets, high-frequency data packets, and low-frequency data packets corresponding to the high and low frequency calibration states.
3. The method according to claim 2, characterized in that, When the target state is the high / low frequency calibration state, the step of calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets when the Bluetooth device is in the target state includes: Acquire the over-the-air data packet; Based on the frequency offset of the air data packets, the fractional deviation of the internal clock source is calibrated; Obtain the low-frequency data packet and the high-frequency data packet; The integer frequency offset of the internal clock source is calibrated based on the frequency offset of the low-frequency data packets and the frequency offset of the high-frequency data packets.
4. The method according to claim 3, characterized in that, The step of calibrating the integer frequency offset of the internal clock source based on the frequency offset of the low-frequency data packet and the frequency offset of the high-frequency data packet includes: Based on the frequency offset of the low-frequency data packet and the frequency offset of the high-frequency data packet, the difference between the reference clock frequency and the actual clock frequency is determined. The integer frequency offset of the internal clock source is determined and compensated based on the difference between the reference clock frequency and the actual clock frequency.
5. The method according to claim 2, characterized in that, When the target state is the crystal-free interrogation scanning state, the step of calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets when the Bluetooth device is in the target state includes: Obtain the ID data packet; Based on the ID data packet, the fractional deviation of the internal clock source is compensated.
6. The method according to claim 5, characterized in that, The method further includes: A multi-frequency transmission strategy is used to send probe data packets.
7. The method according to claim 2, characterized in that, When the target state is the crystal-free paging scan state; when the Bluetooth device is in the target state, calibrating the frequency offset of the internal clock source of the Bluetooth chip according to the external data packet includes: If a first device ID packet is received from the external device, the fractional deviation of the internal clock source is calibrated based on the first device ID packet, and a first chip ID packet is sent back to the external device using a multi-frequency transmission strategy. If a first device FHS packet is received from the external device based on the first chip ID packet, then a second chip ID packet is sent back to the external device using the multi-frequency transmission strategy. If a first device POLL packet is received from the external device based on the second chip ID packet, then the entire frequency offset of the internal clock source is calibrated based on the first device POLL packet.
8. The method according to claim 7, characterized in that, After the step of calibrating the entire frequency offset of the internal clock source based on the first device POLL packet, the method further includes: The multi-frequency transmission strategy is used to reply with a chip NULL packet to the external device in order to establish a Bluetooth connection with the external device.
9. The method according to any one of claims 2 to 8, characterized in that, When the target state is the crystal-free paging state, the step of calibrating the frequency offset of the Bluetooth chip's internal clock source based on external data packets when the Bluetooth device is in the target state includes: The third chip ID packet is transmitted using a multi-frequency transmission strategy. If a second device ID packet is received from the external device based on the third chip ID packet, the frequency offset of the internal clock source is calibrated based on the second device ID packet.
10. The method according to claim 9, characterized in that, Following the step of calibrating the frequency offset of the internal clock source based on the second device ID packet, the method further includes: Reply to the external device with the first chip FHS packet; If a third device ID packet is received from the external device in response to the first chip FHS packet, then a first chip POLL packet is sent back to the external device. If a first device NULL packet is received in response from the external device based on the first chip POLL packet, a Bluetooth connection is established with the external device.
11. The method according to claim 10, characterized in that, The method further includes: If the third device ID packet is not received from the external device based on the first chip FHS packet, a fourth chip ID packet is sent according to the radio frequency offset scanning strategy; wherein, the radio frequency offset scanning strategy includes adjusting the radio frequency offset of the Bluetooth chip while combining multiple transmission frequency points to enable the Bluetooth chip to send ID data packets in a multi-transmission state. If a fourth device ID packet is received from the external device in response to the fourth chip ID packet, the frequency offset adjustment based on the radio frequency offset scanning strategy is stopped, and the second chip FHS packet is sent while maintaining the current multi-transmission state of the Bluetooth chip. If a fifth device ID packet is received from the external device based on the second chip's FHS packet, the second chip's POLL packet is sent while maintaining the current multi-transmission state of the Bluetooth chip. If a second device NULL packet is received from the external device in response to the second chip POLL packet, the frequency offset of the internal clock source is calibrated based on the second device NULL packet.
12. A Bluetooth connection method, characterized in that, Applied to Bluetooth devices, the Bluetooth chip in the Bluetooth device uses the Bluetooth frequency offset calibration method according to any one of claims 1 to 11 to perform frequency offset calibration of its internal clock source; the method includes: Establish a Bluetooth connection with the external device.
13. A Bluetooth chip, characterized in that, Includes: a processor for retrieving and running a computer program from memory, causing a Bluetooth device equipped with the Bluetooth chip to perform the steps of the method as described in any one of claims 1 to 12.
14. A Bluetooth device, characterized in that, Includes the Bluetooth chip as described in claim 13.
15. The Bluetooth device according to claim 14, characterized in that, The Bluetooth device has a high-bandwidth reception function and a multi-frequency transmission function; The high-bandwidth receiving function is used to receive data packets within a bandwidth range of ±2MHz of the current frequency point of the Bluetooth chip; the multi-frequency transmitting function is used to simultaneously transmit the same data packet at the current frequency point, at a frequency point ±1MHz of the current frequency point, and at a frequency point ±2MHz of the current frequency point.