CN116056051B - Bluetooth connection control method, system and equipment - Google Patents

Bluetooth connection control method, system and equipment Download PDF

Info

Publication number
CN116056051B
CN116056051B CN202210630679.7A CN202210630679A CN116056051B CN 116056051 B CN116056051 B CN 116056051B CN 202210630679 A CN202210630679 A CN 202210630679A CN 116056051 B CN116056051 B CN 116056051B
Authority
CN
China
Prior art keywords
bluetooth
bluetooth module
identification information
electronic device
historical
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
CN202210630679.7A
Other languages
Chinese (zh)
Other versions
CN116056051A (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 CN202210630679.7A priority Critical patent/CN116056051B/en
Publication of CN116056051A publication Critical patent/CN116056051A/en
Application granted granted Critical
Publication of CN116056051B publication Critical patent/CN116056051B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W68/00User notification, e.g. alerting and paging, for incoming communication, change of service or the like
    • H04W68/02Arrangements for increasing efficiency of notification or paging channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • 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

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present application relates to the field of terminal technologies, and in particular, to a method, a system, and an apparatus for controlling bluetooth connection. The Bluetooth connection control method is applied to first electronic equipment, the first electronic equipment comprises a first Bluetooth module, and the method comprises the following steps: the first Bluetooth module detects a low-power Bluetooth BLE broadcast sent by the first Bluetooth device, and the BLE broadcast contains identification information and state information of the first Bluetooth device. The first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the identification information, and determines to adjust the parameter information of the paging scanning operation after determining that the first Bluetooth device is in a first box opening state according to the state information. Through the technical scheme, the paging response speed of the first electronic equipment can be improved on the premise of avoiding increasing unnecessary power consumption, and then the Bluetooth connection speed is improved.

Description

Bluetooth connection control method, system and equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a method, a system, and an apparatus for controlling bluetooth connection.
Background
The true wireless stereo (True Wireless Stereo, TWS) Bluetooth headset is a Bluetooth headset product developed based on the Bluetooth chip technology, gets rid of a wired harness, and can truly realize wireless separation of left and right channels of Bluetooth.
Currently, the bluetooth connection procedure between the TWS bluetooth headset and the electronic device is generally that, first, the TWS bluetooth headset sends a paging request after opening the box. The electronic device then feeds back a paging response after hearing the paging request through a paging scan. Further, a bluetooth connection may be established between the two devices. However, in the actual implementation process, the electronic device generally performs page scanning according to a fixed period and a fixed frequency hopping, so that a situation of untimely page response may exist, which causes a slower bluetooth connection speed between the TWS bluetooth headset and the electronic device, and affects user experience.
Disclosure of Invention
The application provides a Bluetooth connection control method, a system and equipment, which are used for improving the Bluetooth connection speed between a TWS Bluetooth headset and electronic equipment.
In a first aspect, the present technical solution provides a bluetooth connection control method, which is applied to a first electronic device, where the first electronic device includes a first bluetooth module, and the method includes: the first Bluetooth module detects a low-power Bluetooth BLE broadcast sent by a first Bluetooth device, wherein the BLE broadcast comprises identification information and state information of the first Bluetooth device; the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the identification information, and determines that the first Bluetooth device is in a first box opening state according to the state information; the first box opening state indicates that the time length after box opening is smaller than a set threshold value; the first Bluetooth module determines to adjust the parameter information of the page scanning operation; the first Bluetooth module is a Bluetooth chip or a central processing unit.
According to the Bluetooth connection control method provided by the technical scheme, after the first Bluetooth device is determined to meet the specific condition according to the identification information and the state information, the parameter information of the paging scanning operation can be adjusted, so that the Bluetooth connection speed is improved.
With reference to the first aspect, in certain implementation manners of the first aspect, the determining, by the first bluetooth module, that the first bluetooth device is a historical bluetooth device according to the identification information includes: the first Bluetooth module compares the identification information with reference identification information of historical Bluetooth equipment; and the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the comparison result.
With reference to the first aspect, in certain implementations of the first aspect, the identification information includes a BLE bluetooth address; the reference identification information includes a reference classical bluetooth address.
In this implementation manner, the identification of the first bluetooth device may be implemented according to the classical bluetooth address of the historical bluetooth device and the BLE bluetooth address of the first bluetooth device, so as to determine that the first bluetooth device is the historical bluetooth device that has been connected.
With reference to the first aspect, in certain implementation manners of the first aspect, the comparing, by the first bluetooth module, the identification information with reference identification information of a historical bluetooth device includes: the first Bluetooth module determines a reference BLE Bluetooth address corresponding to the reference classical Bluetooth address according to a preset address mapping relation; the first bluetooth module compares the reference BLE bluetooth address with the BLE bluetooth address.
In this implementation, an address mapping relationship may be pre-established, so as to implement comparison between two different bluetooth protocol addresses of the classical bluetooth address and the BLE bluetooth address.
With reference to the first aspect, in certain implementation manners of the first aspect, before the first bluetooth module compares the identification information with reference identification information of the historical bluetooth device, the method further includes: and the first Bluetooth module acquires the reference identification information of the historical Bluetooth equipment.
With reference to the first aspect, in certain implementation manners of the first aspect, the first electronic device further includes a second bluetooth module, where the second bluetooth module is a central processor, and the first bluetooth module is a bluetooth chip; the first bluetooth module obtains the reference identification information of the historical bluetooth device, including: and the Bluetooth chip receives the reference identification information of the historical Bluetooth equipment sent by the central processing unit.
With reference to the first aspect, in certain implementation manners of the first aspect, the second bluetooth module is a bluetooth chip, and the first bluetooth module is a central processing unit; the first bluetooth module obtains the reference identification information of the historical bluetooth device, including: and the central processing unit determines the reference identification information of the historical Bluetooth equipment according to the historical Bluetooth connection record.
With reference to the first aspect, in certain implementations of the first aspect, the parameter information includes a scan rate and a traffic priority; the first bluetooth module determines to adjust parameter information of page scanning operation, including: the first Bluetooth module determines to adjust the current scanning rate of the page scanning operation to a target scanning rate, wherein the target scanning rate is higher than the current scanning rate; and/or the first Bluetooth module determines to adjust the current service priority of the page scanning operation to be a target service priority, wherein the target service priority is higher than the current service priority.
In this implementation manner, the time for the first electronic device to monitor the paging request may be shortened by adjusting the scanning rate and/or the service priority of the paging scanning operation, so as to improve the bluetooth connection speed.
With reference to the first aspect, in certain implementation manners of the first aspect, the first bluetooth module is a central processing unit, and the second bluetooth module is a bluetooth chip; the first bluetooth module determines to adjust parameter information of page scanning operation, including: the central processing unit generates a first parameter adjustment instruction, wherein the first parameter adjustment instruction comprises target parameter information; and the central processing unit sends the first parameter adjusting instruction to the Bluetooth chip.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes: the Bluetooth chip receives the first parameter adjusting instruction; and the Bluetooth chip adjusts the current parameter information of the page scanning operation into the target parameter information according to the first parameter adjusting instruction.
With reference to the first aspect, in certain implementation manners of the first aspect, after the first bluetooth module detects a BLE broadcast sent by the first bluetooth device, the method further includes: the first Bluetooth module reads a first flag bit; the first Bluetooth module detects that the first zone bit is a first target value, and determines that the parameter information of the paging scanning operation is in an adjustable state.
In this implementation manner, the first flag bit may be set, and the status of the parameter information of the paging scanning operation is indicated by different values of the first flag bit, so as to implement "unlocking" or "locking" of the parameter information of the paging scanning operation.
With reference to the first aspect, in certain implementation manners of the first aspect, after the first bluetooth module determines to adjust parameter information of a page scanning operation, the method further includes: in a preset time period, the first Bluetooth module detects a Bluetooth connection request of the first Bluetooth device, or the first Bluetooth module does not detect the Bluetooth connection request of the first Bluetooth device; and the first Bluetooth module recovers the parameter information of the page scanning operation.
With reference to the first aspect, in certain implementation manners of the first aspect, in a case that the first bluetooth module does not detect a bluetooth connection request of the first bluetooth device within a preset period of time, after the first bluetooth module recovers the parameter information of the page scanning operation, the method further includes: the first Bluetooth module changes the first zone bit into a second target value, and the second target value is used for indicating that the parameter information is in an unadjustable state.
In a second aspect, the present technical solution provides a bluetooth connection control system, where the system includes a first bluetooth device and a first electronic device; the first Bluetooth device is configured to send a BLE broadcast to the first electronic device; the BLE broadcast, upon receipt by the first electronic device, triggers the first electronic device to perform the method of the first aspect or any of the possible implementations of the first aspect.
In a third aspect, the present technical solution provides an electronic device, including: a first Bluetooth module; the first Bluetooth module is used for detecting a low-power Bluetooth BLE broadcast sent by a first Bluetooth device, wherein the BLE broadcast comprises identification information and state information of the first Bluetooth device; according to the identification information, determining that the first Bluetooth device is a historical Bluetooth device, and according to the state information, determining that the first Bluetooth device is in a first box opening state; the first box opening state indicates that the time length after box opening is smaller than a set threshold value; determining to adjust the parameter information of the page scanning operation; the first Bluetooth module is a Bluetooth chip or a central processing unit.
According to the electronic equipment provided by the technical scheme, after the first Bluetooth equipment is determined to meet the specific conditions according to the identification information and the state information, the parameter information of the page scanning operation can be adjusted, so that the Bluetooth connection speed is improved.
With reference to the third aspect, in some implementations of the third aspect, the first bluetooth module is specifically configured to compare the identification information with reference identification information of the historical bluetooth device; and determining that the first Bluetooth device is a historical Bluetooth device according to the comparison result.
With reference to the third aspect, in certain implementations of the third aspect, the identification information includes a BLE bluetooth address; the reference identification information includes a reference classical bluetooth address.
In this implementation manner, the identification of the first bluetooth device may be implemented according to the classical bluetooth address of the historical bluetooth device and the BLE bluetooth address of the first bluetooth device, so as to determine that the first bluetooth device is the historical bluetooth device that has been connected.
With reference to the third aspect, in some implementations of the third aspect, the first bluetooth module is specifically configured to determine, according to a preset address mapping relationship, a reference BLE bluetooth address corresponding to the reference classical bluetooth address; and comparing the reference BLE Bluetooth address with the BLE Bluetooth address.
In this implementation, an address mapping relationship may be pre-established, so as to implement comparison between two different bluetooth protocol addresses of the classical bluetooth address and the BLE bluetooth address.
With reference to the third aspect, in some implementations of the third aspect, before comparing the identification information with reference identification information of the historical bluetooth device, the first bluetooth module is further configured to: and acquiring the reference identification information of the historical Bluetooth equipment.
With reference to the third aspect, in some implementations of the third aspect, the first electronic device further includes a second bluetooth module, where the second bluetooth module is a central processor, and the first bluetooth module is a bluetooth chip; the Bluetooth chip is specifically used for: and receiving the reference identification information of the historical Bluetooth equipment sent by the central processing unit.
With reference to the third aspect, in some implementations of the third aspect, the second bluetooth module is a bluetooth chip, and the first bluetooth module is a central processing unit; the central processing unit is specifically configured to: and determining the reference identification information of the historical Bluetooth equipment according to the historical Bluetooth connection record.
With reference to the third aspect, in some implementations of the third aspect, the parameter information includes a scan rate and a traffic priority; the first bluetooth module is specifically configured to: determining to adjust a current scanning rate of a page scanning operation to a target scanning rate, the target scanning rate being higher than the current scanning rate; and/or determining to adjust the current service priority of the page scanning operation to a target service priority, wherein the target service priority is higher than the current service priority.
In this implementation manner, the time for the first electronic device to monitor the paging request may be shortened by adjusting the scanning rate and/or the service priority of the paging scanning operation, so as to improve the bluetooth connection speed.
With reference to the third aspect, in some implementations of the third aspect, the first bluetooth module is a central processing unit, and the second bluetooth module is a bluetooth chip; the central processing unit is specifically configured to: generating a first parameter adjustment instruction, wherein the first parameter adjustment instruction comprises target parameter information; and sending the first parameter adjusting instruction to the Bluetooth chip.
With reference to the third aspect, in some implementations of the third aspect, the bluetooth chip is configured to receive the first parameter adjustment instruction; and according to the first parameter adjusting instruction, adjusting the current parameter information of the page scanning operation into the target parameter information.
With reference to the third aspect, in some implementations of the third aspect, after detecting a BLE broadcast sent by the first bluetooth device, the first bluetooth module is further configured to: reading a first flag bit; and detecting the first flag bit as a first target value, and determining that the parameter information of the page scanning operation is in an adjustable state.
In this implementation manner, the first flag bit may be set, and the status of the parameter information of the paging scanning operation is indicated by different values of the first flag bit, so as to implement "unlocking" or "locking" of the parameter information of the paging scanning operation.
With reference to the third aspect, in some implementations of the third aspect, after determining to adjust the parameter information of the page scanning operation, the first bluetooth module is further configured to: detecting a Bluetooth connection request of the first Bluetooth device in a preset time period, or not detecting the Bluetooth connection request of the first Bluetooth device; and recovering the parameter information of the page scanning operation.
With reference to the third aspect, in some implementations of the third aspect, after recovering the parameter information of the page scanning operation in a case where a bluetooth connection request of the first bluetooth device is not detected within a preset period of time, the first bluetooth module is further configured to: and changing the first zone bit into a second target value, wherein the second target value is used for indicating that the parameter information is in an unadjustable state.
In a fourth aspect, the present technical solution provides an electronic device, including: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the device, cause the device to perform the method of the first aspect or any of the possible implementations of the first aspect.
In a fifth aspect, the present technical solution provides an electronic device, where the device includes a storage medium and a central processing unit, where the storage medium may be a non-volatile storage medium, where a computer executable program is stored in the storage medium, and where the central processing unit is connected to the non-volatile storage medium and executes the computer executable program to implement the method in the first aspect or any possible implementation manner of the first aspect.
In a sixth aspect, the present technical solution provides a chip, the chip including a processor and a data interface, where the processor reads instructions stored on a memory through the data interface, and performs the method in the first aspect or any possible implementation manner of the first aspect.
Optionally, as an implementation manner, the chip may further include a memory, where the memory stores instructions, and the processor is configured to execute the instructions stored on the memory, where the instructions, when executed, are configured to perform the method in the first aspect or any of the possible implementation manners of the first aspect.
In a seventh aspect, the present technical solution provides a computer readable storage medium storing program code for execution by a device, the program code comprising instructions for performing the method of the first aspect or any possible implementation of the first aspect.
According to the technical scheme, the first electronic equipment can conduct condition judgment on the first Bluetooth equipment, when the first Bluetooth equipment is determined to be the history Bluetooth equipment which is connected once and is in the just-opened box state, the parameter information of the paging scanning operation can be determined to be adjusted, so that the paging response speed can be increased, and the Bluetooth connection speed is further improved. In addition, the parameter adjustment operation is based on the premise that the first Bluetooth device meets the specific condition, so that unnecessary power consumption can be prevented from being increased, and the Bluetooth connection speed and the power consumption can be realized.
Drawings
Fig. 1 is a schematic structural diagram of a first electronic device according to an embodiment of the present application;
FIG. 2 is a block diagram of a software architecture of a first electronic device according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a bluetooth connection control method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a BLE bluetooth broadcast packet according to an embodiment of the present application;
fig. 5 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application;
fig. 6 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application;
Fig. 7 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application;
fig. 8 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a bluetooth connection control system according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Before describing the embodiments of the present application, a description will be given first of the related art.
The true wireless stereo (True Wireless Stereo, TWS) Bluetooth headset is a Bluetooth headset product developed based on the Bluetooth chip technology, gets rid of a wired harness, and can truly realize wireless separation of left and right channels of Bluetooth. TWS Bluetooth headset is usually placed in the headset box, can realize starting up the start-up automatically after opening the box, and then, establishes bluetooth connection with the connectable equipment in the settlement scope.
In the prior art, the bluetooth connection process between the TWS bluetooth headset and the electronic device is generally that the TWS bluetooth headset sends a paging request after opening the box. The electronic equipment monitors the paging request through paging scanning and feeds back paging response. And the electronic equipment receives a Bluetooth connection request of the TWS Bluetooth headset, and Bluetooth connection is established between the two devices.
However, in the actual execution process, the electronic device generally performs paging scanning according to a fixed period and a fixed frequency hopping frequency, so that a paging request sent by the TWS bluetooth headset after the TWS bluetooth headset is opened may not be timely monitored, which results in untimely paging response, and slow bluetooth connection speed between the TWS bluetooth headset and the electronic device, thereby affecting user experience.
The present application has been made to solve the above-mentioned problems.
In the application, a first Bluetooth device and a first electronic device can be provided. The first bluetooth device may be a TWS bluetooth headset, and the first electronic device may be any electronic device capable of establishing a bluetooth connection with the TWS bluetooth headset. The first electronic device may be, for example, a mobile phone, a tablet computer, a wearable device, an in-vehicle device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), or the like, and the specific type of the first electronic device is not limited in the embodiments of the present application.
The application provides a Bluetooth connection control method which is applied to first electronic equipment. The first electronic device provided by the application can determine that the first Bluetooth device is a historical Bluetooth device according to the identification information of the first Bluetooth device carried in the broadcast after detecting the low-power Bluetooth (Bluetooth Low Energy, BLE) broadcast sent by the first Bluetooth device, and determine that the first Bluetooth device is in a first box opening state according to the state information of the first Bluetooth device carried in the broadcast. The first box opening state indicates that the time length after box opening is smaller than a set threshold value, and can be colloquially understood as a box opening state. Further, the first electronic device may determine to adjust the parameter information of the page scanning operation. By the technical scheme, the response speed of the first electronic equipment to the paging request of the first Bluetooth equipment can be improved, so that the Bluetooth connection speed is improved, and the user experience is improved.
The technical scheme of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic structural diagram of a first electronic device 100 according to an embodiment of the present application. The first 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, a sensor module 180, keys 190, an indicator 192, a camera 193, a display 194, and a user identification module (subscriber identificationmodule, SIM) card interface 195, etc., and optionally, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an acceleration sensor 180E, a distance sensor 180F, a fingerprint sensor 180H, a touch sensor 180K.
It should be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100. In other embodiments of the application, the first 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 central processor (central processing unit, CPU), a bluetooth chip 111, 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 central processing unit may be an operation and control center of the first electronic device 100. The CPU 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. For example, the bluetooth connection control method provided by the embodiment of the application can be completed.
The bluetooth chip may be a control unit in the first electronic device 100 for executing bluetooth related services, and may serve various bluetooth scenarios such as bluetooth connection, bluetooth audio transmission, bluetooth data transmission, and the like. For example, the method can be used for executing the Bluetooth connection control method provided by the embodiment of the application.
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.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and is not limited to the structure of the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an operating system, an application program (such as a bluetooth connection function) required for at least one function, and the like. The storage data area may store data created during use of the first electronic device 100 (e.g., parameters of page scanning operations, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the first electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
Fig. 2 is a block diagram of a software architecture of the first electronic device 100 according to an embodiment of the present application. The layered architecture divides the bluetooth protocol stack into several layers, each layer having distinct roles and divisions. The layers communicate with each other through a software interface. In some embodiments, the bluetooth protocol stack of the first electronic device 100 is divided into two layers, host and controller from top to bottom, respectively. The host and the controller may communicate via a host control layer interface (Host Interface Controller, HCI) protocol.
For easy understanding, the following embodiments of the present application will take a first electronic device having a structure shown in fig. 1 and fig. 2 as an example, to describe a bluetooth connection control method provided by the embodiments of the present application. The bluetooth connection control method provided by the embodiment of the application can be executed in the first electronic device, and specifically can be executed in the first bluetooth module of the first electronic device. The first bluetooth module may be the bluetooth chip mentioned above, or may also be the central processing unit mentioned above. When the first Bluetooth module is a Bluetooth chip, the method flow executed by the Bluetooth chip can be operated on a controller layer of the Bluetooth protocol stack, and when the first Bluetooth module is a central processor, the method flow executed by the central processor can be operated on a host layer of the Bluetooth protocol stack.
Fig. 3 is a schematic flowchart of a bluetooth connection control method according to an embodiment of the present application. As shown in fig. 3, the bluetooth connection control method provided by the embodiment of the application includes:
101, after the first bluetooth device opens the box, sending BLE broadcast to the first electronic device. The BLE broadcast contains identification information and status information of the first bluetooth device.
102, the first bluetooth module of the first electronic device detects a BLE broadcast transmitted by the first bluetooth device.
103, the first bluetooth module determines that the first bluetooth device is a historical bluetooth device according to the identification information carried by the BLE broadcast.
104, the first Bluetooth module determines that the first Bluetooth device is in a first box opening state according to state information carried by BLE broadcasting, wherein the first box opening state indicates that the time length after box opening is smaller than a set threshold value.
The first bluetooth module determines to adjust the parameter information of the page scanning operation 105.
The first bluetooth device may include left and right headsets. In an actual implementation scenario, after the first bluetooth device opens the box, a connection between the left and right headphones needs to be established first, and the process needs to be about 300-500 milliseconds. After the left and right earphone connection is established, the Bluetooth connection can be established with the surrounding first electronic equipment in a connectable state. It should be noted that, in the process of establishing connection between the left and right earphones, the first bluetooth device also performs the following service in parallel, that is, sends BLE bluetooth broadcast to the first electronic device. The BLE bluetooth broadcast may be used to notify the first electronic device that the first bluetooth device is in a connectable state.
Based on the above-mentioned real scenario, in the embodiment of the present application, the target information of the first bluetooth device may be added in the BLE bluetooth broadcast sent by the first bluetooth device. Furthermore, the first bluetooth module of the first electronic device may receive the BLE bluetooth broadcast by using a time difference between connection between the left and right earphones of the first bluetooth device, and perform condition judgment on the first bluetooth device based on target information carried in the BLE bluetooth broadcast.
After determining that the first bluetooth device satisfies the first condition, the first bluetooth module may determine to adjust the parameter information of the page scanning operation. By adjusting the parameter information of the paging scanning operation, the response speed of the first electronic equipment to the paging request of the first Bluetooth equipment can be improved, the Bluetooth connection speed between the first electronic equipment and the first Bluetooth equipment is further improved, and the user experience is improved. Moreover, it can be understood that the above process of receiving the bluetooth broadcast and performing the condition judgment is performed by using the time difference of establishing the connection between the left and right earphones of the first bluetooth device, so that multiplexing of the same time period can be realized, and additional time consumption is avoided.
The method for determining that the first bluetooth device satisfies the first condition by using the first bluetooth module is described in detail below.
In the embodiment of the present application, the target information carried in the BLE bluetooth broadcast may include identification information and status information of the first bluetooth device. Wherein the identification information can be used to uniquely identify the bluetooth device. The state information may be used to characterize the current state of the first bluetooth device, including the first open box state, etc. In the embodiment of the application, the first box opening state refers to a state that the time length after box opening is smaller than a set threshold value, and can be colloquially understood as a state of just opening the box.
According to this implementation manner, after the first bluetooth module of the first electronic device receives the BLE bluetooth broadcast, first, identification information of the first bluetooth device carried in the first bluetooth module may be read.
In a practical scenario, as shown in fig. 4, BLE bluetooth broadcast packet Data may include two parts, valid Data signifiant and invalid Data non-signifiant. Wherein the signalization part may further comprise a number of broadcast data units AD structures. Each AD Structure may include two parts of Length and Data. Wherein Length is used to represent the Length of the own broadcast data unit. Data may further include two parts of Data Type AD Type and Data content AD Data.
Based on the above scenario, in the embodiment of the present application, the identification information may be added to, for example, the header position of the BLE bluetooth broadcast, or the identification information may also be added to the first target field AD Structure X of the BLE bluetooth broadcast packet. AD Structure X may be any field of the first bluetooth device pre-protocol with the first electronic device, for example, may be a field with AD Type manufacturer specific. The AD data of the manufacturer specific field may include two parts, a manufactor ID and an additional data, and the identification information of the embodiment of the present application may be added to the additional data part, for example.
Further, the identification information may be any information capable of uniquely identifying the first bluetooth device. In an alternative implementation, the identification information may be a BLE bluetooth address of the first bluetooth device. In another alternative implementation, the identification information may be a random number sequence that is pre-agreed with the first bluetooth device and the first electronic device.
The first Bluetooth module can judge whether the first Bluetooth device is a historical Bluetooth device or not according to the read identification information. A historical bluetooth device refers to a bluetooth device that has established a bluetooth connection with a first electronic device.
Specifically, the first bluetooth module may store reference identification information of the historical bluetooth device. After the identification information of the first bluetooth device is read, the identification information may be compared with reference identification information of the historical bluetooth device. According to the comparison result, if the comparison result is consistent, the first Bluetooth device can be determined to be a historical Bluetooth device.
Taking the identification information of the first bluetooth device as a BLE bluetooth address as an example for illustration. At this time, the reference identification information of the history bluetooth device may be a reference classical bluetooth address. Because BLE bluetooth address and classical bluetooth address belong to different bluetooth protocols, can't directly compare between the two. Therefore, in the embodiment of the present application, the address mapping relationship may be stored in the first bluetooth module in advance. The address mapping may be used to specify the mapping of BLE bluetooth addresses to classical bluetooth addresses. The mapping relationship may be set by the vendor's own negotiation, e.g., may be set such that the BLE bluetooth address is the same as the classical bluetooth address, or different.
Based on the above, the first bluetooth module may determine, according to the preset address mapping relationship, a reference BLE bluetooth address corresponding to a reference classical bluetooth address of the historical bluetooth device. Further, the first bluetooth module may compare the reference BLE bluetooth address with a BLE bluetooth address of the first bluetooth device. If the comparison is consistent, then the first Bluetooth device may be determined to be a historical Bluetooth device.
Under the condition that the first Bluetooth module determines that the first Bluetooth device is the historical Bluetooth device according to the identification information, the first Bluetooth device can be considered to have high possibility of establishing Bluetooth connection with the first electronic device.
Then, the first bluetooth module may continue to read the state information of the first bluetooth device carried in the BLE bluetooth broadcast.
Specifically, the status information may be set in a second target field of the BLE bluetooth broadcast message, for example. The second target field may be any field of the first bluetooth device's pre-protocol with the first electronic device. The specific data content of the status information, and the meaning characterized by each data content, may be determined by a predetermined protocol of the first bluetooth device with the first electronic device.
The first bluetooth module can judge whether the first bluetooth device is in a first box opening state, namely a box opening state. If the first Bluetooth device is in the as-opened box state, it is indicated that the first Bluetooth device has a high probability of being connected to the first electronic device.
Further, it is determined that the first bluetooth device satisfies the first condition.
After determining that the first bluetooth device meets the first condition, further, the first bluetooth module may determine to adjust parameter information of the page scanning operation.
In one possible implementation, the parameter information for page scanning operation may include a scanning rate.
The scan rate may be used to characterize the size of the interval between two page scan operations. The greater the scanning rate, the smaller the interval between two page scan operations, the faster the page request is heard, but at the same time the greater the power consumption. Based on this, upon determining that the first bluetooth device satisfies the first condition, the first bluetooth module may determine to adjust the current scanning rate of the page scanning operation to the target scanning rate. Wherein the target scan rate is higher than the current scan rate.
In an actual implementation scenario, the scan rate may include several gears such as R0, R1, R2, etc. according to the current bluetooth protocol standard. The gear R1 may further include a plurality of gears including Fast R1, medium R1 and Low R1. Correspondingly, the gear R2 can also comprise a plurality of gears of Fast R2 and Slow R2. Each gear corresponds to a particular scan rate value. The scanning rate corresponding to R0 is the largest, and the scanning rate corresponding to R2 is the smallest.
Based on the above, in the embodiment of the present application, for example, if the gear of the current scanning rate is Medium R1, the gear of the adjusted target scanning rate may be Fast R1.
Through adjusting the scanning rate of the page scanning operation, the speed of the first electronic equipment for scanning the paging request of the first Bluetooth equipment can be improved, so that the first electronic equipment can respond to the paging request more quickly, and the Bluetooth connection speed between the first Bluetooth equipment and the first electronic equipment is improved.
In another possible implementation, the parameter information for page scanning operation may include traffic priority.
For the first electronic device, there may be multiple bluetooth services to be performed in the same time period, which may include page scanning, bluetooth data transmission, and so on, for example. In an actual execution scenario, in order to enable multiple bluetooth services to be executed in order, different priorities may be generally set for different bluetooth services, and then, each bluetooth service may be executed sequentially according to the order of the priorities from high to low. Based on this, in the embodiment of the present application, after determining that the first bluetooth device meets the first condition, the current service priority of the page scanning operation may be adjusted to the target service priority. Wherein the target service priority is higher than the current service priority.
By adjusting the service priority, the page scanning operation can be executed preferentially compared with other Bluetooth services, so that the first electronic device can respond to the paging request more quickly, and the Bluetooth connection speed between the first electronic device and the first Bluetooth device is improved.
In yet another possible implementation, the parameter information of the page scanning operation may include both the scanning rate and the traffic priority. In this implementation, after determining that the first bluetooth device meets the first condition, the first bluetooth module of the first electronic device may simultaneously adjust the current scanning rate of the page scanning operation to the target scanning rate, and adjust the current traffic priority of the page scanning operation to the target traffic priority.
Through the implementation mode, the paging response speed of the first electronic equipment can be improved from two aspects simultaneously, and the Bluetooth connection speed between the first electronic equipment and the first Bluetooth equipment is improved more efficiently.
According to the technical scheme provided by the embodiment of the application, the first electronic equipment can judge the condition of the first Bluetooth equipment, and when the first Bluetooth equipment is determined to be the history Bluetooth equipment which is connected once and is in the just-opened box state, the parameter information of the paging scanning operation can be determined to be adjusted, so that the paging response speed can be increased, and the Bluetooth connection speed is further improved. In addition, the parameter adjustment operation is based on the premise that the first Bluetooth device meets the specific condition, so that unnecessary power consumption can be prevented from being increased, and the Bluetooth connection speed and the power consumption can be realized.
In another embodiment of the present application, in order to further improve the reliability of the scheme, in addition to the identification information and the status information, the to-be-connected device information of the first bluetooth device may be added to the BLE broadcast sent by the first bluetooth device.
In this implementation, as shown in fig. 5, before performing the step 103, the method may further include:
1021, the first bluetooth module determines that the first electronic device is the device to be connected of the first bluetooth device according to the information of the device to be connected carried by the BLE broadcast.
In the embodiment of the present application, the device information to be connected may be, for example, a device address of the device to be connected. The device information to be connected may be set in a third target field of the BLE bluetooth broadcast message, for example. The third target field may be any field of the first bluetooth device's pre-protocol with the first electronic device.
Through the technical scheme, the judgment of the first Bluetooth device can be more reliably realized, and the equipment connected with the first Bluetooth device is ensured to be the first electronic device, so that the first electronic device is prevented from carrying out unnecessary operation, and the operation resource is saved.
In another embodiment of the present application, the first electronic device may further include a second bluetooth module in addition to the first bluetooth module. In the embodiment of the application, the first bluetooth module is taken as a bluetooth chip, and the second bluetooth module is taken as a central processing unit as an example, so as to explain the bluetooth connection control method provided by the application.
Fig. 6 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application. As shown in fig. 6, the bluetooth connection control method provided by the embodiment of the application may include:
201, the bluetooth chip acquires reference identification information of a history bluetooth device.
In the embodiment of the application, the CPU of the first electronic device can detect whether the Bluetooth function of the first electronic device is started. And responding to the starting of the Bluetooth function, and the central processing unit can acquire the reference identification information of the history Bluetooth equipment connected with the first electronic equipment according to the history Bluetooth connection record. The central processor may then send the reference identification information of the historical bluetooth device to the bluetooth chip.
202, after the first bluetooth device opens the box, sending BLE broadcast to the first electronic device. The BLE broadcast contains identification information and status information of the first bluetooth device.
203, the bluetooth chip detects BLE broadcast sent by the first bluetooth device.
204, the bluetooth chip compares the identification information carried by the BLE broadcast with the reference identification information of the historical bluetooth equipment.
205, the bluetooth chip determines that the first bluetooth device is a historical bluetooth device according to the comparison result.
206, determining, by the bluetooth chip, that the first bluetooth device is in a first box opening state according to state information carried by BLE broadcast, where the first box opening state indicates that a time length after box opening is less than a set threshold.
207, the bluetooth chip determines to adjust the parameter information of the page scanning operation.
Specifically, the bluetooth chip may adjust the current scanning rate of the page scanning operation to a target scanning rate, and adjust the current traffic priority of the page scanning operation to a target traffic priority. Wherein the target scanning rate is higher than the current scanning rate, and the target service priority is higher than the current service priority.
Through the scheme, the first electronic device can adjust the parameter information of the paging scanning operation when the first Bluetooth device is determined to be the historical Bluetooth device and is in the just-opened box state, so that the Bluetooth connection speed is improved. In addition, the technical scheme is mainly implemented in the Bluetooth chip of the first electronic device, so that the occupation of resources of the central processor is avoided, and the processing efficiency is higher.
In another embodiment of the present application, a first bluetooth module is taken as a central processing unit, and a second bluetooth module is taken as a bluetooth chip, to describe the bluetooth connection control method provided by the present application.
Fig. 7 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application. As shown in fig. 7, the bluetooth connection control method provided by the embodiment of the application may include:
301, a central processing unit acquires reference identification information of a historical bluetooth device.
In the embodiment of the application, the CPU of the first electronic device can detect whether the Bluetooth function of the first electronic device is started. And responding to the starting of the Bluetooth function, and the central processing unit can acquire the reference identification information of the history Bluetooth equipment connected with the first electronic equipment according to the history Bluetooth connection record.
302, after the first bluetooth device opens the box, a BLE broadcast is sent to the first electronic device. The BLE broadcast contains identification information and status information of the first bluetooth device.
303, the central processor detects a BLE broadcast sent by the first bluetooth device.
304, the central processing unit compares the identification information carried by the BLE broadcast with the reference identification information of the historical bluetooth device.
And 305, the central processing unit determines that the first Bluetooth device is a historical Bluetooth device according to the comparison result.
306, the central processing unit determines that the first bluetooth device is in a first box opening state according to state information carried by BLE broadcast, wherein the first box opening state indicates that the time length after box opening is smaller than a set threshold value.
307, the central processor generates a first parameter adjustment instruction, the first parameter adjustment instruction comprising target parameter information.
In a possible implementation, the first parameter adjustment instruction may specifically be an hci_write_page_scan_activity command specified in the bluetooth protocol. The target parameter information may include a target scan rate and a target traffic priority. Wherein the target scanning rate is higher than the current scanning rate of the page scanning operation, and the target service priority is higher than the current service priority of the page scanning operation.
308, the central processor sends a first parameter adjustment instruction to the bluetooth chip.
309, the bluetooth chip receives a first parameter adjustment instruction.
And 310, the Bluetooth chip adjusts the current parameter information of the page scanning operation into target parameter information according to the first parameter adjustment instruction.
Through the scheme, the first electronic device can adjust the parameter information of the paging scanning operation when the first Bluetooth device is determined to be the historical Bluetooth device and is in the just-opened box state, so that the Bluetooth connection speed is improved. In addition, the technical scheme can be executed in the central processing unit of the first electronic device, and complex configuration of more hardware is not needed.
Fig. 8 is another schematic flowchart of a bluetooth connection control method according to an embodiment of the present application. As shown in fig. 8, the bluetooth connection control method provided by the embodiment of the application may include:
after the first bluetooth device opens the box, 401, a BLE broadcast is sent to the first electronic device. The BLE broadcast contains identification information and status information of the first bluetooth device.
402, a first bluetooth module of a first electronic device detects a BLE broadcast transmitted by the first bluetooth device.
403, the first bluetooth module reads the first flag bit.
404, the first bluetooth module determines whether the parameter information of the page scanning operation is in an adjustable state according to the first flag bit. If yes, go to step 405, otherwise, go to step 411.
In the embodiment of the application, the first flag bit can be set in the first electronic device. The first flag may be set to different values, which may be used to characterize different states of the parameter information of the page scanning operation.
For example, the first flag may have a first target value and a second target value. The first target value may be used, for example, to indicate that the parameter information for page scanning operation is in an adjustable state, and the second target value may be used, for example, to indicate that the parameter information for page scanning operation is in a non-adjustable state.
In one possible implementation manner, the first target value may be 1, for example, and the second target value may be 0, for example. The application is not limited in this regard.
After detecting the BLE broadcast sent by the first Bluetooth device, the first Bluetooth module can read the first flag bit first, and determine whether the parameter information of the paging scanning operation is in an adjustable state according to the first flag bit. Under the condition that the Bluetooth module is in the adjustable state, the first Bluetooth module can further execute the subsequent procedure to judge the identification information and the state information carried by the BLE broadcast. Otherwise, the first bluetooth module may directly end the current method flow.
405, the first bluetooth module determines, according to the identification information carried by the BLE broadcast, whether the first bluetooth device is a historical bluetooth device. If yes, step 406 is performed, otherwise step 411 is performed.
406, the first bluetooth module determines whether the first bluetooth device is in a first box opening state according to state information carried by BLE broadcast, wherein the first box opening state indicates that the time length after box opening is smaller than a set threshold value. If yes, step 407 is performed, otherwise step 411 is performed.
The first bluetooth module determines 407 to adjust the parameter information of the page scanning operation.
The first bluetooth module determines 408 whether a bluetooth connection request of the first bluetooth device is detected within a preset time period. If yes, go to step 409, otherwise, go to step 410.
409, the first bluetooth module recovers parameter information of the page scanning operation.
410, the first bluetooth module recovers the parameter information of the page scanning operation, and changes the first flag bit to a second target value, where the second target value is used to indicate that the parameter information is in an unadjustable state.
In view of the fact that the power consumption is increased by improving the parameter information such as the scanning rate of the page scanning operation, in the embodiment of the present application, in order to avoid unnecessary power consumption overhead, a time period may be preset, and the value of the preset time period may be used to specify the maximum maintenance duration of the target parameter information after the parameter information of the page scanning operation is adjusted to the target parameter information.
After the adjustment of the paging scanning operation parameter information is completed, the first bluetooth module may determine whether a bluetooth connection request of the first bluetooth device is detected within a preset period of time. The value of the preset time period can be flexibly set according to the actual scene, and can be 10S for example.
If it is determined that the bluetooth connection request of the first bluetooth device is detected within the preset time period, the bluetooth connection with the first bluetooth device can be completed, and the end of the bluetooth connection process is confirmed. At this time, to avoid increasing power consumption, the first bluetooth module may restore the parameter information of the page scanning operation, and adjust the parameter information back to the original value.
Conversely, if it is determined that the bluetooth connection request of the first bluetooth device is not detected within the preset time period, it may be determined that the first bluetooth device does not currently have a bluetooth connection requirement with the first electronic device. At this time, to avoid increasing power consumption, the first bluetooth module may also restore the parameter information of the page scanning operation, and adjust the parameter information back to the original value.
Further, for the case that the bluetooth connection request of the first bluetooth device is not detected within the preset period of time, the first bluetooth module may further change the first flag bit to the second target value after recovering the parameter information of the page scanning operation. By the technical means, the paging scanning operation parameter information can be locked, so that the paging scanning operation parameter information is in an unadjustable state. Then, after the first electronic device receives the BLE broadcast of the first bluetooth device again, the current method flow can be ended according to the first flag bit, and the identification information, the state information and the like contained in the first flag bit are not judged any more, so that unnecessary operation is avoided, and operation resources and power consumption are saved.
Furthermore, after the first bluetooth module changes the first flag bit into the second target value, the first bluetooth module can start timing, and after determining that the timing duration exceeds the set threshold, the first flag bit can be changed back to the first target value, so as to realize "unlocking" of the parameter information of the page scanning operation. After that, after the first electronic device receives the BLE broadcast of the first bluetooth device again, the method flow of the present application may be executed normally, and the identification information, the status information, etc. included in the BLE broadcast may be determined. The value of the set threshold can be flexibly set, for example, 30 minutes. Thus, it is possible to avoid affecting the normal bluetooth connection between the first electronic device and the first bluetooth device.
Step 411, the current flow is ended.
In the above technical scheme, the "locking" and "unlocking" of the parameter information of the page scanning operation can be realized by setting the first flag bit. Through the technical scheme, the first electronic equipment can be prevented from frequently responding to BLE broadcasting of the first Bluetooth equipment and frequently adjusting the parameter information of the paging scanning operation under a specific scene (such as a scene that a user unconsciously carries out frequent box opening and closing on the first Bluetooth equipment), and the waste of operation resources and power consumption is avoided.
Fig. 9 is a schematic structural diagram of a bluetooth connection control system according to an embodiment of the present application. As shown in fig. 9, a bluetooth connection control system 800 according to an embodiment of the present application may include a first bluetooth device 801 and a first electronic device 802. Wherein the first bluetooth device 801 may send a BLE broadcast to the first electronic device 802. The first electronic device 802 may trigger to execute the bluetooth connection control method provided by the present application after receiving the BLE broadcast.
In another embodiment of the present application, an electronic device may be provided. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The steps of the examples described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art can implement the described functionality using different approaches for each particular application in conjunction with the embodiments.
The present embodiment may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
In the case of dividing the respective functional modules with the respective functions, fig. 10 shows a schematic diagram of one possible composition of the electronic device involved in the above-described embodiment, and as shown in fig. 10, the electronic device 600 may include: a first bluetooth module 601 and a second bluetooth module 602. Wherein:
the first bluetooth module 601 is configured to detect a bluetooth low energy BLE broadcast sent by a first bluetooth device, where the BLE broadcast includes identification information and status information of the first bluetooth device; according to the identification information, determining that the first Bluetooth device is a historical Bluetooth device, and according to the state information, determining that the first Bluetooth device is in a first box opening state; the first box opening state indicates that the time length after box opening is smaller than a set threshold value; determining to adjust the parameter information of the page scanning operation; the first bluetooth module 601 is a bluetooth chip, or the first bluetooth module 601 is a central processing unit.
In one possible implementation manner, the first bluetooth module 601 is specifically configured to compare the identification information with reference identification information of the historical bluetooth device; and determining that the first Bluetooth device is a historical Bluetooth device according to the comparison result.
In one possible implementation, the identification information includes a BLE bluetooth address; the reference identification information includes a reference classical bluetooth address.
In one possible implementation manner, the first bluetooth module 601 is specifically configured to determine, according to a preset address mapping relationship, a reference BLE bluetooth address corresponding to a reference classical bluetooth address; the reference BLE bluetooth address is compared with the BLE bluetooth address.
In one possible implementation, before comparing the identification information with the reference identification information of the historical bluetooth device, the first bluetooth module 601 is further configured to: and acquiring reference identification information of the historical Bluetooth equipment.
In one possible implementation, the electronic device 600 further includes a second bluetooth module 602, where the second bluetooth module 602 is a central processor and the first bluetooth module 601 is a bluetooth chip; the Bluetooth chip is specifically used for: and receiving the reference identification information of the historical Bluetooth equipment sent by the central processing unit.
In one possible implementation, the second bluetooth module 602 is a bluetooth chip, and the first bluetooth module 601 is a central processor; the central processing unit is particularly adapted to: and determining the reference identification information of the historical Bluetooth equipment according to the historical Bluetooth connection record.
In one possible implementation, the parameter information includes a scan rate and a traffic priority; the first bluetooth module 601 is specifically configured to: determining to adjust the current scanning rate of the page scanning operation to a target scanning rate, the target scanning rate being higher than the current scanning rate; and/or determining to adjust the current service priority of the page scanning operation to a target service priority, wherein the target service priority is higher than the current service priority.
In one possible implementation, the first bluetooth module 601 is a central processor, and the second bluetooth module 602 is a bluetooth chip; the central processing unit is particularly adapted to: generating a first parameter adjustment instruction, wherein the first parameter adjustment instruction comprises target parameter information; and sending the first parameter adjusting instruction to the Bluetooth chip.
In one possible implementation manner, the bluetooth chip is configured to receive a first parameter adjustment instruction; and according to the first parameter adjusting instruction, adjusting the current parameter information of the page scanning operation into target parameter information.
In one possible implementation, after detecting the BLE broadcast sent by the first bluetooth device, the first bluetooth module 601 is further configured to: reading a first flag bit; and detecting the first flag bit as a first target value, and determining that the parameter information of the page scanning operation is in an adjustable state.
In one possible implementation, after determining to adjust the parameter information of the page scanning operation, the first bluetooth module 601 is further configured to: detecting a Bluetooth connection request of the first Bluetooth device in a preset time period, or not detecting the Bluetooth connection request of the first Bluetooth device; and recovering the parameter information of the page scanning operation.
In a possible implementation manner, after recovering the parameter information of the page scanning operation, in a case where the bluetooth connection request of the first bluetooth device is not detected within a preset period of time, the first bluetooth module 601 is further configured to: and changing the first zone bit into a second target value, wherein the second target value is used for indicating that the parameter information is in an unadjustable state.
Through the above technical scheme, the electronic device 600 can perform condition judgment on the first bluetooth device, and when it is determined that the first bluetooth device is a history bluetooth device that has been connected once, and the first bluetooth device is in a box-just-opened state, it can determine to adjust parameter information of a page scanning operation, so that a page response speed can be increased, and further a bluetooth connection speed is improved. In addition, the parameter adjustment operation is based on the premise that the first Bluetooth device meets the specific condition, so that unnecessary power consumption can be prevented from being increased, and the Bluetooth connection speed and the power consumption can be realized.
It should be understood that the electronic device herein is embodied in the form of functional units. The term "unit" herein may be implemented in software and/or hardware, without specific limitation. For example, a "unit" may be a software program, a hardware circuit or a combination of both that implements the functions described above. The hardware circuitry may include application specific integrated circuits (application specific integrated circuit, ASICs), electronic circuits, processors (e.g., shared, proprietary, or group processors, etc.) and memory for executing one or more software or firmware programs, merged logic circuits, and/or other suitable components that support the described functions.
The application also provides an electronic device, which comprises a storage medium and a central processing unit, wherein the storage medium can be a nonvolatile storage medium, a computer executable program is stored in the storage medium, and the central processing unit is connected with the nonvolatile storage medium and executes the computer executable program to realize the Bluetooth connection control method.
The present application also provides a computer readable storage medium having instructions stored therein which, when executed on a computer, cause the computer to perform the steps of the bluetooth connection control method of the present application.
The application also provides a computer program product comprising instructions which, when run on a computer or on any of the at least one processor, cause the computer to perform the steps of the bluetooth connection control method of the application.
The application also provides a chip, which comprises a processor and a data interface, wherein the processor reads instructions stored in a memory through the data interface so as to execute corresponding operations and/or processes executed by the Bluetooth connection control method.
Optionally, the chip further comprises a memory, the memory is connected with the processor through a circuit or a wire, and the processor is used for reading and executing the computer program in the memory. Further optionally, the chip further comprises a communication interface, and the processor is connected to the communication interface. The communication interface is used for receiving data and/or information to be processed, and the processor acquires the data and/or information from the communication interface and processes the data and/or information. The communication interface may be an input-output interface.
The memory may be read-only memory (ROM), other types of static storage devices that can store static information and instructions, random access memory (random access memory, RAM) or other types of dynamic storage devices that can store information and instructions, electrically erasable programmable read-only memory (electrically erasable programmable read-only memory, EEPROM), compact disc read-only memory (compact disc read-only memory) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media, or any other magnetic storage device that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, etc.
In the embodiment of the application, "and/or" describes the association relation of the association objects, which means that three relations can exist, for example, a and/or B, and can mean that a exists alone, a exists together with B, and B exists alone. Wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of the following" and the like means any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in the embodiments disclosed herein can be implemented as a combination of electronic hardware, computer software, and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In several embodiments provided by the present application, any of the functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to 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 foregoing is merely exemplary embodiments of the present application, and any person skilled in the art may easily conceive of changes or substitutions within the technical scope of the present application, which should be covered by the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (17)

1. A bluetooth connection control method, applied to a first electronic device, where the first electronic device includes a first bluetooth module, the method comprising:
the first Bluetooth module detects a low-power Bluetooth BLE broadcast sent by a first Bluetooth device, wherein the BLE broadcast comprises identification information and state information of the first Bluetooth device;
the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the identification information, and determines that the first Bluetooth device is in a first box opening state according to the state information; the first box opening state indicates that the time length after box opening is smaller than a set threshold value;
the first Bluetooth module determines to adjust the parameter information of the page scanning operation;
the first Bluetooth module is a Bluetooth chip or a central processing unit.
2. The method of claim 1, wherein the first bluetooth module determining that the first bluetooth device is a historical bluetooth device according to the identification information comprises:
the first Bluetooth module compares the identification information with reference identification information of historical Bluetooth equipment;
and the first Bluetooth module determines that the first Bluetooth device is a historical Bluetooth device according to the comparison result.
3. The method according to claim 2, wherein the identification information comprises a BLE bluetooth address; the reference identification information includes a reference classical bluetooth address.
4. The method of claim 3, wherein the first bluetooth module comparing the identification information with reference identification information of a historical bluetooth device comprises:
the first Bluetooth module determines a reference BLE Bluetooth address corresponding to the reference classical Bluetooth address according to a preset address mapping relation;
the first bluetooth module compares the reference BLE bluetooth address with the BLE bluetooth address.
5. The method of claim 2, wherein before the first bluetooth module compares the identification information with reference identification information of a historical bluetooth device, the method further comprises:
And the first Bluetooth module acquires the reference identification information of the historical Bluetooth equipment.
6. The method of claim 5, wherein the first electronic device further comprises a second bluetooth module, the second bluetooth module being a central processor, the first bluetooth module being a bluetooth chip; the first bluetooth module obtains the reference identification information of the historical bluetooth device, including:
and the Bluetooth chip receives the reference identification information of the historical Bluetooth equipment sent by the central processing unit.
7. The method of claim 6, wherein the second bluetooth module is a bluetooth chip and the first bluetooth module is a central processing unit; the first bluetooth module obtains the reference identification information of the historical bluetooth device, including:
and the central processing unit determines the reference identification information of the historical Bluetooth equipment according to the historical Bluetooth connection record.
8. The method of claim 1, wherein the parameter information includes a scan rate and a traffic priority;
the first bluetooth module determines to adjust parameter information of page scanning operation, including:
the first Bluetooth module determines to adjust the current scanning rate of the page scanning operation to a target scanning rate, wherein the target scanning rate is higher than the current scanning rate; and/or the number of the groups of groups,
The first Bluetooth module determines to adjust the current service priority of the page scanning operation to be a target service priority, wherein the target service priority is higher than the current service priority.
9. The method of claim 6, wherein the first bluetooth module is a central processing unit and the second bluetooth module is a bluetooth chip; the first bluetooth module determines to adjust parameter information of page scanning operation, including:
the central processing unit generates a first parameter adjustment instruction, wherein the first parameter adjustment instruction comprises target parameter information;
and the central processing unit sends the first parameter adjusting instruction to the Bluetooth chip.
10. The method according to claim 9, wherein the method further comprises:
the Bluetooth chip receives the first parameter adjusting instruction;
and the Bluetooth chip adjusts the current parameter information of the page scanning operation into the target parameter information according to the first parameter adjusting instruction.
11. The method of claim 1, wherein after the first bluetooth module detects a BLE broadcast transmitted by a first bluetooth device, the method further comprises:
The first Bluetooth module reads a first flag bit;
the first Bluetooth module detects that the first zone bit is a first target value, and determines that the parameter information of the paging scanning operation is in an adjustable state.
12. The method of claim 11, wherein after the first bluetooth module determines to adjust the parameter information for the page scanning operation, the method further comprises:
in a preset time period, the first Bluetooth module detects a Bluetooth connection request of the first Bluetooth device, or the first Bluetooth module does not detect the Bluetooth connection request of the first Bluetooth device;
and the first Bluetooth module recovers the parameter information of the page scanning operation.
13. The method according to claim 12, wherein in a case where the first bluetooth module does not detect a bluetooth connection request of the first bluetooth device within a preset period of time, the first bluetooth module restores the parameter information of the page scanning operation, the method further comprises:
the first Bluetooth module changes the first zone bit into a second target value, and the second target value is used for indicating that the parameter information is in an unadjustable state.
14. A bluetooth connection control system, wherein the system comprises a first bluetooth device and a first electronic device;
the first Bluetooth device is configured to send a BLE broadcast to the first electronic device; the BLE broadcast, upon receipt by the first electronic device, triggers the first electronic device to perform the method of any of the preceding claims 1-13.
15. An electronic device comprising a memory for storing program instructions and a processor for executing the program instructions, wherein the program instructions, when executed by the processor, trigger the electronic device to perform the method of any of the preceding claims 1-13.
16. A chip comprising a processor and a data interface, the processor reading instructions stored on a memory via the data interface, performing the method of any of the preceding claims 1-13.
17. A storage medium having stored therein program instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-13.
CN202210630679.7A 2022-06-06 2022-06-06 Bluetooth connection control method, system and equipment Active CN116056051B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210630679.7A CN116056051B (en) 2022-06-06 2022-06-06 Bluetooth connection control method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210630679.7A CN116056051B (en) 2022-06-06 2022-06-06 Bluetooth connection control method, system and equipment

Publications (2)

Publication Number Publication Date
CN116056051A CN116056051A (en) 2023-05-02
CN116056051B true CN116056051B (en) 2023-10-27

Family

ID=86127807

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210630679.7A Active CN116056051B (en) 2022-06-06 2022-06-06 Bluetooth connection control method, system and equipment

Country Status (1)

Country Link
CN (1) CN116056051B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106102129A (en) * 2016-05-23 2016-11-09 深圳Tcl数字技术有限公司 Connect the method and device of bluetooth equipment
WO2021027666A1 (en) * 2019-08-14 2021-02-18 华为技术有限公司 Bluetooth reconnection method and related apparatus
CN112449332A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Bluetooth connection method and electronic equipment
CN112469014A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and electronic equipment for configuring Bluetooth connection parameters
CN112640505A (en) * 2018-12-22 2021-04-09 华为技术有限公司 Transmission rate control method and equipment
CN113038437A (en) * 2019-12-25 2021-06-25 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and terminal equipment
CN113923641A (en) * 2021-12-07 2022-01-11 荣耀终端有限公司 Connection method and device
CN114079893A (en) * 2020-08-13 2022-02-22 华为技术有限公司 Bluetooth communication method, terminal device and computer readable storage medium
CN114339696A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Bluetooth communication system, Bluetooth connection method, electronic device, and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070047506A1 (en) * 2005-08-31 2007-03-01 Froehling Timothy P Methods and devices for dynamically adjusting page scan intervals of bluetooth enabled devices

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106102129A (en) * 2016-05-23 2016-11-09 深圳Tcl数字技术有限公司 Connect the method and device of bluetooth equipment
CN112640505A (en) * 2018-12-22 2021-04-09 华为技术有限公司 Transmission rate control method and equipment
WO2021027666A1 (en) * 2019-08-14 2021-02-18 华为技术有限公司 Bluetooth reconnection method and related apparatus
CN112399390A (en) * 2019-08-14 2021-02-23 华为技术有限公司 Bluetooth connection method and related device
CN112449332A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Bluetooth connection method and electronic equipment
CN112469014A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and electronic equipment for configuring Bluetooth connection parameters
CN113038437A (en) * 2019-12-25 2021-06-25 Oppo广东移动通信有限公司 Data transmission method, device, storage medium and terminal equipment
CN114079893A (en) * 2020-08-13 2022-02-22 华为技术有限公司 Bluetooth communication method, terminal device and computer readable storage medium
CN114339696A (en) * 2020-09-30 2022-04-12 华为技术有限公司 Bluetooth communication system, Bluetooth connection method, electronic device, and storage medium
CN113923641A (en) * 2021-12-07 2022-01-11 荣耀终端有限公司 Connection method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
低功耗蓝牙BLE协议;杨一聪;;企业技术开发(第04期);全文 *
杨一聪 ; .低功耗蓝牙BLE协议.企业技术开发.2019,(第04期),全文. *
蓝牙在智能家居中设备识别的改进;杨志斌;周兴斌;;计算机与现代化(第11期);全文 *

Also Published As

Publication number Publication date
CN116056051A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
EP1833199A1 (en) Adjustment of wireless communication parameters based upon battery status
US9634888B2 (en) Method and system for transmitting data in parallel via wireless link and wired link
US11375569B2 (en) Method and device for reconnecting Bluetooth communication
CN110446193B (en) Processing method and device of Bluetooth data packet
EP3490304A1 (en) Method for identifying access point and hotspot, and related product
EP4152816A1 (en) Information transmission method and apparatus, and electronic device
CN112533192B (en) Method and device for switching SIM (subscriber identity Module) card and electronic equipment
EP4061082A1 (en) Uplink resource determination method, indication method, terminal and network device
CN111835458A (en) Information transmission and receiving method, terminal and network side equipment
KR20220007013A (en) Power-efficient resource selection procedure for nr v2x ue with limited power
CN108601048B (en) Flow control method and mobile terminal
CN113220385A (en) Automatic setting method for horizontal and vertical screens of mobile terminal
CN110719647B (en) Random access method, terminal and network equipment
CN110636533B (en) Scheduling transmission method and terminal
CN116056051B (en) Bluetooth connection control method, system and equipment
CN111459410A (en) Memory space allocation method and device, electronic equipment and storage medium
CN116126744A (en) Memory recycling method and device and terminal equipment
CN115396990A (en) Power consumption control method and device
CN116028210A (en) Resource scheduling method, electronic equipment and storage medium
JP6534356B2 (en) Communication apparatus, communication control method and communication system
CN116419359B (en) Bluetooth control method and device
US20200285781A1 (en) Terminal and communication method
KR102395293B1 (en) Wireless Communication System, Vehicle, Smart Apparatus and controlling method thereof
CN117135254B (en) Voice call method and electronic equipment
CN115826771B (en) Input method switching method and electronic equipment

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