Bluetooth control method, Bluetooth control device, storage medium and electronic device
By separating the power configuration of broadcast channels and data channels in Bluetooth Low Energy, and increasing data transmission power when the number of frequency hopping channels reaches a preset number, the problem of low-power Bluetooth signal transmission is solved, and the anti-interference ability and user experience are improved.
Patent Information
- Application Number
- CN202210515680.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-05-12
AI Technical Summary
Low-power Bluetooth signal transmission is easily disturbed, resulting in weakening and lagging signal strength at the receiver.
By separating the power configuration of the broadcast channel of the low-power Bluetooth and the data channel, the broadcast data is transmitted using a lower first power, and when the number of frequency-hopable channels reaches a preset number, the Bluetooth data is transmitted at a higher second power.
It improves the anti-interference capability and receiver signal strength of Bluetooth Low Energy, improves the transmission lag problem of Bluetooth data and the stability of Bluetooth Low Energy connection, and improves the user experience.
Smart Images

Figure CN115002735B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a Bluetooth control method, a Bluetooth control device, a computer-readable storage medium, and an electronic device. Background Art
[0002] With the development of Bluetooth communication, the application of Bluetooth Low Energy (BLE) is becoming more and more widespread, and more and more electronic devices rely on BLE to achieve specific functions and services. For example, wearable devices such as TWS (TrueWireless Stereo) Bluetooth headsets and smart watches can maintain long-term connection and data transmission by connecting to mobile phones through low-power Bluetooth.
[0003] In related technologies, the signal transmission of low-power Bluetooth is easily affected. For example, if there are interference signals or obstructions such as walls in the environment, the signal strength received by the receiving end will be weakened, or even freezes may occur.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those skilled in the art. Summary of the invention
[0005] The present disclosure provides a Bluetooth control method, a Bluetooth control device, a computer-readable storage medium and an electronic device, so as to at least to some extent solve the problem that low-power Bluetooth is susceptible to interference.
[0006] According to a first aspect of the present disclosure, a Bluetooth control method is provided, which is applied to a first Bluetooth device, and the method includes: sending broadcast data through a low-power Bluetooth broadcast channel at a first power to establish a low-power Bluetooth connection with a second Bluetooth device; obtaining the number of frequency-hopping channels in the low-power Bluetooth data channel; if the number of frequency-hopping channels reaches a preset number, sending Bluetooth data to the second Bluetooth device through the frequency-hopping channel at a second power; the second power is higher than the first power.
[0007] According to a second aspect of the present disclosure, a Bluetooth control method is provided, which is applied to a second Bluetooth device, and the method includes: in response to broadcast data sent by the first Bluetooth device through a broadcast channel of low-power Bluetooth at a first power, establishing a low-power Bluetooth connection with the first Bluetooth device; receiving Bluetooth data sent by the first Bluetooth device through a frequency-hopping channel in a data channel of low-power Bluetooth at a second power; the first Bluetooth device sending the Bluetooth data at the second power when the number of the frequency-hopping channels reaches a preset number; the second power is higher than the first power.
[0008] According to a third aspect of the present disclosure, a Bluetooth control device is provided, which is applied to a first Bluetooth device, and the device includes: a broadcast control module, configured to send broadcast data through a low-power Bluetooth broadcast channel at a first power to establish a low-power Bluetooth connection with a second Bluetooth device; a channel quantity acquisition module, configured to obtain the number of frequency-hopping channels in a low-power Bluetooth data channel; a data transmission control module, configured to send Bluetooth data to the second Bluetooth device through the frequency-hopping channel at a second power if the number of frequency-hopping channels reaches a preset number; the second power is higher than the first power.
[0009] According to a fourth aspect of the present disclosure, a Bluetooth control device is provided, which is applied to a second Bluetooth device, and the device includes: a broadcast control module, configured to establish a low-power Bluetooth connection with the first Bluetooth device in response to broadcast data sent by the first Bluetooth device through a broadcast channel of low-power Bluetooth at a first power; a data transmission control module, configured to receive Bluetooth data sent by the first Bluetooth device through a frequency-hopping channel in a data channel of low-power Bluetooth at a second power; the first Bluetooth device sends the Bluetooth data at the second power when the number of the frequency-hopping channels reaches a preset number; the second power is higher than the first power.
[0010] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the Bluetooth control method of the first or second aspect and its possible implementation manner are implemented.
[0011] According to the sixth aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; and a communication unit for performing Bluetooth communication with other devices; wherein the processor is configured to execute the Bluetooth control method of the first or second aspect and its possible implementation method by executing the executable instructions.
[0012] The technical solution disclosed in this disclosure has the following beneficial effects:
[0013] On the one hand, the power configuration of the broadcast channel and the data channel of low-power Bluetooth is separated, and a relatively low first power is used to transmit broadcast data on the broadcast channel, and a relatively high second power is used to transmit Bluetooth data on the data channel when the number of frequency-hopping channels reaches a preset number, thereby allocating more power consumption resources to the transmission of data channels that have a greater impact on the Bluetooth communication process, which is conducive to improving the anti-interference ability of low-power Bluetooth and the signal strength of Bluetooth data received by the receiving end, improving the transmission jamming problem of Bluetooth data and the stability of low-power Bluetooth connection, and improving user experience. On the other hand, this solution uses the second power to transmit Bluetooth data when the number of frequency-hopping channels of the data channel reaches a preset number, which can ensure that the interference between its signal and other signals in the frequency-hopping channel is low, thereby ensuring the communication quality of low-power Bluetooth.
[0014] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A schematic diagram of a system architecture in this exemplary embodiment is shown;
[0017] Figure 2 A flowchart showing a Bluetooth control method performed by a first Bluetooth device in this exemplary embodiment;
[0018] Figure 3 A flowchart showing a Bluetooth control method performed by a second Bluetooth device in this exemplary embodiment;
[0019] Figure 4 A schematic flow chart of a Bluetooth control method in this exemplary embodiment is shown;
[0020] Figure 5 A schematic flow chart showing another Bluetooth control method in this exemplary embodiment;
[0021] Figure 6 A schematic diagram showing the structure of a Bluetooth control device in this exemplary embodiment is shown;
[0022] Figure 7 A schematic diagram showing the structure of another Bluetooth control device in this exemplary embodiment is shown;
[0023] Figure 8 A schematic structural diagram of an electronic device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0024] Exemplary embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as being limited to the examples set forth herein. These embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concept of the exemplary embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, the known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.
[0025] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0026] SIG (Bluetooth Special Interest Group) proposed BLE audio, an audio transmission technology based on low-power Bluetooth, in Bluetooth 5.2. BLE audio has new features such as low power consumption, broadcast audio, audio sharing, and hearing aid support, which can improve the performance of Bluetooth headsets. However, BLE audio is prone to audio freezes in some interference scenarios or weak signal scenarios, affecting the user experience.
[0027] In view of one or more of the above problems, an exemplary embodiment of the present disclosure first provides a Bluetooth control method. Figure 1 The system architecture of the operating environment of this exemplary embodiment will be described.
[0028] refer to Figure 1As shown, the system architecture 100 may include a first Bluetooth device 110 and a second Bluetooth device 120. The first Bluetooth device 110 is a sender of Bluetooth data, and the second Bluetooth device 120 is a receiver of Bluetooth data. In this exemplary embodiment, the Bluetooth data may be application data or business data that a user needs to interact with via Bluetooth, such as audio data, image data, video data, user motion data, etc. In one embodiment, the first Bluetooth device 110 and the second Bluetooth device 120 may perform bidirectional transmission and reception of Bluetooth data, that is, the second Bluetooth device 120 may send Bluetooth data to the first Bluetooth device 110.
[0029] In one implementation, the first Bluetooth device 110 may be a Bluetooth master device (Master), which works in master mode and can actively search for other Bluetooth devices and establish connections. The second Bluetooth device 120 may be a Bluetooth slave device (Slave), which works in slave mode and can only be searched by other Bluetooth devices and wait for other Bluetooth devices to initiate connections.
[0030] The first Bluetooth device 110 and the second Bluetooth device 120 can both be any electronic device with Bluetooth function. Exemplarily, the first Bluetooth device 110 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, etc., and the second Bluetooth device 120 can be a Bluetooth headset, a smart bracelet, etc. For example, if the first Bluetooth device 110 is a mobile phone and the second Bluetooth device 120 is a Bluetooth headset, the mobile phone and the Bluetooth headset establish a Bluetooth connection, which can be a low-power Bluetooth connection or a traditional Bluetooth (Classic Bluetooth) connection. The mobile phone sends an audio data packet to the Bluetooth headset and controls the power by executing the Bluetooth control method in this exemplary embodiment, and the Bluetooth headset receives and plays the audio. Of course, the present disclosure does not limit the specific forms of the first Bluetooth device 110 and the second Bluetooth device 120. For example, the first Bluetooth device 110 can be a Bluetooth headset, a smart bracelet, etc., and the second Bluetooth device 120 can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, etc.
[0031] The Bluetooth control method in this exemplary embodiment may be executed by the first Bluetooth device 110 or the second Bluetooth device 120. The Bluetooth control method is described below from two aspects of the first Bluetooth device 110 and the second Bluetooth device 120, respectively.
[0032] Figure 2 An exemplary process of a Bluetooth control method executed by a first Bluetooth device in this exemplary embodiment is shown, which may include the following steps S210 to S230:
[0033] Step S210, sending broadcast data through a low-power Bluetooth broadcast channel at a first power to establish a low-power Bluetooth connection with a second Bluetooth device;
[0034] Step S220, obtaining the number of frequency hopping channels in the Bluetooth low energy data channel;
[0035] Step S230: if the number of frequency-hopping channels reaches a preset number, sending Bluetooth data to the second Bluetooth device through the frequency-hopping channels at a second power; the second power is higher than the first power.
[0036] Based on the above method, on the one hand, the power configuration of the broadcast channel and the data channel of the low-power Bluetooth is separated, and a relatively low first power is used to transmit broadcast data for the broadcast channel, and a relatively high second power is used to transmit Bluetooth data for the data channel when the number of frequency-hopping channels reaches a preset number, thereby allocating more power consumption resources to the transmission of the data channel that has a greater impact on the communication quality, which is conducive to improving the anti-interference ability of low-power Bluetooth and the signal strength of the Bluetooth data received by the receiving end, improving the transmission jamming problem of Bluetooth data and the stability of the low-power Bluetooth connection, and improving the user experience. On the other hand, this solution uses the second power to transmit Bluetooth data when the number of frequency-hopping channels of the data channel reaches a preset number, which can ensure that the interference between its signal and other signals in the frequency-hopping channel is low, thereby ensuring the communication quality of low-power Bluetooth.
[0037] Below Figure 2 Each step in the procedure is described in detail.
[0038] refer to Figure 2 In step S210, broadcast data is sent through a broadcast channel of low-power Bluetooth at a first power to establish a low-power Bluetooth connection with a second Bluetooth device.
[0039] The frequency band of Bluetooth Low Energy is the same as the BR (Basic Rate) and EDR (Enhanced Data Rate) bands of traditional Bluetooth, both of which are 2.4GHz ISM (Industrial, Scientific and Medical) bands with a frequency range of 2.400-2.4835GHz.
[0040] As shown in Table 1, in low-power Bluetooth, the ISM band is divided into 40 physical channels, numbered 0 to 39, and each channel occupies 2M bandwidth. The 40 physical channels are further divided into 37 data channels and 3 advertising channels.
[0041] Table 1
[0042] Physical channel number Center frequency Data channel number Broadcast channel number 0 2402MHz 37 1 2404MHz 0 2 2406MHz 1 … … … 11 2424MHz 10 12 2426MHz 38 13 2428MHz 11 … … … 38 2478MHz 36 39 2480MHz 39
[0043] The broadcast channel can be used to transmit broadcast data, which is a general term for PDU (Packet Data Unit, packet data unit, which can be referred to as data packet) sent through the broadcast channel, and may include but is not limited to the following types of data packets: advertising, scanning, and initiating. Among them, advertising is used to enable other Bluetooth devices to search for themselves, scanning is used to search for other Bluetooth devices, and initiating a connection is used to request to establish a low-power Bluetooth connection with other Bluetooth devices.
[0044] The first Bluetooth device can establish a low-power Bluetooth connection with the second Bluetooth device by sending one or more of the above-mentioned broadcast data. In one embodiment, the second Bluetooth device broadcasts through a broadcast channel, the first Bluetooth device searches for the second Bluetooth device by scanning, and establishes a low-power Bluetooth connection with the second Bluetooth device by initiating a connection request. In one embodiment, the first Bluetooth device broadcasts through a broadcast channel, the second Bluetooth device searches for the first Bluetooth device by scanning, and establishes a low-power Bluetooth connection with the first Bluetooth device by initiating a connection request. In other words, the first Bluetooth device can scan and discover the second Bluetooth device, and the second Bluetooth device can scan and discover the first Bluetooth device.
[0045] The first Bluetooth device can select any one or more of the three broadcast channels to send broadcast data. However, since the number of the three broadcast channels is too small to meet the frequency hopping requirements, the first Bluetooth device cannot use the frequency hopping mechanism when sending broadcast data, and the probability of signal interference in the broadcast channel is high. Therefore, a lower first power can be used to send broadcast data to reduce the interference of the broadcast data signal on other signals in the broadcast channel.
[0046] In one implementation, the first power may be determined according to the requirements for the transmission power of non-frequency hopping devices in the relevant specifications. For example, in the SIG or the specifications of different countries and regions on low-power Bluetooth, the upper limit of the transmission power of non-frequency hopping devices is limited, and the first power may be any value not exceeding the upper limit. In this way, the requirements of the relevant specifications can be met, and the interference of the signal of the first Bluetooth device sending broadcast data to other signals in the broadcast channel can be reduced.
[0047] In one implementation, the first Bluetooth device may scan the number of Bluetooth devices in the current environment and determine the first power based on the number. Generally speaking, the more Bluetooth devices there are in the current environment, the more likely they are to interfere with each other, and the first power may be set to a lower value accordingly. The first Bluetooth device may dynamically and adaptively adjust the first power based on the number of Bluetooth devices in the current environment, thereby optimizing the signal quality in the broadcast channel.
[0048] Continue to refer Figure 2 In step S220, the number of frequency-hopping channels in the data channel of the Bluetooth low energy consumption is obtained.
[0049] The data channel can be used to transmit Bluetooth data when establishing a low-power Bluetooth connection. The number of data channels is 37. The first Bluetooth device can use a frequency hopping mechanism when sending Bluetooth data to avoid interference between the Bluetooth data signal and other signals in the data channel.
[0050] The first Bluetooth device can detect in advance which data channels can be used as frequency hopping channels, and can evaluate different data channels to evaluate whether they are available, and then determine the frequency hopping channels. For example, the first Bluetooth device can use an idle channel in the data channel of low-power Bluetooth as a frequency hopping channel. After determining the frequency hopping channels, the number of frequency hopping channels is obtained.
[0051] In one implementation, the second Bluetooth device may detect frequency-hopping channels and send information about the frequency-hopping channels to the first Bluetooth device, so that the first Bluetooth device acquires the number of frequency-hopping channels.
[0052] Continue to refer Figure 2 In step S230, if the number of frequency-hopping channels reaches a preset number, Bluetooth data is sent to the second Bluetooth device through the frequency-hopping channel at a second power; the second power is higher than the first power.
[0053] It should be noted that, in this article, "reach" means greater than or equal to.
[0054] Generally, the more frequency-hopping channels there are, the lower the probability of interference with other signals in the frequency-hopping channels when sending Bluetooth data through the frequency-hopping channels. The preset number is used to measure whether the number of frequency-hopping channels is sufficient and whether the probability of interference is low enough. The preset number can be determined based on experience or actual needs. In one embodiment, the relevant specification may specify a minimum number of frequency-hopping channels for the frequency-hopping device, and the preset number can be any value not less than the minimum value. Exemplarily, the preset number can be 10.
[0055] If the number of frequency-hopping channels reaches a preset number, it can be considered that the probability of interference occurring in the frequency-hopping channels is at a negligible or acceptable level. In this case, the first Bluetooth device can use a higher second power to send Bluetooth data to the second Bluetooth device, thereby ensuring that the RSSI (Received Signal Strength Indicator) of the signal received by the second Bluetooth device is higher, thereby improving the communication quality of low-power Bluetooth.
[0056] In this exemplary embodiment, the first Bluetooth device can use a first power in the broadcast channel and a second power in the data channel, and the second power is higher than the first power. Thus, the power of the broadcast channel and the data channel are configured separately, so that relatively more power consumption resources are allocated to the transmission of Bluetooth data, and the transmission quality of Bluetooth data has a greater impact on the Bluetooth communication process. Therefore, this solution can improve the anti-interference ability of low-power Bluetooth as a whole and enhance the user's Bluetooth experience.
[0057] For example, when a user listens to audio through a low-power Bluetooth connection between a mobile phone and a Bluetooth headset, although the use of the first power to send broadcast data may cause delays in pairing and connection between the mobile phone and the Bluetooth headset, the use of the second power to send Bluetooth data can improve the smoothness of audio transmission and playback and improve the problem of audio stuttering. In comparison, users usually have a higher tolerance for delays in the pairing and connection process and a lower tolerance for audio stuttering, and the latter has a greater impact on the user experience. Therefore, this solution can improve the user experience as a whole by focusing on improving the anti-interference of the Bluetooth data transmission process.
[0058] In one implementation, the second power may be determined according to the requirements for the transmission power of the frequency hopping device in the relevant specifications. For example, in the SIG or the specifications of different countries and regions regarding low-power Bluetooth, the upper limit of the transmission power of the frequency hopping device is limited, and the second power may be any value not exceeding the upper limit. In this way, the requirements of the relevant specifications can be met, and the interference between the Bluetooth data sent by the first Bluetooth device and other signals in the frequency hopping channel can be reduced.
[0059] In one embodiment, the Bluetooth control method may further include the following steps:
[0060] If the number of frequency hopping channels reaches a preset number, the second power is determined according to the number of frequency hopping channels.
[0061] Generally speaking, the more frequency hopping channels there are, the less likely signal interference will occur. The second power can be set to a higher value within a suitable power value range, that is, the number of frequency hopping channels is positively correlated with the second power.
[0062] In one implementation, the second power may be determined according to the number of frequency-hopping channels within the first power value interval. The first power value interval may be determined according to actual needs, and its lower limit value is greater than or equal to the first power (when the lower limit value is equal to the first power, the first power value interval does not include the lower limit value, that is, it is an open interval at the lower limit value). For example, the first power value interval may be [P 1 +a,P max ], where P 1 is the first power, a is a compensation value greater than 0 and smaller in value, which can be determined based on experience, P max For the maximum power of low-power Bluetooth or frequency-hopping devices, P can be determined according to the requirements in the relevant specifications. max .
[0063] In one implementation, a mapping relationship may be formed between the first power value interval and the number interval of frequency hopping channels that is not less than a preset number. For example, the number interval of frequency hopping channels may be [N 0 ,N max ],N 0 is the preset number, N max is the maximum number of frequency hopping channels, such as the total number of data channels 37. A linear or nonlinear mapping relationship may be set in advance between the first power value interval and the frequency hopping channel number interval that is not less than the preset number. Thus, when the number of frequency hopping channels is obtained and the number reaches the preset number, the number of frequency hopping channels may be mapped to a value within the first power value interval according to the mapping relationship, thereby obtaining the second power.
[0064] Based on the above-mentioned method of determining the second power according to the number of frequency-hopping channels, the second power can be adaptive to the number of frequency-hopping channels, and the second power can be dynamically adjusted according to the change in the number of frequency-hopping channels, so as to balance the signal strength of the Bluetooth data in the frequency-hopping channel and the degree of interference to other signals, thereby further optimizing the signal quality of the Bluetooth data.
[0065] In one embodiment, the Bluetooth control method may further include the following steps:
[0066] If the number of frequency-hopping channels does not reach the preset number, the Bluetooth data is sent to the second Bluetooth device through the frequency-hopping channels at a third power; the third power is lower than the second power.
[0067] Among them, if the number of frequency-hopping channels does not reach the preset number, it can be considered that the probability of interference occurring in the frequency-hopping channels is high. In this case, the first Bluetooth device can use a third power lower than the second power to send Bluetooth data to the second Bluetooth device, which can reduce the interference of the Bluetooth data signal to other signals in the frequency-hopping channels.
[0068] The first power and the third power are two powers configured for the broadcast channel and the data channel respectively, and the two may be unrelated. In one implementation, the first power and the third power may be equal or similar.
[0069] In one implementation, the third power may be determined according to the requirements for the transmit power of non-frequency hopping devices in the relevant specifications. For example, the specifications stipulate an upper limit for the transmit power of non-frequency hopping devices, and the third power may be any value that does not exceed the upper limit. In this way, the requirements of the relevant specifications may be met, and when the number of frequency hopping channels is small, the interference of the signal of the first Bluetooth device sending Bluetooth data to other signals in the frequency hopping channel may be reduced.
[0070] In one implementation, the third power may be determined according to the number of frequency hopping channels. Generally speaking, the more frequency hopping channels there are, the less likely signal interference will occur. The third power may be set to a higher value within a suitable power value range, that is, the number of frequency hopping channels is positively correlated with the third power.
[0071] In one implementation, the third power may be determined according to the number of frequency-hopping channels within the second power value interval. The third power value interval may be determined according to actual needs, and its upper limit value is less than or equal to the second power (when the upper limit value is equal to the second power, the second power value interval does not include the upper limit value, that is, it is an open interval at the upper limit value). For example, the second power value interval may be [P min ,P 2 ), where P min is the minimum power for low-power Bluetooth or non-frequency hopping devices, P 2 Alternatively, the upper limit of the second power value interval may be the maximum power for non-frequency hopping devices or the above-mentioned P 1 +a, etc.
[0072] In one implementation, a mapping relationship may be formed between the second power value interval and the number interval of frequency hopping channels less than a preset number. For example, the number interval of frequency hopping channels may be [N min ,N 0 ), N 0 is the preset number, N min Can be 1 or less than N 0 A linear or nonlinear mapping relationship may be set in advance between the second power value interval and the interval of the number of frequency-hopping channels that is less than the preset number. Thus, when the number of frequency-hopping channels is obtained and the number does not reach the preset number, the number of frequency-hopping channels may be mapped to a value within the second power value interval according to the mapping relationship, thereby obtaining the third power.
[0073] Based on the above-mentioned method of determining the third power according to the number of frequency-hopping channels, the third power can be adaptive to the number of frequency-hopping channels, and the third power can be dynamically adjusted according to the change in the number of frequency-hopping channels, so as to balance the signal strength of the Bluetooth data in the frequency-hopping channel and the degree of interference to other signals, thereby further optimizing the signal quality of the Bluetooth data.
[0074] It should be noted that after the first Bluetooth device establishes a low-power Bluetooth connection with the second Bluetooth device, during the process of sending Bluetooth data, the first Bluetooth device can continue to send broadcast data in the broadcast channel, for example, while sending Bluetooth data, broadcast so that it can be searched by other Bluetooth devices, or scan to search for other Bluetooth devices. Of course, the first Bluetooth device can also stop sending broadcast data in the broadcast channel, that is, the broadcast function can be turned off when the low-power Bluetooth connection has been established. This may depend on the specific settings on the first Bluetooth device, and the present disclosure does not limit this.
[0075] In one implementation, the obtaining of the number of frequency-hopping channels in the Bluetooth low energy data channel may include the following steps:
[0076] An idle channel in a data channel of the low-power Bluetooth is used as a frequency-hopping channel to obtain the number of frequency-hopping channels.
[0077] The present disclosure does not limit the criteria for determining an idle channel. For example, when the level of a signal in a data channel is evaluated to be lower than a preset detection threshold, the data channel can be marked as an idle channel. Using an idle channel as a frequency hopping channel can ensure that there is no interference with other signals in the frequency hopping channel, thereby ensuring the transmission quality of Bluetooth data.
[0078] In one implementation, the obtaining of the number of frequency-hopping channels in the Bluetooth low energy data channel may further include the following steps:
[0079] If the number of idle channels does not reach the preset number, a non-idle channel in the data channel of the low-power Bluetooth is added to the frequency-hopping channels so that the number of the frequency-hopping channels reaches the preset number.
[0080] That is, the frequency hopping channel may include an idle channel and a certain number of non-idle channels, so that the number of frequency hopping channels is greater than or equal to a preset number, thereby satisfying the condition in step S230, so that the first Bluetooth device can send Bluetooth data to the second Bluetooth device through the frequency hopping channel at the second power, thereby ensuring the transmission quality of the Bluetooth data. When the first Bluetooth device uses the non-idle channel in the frequency hopping channel to send Bluetooth data, since the second power is relatively high, it can compensate for the interference in the channel, thereby ensuring the signal strength of the Bluetooth data received by the second Bluetooth device.
[0081] In one embodiment, the Bluetooth control method may further include the following steps:
[0082] If there is an abnormality in the low-power Bluetooth connection with the second Bluetooth device, the traditional Bluetooth is used to connect to the second Bluetooth device.
[0083] Among them, there are abnormalities in the low-power Bluetooth connection, which may include but are not limited to the following situations: under the low-power Bluetooth connection, the number of data retransmissions is large; the low-power Bluetooth connection with the second Bluetooth device is disconnected, such as no response from the second Bluetooth device is received; the low-power Bluetooth function of the first Bluetooth device is abnormal, such as hardware or software failure, etc.
[0084] In one implementation, it may be determined whether a low-power Bluetooth connection is abnormal in the following manner:
[0085] When the number of retransmissions of the Bluetooth data sent to the second Bluetooth device through the frequency hopping channel reaches a preset number, it is determined that an abnormality exists in the low power consumption Bluetooth connection with the second Bluetooth device.
[0086] The preset number of times can be determined based on experience or actual conditions. For example, if the number of retransmissions of a data packet in the Bluetooth data reaches the preset number of times, it can be considered that there is an abnormality in the low-power Bluetooth connection. Alternatively, if the number of retransmissions of a certain number of data packets in the Bluetooth data reaches the preset number of times, it can be considered that there is an abnormality in the low-power Bluetooth connection.
[0087] In the case of an abnormal low-power Bluetooth connection, you can use traditional Bluetooth to connect to the second Bluetooth device, so that the first Bluetooth device and the second Bluetooth device can continue to interact with each other through the traditional Bluetooth connection. In comparison, the transmission power of traditional Bluetooth is higher, which can make up for the shortcomings of low-power Bluetooth connection in scenarios such as strong interference and weak signals, and maintain the Bluetooth data interaction between the first Bluetooth device and the second Bluetooth device.
[0088] In one implementation, when both the first Bluetooth device and the second Bluetooth device support traditional Bluetooth and low-power Bluetooth, the priority of low-power Bluetooth can be set higher than that of traditional Bluetooth. In this way, the first Bluetooth device and the second Bluetooth device preferentially use low-power Bluetooth for connection and data exchange, and switch to traditional Bluetooth for connection and data exchange when the low-power Bluetooth connection is abnormal, which can reduce power consumption as much as possible while ensuring normal transmission of Bluetooth data.
[0089] For example, when a user listens to audio through a low-power Bluetooth connection between a mobile phone and a Bluetooth headset, if the distance between the mobile phone and the Bluetooth headset is far, there are obstructions, or there are interference signals in the environment, the low-power Bluetooth connection may be abnormal, and the audio received by the Bluetooth headset may be stuck or delayed. In this case, the mobile phone and the Bluetooth headset can quickly switch to a traditional Bluetooth connection and continue to transmit audio, which can improve audio stuck and delay.
[0090] Through the above method, when there is an abnormality in the low-power Bluetooth connection, it can quickly switch to traditional Bluetooth. There is no need for the first Bluetooth device to negotiate with the second Bluetooth device and wait for each other's feedback. The switching rate can be increased and even reach a user-imperceptible level, thereby reducing latency and further improving the user experience.
[0091] In one implementation, if the first Bluetooth device detects that the second Bluetooth device does not support low-power Bluetooth, the first Bluetooth device uses traditional Bluetooth to connect to the second Bluetooth device and sends Bluetooth data through the traditional Bluetooth connection.
[0092] Figure 3 An exemplary process of the Bluetooth control method executed by the second Bluetooth device in this exemplary embodiment is shown, which may include the following steps S310 to S320:
[0093] Step S310, in response to broadcast data sent by the first Bluetooth device through a broadcast channel of low-power Bluetooth at a first power, establishing a low-power Bluetooth connection with the first Bluetooth device;
[0094] Step S320, receiving Bluetooth data sent by the first Bluetooth device at a second power through a frequency-hopping channel in a low-power Bluetooth data channel; wherein the first Bluetooth device sends Bluetooth data at the second power when the number of frequency-hopping channels reaches a preset number; the second power is higher than the first power.
[0095] The broadcast data sent by the first Bluetooth device may include one or more of broadcast, scanning, and initiating a connection. The first Bluetooth device may scan the second Bluetooth device and establish a low-power Bluetooth connection with the second Bluetooth device by initiating a connection request, or the second Bluetooth device may scan the first Bluetooth device and establish a low-power Bluetooth connection with the first Bluetooth device by initiating a connection request.
[0096] In a low-power Bluetooth connection, when the number of frequency-hopping channels reaches a preset number, the first Bluetooth device sends Bluetooth data at a second power, and the second Bluetooth device receives the Bluetooth data and can also perform relevant processing on the Bluetooth data. For example, if the Bluetooth data is audio, the second Bluetooth device can play the audio after receiving it.
[0097] Based on the above method, when the number of frequency-hopping channels of the first Bluetooth device reaches a preset number, the first Bluetooth device sends Bluetooth data to the second Bluetooth device at a higher second power, which is beneficial to improving the signal strength of the Bluetooth data received by the second Bluetooth device, improving the stability of the low-power Bluetooth connection in interference scenarios and weak signal scenarios, and improving the transmission jamming problem of Bluetooth data.
[0098] Figure 4 A schematic flow chart of a Bluetooth control method executed by a first Bluetooth device is shown, which may include:
[0099] Step S410, detecting whether the second Bluetooth device supports low-power Bluetooth, for example, detecting whether the second Bluetooth device has feedback after sending broadcast data in low-power Bluetooth mode, or detecting which broadcast data the second Bluetooth device responds to after sending broadcast data of low-power Bluetooth and broadcast data of traditional Bluetooth at the same time, so as to determine whether it supports low-power Bluetooth; if so, executing step S420, if not, executing step S480;
[0100] Step S420, when both the low-power Bluetooth and the traditional Bluetooth are enabled at the same time, setting the low-power Bluetooth to have a higher priority;
[0101] Step S430, in the low power Bluetooth mode, sending broadcast data through the broadcast channel at a first power to establish a low power Bluetooth connection with the second Bluetooth device;
[0102] Step S440, in the Bluetooth low energy mode, sending Bluetooth data through a frequency hopping channel in the data channel at a second power, where the second power may be a default power;
[0103] Step S450, detecting whether the number of frequency hopping channels reaches a preset number, if so, maintaining the second power and executing step S470, if not, executing step S460;
[0104] Step S460, sending Bluetooth data to the second Bluetooth device through the data channel at the third power, and then continuing to step S470;
[0105] Step S470, during the transmission of the Bluetooth data, detecting whether there is a transmission jam in the Bluetooth data, for example, whether the number of retransmissions of the Bluetooth data reaches a preset number, if yes, executing step S480, if no, continuing to send the Bluetooth data at the second power or the third power in the low power Bluetooth mode;
[0106] Step S480: connect to the second Bluetooth device via traditional Bluetooth and send Bluetooth data.
[0107] Figure 5 Another schematic flow of a Bluetooth control method performed by a first Bluetooth device is shown, which may include:
[0108] Step S510, detecting whether the second Bluetooth device supports low-power Bluetooth, for example, detecting whether the second Bluetooth device has feedback after sending broadcast data in low-power Bluetooth mode, or detecting which broadcast data the second Bluetooth device responds to after sending low-power Bluetooth broadcast data and traditional Bluetooth broadcast data at the same time, so as to determine whether it supports low-power Bluetooth; if so, executing step S520, if not, executing step S590;
[0109] Step S520, enabling Bluetooth LE and traditional Bluetooth at the same time, and setting Bluetooth LE to have a higher priority;
[0110] Step S530, in the low power Bluetooth mode, sending broadcast data through the broadcast channel at a first power to establish a low power Bluetooth connection with the second Bluetooth device;
[0111] Step S540, in the Bluetooth low energy mode, using an idle channel in the data channel as a frequency hopping channel;
[0112] Step S550, detecting whether the number of frequency hopping channels reaches a preset number, if yes, executing step S570, if no, executing step S560;
[0113] Step S560, adding a non-idle channel to the frequency hopping channels, and detecting again whether the number of frequency hopping channels reaches a preset number, so that the number of frequency hopping channels after adding the non-idle channels reaches the preset number;
[0114] Step S570, in the Bluetooth low energy mode, sending Bluetooth data to the second Bluetooth device via the frequency hopping channel at the second power;
[0115] Step S580, during the transmission of the Bluetooth data, detecting whether there is a transmission jam in the Bluetooth data, for example, whether the number of retransmissions of the Bluetooth data reaches a preset number, if so, executing step S590, if not, continuing to send the Bluetooth data at the second power in the low power Bluetooth mode;
[0116] Step S590: connect to the second Bluetooth device via traditional Bluetooth and send Bluetooth data.
[0117] The exemplary embodiment of the present disclosure also provides a Bluetooth control device, which can be applied to a first Bluetooth device. Figure 6 As shown, the Bluetooth control device 600 may include:
[0118] The broadcast control module 610 is configured to send broadcast data through a broadcast channel of the low-power Bluetooth at a first power to establish a low-power Bluetooth connection with a second Bluetooth device;
[0119] The channel number acquisition module 620 is configured to acquire the number of frequency hopping channels in the data channel of the Bluetooth low energy consumption;
[0120] The data transmission control module 630 is configured to send Bluetooth data to the second Bluetooth device through the frequency hopping channel at a second power if the number of frequency hopping channels reaches a preset number; the second power is higher than the first power.
[0121] In one implementation, the data transmission control module 630 is further configured to:
[0122] If the number of frequency-hopping channels does not reach the preset number, the Bluetooth data is sent to the second Bluetooth device through the frequency-hopping channels at a third power; the third power is lower than the second power.
[0123] In one implementation, the obtaining of the number of frequency-hopping channels in the data channel of Bluetooth low energy includes:
[0124] An idle channel in a data channel of the low-power Bluetooth is used as a frequency-hopping channel to obtain the number of frequency-hopping channels.
[0125] In one implementation, the obtaining of the number of frequency hopping channels in the Bluetooth low energy data channel further includes:
[0126] If the number of idle channels does not reach the preset number, a non-idle channel in the data channel of the low-power Bluetooth is added to the frequency-hopping channels so that the number of the frequency-hopping channels reaches the preset number.
[0127] In one implementation, the Bluetooth control device 600 may further include a traditional Bluetooth control module configured to:
[0128] If there is an abnormality in the low-power Bluetooth connection with the second Bluetooth device, the traditional Bluetooth is used to connect to the second Bluetooth device.
[0129] In one implementation, the data transmission control module 630 is further configured to:
[0130] When the number of retransmissions of the Bluetooth data sent to the second Bluetooth device through the frequency hopping channel reaches a preset number, it is determined that an abnormality exists in the low power consumption Bluetooth connection with the second Bluetooth device.
[0131] In one implementation, the channel quantity acquisition module 620 is further configured to:
[0132] If the number of frequency hopping channels reaches a preset number, the second power is determined according to the number of frequency hopping channels.
[0133] The exemplary embodiment of the present disclosure also provides another Bluetooth control device, which can be applied to a second Bluetooth device. Figure 7 As shown, the Bluetooth control device 700 may include:
[0134] The broadcast control module 710 is configured to establish a low-power Bluetooth connection with the first Bluetooth device in response to broadcast data sent by the first Bluetooth device through a low-power Bluetooth broadcast channel at a first power;
[0135] The data transmission control module 720 is configured to receive Bluetooth data sent by the first Bluetooth device at a second power through a frequency-hopping channel in a low-power Bluetooth data channel; the first Bluetooth device sends Bluetooth data at the second power when the number of frequency-hopping channels reaches a preset number; the second power is higher than the first power.
[0136] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0137] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In an optional embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0138] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0139] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0140] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0141] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0142] The exemplary embodiment of the present disclosure also provides an electronic device. The electronic device may be the first Bluetooth device or the second Bluetooth device described above. Generally, the electronic device may include a processor, a memory, and a communication unit. The communication unit is used to perform Bluetooth communication with other devices, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned Bluetooth control method by executing the executable instructions.
[0143] Below Figure 8 The mobile terminal 800 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 8 The construction in can also be applied to fixed type equipment.
[0144] like Figure 8 As shown, the mobile terminal 800 may specifically include: a processor 801 , a memory 802 , a bus 803 , a communication unit 804 , an antenna, an audio unit 805 , a power supply unit 806 and a sensor unit 807 .
[0145] The processor 801 may include one or more processing units, for example, the processor 801 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The Bluetooth control method in this exemplary embodiment may be executed by an AP, etc.
[0146] The processor 801 may be connected to the memory 802 or other components via a bus 803 .
[0147] The memory 802 may be used to store computer executable program codes, which may include instructions. The processor 801 executes various functional applications and data processing of the mobile terminal 800 by running the instructions stored in the memory 802. The memory 802 may also store application data, such as images, audio, video and other files.
[0148] The communication function of the mobile terminal 800 can be implemented by the communication unit 804, the antenna, the modem processor, etc. The antenna is used to transmit and receive electromagnetic wave signals. The communication unit 804 can provide a Bluetooth communication solution applied to the mobile terminal 800, including a communication mode of low-power Bluetooth or traditional Bluetooth. In addition, the communication unit 804 can also provide mobile communication solutions such as 3G, 4G, and 5G, or wireless communication solutions other than Bluetooth such as wireless LAN and near-field communication.
[0149] The audio unit 805 is used to implement audio functions, such as playing audio, collecting voice, etc. The power unit 806 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor unit 807 may include one or more sensors to implement corresponding induction detection functions, such as the sensor unit 807 may include an inertial sensor, a contact sensor, etc.
[0150] In addition, the mobile terminal 800 may further include Figure 8 Components not shown in the figure, such as display screen, camera, etc., are not limited in this disclosure.
[0151] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0152] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as a system, method or program product. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be collectively referred to herein as a "circuit", "module" or "system". Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0153] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A Bluetooth control method, It is characterized in that Applied to a first Bluetooth device, the method includes: Sending broadcast data through a broadcast channel of low-power Bluetooth at a first power to establish a low-power Bluetooth connection with a second Bluetooth device; Get the number of frequency-hopping channels in the Bluetooth low energy data channel; If the number of the frequency-hopping channels reaches a preset number, Bluetooth data is sent to the second Bluetooth device through the frequency-hopping channels at a second power; the second power is higher than the first power.
2. The method according to claim 1, It is characterized in that The method further comprises: If the number of the frequency-hopping channels does not reach the preset number, sending Bluetooth data to the second Bluetooth device through the frequency-hopping channels at a third power; the third power is lower than the second power.
3. The method according to claim 1, It is characterized in that The obtaining the number of frequency-hopping channels in the data channel of the low-power Bluetooth comprises: An idle channel in a data channel of the low-power Bluetooth is used as the frequency-hopping channel to obtain the number of the frequency-hopping channels.
4. The method according to claim 3, It is characterized in that The step of obtaining the number of frequency hopping channels in the data channel of the low power Bluetooth further includes: If the number of idle channels does not reach the preset number, a non-idle channel in the data channel of Bluetooth low energy is added to the frequency hopping channel so that the number of the frequency hopping channel reaches the preset number.
5. The method according to claim 1, It is characterized in that The method further comprises: If there is an abnormality in the low-power Bluetooth connection with the second Bluetooth device, traditional Bluetooth is used to connect to the second Bluetooth device.
6. The method according to claim 5, It is characterized in that The method further comprises: When the number of retransmissions of the Bluetooth data sent to the second Bluetooth device through the frequency hopping channel reaches a preset number, it is determined that an abnormality exists in the low-power Bluetooth connection with the second Bluetooth device.
7. The method according to claim 1, It is characterized in that The method further comprises: If the number of the frequency-hopping channels reaches a preset number, the second power is determined according to the number of the frequency-hopping channels.
8. A Bluetooth control method, It is characterized in that Applied to a second Bluetooth device, the method comprises: In response to broadcast data sent by the first Bluetooth device through a broadcast channel of low-power Bluetooth at a first power, establishing a low-power Bluetooth connection with the first Bluetooth device; Receive Bluetooth data sent by the first Bluetooth device at a second power through a frequency-hopping channel in a low-power Bluetooth data channel; the first Bluetooth device sends the Bluetooth data at the second power when the number of the frequency-hopping channels reaches a preset number; the second power is higher than the first power.
9. A Bluetooth control device, It is characterized in that Applied to a first Bluetooth device, the apparatus comprises: a broadcast control module, configured to send broadcast data through a broadcast channel of low-power Bluetooth at a first power to establish a low-power Bluetooth connection with a second Bluetooth device; A channel number acquisition module is configured to acquire the number of frequency-hopping channels in a low-power Bluetooth data channel; The data transmission control module is configured to send Bluetooth data to the second Bluetooth device through the frequency hopping channel at a second power if the number of the frequency hopping channels reaches a preset number; the second power is higher than the first power.
10. A Bluetooth control device, It is characterized in that Applied to a second Bluetooth device, the apparatus comprises: a broadcast control module configured to establish a low-power Bluetooth connection with the first Bluetooth device in response to broadcast data sent by the first Bluetooth device through a low-power Bluetooth broadcast channel at a first power; The data transmission control module is configured to receive Bluetooth data sent by the first Bluetooth device at a second power through a frequency-hopping channel in a low-power Bluetooth data channel; the first Bluetooth device sends the Bluetooth data at the second power when the number of the frequency-hopping channels reaches a preset number; the second power is higher than the first power.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
12. An electronic device, It is characterized in that include: processor; A memory, configured to store executable instructions of the processor; A communication unit, used for Bluetooth communication with other devices; The processor is configured to perform the method of any one of claims 1 to 7 by executing the executable instructions.
Citation Information
Patent Citations
Method and device for data transmission and channel measurement
CN107005949A
Method and device for optimizing frequency hopping technology and storage medium
CN112468184A