CN115993592B - Bluetooth ranging method, electronic equipment and storage medium - Google Patents

Bluetooth ranging method, electronic equipment and storage medium Download PDF

Info

Publication number
CN115993592B
CN115993592B CN202310285918.4A CN202310285918A CN115993592B CN 115993592 B CN115993592 B CN 115993592B CN 202310285918 A CN202310285918 A CN 202310285918A CN 115993592 B CN115993592 B CN 115993592B
Authority
CN
China
Prior art keywords
bluetooth
value
signal
insertion loss
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310285918.4A
Other languages
Chinese (zh)
Other versions
CN115993592A (en
Inventor
牛永民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310285918.4A priority Critical patent/CN115993592B/en
Publication of CN115993592A publication Critical patent/CN115993592A/en
Application granted granted Critical
Publication of CN115993592B publication Critical patent/CN115993592B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application relates to a Bluetooth ranging method, electronic equipment and a storage medium. The method is applied to Bluetooth equipment. When the Bluetooth device starts Bluetooth ranging, the Bluetooth mode of the Bluetooth device is determined according to the configuration information of the antenna of the Bluetooth device, and the insertion loss value corresponding to the Bluetooth mode is determined. The Bluetooth device receives a Bluetooth signal sent by the device to be measured, and obtains a transmitting power value and a receiving signal strength value of the Bluetooth signal from the Bluetooth signal. And the Bluetooth equipment determines the distance between the Bluetooth equipment and the equipment to be measured according to the insertion loss value, the transmitting power value and the receiving signal strength value. According to the technical scheme, the Bluetooth device sets the insertion loss value according to the Bluetooth modes, so that the calculated distances of the Bluetooth devices in different Bluetooth modes can be kept consistent, and the measured distance results can be consistent even if the Bluetooth devices have differences in radio frequency performance or co-frequency interference and channel interference corresponding to the different Bluetooth modes.

Description

Bluetooth ranging method, electronic equipment and storage medium
Technical Field
The application relates to the field of terminal equipment, in particular to a Bluetooth ranging method, electronic equipment and a storage medium.
Background
Devices with bluetooth functions (e.g., mobile phones) may have different received signal strength values of mobile phones with different hardware configurations or mobile phones under different service data due to different configuration conditions of their own hardware (e.g., antennas) and different current service data (e.g., wi-Fi service data). However, the received signal strength value is typically one of the parameters used to calculate the range in the associated bluetooth ranging method. Thus, the distances calculated when applied to bluetooth ranging are different for mobile phones with different hardware configurations or mobile phones under different service data, so that the mobile phone ranging can obtain inconsistent distance results.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a bluetooth ranging method, an electronic device and a storage medium to solve the technical problem that the bluetooth ranging result is inconsistent.
In a first aspect, an embodiment of the present application provides a bluetooth ranging method, which is applied in a bluetooth device, where the bluetooth device is connected with a device to be measured in bluetooth, and the method includes: when starting Bluetooth ranging, determining a Bluetooth mode of the Bluetooth equipment according to configuration information of an antenna of the Bluetooth equipment; determining the insertion loss value of the Bluetooth equipment according to the Bluetooth mode; receiving a Bluetooth signal sent by the equipment to be measured, and acquiring a transmitting power value of the Bluetooth signal from the Bluetooth signal; acquiring a received signal strength value when the Bluetooth device receives the Bluetooth signal; and determining the loss of the Bluetooth signal according to the insertion loss value, the transmitting power value and the receiving signal intensity value, and determining the distance between the Bluetooth device and the device to be measured according to the loss of the Bluetooth signal.
According to the technical scheme, the insertion loss value is set according to the Bluetooth modes, so that the calculated loss values of Bluetooth signals in different Bluetooth modes are the same, and therefore the calculated distances of the Bluetooth devices in different Bluetooth modes can be kept consistent, and the measured distance results can be kept consistent even if the radio frequency performance or the same-frequency interference and the channel interference corresponding to the different Bluetooth modes are different.
In an embodiment of the present application, the bluetooth mode of the bluetooth device includes an independent bluetooth mode and a dependent bluetooth mode, where the independent bluetooth mode refers to that the bluetooth device independently receives and transmits the bluetooth signal through the antenna, and the dependent bluetooth mode refers to that the bluetooth device multiplexes the antenna to perform Wi-Fi signal and receive and transmit the bluetooth signal. In the above technical scheme, the bluetooth device independently transmits and receives bluetooth signals through the antenna in an independent bluetooth mode to perform distance measurement, and the bluetooth device multiplexes the antenna to transmit and receive bluetooth information in a dependent bluetooth mode to perform distance measurement.
In an embodiment of the present application, the determining the insertion loss value of the bluetooth device according to the bluetooth mode includes: if the Bluetooth mode is an independent Bluetooth mode, setting the insertion loss value of the Bluetooth device as a first value; and if the Bluetooth mode is a non-independent Bluetooth mode, setting the insertion loss value of the Bluetooth device to be a second value, wherein the first value is larger than the second value. It should be noted that, if the radio frequency performance of the antenna of the bluetooth device in the independent bluetooth mode is better than the radio frequency performance of the antenna in the non-independent bluetooth mode, the first value may also be smaller than the second value. This is by way of example only and not by way of limitation. According to the technical scheme, the insertion loss value of the Bluetooth device can be dynamically adjusted according to the Bluetooth mode of the Bluetooth device, so that the measured distance results of the Bluetooth device in different Bluetooth modes are consistent.
In one embodiment of the present application, the first value is 15dbm and the second value is 10dbm. According to the technical scheme, the insertion loss value of the Bluetooth device in the independent Bluetooth mode is set to be 15dbm, and the insertion loss value of the Bluetooth device in the non-independent Bluetooth mode is set to be 10dbm, so that the effect that the measured distance results of the Bluetooth device in different Bluetooth modes are consistent is optimal.
In an embodiment of the present application, the acquiring the received signal strength value when the bluetooth signal is received includes: and acquiring the intensity indication RSSI of a received signal from the Bluetooth signal as the intensity value of the received signal.
In an embodiment of the present application, the determining the loss of the bluetooth signal according to the insertion loss value, the transmission power value, and the received signal strength value includes: according to the formulaCalculating the distance, wherein +_>Representing the transmit power value,/->Representing the insertion loss value,/->Representing the received signal strength value,/->Representing a loss of the bluetooth signal; the determining the distance between the bluetooth device and the device to be measured according to the loss of the bluetooth signal includes: according to the formula->Calculating the distance, wherein >Representing the distance. In the technical proposal, the formula ∈10 can be adopted>And calculating the loss of the Bluetooth device by the dynamically adjusted insertion loss value so as to dynamically compensate the loss of the Bluetooth signal in different Bluetooth modes, so that the measured distance results of the Bluetooth device in different Bluetooth modes are consistent.
In a second aspect, an embodiment of the present application further provides a bluetooth ranging method, which is applied in a bluetooth device, where the bluetooth device is connected with a device to be measured in bluetooth, and the method includes: when Bluetooth ranging is started, wi-Fi service data and Bluetooth service data are acquired; determining the insertion loss value of the Bluetooth device according to the Wi-Fi service data and the Bluetooth service data; receiving a Bluetooth signal sent by the equipment to be measured, and acquiring a transmitting power value of the Bluetooth signal from the Bluetooth signal; acquiring a received signal strength value when the Bluetooth device receives the Bluetooth signal; and determining the loss of the Bluetooth signal according to the insertion loss value, the transmitting power value and the receiving signal intensity value, and determining the distance between the Bluetooth device and the device to be measured according to the loss of the Bluetooth signal.
In the above technical solution, since the co-channel interference and the channel interference of the bluetooth devices in different service scenarios are different, the received signal strength values of the bluetooth signals received by the bluetooth devices in different service scenarios are also different, resulting in different loss values of the received bluetooth signals. In order to ensure that the calculated distance values of the Bluetooth equipment in different service scenes are kept consistent, different insertion loss values are set according to different service scenes, so that the calculated loss values of the Bluetooth equipment in different service scenes are kept consistent, and the calculated distance results of the Bluetooth equipment in different service scenes are kept consistent.
In an implementation of the present application, the determining the insertion loss value of the bluetooth device according to the Wi-Fi service data and the bluetooth service data includes: and determining a service scene according to the Wi-Fi service data and the Bluetooth service data, wherein the service scene at least comprises a first service scene, a second service scene and a third service scene, the insertion loss value corresponding to the first service scene is a first value, the insertion loss value corresponding to the second service scene is a second value, and the insertion loss value corresponding to the third service scene is a third value. According to the technical scheme, the first service scene, the second service scene and the third service scene are determined according to Wi-Fi service data and the Bluetooth service data, and the insertion loss value of the Bluetooth device is dynamically adjusted according to the service scenes so that the measured distance results of the Bluetooth device under different service scenes are consistent.
In an implementation of the present application, the determining the insertion loss value of the bluetooth device according to the Wi-Fi service data and the bluetooth service data includes: if the Wi-Fi service data and the Bluetooth service data do not exist in the Bluetooth equipment, determining that the service scene is the first service scene; if the Bluetooth device has the Wi-Fi service data but does not have the Bluetooth service data, determining that the service scene is the second service scene; if the Wi-Fi service data and the Bluetooth service data exist in the Bluetooth equipment, determining that the service scene is the third service scene; the first value is less than the second value, and the second value is less than the third value.
In an implementation of the present application, the determining the loss of the bluetooth signal according to the insertion loss value, the transmission power value, and the received signal strength value includes: according to the formulaCalculating the distance, wherein>Representing the transmit power value,/->Representing the insertion loss value,/->Representing the received signal strength value,/->Representing a loss of the bluetooth signal; the determining the distance between the bluetooth device and the device to be measured according to the loss of the bluetooth signal includes: according to the formula- >Calculating the distance, wherein>Representing the distance. In the technical proposal, the formula ∈10 can be adopted>And calculating the loss of the Bluetooth equipment by the dynamically adjusted insertion loss value so as to dynamically compensate the loss of the Bluetooth signal in different service scenes, so that the measured distance results of the Bluetooth equipment in different service scenes are consistent.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory; wherein the processor is coupled to the memory; the memory is used for storing program instructions; the processor is configured to read the program instructions stored in the memory, so as to implement the bluetooth ranging method.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing program instructions that, when executed by a processor, perform the above bluetooth ranging method.
In addition, the technical effects of the third aspect to the fourth aspect may be referred to in the description related to the method designed in the method section above, and will not be repeated here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly describe the drawings in the embodiments, it being understood that the following drawings only illustrate some embodiments of the present application and should not be considered as limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is an application scenario diagram of a bluetooth ranging method according to an embodiment of the present application.
Fig. 2 is a flowchart of a bluetooth ranging method according to an embodiment of the present application.
FIG. 3 is a schematic diagram of a table of insertion loss values according to an embodiment of the present application.
Fig. 4 is a flowchart of a bluetooth ranging method according to another embodiment of the present application.
Fig. 5 is a flowchart illustrating determination of insertion loss values of a bluetooth device according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a bluetooth device in a first scenario according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a bluetooth device in a second scenario according to an embodiment of the present application.
Fig. 8 is a schematic diagram of a bluetooth device in a third scenario according to an embodiment of the present application.
Fig. 9 is a schematic diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, "/" means or, unless otherwise indicated herein. For example, A/B may represent A or B. The term "and/or" in this application is merely an association relationship describing an association object, and means that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist simultaneously, and B exists alone. "at least one" means one or more. "plurality" means two or more than two. For example, at least one of a, b or c may represent: seven cases of a, b, c, a and b, a and c, b and c, a, b and c.
At present, before leaving the factory, bluetooth devices such as mobile phones and the like need to be placed in a certain distance range for various functional tests, for example, the connection response function of the mobile phones and bluetooth headphones is tested in the certain distance range. However, when the mobile phone processes different service data under different hardware configuration conditions, the radio frequency performance or the same frequency interference and the channel interference of the mobile phone are different, so that the strength values of the received signals received by the mobile phones with different hardware configurations or the mobile phones under different service data are also different, and inconsistent distance results can be obtained in the ranging of the mobile phones. However, when the mobile phone performs the function test according to the tested distance result, the function test result of the mobile phone is inaccurate and unreliable due to the inaccuracy and inconsistency of the tested distance result, which affects the function test efficiency of the mobile phone. For example, when the mobile phone is close to the bluetooth headset to test the connection response function of the mobile phone and the bluetooth headset, when the mobile phone is close to the bluetooth headset for 10 times within the preset distance range according to the distance tested by the mobile phone, the experimental data of the time when the mobile phone responds to the bluetooth headset and performs bluetooth connection is 4.91s,9.24s,30.52s, connection failure, 32.37s,23.92s,13.74s,7.63s,19.60s, and connection failure, respectively. However, under the existing standard, when the mobile phone approaches the bluetooth headset to within a preset distance range, the time for the mobile phone to respond to the bluetooth headset is 1s-2s. Obviously, the result of the function test of the mobile phone is also inaccurate and unreliable due to the inaccuracy and inconsistency of the result of the test distance.
In order to solve the technical problems of inaccurate and inconsistent results of the distance test, the application provides a Bluetooth ranging method. The Bluetooth ranging method is applied to Bluetooth equipment. Referring to fig. 1, an application scenario diagram of a bluetooth ranging method in an embodiment of the present application is shown. The bluetooth device 10 is in communication with a device under test 20. The bluetooth device 10 is configured to receive a bluetooth signal of the device to be measured 20, and determine a distance between the bluetooth device 10 and the device to be measured 20 according to the bluetooth signal, its own hardware configuration, or currently processed service data.
In fig. 1, a mobile phone is used as a bluetooth device 10, a bluetooth headset is used as a device to be tested 20, and an application scenario of a bluetooth ranging method is illustrated. For example, in other embodiments of the present application, the Bluetooth device 10 may also be a tablet, desktop, laptop, handheld, notebook, ultra-mobile personal computer (UMPC), netbook, and a cellular telephone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) device, virtual Reality (VR) device, artificial intelligence (artificial intelligence, AI) device, wearable device, in-vehicle device, smart home device, and/or smart city device, among other devices having Bluetooth communication capabilities. The device 20 to be measured may be a sound box, a wearable device, a vehicle-mounted device, an intelligent home device, or the like with a bluetooth communication function.
Referring to fig. 2, a flowchart of a bluetooth ranging method according to an embodiment of the present application is shown. It should be further noted that the method disclosed in the embodiments of the present application or the method shown in the flowchart, including one or more steps for implementing the method, may be performed in an order that the steps may be interchanged with one another, and some steps may be deleted without departing from the scope of the claims. Some embodiments will be described below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict. The Bluetooth ranging method comprises the following steps.
Step S201, when the Bluetooth ranging is started, determining the Bluetooth mode of the Bluetooth device according to the configuration information of the antenna of the Bluetooth device.
In one embodiment of the present application, a system app (application) application of the bluetooth device 10 (e.g., a mobile phone) may monitor whether the bluetooth device 10 is on screen, and invoke the bluetooth ranging function if the bluetooth device 10 is monitored to be on screen. The bluetooth ranging function may calculate the distance between devices based on bluetooth information received by the devices. In another embodiment of the present application, the app application of the bluetooth device 10 may receive an operation instruction of the user to initiate bluetooth ranging, and the user may input the operation instruction in the app application through physical keys, virtual keys, voice, gesture actions to initiate bluetooth ranging.
In an embodiment of the present application, the bluetooth mode includes an independent bluetooth mode and a dependent bluetooth mode. The independent bluetooth mode refers to that the bluetooth device 10 independently transmits and receives bluetooth signals through an antenna, such as transmitting and receiving bluetooth signals transmitted from the device to be measured 20. The non-independent bluetooth mode refers to that the bluetooth device 10 multiplexes the antenna to transmit and receive Wi-Fi signals and bluetooth signals. In an embodiment of the present application, determining the bluetooth mode of the bluetooth device according to the configuration information of the antenna of the bluetooth device 10 includes: if the configuration information of the antenna of the Bluetooth device 10 is that the antenna independently receives and transmits Bluetooth signals, determining that the Bluetooth mode is an independent Bluetooth mode; if the configuration information of the antenna of the bluetooth device 10 is that the antenna is used to transmit and receive Wi-Fi signals and bluetooth signals, it is determined that the bluetooth mode is an independent bluetooth mode.
Step S202, determining the insertion loss value of the bluetooth device 10 according to the bluetooth mode.
In an embodiment of the present application, a table of insertion loss value relationships is preset in the bluetooth device 10. The insertion loss value relation table comprises different types of Bluetooth modes and insertion loss values corresponding to the different Bluetooth modes. The bluetooth device 10 may determine the corresponding insertion loss value according to the bluetooth mode and insertion loss value relationship table. FIG. is a schematic diagram of a table of insertion loss value relationships according to an embodiment of the present application. As shown in fig. 3, the insertion loss value corresponding to the independent bluetooth mode is 15dbm, and the insertion loss value corresponding to the non-independent bluetooth mode is 10dbm. When the bluetooth mode of the bluetooth device 10 is the independent bluetooth mode, the insertion loss value of the bluetooth device 10 is set to 15dbm according to the insertion loss value relationship table. When the bluetooth mode of the bluetooth device 10 is the dependent bluetooth mode, the insertion loss value of the bluetooth device 10 is set to 15dbm according to the insertion loss value relationship table.
In step S203, the bluetooth signal sent by the device to be measured 20 is received, and the transmission power value of the bluetooth signal is obtained from the bluetooth signal.
In an embodiment of the present application, if the distance-to-be-measured device 20 enters the bluetooth communication range, the distance-to-be-measured device 20 carries a transmission power value for transmitting the bluetooth signal in the bluetooth signal, and transmits the bluetooth signal to the bluetooth device 10. For example, the distance to be measured device 20 carries the transmission power value for transmitting the bluetooth signal in a preset field in the data frame of the bluetooth signal, and transmits the data frame of the bluetooth signal to the bluetooth device 10. After receiving the data frame of the bluetooth signal, the bluetooth device 10 obtains the transmission power value of the device 20 to be measured from the data frame.
In step S204, the received signal strength value when the bluetooth device 10 receives the bluetooth signal is obtained.
In an embodiment of the present application, the bluetooth device 10 is capable of obtaining a strength indication (Received Signal Strength Indicator, RSSI) of a received signal from a received bluetooth signal, and taking the obtained strength indication of the received signal as a received signal strength value.
In step S205, the loss of the bluetooth signal is determined according to the insertion loss value, the transmission power value and the received signal strength value, and the distance between the bluetooth device 10 and the device 20 to be measured is determined according to the loss of the bluetooth signal.
In one embodiment of the present application, the loss includes an energy loss of the electromagnetic wave when it propagates in the air. Determining the loss of the bluetooth signal according to the insertion loss value, the transmission power value and the received signal strength value comprises: according to the formulaCalculating a distance between the Bluetooth device 10 and the device 20 to be measured, whereinRepresenting the actual transmit power value,/, and>representing insertion loss value->Representing the received signal strength value,/->Indicating loss of bluetooth signal. In an embodiment of the present application, the determining the distance between the bluetooth device and the device to be measured according to the loss of the bluetooth signal includes: according to the formula->Calculating the distance between the Bluetooth device 10 and the device to be measured 20, wherein +.>Represents the calculated distance in Km.
In the experimental test of the application, the transmission power value of the bluetooth headset as the device to be measured 20 to the mobile phone (as the bluetooth device 10) is fixed, and the specific value is-3 dbm. In the independent Bluetooth mode, the received signal strength value of the received Bluetooth signal is-60 dbm. Thus, the LOSs value of the bluetooth signal received by the handset in the independent bluetooth mode may be expressed as los= - (-3) -Lin- (-60) =63-Lin. In the non-independent Bluetooth mode, the received signal strength value of the received Bluetooth signal of the mobile phone is-65 dbm, and correspondingly, the LOSs value of the received Bluetooth signal of the mobile phone in the non-independent Bluetooth mode can be expressed as LOS= - (-3) -Lin- (-65) =68-Lin. Thus, it can be seen that the loss value of the bluetooth signal received by the mobile phone in the non-independent mode is 5dbm higher than that of the bluetooth signal received by the mobile phone in the independent mode, so that the calculated distances of the mobile phones in the two bluetooth modes are inconsistent.
Based on the above embodiment, in order to solve the problem that the distance between the bluetooth device 10 (e.g., mobile phone) and the device 20 to be measured is not consistent, the insertion LOSs value (i.e., lin) may be set according to the bluetooth mode, specifically, the insertion LOSs value corresponding to the non-independent mode is set to 15dbm, the insertion LOSs value corresponding to the independent mode is set to 10dbm, so that the LOSs value of the bluetooth signal received by the mobile phone in the non-independent mode is calculated to los=68-15=53 dbm, and the LOSs value of the bluetooth signal received by the mobile phone in the independent mode is calculated to los=63-10=53 dbm. Therefore, according to the method and the device, the loss values of the calculated Bluetooth signals in the two Bluetooth modes are the same, so that the calculated distances of the mobile phones in the two Bluetooth modes can be kept consistent, and the calculated distance results can be kept consistent even if the radio frequency performance corresponding to the different Bluetooth modes of the mobile phones is different.
Referring to fig. 4, a flowchart of a bluetooth ranging method according to another embodiment of the present application is shown. The method comprises the following steps.
Step S401, when Bluetooth ranging is started, wi-Fi service data and Bluetooth service data are acquired.
The specific implementation of starting bluetooth ranging may refer to the description of step S201 of fig. 2, and the description will not be repeated here.
In an embodiment of the present application, the Wi-Fi service data refers to data uploading and data downloading by the bluetooth device in a Wi-Fi internet surfing mode, for example, uploading or downloading data such as pictures, audio, images, text, etc. in a Wi-Fi internet surfing mode. The bluetooth service data refers to data transmitted by the bluetooth device through a bluetooth communication mode, for example, audio data transmitted through the bluetooth communication mode.
Step S402, determining the insertion loss value of the bluetooth device 10 according to the Wi-Fi service data and the bluetooth service data.
In an embodiment of the present application, the bluetooth device 10 can determine different service scenarios according to Wi-Fi service data and bluetooth service data, because co-channel interference and channel interference of the bluetooth device 10 are also different in different service scenarios. In an embodiment of the present application, the bluetooth device 10 sets different insertion loss values according to different service scenarios. The method for determining the insertion loss value of the bluetooth device 10 according to the Wi-Fi service data and the bluetooth service data may refer to the following detailed specific flow shown in fig. 5.
In step S403, the bluetooth signal sent by the device to be measured 20 is received, and the transmission power value of the bluetooth signal is obtained from the bluetooth signal.
In step S404, the received signal strength value when the bluetooth device 10 receives the bluetooth signal is obtained.
In step S405, the loss of the bluetooth signal is determined according to the insertion loss value, the transmission power value and the received signal strength value, and the distance between the bluetooth device 10 and the device 20 to be measured is determined according to the loss of the bluetooth signal.
The specific implementation of steps S403 to S405 in the present application may refer to the description of steps S203 to S205 in fig. 2, and the description will not be repeated here.
In this embodiment of the present application, since the co-channel interference and the channel interference of the bluetooth device 10 in different service scenarios have differences, the received signal strength values of the bluetooth signals received by the bluetooth device 10 in different service scenarios are also different, resulting in different loss values of the received bluetooth signals, and in order to ensure that the distance values calculated by the bluetooth device 10 in different service scenarios are consistent, different insertion loss values are set according to different service scenarios, so that the loss values calculated by the bluetooth device 10 in different service scenarios are consistent, and the distance results calculated by the bluetooth device 10 in different service scenarios are consistent.
Referring to fig. 5, a flowchart of determining an insertion loss value of a bluetooth device according to an embodiment of the present application is shown, specifically, determining an insertion loss value of a bluetooth device according to Wi-Fi service data and bluetooth service data, including the following steps:
Step S501, a service scene is determined according to Wi-Fi service data and Bluetooth service data.
In an embodiment of the present application, the service scenario at least includes a first scenario, a second scenario, and a third scenario. Fig. 6 is a schematic diagram of a bluetooth device in a first scenario according to an embodiment of the present application. In an embodiment of the present application, if the bluetooth device 10 does not have Wi-Fi service data and bluetooth service data, the service scenario is determined to be the first service scenario. Referring to fig. 7, a schematic diagram of a bluetooth device in a second scenario according to an embodiment of the present application is shown. If the bluetooth device 10 has Wi-Fi service data but does not have bluetooth service data, determining that the service scenario is a second service scenario. Referring to fig. 8, a schematic diagram of a bluetooth device in a third scenario according to an embodiment of the present application is shown. If the bluetooth device 10 has Wi-Fi service data and bluetooth service data at the same time, determining that the service scenario is a third service scenario. In an embodiment of the present application, the service scenario further includes a fourth scenario. If the bluetooth device 10 does not have Wi-Fi service data, but has bluetooth service data, the service scenario is determined to be a fourth service scenario.
Step S502, determining insertion loss values corresponding to the service scenes according to different service scenes, wherein the insertion loss value corresponding to the first service scene is a first value, the insertion loss value corresponding to the second service scene is a second value, and the insertion loss value corresponding to the third service scene is a third value.
If the bluetooth device 10 does not have Wi-Fi service data or bluetooth service data, it indicates that the bluetooth device 10 is in a ranging scenario with less interference, and the bluetooth device 10 sets the insertion loss value (i.e., the first value) of the first service scenario to be smaller. If Wi-Fi service data is present, but bluetooth service data is not present, it indicates that the existing Wi-Fi service data may have an influence on the bluetooth ranging function, and the bluetooth device 10 sets an insertion loss value (i.e., a second value) of the second service scenario higher than that of the first service scenario. If the bluetooth device 10 has both insertion loss value data and bluetooth service data of the second service scenario of the Wi-Fi service, it indicates that both the Wi-Fi service data and the bluetooth service data that are simultaneously present may have an influence on the bluetooth ranging function, and the bluetooth device 10 sets an insertion loss value (i.e., a third value) of a third service scenario, where the insertion loss value of the third service scenario is higher than the insertion loss value of the second scenario. If the bluetooth device 10 does not have Wi-Fi service data, but has bluetooth service data, the specification bluetooth service data may have an effect on the bluetooth ranging function, and the bluetooth device 10 sets the insertion loss value of the fourth service scenario to a fourth value. Wherein the fourth value is less than the third value but greater than the first value.
The electronic device 100 according to the embodiment of the present application is described below. Referring to fig. 9, a schematic hardware structure of an electronic device 100 according to an embodiment of the present application is shown. The electronic device 100 may be the bluetooth device 10 or the device under test 20 of fig. 1.
In this embodiment, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices 100, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (FLED), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the electronic device 100 may be implemented through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.;
the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia memory cards (embedded multi media Card, eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
The external memory interface 120 may be used to connect external non-volatile memory to enable expansion of the memory capabilities of the electronic device 100. The external nonvolatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and video are stored in an external nonvolatile memory.
The internal memory 121 or the external memory interface 120 is used to store one or more computer programs. One or more computer programs are configured to be executed by the processor 110. The one or more computer programs include a plurality of instructions that when executed by the processor 110, implement the bluetooth ranging method on the electronic device 100 in the above-described embodiments to implement the bluetooth ranging function of the electronic device 100.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 100 may listen to music, or to hands-free conversations, through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 100 is answering a telephone call or voice message, voice may be received by placing receiver 170B in close proximity to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may also be provided with three, four, or more microphones 170C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be a USB interface 130 or a 3.5mm open mobile electronic device 100 platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. In some embodiments, the angular velocity of electronic device 100 about three axes (i.e., x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. For example, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and makes the lens counteract the shake of the electronic device 100 through the reverse motion, so as to realize anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture of the electronic equipment 100, and can be applied to applications such as horizontal and vertical screen switching, pedometers and the like.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it may be determined that there is an object in the vicinity of the electronic device 100. When insufficient reflected light is detected, the electronic device 100 may determine that there is no object in the vicinity of the electronic device 100. The electronic device 100 can detect that the user holds the electronic device 100 close to the ear by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. Ambient light sensor 180L may also cooperate with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint feature to unlock the fingerprint, access the application lock, photograph the fingerprint, answer the incoming call, etc.
The temperature sensor 180J is for detecting temperature. In some embodiments, the electronic device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, electronic device 100 performs a reduction in the performance of a processor located in the vicinity of temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the electronic device 100 heats the battery 142 to avoid the low temperature causing the electronic device 100 to be abnormally shut down. In other embodiments, when the temperature is below a further threshold, the electronic device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The electronic device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the electronic device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195, or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, i.e.: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
The present embodiment also provides a computer storage medium having stored therein computer instructions that, when executed on the electronic device 100, cause the electronic device 100 to perform the above-described related method steps to implement the bluetooth ranging method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described relevant steps to implement the bluetooth ranging method in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component, or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer-executable instructions, and when the device is operated, the processor can execute the computer-executable instructions stored in the memory, so that the chip can execute the Bluetooth ranging method in each method embodiment.
The electronic device 100, the computer storage medium, the computer program product, or the chip provided in this embodiment are used to execute the corresponding methods provided above, so that the advantages achieved by the method can refer to the advantages in the corresponding methods provided above, and will not be described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated unit may be stored in a readable storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application and not for limiting, and although the present application has been described in detail with reference to the above preferred embodiments, it should be understood by those skilled in the art that the technical solution of the present application may be modified or substituted without departing from the spirit and scope of the technical solution of the present application.

Claims (11)

1. The Bluetooth ranging method is applied to Bluetooth equipment and is characterized in that the Bluetooth equipment is connected with equipment to be measured in a Bluetooth mode, and the method comprises the following steps:
when starting Bluetooth ranging, determining a Bluetooth mode of the Bluetooth device according to configuration information of an antenna of the Bluetooth device, wherein the Bluetooth mode of the Bluetooth device comprises an independent Bluetooth mode and a dependent Bluetooth mode, the independent Bluetooth mode is that the Bluetooth device independently receives and transmits the Bluetooth signal through the antenna, and the dependent Bluetooth mode is that the Bluetooth device multiplexes the antenna to receive and transmit a Wi-Fi signal and the Bluetooth signal;
adjusting the insertion loss value of the Bluetooth equipment according to the Bluetooth mode;
receiving a Bluetooth signal sent by the equipment to be measured, and acquiring a transmitting power value of the Bluetooth signal from the Bluetooth signal;
Acquiring a received signal strength value when the Bluetooth device receives the Bluetooth signal;
and determining the loss of the Bluetooth signal according to the insertion loss value, the transmitting power value and the receiving signal intensity value, and determining the distance between the Bluetooth device and the device to be measured according to the loss of the Bluetooth signal, so that the distances measured in different Bluetooth modes are consistent.
2. The bluetooth ranging method according to claim 1, wherein the adjusting the insertion loss value of the bluetooth device according to the bluetooth mode comprises:
if the Bluetooth mode is an independent Bluetooth mode, setting the insertion loss value of the Bluetooth device as a first value;
and if the Bluetooth mode is a non-independent Bluetooth mode, setting the insertion loss value of the Bluetooth device to be a second value, wherein the first value is smaller than the second value.
3. The bluetooth ranging method according to claim 2, wherein the first value is 10dbm and the second value is 15dbm.
4. The bluetooth ranging method according to claim 1, wherein the acquiring the received signal strength value when the bluetooth device receives the bluetooth signal comprises:
And acquiring the intensity indication RSSI of a received signal from the Bluetooth signal as the intensity value of the received signal.
5. The bluetooth ranging method according to claim 1, wherein the determining the loss of the bluetooth signal according to the insertion loss value, the transmission power value, and the received signal strength value comprises:
according to the formulaCalculating the distance, wherein +_>Representing the transmit power value,/->Representing the insertion loss value,/->Representing the received signal strength value,/->Representing a loss of the bluetooth signal;
the determining the distance between the bluetooth device and the device to be measured according to the loss of the bluetooth signal includes:
according to the formulaCalculating the distance, wherein>Representing the distance.
6. The Bluetooth ranging method is applied to Bluetooth equipment and is characterized in that the Bluetooth equipment is connected with equipment to be measured in a Bluetooth mode, and the method comprises the following steps:
when Bluetooth ranging is started, wi-Fi service data and Bluetooth service data are acquired;
determining a service scene according to the Wi-Fi service data and the Bluetooth service data;
according to the service scene, adjusting the insertion loss value of the Bluetooth equipment;
Receiving a Bluetooth signal sent by the equipment to be measured, and acquiring a transmitting power value of the Bluetooth signal from the Bluetooth signal;
acquiring a received signal strength value when the Bluetooth device receives the Bluetooth signal;
and determining the loss of the Bluetooth signal according to the insertion loss value, the transmitting power value and the receiving signal intensity value, and determining the distance between the Bluetooth device and the device to be measured according to the loss of the Bluetooth signal, so that the distances measured under different service scenes are consistent.
7. The bluetooth ranging method according to claim 6, wherein the adjusting the insertion loss value of the bluetooth device according to the service scenario comprises:
the service scenes at least comprise a first service scene, a second service scene and a third service scene, wherein the insertion loss value corresponding to the first service scene is a first value, the insertion loss value corresponding to the second service scene is a second value, and the insertion loss value corresponding to the third service scene is a third value.
8. The bluetooth ranging method according to claim 7, wherein the adjusting the insertion loss value of the bluetooth device according to the service scenario comprises:
If the Wi-Fi service data and the Bluetooth service data do not exist in the Bluetooth equipment, determining that the service scene is the first service scene;
if the Bluetooth device has the Wi-Fi service data but does not have the Bluetooth service data, determining that the service scene is the second service scene;
if the Wi-Fi service data and the Bluetooth service data exist in the Bluetooth equipment, determining that the service scene is the third service scene;
the first value is less than the second value, and the second value is less than the third value.
9. The Bluetooth ranging method of claim 6, wherein,
the determining the loss of the bluetooth signal according to the insertion loss value, the transmission power value and the received signal strength value includes:
according to the formulaCalculating the distance, wherein>Representing the transmit power value,/->Representing the insertion loss value,/->Representing the received signal strength value,/->Representing a loss of the bluetooth signal;
the determining the distance between the bluetooth device and the device to be measured according to the loss of the bluetooth signal includes:
according to the formulaCalculating the distance, wherein >Representing the distance.
10. An electronic device, comprising a processor and a memory; wherein the processor is coupled to the memory;
the memory is used for storing program instructions;
the processor configured to read the program instructions stored in the memory to implement the bluetooth ranging method according to any one of claims 1 to 9.
11. A computer readable storage medium, characterized in that the computer readable storage medium stores program instructions that, when run on an electronic device, cause the electronic device to perform the bluetooth ranging method according to any of claims 1 to 9.
CN202310285918.4A 2023-03-22 2023-03-22 Bluetooth ranging method, electronic equipment and storage medium Active CN115993592B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310285918.4A CN115993592B (en) 2023-03-22 2023-03-22 Bluetooth ranging method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310285918.4A CN115993592B (en) 2023-03-22 2023-03-22 Bluetooth ranging method, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115993592A CN115993592A (en) 2023-04-21
CN115993592B true CN115993592B (en) 2023-08-08

Family

ID=85993739

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310285918.4A Active CN115993592B (en) 2023-03-22 2023-03-22 Bluetooth ranging method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115993592B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102263857A (en) * 2011-07-12 2011-11-30 康佳集团股份有限公司 Shared antenna circuit for mobile terminal
CN103141154A (en) * 2010-10-08 2013-06-05 惠普发展公司,有限责任合伙企业 Techniques to control a shared antenna architecture for multiple co-located radio modules
CN113115439A (en) * 2021-04-20 2021-07-13 Oppo广东移动通信有限公司 Positioning method and related equipment
CN113395685A (en) * 2020-03-10 2021-09-14 华为技术有限公司 Bluetooth communication system and wireless communication system
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN115361035A (en) * 2022-08-15 2022-11-18 Oppo广东移动通信有限公司 Radio frequency system, communication device, communication control method, and communication control apparatus
CN115459805A (en) * 2022-10-27 2022-12-09 荣耀终端有限公司 Circuit for realizing antenna multiplexing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8594056B2 (en) * 2009-06-16 2013-11-26 Qualcomm Incorporated Method and apparatus for dynamic and dual antenna bluetooth (BT)/WLAN coexistence

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103141154A (en) * 2010-10-08 2013-06-05 惠普发展公司,有限责任合伙企业 Techniques to control a shared antenna architecture for multiple co-located radio modules
CN102263857A (en) * 2011-07-12 2011-11-30 康佳集团股份有限公司 Shared antenna circuit for mobile terminal
CN113395685A (en) * 2020-03-10 2021-09-14 华为技术有限公司 Bluetooth communication system and wireless communication system
CN113115439A (en) * 2021-04-20 2021-07-13 Oppo广东移动通信有限公司 Positioning method and related equipment
CN113891297A (en) * 2021-05-31 2022-01-04 荣耀终端有限公司 Method for controlling Bluetooth connection and electronic equipment
CN115361035A (en) * 2022-08-15 2022-11-18 Oppo广东移动通信有限公司 Radio frequency system, communication device, communication control method, and communication control apparatus
CN115459805A (en) * 2022-10-27 2022-12-09 荣耀终端有限公司 Circuit for realizing antenna multiplexing

Also Published As

Publication number Publication date
CN115993592A (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN110364151B (en) Voice awakening method and electronic equipment
CN114422340B (en) Log reporting method, electronic equipment and storage medium
CN114490174B (en) File system detection method, electronic device and computer readable storage medium
CN114880251B (en) Memory cell access method, memory cell access device and terminal equipment
CN113126948B (en) Audio playing method and related equipment
CN113438643B (en) Terminal capability reporting system, method, electronic equipment and storage medium
CN112099741A (en) Display screen position identification method, electronic device and computer readable storage medium
CN116055859B (en) Image processing method and electronic device
CN113901485B (en) Application program loading method, electronic device and storage medium
CN114466238B (en) Frame demultiplexing method, electronic device and storage medium
CN115993592B (en) Bluetooth ranging method, electronic equipment and storage medium
CN116048769B (en) Memory recycling method and device and terminal equipment
CN113704209B (en) Data sharing method, electronic device and storage medium
CN116346982B (en) Method for processing audio, electronic device and readable storage medium
CN114285946B (en) Number portability number display method, electronic equipment and storage medium
CN116703691B (en) Image processing method, electronic device, and computer storage medium
CN115529379B (en) Method for preventing Bluetooth audio Track jitter, electronic equipment and storage medium
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment
CN116719699B (en) Bus monitoring and control method, electronic device, chip and storage medium
CN114520870B (en) Display method and terminal
CN117130975A (en) Bus interface expansion method and related equipment
CN117130959A (en) Bus control method, electronic device and computer storage medium
CN116263760A (en) File storage method, file access method, electronic device and storage medium
CN118057858A (en) Data processing method, device and system
CN117319369A (en) File delivery method, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant