A TWS earphone connection method and device

By optimizing the scanning and connection strategy of TWS headphones, the problems of long connection time and high power consumption are solved, and the effects of fast Bluetooth connection and low power consumption are achieved.

CN114679710BActive Publication Date: 2025-09-02HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011563540.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2025-09-02
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

The existing TWS headsets have problems such as long connection time and high power consumption during the connection process, which affects the user experience.

Method used

The first headset is used to scan at 100% scanning duty cycle, and the second headset is broadcast to determine whether the scanning time exceeds the broadcast cycle. If it exceeds the previous pairing device, otherwise the scanning will continue; and paging is performed when the Bluetooth connection is out of range to ensure a quick connection.

Benefits of technology

It realizes fast Bluetooth connection between TWS headphones and other electronic devices, reducing power consumption and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114679710B_ABST
    Figure CN114679710B_ABST
Patent Text Reader

Abstract

The present application discloses a method for connecting TWS headphones, including: the TWS headphones include a first earphone and a second earphone; the first earphone scans with a first scanning duty cycle, and the first scanning duty cycle is 100%; the second earphone broadcasts; if the first earphone does not scan the broadcast, determining or judging whether the scanning time of the first earphone exceeds the broadcast period of the second earphone; if the scanning time of the first earphone exceeds the broadcast period of the second earphone, the first earphone connects to the electronic device that was last paired with the first earphone by Bluetooth; if the scanning time of the first earphone does not exceed the broadcast period of the second earphone, the first earphone continues to scan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of electronic technology, and in particular to a TWS earphone connection method and device. Background Art

[0002] As users demand greater convenience from their headphones, wireless earbuds are gaining popularity. In particular, true wireless stereo (TWS) earbuds, which include two earbuds and don't require a wire to connect them, are much more convenient for users. Summary of the Invention

[0003] The embodiments of the present application provide a TWS headset connection method and device, which can quickly establish a Bluetooth connection between the TWS headset and other electronic devices (such as mobile phones), and can reduce the power consumption of the TWS headset.

[0004] In a first aspect, the present application discloses a method for connecting a TWS headset, comprising:

[0005] The TWS earphone includes a first earphone and a second earphone; the first earphone is scanned at a first scanning duty cycle, and the first scanning duty cycle is 100%;

[0006] The second earphone is used for broadcasting;

[0007] If the first headset does not scan the broadcast, determining or judging whether the scanning time of the first headset exceeds the broadcast period of the second headset;

[0008] If the scanning time of the first headset exceeds the broadcast period of the second headset, the first headset connects to the electronic device (such as a mobile phone) that was last paired with the first headset through Bluetooth;

[0009] If the scanning time of the first headset does not exceed the broadcasting period of the second headset, the first headset continues to scan.

[0010] In some embodiments, the TWS earphones further include an earphone storage box, which stores the first earphone and the second earphone.

[0011] In some other embodiments, when the first earphone is taken out of the earphone receiving box, the first earphone scans with a first scanning duty cycle.

[0012] In some implementations, the scanWindow parameter of the first headset is set to be greater than the broadcast period of the second headset.

[0013] In some other implementations, if the first headset scans the broadcast transmitted by the second headset, the first headset initiates a Bluetooth connection with the second headset; the first headset establishes a Bluetooth connection with the second headset.

[0014] In some embodiments, if, after the first earphone establishes a Bluetooth connection with the second earphone, the distance between the first earphone and the second earphone exceeds the effective range of the Bluetooth connection, the Bluetooth connection between the first earphone and the second earphone is disconnected; the first earphone initiates paging to the second earphone within the interval time tn, and the number of paging times is n times; the interval time tn is greater than the interval time tn-1; when the first earphone performs the nth paging, the first earphone establishes a Bluetooth connection with the second earphone.

[0015] In some other embodiments, if, after the first earphone establishes a Bluetooth connection with the second earphone, the distance between the first earphone and the second earphone exceeds the effective range of the Bluetooth connection, the Bluetooth connection between the first earphone and the second earphone is disconnected; the first earphone initiates a paging call to the second earphone, and the paging cycle is t; if the first earphone and the second earphone fail to establish a Bluetooth connection within the said period t, the first earphone enters a scanning state and scans for broadcasts sent by the second earphone.

[0016] In a second aspect, the present application discloses a TWS headset, comprising:

[0017] A first earphone, a second earphone, and an earphone storage box; the first earphone and the second earphone are provided with a microphone and a receiver;

[0018] The first earphone, the second earphone and the earphone storage box also include: a wireless communication module; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the TWS earphone, enable the TWS earphone to execute the method in the first aspect above.

[0019] In a third aspect, the present application discloses a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes the method in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1A This is a partial structural diagram of a TWS headset provided in an embodiment of the present application;

[0021] Figure 1B This is a schematic diagram of the partial structure of a single earphone in the TWS earphone provided in an embodiment of the present application;

[0022] Figure 1C This is a schematic diagram of the hardware structure of the TWS headset provided in an embodiment of the present application;

[0023] Figure 2 Schematic diagram of the hardware structure of the mobile phone provided in the embodiment of the present application;

[0024] Figure 3A Schematic diagram of the existing BR / EDR Bluetooth protocol framework;

[0025] Figure 3B 、 Figure 3C This is a diagram of the protocol stack of several existing audio profiles;

[0026] Figure 4 This is a schematic diagram of the BLE-based audio protocol framework provided by this application;

[0027] Figure 5 This is a schematic diagram of several data types of audio services provided by this application;

[0028] Figure 6 This is a flowchart of establishing a Bluetooth connection between a mobile phone and a TWS headset;

[0029] Figure 7 This is a user interface diagram for a user to enable the Bluetooth function on a mobile phone;

[0030] Figure 8 This is a schematic diagram of the system architecture for communication between TWS headphones and mobile phones;

[0031] Figure 9 This is a schematic diagram of the composition of broadcast in the Bluetooth protocol of this application;

[0032] Figure 10 This is a schematic diagram of the data structure broadcast in the Bluetooth protocol of this application;

[0033] Figure 11 This is a schematic diagram of the steps for connecting a TWS headset to a mobile phone in this application;

[0034] Figure 12 This is a schematic diagram of the steps for connecting TWS headphones to a mobile phone under special circumstances in this application. DETAILED DESCRIPTION

[0035] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0036] Generally, the TWS headset 100 includes two earphones (such as Figure 1A The left earphone 101 and the right earphone 102 shown in FIG) and an earphone storage box (as shown in FIG). Figure 1A The earphone storage box 103 shown in FIG. Figure 1A , the earphone storage box 103 can be used to store the left earphone 101 and the right earphone 102 of the TWS earphone 100, and the earphone storage box 103 can also be used to charge the left earphone 101 and the right earphone 102. In some embodiments, the earphone storage box 103 can also be provided with at least one touchable button 104 for pairing the TWS earphone 100 with the mobile phone, re-pairing the left earphone 101 and the right earphone 102, and other operations. The earphone storage box 103 can also be provided with a charging port 105 for charging the earphone storage box 103 itself. The earphone storage box 103 can also include a variety of sensors, such as Hall sensors, acceleration sensors, etc. It can be understood that the earphone storage box 103 can also include other controls, which is not limited in this application. In some embodiments, the earphone storage box 103 can also include components such as a processor and a memory. The memory can be used to store computer program code, and the execution is controlled by the processor of the earphone storage box 103 to realize the functions of the earphone storage box 103. For example, when the user opens the lid of the earphone storage box, the processor of the earphone storage box 103 can send a pairing command to the left and right earphones of the TWS earphone 100 in response to the user's operation of opening the lid by executing the computer program code stored in the memory.

[0037] like Figure 1BThe diagram shows a right earphone 102; it is understood that this earphone could also be the left earphone 101. In some embodiments, the right earphone 102 may include an input / output interface 117. The input / output interface 117 can be used to provide any wired connection between the earphones of the TWS earphones 100 and an earphone storage box (such as the earphone storage box 103 described above). In some embodiments, the input / output interface 117 may be an electrical connector. When the earphones of the TWS earphones 100 are placed in the earphone storage box, the earphones can be electrically connected to the earphone storage box (such as the input / output interface included in the earphone storage box) via the electrical connector. Once this electrical connection is established, the earphone storage box can charge the power supply 127 of the left and right earphones of the TWS earphones 100. Once this electrical connection is established, the left and right earphones of the TWS earphones 100 can also communicate data with the earphone storage box. For example, the left and right earphones of the TWS earphones 100 can receive pairing instructions from the earphone storage box via the electrical connector. The pairing command is used to instruct the left and right earphones of the TWS earphones 100 to turn on the wireless communication module 124, so that the left and right earphones of the TWS earphones 100 can be paired and connected with an electronic device (such as a mobile phone) using a corresponding wireless communication protocol (such as Bluetooth, Wi-Fi, etc.). The earphones 102 may also include a receiver 125, a microphone 116, an input / output interface 117, an indicator light 115, a display 110, a touch key 111, and a proximity light sensor 112. The touch key 111 can be used in conjunction with the touch sensor to trigger operations such as pause, play, record, turn the microphone on and off.

[0038] It is understandable that the left and right earphones of the above-mentioned TWS earphones 100 can also establish a wireless connection with the earphone storage box through the wireless communication module 124 and realize charging or data communication functions.

[0039] For example, Figure 1C FIG1 shows a schematic diagram of the structure of one of the main bodies of a TWS earphone 100, namely the left earphone 101 or the right earphone 102. Figure 1C As shown, the earphone of the TWS earphone may include: a processor 121, a memory 122, a sensor 123, a wireless communication module 124, a receiver 125, a microphone 126 and a power supply 127.

[0040] Among them, the memory 122 can be used to store computer program code, such as for establishing a wireless connection with another earphone of the TWS earphone 100, and for pairing the earphone with an electronic device (such as a mobile phone). The memory 122 can also store a Bluetooth address for uniquely identifying the earphone, and the Bluetooth address of the other earphone that stores the TWS earphone. In addition, the memory 122 can also store the pairing history of electronic devices that have been successfully paired with the earphone before. For example, the pairing history may include the Bluetooth address of the electronic device that has been successfully paired with the earphone before. Based on the pairing history, the earphone can automatically connect back to the paired electronic device. The above-mentioned Bluetooth address can be a media access control (MAC) address.

[0041] The processor 121 can execute the above computer program code to implement the functions of the TWS headset 100 in the embodiment of the present application. For example, each earphone of the TWS headset 100 can establish a wireless pairing connection with an electronic device (such as a mobile phone).

[0042] The sensor 123 may be a distance sensor or a proximity light sensor. The headset may determine whether it is being worn by the user through the sensor 123. For example, the headset may use a proximity light sensor to detect whether there is an object near the headset, thereby determining whether the headset is being worn by the user. When it is determined that the headset is being worn, the headset may turn on the receiver 125. In some embodiments, the headset may further include a bone conduction sensor, combined into a bone conduction headset. Using the bone conduction sensor, the headset may obtain the vibration signal of the vocal bone vibration, parse the voice signal, and realize the voice function. In other embodiments, the headset may further include a fingerprint sensor for detecting the user's fingerprint, identifying the user's identity, or performing control operations on the headset, etc. In other embodiments, the headset may further include an ambient light sensor, which may adaptively adjust some parameters according to the brightness of the perceived ambient light.

[0043] The wireless communication module 124 is used to support wireless data exchange between the current earphone and the other earphone of the TWS headset, as well as with an electronic device (such as a mobile phone). In some embodiments, the wireless communication module 124 can be a Bluetooth transceiver. The left and right earphones of the TWS headset can establish a wireless connection with the above electronic devices through the Bluetooth transceiver to enable short-range data exchange between the two.

[0044] At least one receiver 125, also known as a "handset", can be used to convert audio electrical signals into sound signals and play them. For example, when the left and right earphones of the TWS headset 100 serve as audio output devices of the above electronic device, the receiver 125 can convert the received audio electrical signals into sound signals and play them.

[0045] At least one microphone 126, also known as a "microphone" or "microphone," is used to convert sound signals into audio electrical signals. For example, when the left and right earphones of the TWS headset 100 serve as audio input devices for the above-mentioned electronic device, when the user speaks (such as making a call or sending a voice message), the microphone 126 can collect the user's sound signal and convert it into an audio electrical signal. The above-mentioned audio electrical signal is the audio data in the embodiment of the present application.

[0046] The power supply 127 can be used to supply power to various components included in the left and right earphones of the TWS earphones 100. In some embodiments, the power supply 127 can be a battery, such as a rechargeable battery.

[0047] It is understood that the structure shown in the embodiment of the present application does not constitute a specific limitation on the TWS earphone 100. The TWS earphone 100 may have a plurality of Figure 1C More or fewer components shown in the figure may be combined with two or more components, or may have different component configurations. For example, the headset may also include an indicator light 129 (i.e. Figure 1B The indicator light 115 in the headset can indicate the battery level or connection status of the headset, the display screen (i.e. Figure 1B The display screen 110 in the figure is used to prompt the user with relevant information, the dustproof filter (not shown in the figure) is used in conjunction with the handset, the motor and other components. Figure 1C The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application specific integrated circuits.

[0048] It should also be noted that Figure 1A 、 Figure 1B 、 Figure 1C The structure shown is only an exemplary description and does not constitute a limitation on the structure or function of the TWS earphones and earphone storage box.

[0049] The electronic device connected to the TWS headset 100 is taken as an example of a mobile phone. For example, when the electronic device is a mobile phone 200, Figure 2FIG2 shows a schematic diagram of the structure of a mobile phone 200. The mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display 294, and a subscriber identification module (SIM) card interface 295. The sensor module 280 may include a pressure sensor 280A, a gyroscope sensor 280B, an air pressure sensor 280C, a magnetic sensor 280D, an acceleration sensor 280E, a distance sensor 280F, a proximity light sensor 280G, a fingerprint sensor 280H, a temperature sensor 280J, a touch sensor 280K, an ambient light sensor 280L, a bone conduction sensor 280M, etc.

[0050] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the mobile phone 200. In other embodiments of the present application, the mobile phone 200 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The components shown in the illustrations may be implemented in hardware, software, or a combination of software and hardware.

[0051] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0052] The controller may be the nerve center and command center of the mobile phone 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0053] Processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 210 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 210. If processor 210 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 210 latency, and thus improves system efficiency.

[0054] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0055] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple I2C busses. The processor 210 may be coupled to the touch sensor 280K, charger, flash, camera 293, etc. via different I2C bus interfaces. For example, the processor 210 may be coupled to the touch sensor 280K via the I2C interface, enabling communication between the processor 210 and the touch sensor 280K via the I2C bus interface, thereby enabling the touch function of the mobile phone 200.

[0056] The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to enable communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the I2S interface, enabling functions such as answering calls via a Bluetooth headset.

[0057] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via a PCM bus interface. In some embodiments, the audio module 270 can also transmit audio signals to the wireless communication module 260 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0058] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 210 and the wireless communication module 260. For example, the processor 210 communicates with the Bluetooth module in the wireless communication module 260 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 270 can transmit audio signals to the wireless communication module 260 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0059] The MIPI interface can be used to connect the processor 210 to peripheral devices such as the display screen 294 and the camera 293. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 210 and the camera 293 communicate via the CSI interface to implement the camera function of the mobile phone 200. The processor 210 and the display screen 294 communicate via the DSI interface to implement the display function of the mobile phone 200.

[0060] The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 210 to the camera 293, the display 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0061] USB port 230 is an interface that complies with USB standards and specifications, and may be a Mini USB port, a Micro USB port, a USB Type-C port, or the like. USB port 230 can be used to connect a charger to charge mobile phone 200, or to transfer data between mobile phone 200 and external devices. It can also be used to connect headphones to play audio. This port can also be used to connect other mobile phones, such as AR devices.

[0062] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the mobile phone 200. In other embodiments of the present application, the mobile phone 200 may also adopt a different interface connection method from the above embodiment, or a combination of multiple interface connection methods.

[0063] The charging management module 240 is configured to receive charging input from a charger.

[0064] The power management module 241 is used to connect the battery 242 , the charging management module 240 and the processor 210 .

[0065] The wireless communication function of the mobile phone 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.

[0066] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0067] The mobile communication module 250 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the mobile phone 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 250 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 can be set in the same device as at least some of the modules of the processor 210.

[0068] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 270A, the receiver 270B, etc.) or displays an image or video through the display screen 294. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 210 and be set in the same device as the mobile communication module 250 or other functional modules.

[0069] The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 200. The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 can also receive the signal to be sent from the processor 210, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0070] For example, in an embodiment of the present application, the mobile phone 200 can establish a wireless connection with an external device using wireless communication technology (such as Bluetooth) using the wireless communication module 260. Based on the established wireless connection, the mobile phone 200 can send audio data to the external device and can also receive audio data from the external device.

[0071] In some embodiments, the antenna 1 of the mobile phone 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the mobile phone 200 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the Beidou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS) and / or the Satellite Based Augmentation System (SBAS).

[0072] Mobile phone 200 implements display functionality through a GPU, display screen 294, and an application processor. The GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.

[0073] The display screen 294 is used to display images, videos, etc. In some embodiments, the mobile phone 200 may include 2 or N display screens 294 , where N is a positive integer greater than 1.

[0074] The mobile phone 200 can realize the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294 and the application processor.

[0075] The ISP is used to process data fed back by the camera 293 .

[0076] The camera 293 is used to capture still images or videos. In some embodiments, the mobile phone 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.

[0077] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the mobile phone 200 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0078] Video codecs are used to compress or decompress digital video. Mobile phone 200 may support one or more video codecs. This allows mobile phone 200 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0079] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in the mobile phone 200, such as image recognition, face recognition, voice recognition, and text comprehension.

[0080] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200.

[0081] The internal memory 221 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the mobile phone 200 by running the instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 can establish a wireless pairing connection between the two main bodies of the external device through the wireless communication module 260 by executing the instructions stored in the internal memory 221, and perform short-range data exchange with the external device to realize functions such as calling and playing music through the external device. The internal memory 221 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0082] In an embodiment of the present application, the mobile phone 200 can use wireless communication technology (such as Bluetooth) to establish wireless connections with the two main bodies of the external device. For example, the mobile phone 200 establishes a wireless connection with the first main body, and then establishes a wireless connection between the mobile phone 200 and the second main body through the first main body. After establishing the wireless connection, the mobile phone 200 can store the Bluetooth address of the external device in the internal memory 221. In some embodiments, when the external device is a device comprising two main bodies, such as a TWS headset, the left and right earbuds of the TWS headset have their own Bluetooth addresses respectively. The mobile phone 200 can associate the Bluetooth addresses of the left and right earbuds of the TWS headset and store them in the internal memory 221 so that the left and right earbuds of the TWS headset can be used as a pair of devices.

[0083] The mobile phone 200 can implement audio functions such as music playback and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.

[0084] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be provided in the processor 210, or some functional modules of the audio module 270 can be provided in the processor 210.

[0085] The speaker 270A, also called a "horn," is used to convert audio electrical signals into sound signals. The mobile phone 200 can listen to music or make hands-free calls through the speaker 270A.

[0086] The receiver 270B, also called the "earpiece", is used to convert audio electrical signals into sound signals. When the mobile phone 200 receives a call or a voice message, the voice can be heard by placing the receiver 270B close to the ear.

[0087] The microphone 270C, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 270C to input the sound signal into the microphone 270C. The mobile phone 200 can be provided with at least one microphone 270C. In other embodiments, the mobile phone 200 can be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the mobile phone 200 can also be provided with three, four or more microphones 270C to realize sound signal collection, noise reduction, and identification of sound sources, and realize directional recording function, etc.

[0088] The earphone jack 270D is used to connect a wired earphone and can be a USB interface 230 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0089] In an embodiment of the present application, when the mobile phone 200 establishes a wireless connection with an external device, such as a TWS headset, the TWS headset can be used as an audio input / output device for the mobile phone 200. For example, the audio module 270 can receive the audio electrical signals transmitted by the wireless communication module 260, enabling functions such as answering calls and playing music through the TWS headset. For example, when a user is making a call, the TWS headset can collect the user's voice signal, convert it into an audio electrical signal, and then send it to the wireless communication module 260 of the mobile phone 200. The wireless communication module 260 transmits the audio electrical signal to the audio module 270. The audio module 270 can convert the received audio electrical signal into a digital audio signal, encode it, and then transmit it to the mobile communication module 250. The mobile communication module 250 transmits it to the other end device of the call to complete the call. For another example, when a user plays music using the media player of the mobile phone 200, the application processor can transmit the audio electrical signal corresponding to the music played by the media player to the audio module 270. The audio module 270 transmits the audio electrical signal to the wireless communication module 260. The wireless communication module 260 can send the audio electrical signal to the TWS headset so that the TWS headset converts the audio electrical signal into a sound signal and plays it.

[0090] Pressure sensor 280A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 280A can be located on display screen 294. There are many types of pressure sensors 280A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 280A, the capacitance between the electrodes changes. Mobile phone 200 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 294, mobile phone 200 detects the touch intensity based on pressure sensor 280A. Mobile phone 200 can also calculate the touch location based on the detection signal from pressure sensor 280A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0091] The gyro sensor 280B may be used to determine the motion posture of the mobile phone 200 .

[0092] The air pressure sensor 280C is used to measure air pressure.

[0093] The magnetic sensor 280D includes a Hall sensor, and the mobile phone 200 can use the magnetic sensor 280D to detect the opening and closing of the flip cover.

[0094] The acceleration sensor 280E can detect the magnitude of the acceleration of the mobile phone 200 in various directions (generally three axes).

[0095] Distance sensor 280F is used to measure distance. Mobile phone 200 can measure distance using infrared or laser. In some embodiments, when shooting a scene, mobile phone 200 can use distance sensor 280F to measure distance to achieve fast focus.

[0096] The proximity light sensor 280G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.

[0097] The ambient light sensor 280L is used to sense the brightness of the ambient light.

[0098] The fingerprint sensor 280H is used to collect fingerprints. The mobile phone 200 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0099] The temperature sensor 280J is used to detect temperature. In some embodiments, the mobile phone 200 uses the temperature detected by the temperature sensor 280J to execute a temperature processing strategy.

[0100] Touch sensor 280K, also known as a "touch panel," can be mounted on display screen 294. Together, touch sensor 280K and display screen 294 form a touch screen, also known as a "touch screen." Touch sensor 280K detects touch operations applied to or near the touch sensor. The touch sensor can communicate the detected touch operations to the application processor to determine the type of touch event.

[0101] Bone conduction sensor 280M can acquire vibration signals. In some embodiments, bone conduction sensor 280M can acquire vibration signals from the vibrating bones of the human body's vocal cords. Bone conduction sensor 280M can also contact the human pulse to receive blood pressure signals. In some embodiments, bone conduction sensor 280M can also be placed in headphones to form bone conduction headphones. Audio module 270 can parse the vibration signals from the vibrating bones of the vocal cords acquired by bone conduction sensor 280M into voice signals, thereby implementing voice functions.

[0102] Keys 290 include a power button, a volume button, and the like. Keys 290 may be mechanical keys or touch-sensitive keys. Mobile phone 200 may receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 200.

[0103] Motor 291 can generate vibration prompts. Motor 291 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.

[0104] The indicator 292 may be an indicator light, which may be used to indicate the charging status, power level change, messages, missed calls, notifications, etc.

[0105] The SIM card interface 295 is used to connect a SIM card.

[0106] The following embodiments of this application will take the establishment of a connection between a mobile phone 200 and a TWS headset 100 via Bluetooth as an example to illustrate the pairing connection method provided in the embodiments of this application.

[0107] TWS earphones can exchange audio data with mobile phones through a Bluetooth connection. This audio data can include media data and voice data. For example, TWS earphones can play music, recordings, sounds from video files, and other media data for users. In phone, audio, and video call scenarios, they can play incoming call prompts and the voice data of the other end of the call, and collect the user's voice data and send it to the phone. In gaming scenarios, they can play background music, game prompts, teammates' voice data, etc., and collect the user's voice data and send it to the phone. In WeChat voice messaging scenarios, they can play voice messages, collect the user's recorded voice data, and send it to the phone. In voice assistant scenarios, they can collect the user's voice data and send it to the phone.

[0108] Bluetooth wireless technology is a short-range communication system that replaces wired connections between portable and / or fixed electronic devices. Key features of Bluetooth wireless communication technology are stability, low power consumption, and low cost. Many features of its core specification are optional, enabling product differentiation.

[0109] Bluetooth wireless technology has two forms of systems: basic rate (BR) and low energy (LE). Both forms of the system include device discovery, connection establishment, and connection mechanisms. Basic rate BR can include an optional enhanced data rate (EDR) and alternate media access control and physical layer extensions (AMP). The low energy LE system includes some features that are designed to implement products that require lower power consumption, lower complexity, and lower cost than BR / EDR.

[0110] Devices that implement both BR and LE systems can communicate with other devices that also implement both systems. Some profiles and use cases are supported only by one system. Therefore, devices that implement both systems have the ability to support more use cases.

[0111] Profiles are a unique concept in the Bluetooth protocol. To enable interoperability between devices on different platforms, the Bluetooth protocol not only defines core specifications (called the Bluetooth core) but also defines various application layer specifications for various use cases, known as Bluetooth profiles. To achieve interoperability between devices on different platforms, the Bluetooth protocol has established application layer specifications (profiles) for various possible and universal use cases, such as the Advance Audio Distribution Profile (A2DP), the Audio / Video Remote Control Profile (AVRCP), the Basic Imaging Profile (BIP), the Hands-Free Profile (HFP), the Human Interface Device Profile (HID profile), the Headset Profile (HSP), the Serial Port Profile (SPP), the File Transfer Profile (FTP), the Personal Area Networking Profile (PAN profile), and many others.

[0112] Figure 3A The existing BR / EDR Bluetooth protocol framework is shown as an example. Figure 3A As shown, the existing BR / EDR Bluetooth protocol framework may include multiple profiles. Figure 3A Only some profiles for audio applications are shown: A2DP, AVRCP, and HFP. However, the existing BR / EDR Bluetooth protocol framework may also include other profiles, such as SPP and FTP.

[0113] A2DP specifies the protocol stack and usage methods for transmitting high-quality audio using Bluetooth asynchronous transmission channels. For example, you can use stereo Bluetooth headphones to listen to music from a music player. AVRCP refers to remote control functions, generally supporting remote control operations such as pause, stop, replay, and volume control. For example, you can use Bluetooth headphones to control music playback by pausing and switching to the next song. FHP is for voice applications, providing hands-free calling capabilities.

[0114] Figure 3B-3C The protocol stacks of A2DP and HFP are shown respectively.

[0115] A. Protocols and entities included in the A2DP protocol stack

[0116] An audio source is the source of a digital audio stream, which is transmitted to an audio sink in a piconet. An audio sink is a receiver of a digital audio stream from an audio source in the same piconet. In music playback scenarios, a typical audio source device might be a media player, such as an MP3 player, and a typical audio sink device might be headphones. In audio recording scenarios, a typical audio source device might be a sound capture device, such as a microphone, and a typical audio sink device might be a portable recorder.

[0117] The Bluetooth protocols defined in the Bluetooth core specification include the baseband, link management protocol (LMP), logical link control and adaptation protocol (L2CAP), and service discovery protocol (SDP). The audio and video data transport protocol (AVDTP) includes a signaling entity for negotiating streaming parameters and a transport entity for controlling the stream itself. The application layer defines application services and transport service parameters. This entity is also responsible for adapting audio stream data to a defined packet format and vice versa.

[0118] B. Protocols and entities included in the AVRCP protocol stack

[0119] The controller is the device that initiates a transaction by sending a command frame to the target device. Typical controllers are personal computers, mobile phones, and remote controls. The target is the device that receives the command frame and generates a response frame. Typical targets are audio players / recorders, video players / recorders, and televisions.

[0120] Baseband, Link Management Protocol (LMP), and Logical Link Control and Adaptation Protocol (L2CAP) are the Bluetooth protocols at Layers 1 and 2 of the OSI model. The Audio Video Control Transport Protocol (AVCTP) and Basic Imaging Profile (BIP) define the procedures and messages used to exchange control of A / V devices. SDP is the Bluetooth Service Discovery Protocol. The Object Exchange (OBEX) protocol, used to transfer data objects between Bluetooth devices, originated from the protocol defined by infrared and later adopted by Bluetooth. Audio Video / Control (AV / C) is the entity responsible for device control signaling based on AV / C commands. The Application layer is the ACRVP entity, used to exchange control and browsing commands defined in the protocol.

[0121] C. Protocols and entities included in the HFP protocol stack

[0122] An audio gateway is a device that acts as a gateway for audio input and output. A typical audio gateway device is a cell phone. A hands-free unit is a device that acts as a remote audio input and output mechanism for an audio gateway. A hands-free unit may provide some remote control methods. A typical hands-free unit is a car hands-free unit.

[0123] Baseband, Link Management Protocol (LMP), and Logical Link Control and Adaptation Protocol (L2CAP) are Bluetooth protocols at Layers 1 and 2 of the OSI model. RFCOMM is the Bluetooth serial port emulation entity. SDP is the Bluetooth Service Discovery Protocol. The Hands-Free Control layer is responsible for specific control signals for the hands-free unit. These control signals are based on AT commands. The audio port emulation layer is the entity that emulates the audio port on the audio gateway, and the audio driver is the driver software in the hands-free unit.

[0124] From the AC items above, we can see that A2DP, AVRCP, and HFP each correspond to a different protocol stack. Different profiles utilize different transmission links and are therefore incompatible with each other. In other words, profiles are essentially different Bluetooth protocol stacks for different application scenarios. When the Bluetooth protocol needs to support new application scenarios, it must add profiles and protocol stacks within the existing Bluetooth protocol framework.

[0125] Moreover, since different profiles use different protocol stacks and each protocol stack is independent of each other, switching between applications of different profiles is time-consuming and will result in obvious pauses.

[0126] For example, a user wearing a Bluetooth headset might turn on the microphone to chat with teammates while gaming (which generates background audio, such as the sound of skill triggers). In this scenario, audio transmission needs to switch from A2DP to HFP. Background audio transmission can be implemented using the A2DP protocol stack, while voice transmission for chatting with teammates can be implemented using the HFP protocol stack. Background audio requires higher quality than voice, which means that the encoding parameters (such as compression rate) used for both are different, with a higher compression rate being used. Because A2DP and HFP are independent, switching from A2DP to HFP requires terminating the configuration related to background audio transmission under A2DP and re-negotiating audio data transmission parameters and initializing the configuration under HFP. This switching process takes a long time, resulting in noticeable pauses for the user.

[0127] In addition, the existing BR / EDR Bluetooth protocol does not implement point-to-multipoint synchronous transmission.

[0128] The existing BR / EDR Bluetooth protocol defines two types of Bluetooth physical links: asynchronous connectionless (ACL) links and synchronous connection-oriented (SCO) or extended SCO (eSCO) links. ACL links support both symmetric (point-to-point) and asymmetric (point-to-multipoint) connections. ACL links offer high transmission efficiency, but uncontrollable latency and an unlimited number of retransmissions. They are primarily used to transmit latency-insensitive data, such as control signaling and packet data. SCO / eSCO links support symmetric (point-to-point) connections. SCO / eSCO links offer low transmission efficiency, but controllable latency and a limited number of retransmissions. They are primarily used to transmit latency-sensitive services, such as voice.

[0129] The existing ACL and SCO / eSCO links in the BR / EDR Bluetooth protocols do not support isochronous data. This means that in a point-to-multipoint piconet, data sent from a master to multiple slaves is not transmitted synchronously, resulting in signals from the slaves being out of sync.

[0130] The existing BLE protocol supports a point-to-multipoint network topology. Furthermore, the Bluetooth Special Interest Group (SIG) has proposed adding support for isochronous data to BLE, allowing BLE devices to transmit isochronous data. Isochronous data is time-bounded. Isochronous data refers to information in a stream where each information entity is bounded by its temporal relationship to previous and subsequent information entities.

[0131] Figure 4 The BLE-based audio protocol framework provided by this application is shown. Figure 4 As shown, the protocol framework may include: LE physical layer (LE physical layer 413), LE link layer (LE link layer 410), L2CAP layer and application layer (application layer 408). The LE physical layer 413 and LE link layer 410 can be implemented in the controller, and the L2CAP layer 408 can be implemented in the host. The protocol framework may also include some functional entities implemented in the host: multimedia audio functional entity 402, voice functional entity 403, background sound functional entity 404, content control functional entity 405, flow control functional entity 406, and stream data functional entity 407.

[0132] In Controller:

[0133] (1) The LE physical layer 413 is responsible for providing the physical channel (often called a channel) for data transmission. Typically, there are several different types of channels in a communication system, such as control channels, data channels, and voice channels. Bluetooth uses the 2.4 GHz industrial scientific medical (ISM) band.

[0134] (2) LE Link Layer 410 provides a physical-independent logical transmission channel (also called a logical link) between two or more devices based on the physical layer. The LE Link Layer 410 can be used to control the radio frequency state of the device. The device will be in one of five states: waiting, advertising, scanning, initialization, and connection. The broadcasting device can send data without establishing a connection, and the scanning device receives the data sent by the broadcasting device; the device that initiates the connection responds to the broadcasting device by sending a connection request. If the broadcasting device accepts the connection request, the broadcasting device and the device that initiates the connection will enter the connection state. The device that initiates the connection is called the master device (master), and the device that accepts the connection request is called the slave device (slave).

[0135] LE Link Layer 410 may include an LE ACL link 411 and an LE isochronous (ISO) link 412. The LE ACL link 411 may be used to transmit control messages between devices, such as flow control messages, content control messages, and volume control messages. The LE ISO link 412 may be used to transmit isochronous data (such as the stream data itself) between devices.

[0136] In Host:

[0137] (1) L2CAP layer 408 is responsible for managing the logical links provided by the logical layer. Based on L2CAP, different

[0138] Upper-layer applications can share the same logical link, similar to the concept of a port in TCP / IP.

[0139] (2) Multimedia audio function entity 402, voice function entity 403, background sound function entity 404 can

[0140] This is a functional entity set up based on business scenarios. It can be used to classify audio applications at the application layer into several types of audio services, such as multimedia audio, voice, and background sound. Audio services are not limited to multimedia audio, voice, and background sound. They can also be divided into voice, music, games, videos, voice assistants, email notifications, alarms, prompts, and navigation sounds.

[0141] (3) Content control functional entity 405 is responsible for encapsulating the content of various audio services

[0142] Control messages (such as previous song, next song, etc.) and transmit the encapsulated content control messages through the LE ACL link 411.

[0143] (4) The stream control functional entity 406 is responsible for parameter negotiation, such as negotiation of quality of service (QoS) parameters, negotiation of codec parameters, negotiation of isochronous data transmission channel parameters (hereinafter referred to as ISO parameters), and establishment of isochronous data transmission channels.

[0144] (5) The stream data function entity 407 may be responsible for transmitting audio data via an isochronous data path. The isochronous data path may be a connected isochronous stream (CIS). The CIS may be used to transmit isochronous data between connected devices. The isochronous data path is ultimately carried by LE ISO 412. The stream control function entity 406 may also be used to negotiate parameters before establishing the isochronous data path, and then establish the isochronous data path based on the negotiated parameters.

[0145] like Figure 4 As shown, in the BLE-based audio protocol framework provided by this application, the audio data from the application layer is finally transmitted through the LE ISO link 412.

[0146] in addition, Figure 4 The audio protocol framework shown may also include a Host Controller Interface (HCI). The host and controller communicate via the HCI, using HCI commands as the medium of communication. The host can be implemented in the device's application processor (AP), and the controller can be implemented in the device's Bluetooth chip. Alternatively, in small devices, the host and controller can be implemented in the same processor or controller, in which case the HCI is optional.

[0147] like Figure 5 As shown, the BLE-based audio protocol framework provided by this application can divide the data of various audio applications (such as A2DP, HFP, etc.) into three types:

[0148] 1. Content control: call control (such as answering, hanging up, etc.), playback control (such as previous song, next song, etc.), volume control (such as increasing volume, decreasing volume), and other signaling.

[0149] 2. Stream control: Signaling for stream management, such as creating a stream and terminating a stream. Streams can be used to carry audio data.

[0150] 3. Stream data: the audio data itself.

[0151] Among them, content control and flow control data are transmitted through the LE ACL 411 link; flow data is transmitted through the LE ISO 412 link.

[0152] In existing Bluetooth protocols, different profiles correspond to different protocol stacks and transmission frameworks. For example, A2DP and HFP each have different transmission frameworks. A2DP streaming data (such as stereo music data) is ultimately transmitted over ACL links due to their high transmission efficiency, while HFP streaming data (such as voice data) is ultimately transmitted over SCO / eSCO links due to their controllable transmission latency.

[0153] It can be seen that the BLE-based audio protocol framework provided by this application supports audio transmission, can unify service-level connections, and divide all upper-layer audio profiles into multimedia audio, voice, background sound and other audio services based on business scenarios. The flow control of each audio service (including the negotiation of QoS parameters, the negotiation of codec parameters, the negotiation of ISO parameters and the establishment of isochronous data transmission channels) is uniformly the responsibility of the stream control functional entity in the protocol stack. The content control of each audio service (such as call control such as answering and hanging up, playback control such as the previous song and the next song, volume control, etc.) is uniformly the responsibility of the content control functional entity in the protocol stack. Both flow control messages and content control messages are transmitted through the LE ACL link, and stream data is transmitted through the LE ISO link. In this way, different audio profiles can be based on the same transmission framework, which is more compatible.

[0154] The following embodiments of this application will be described by taking the audio playback scenario as an example, in which a connection is established between a mobile phone and a TWS headset to play audio for the user. Figure 6 , connection methods can include:

[0155] 600. Turn on the Bluetooth function of your mobile phone.

[0156] When the user wants to use TWS headphones to play audio, for example, see Figure 7 , users can turn on the Bluetooth function on their mobile phones.

[0157] 601. The first earphone 101 and the second earphone 102 in the TWS earphone establish a wireless pairing connection.

[0158] For example, in one scenario, a first earphone 101 and a second earphone 102 are placed in an earphone storage box 103. When the earphone box is opened, or one earphone is removed from the mobile phone storage box 103, or the user touches (e.g., taps, clicks, or long presses) the button 104 on the earphone storage box 103, the first earphone 101 and the second earphone 102 can be paired with each other via Bluetooth Low Energy (BLE) or Bluetooth Frame Relay (BR / EDR). When using BLE, the first earphone 101 and the second earphone 102 can discover each other via BLE broadcast and establish a Bluetooth pairing connection via a BLE connectable broadcast message. When using BR / EDR, the first earphone 101 and the second earphone 102 can discover each other via page scan or inquiry scan and establish a Bluetooth pairing connection via messages such as page and page response.

[0159] In some embodiments, the first headset 101 and the second headset 102 have been pre-paired by the manufacturer, or have been paired before this use. The first headset 101 and the second headset 102 can store each other's MAC addresses. When the headset storage box 103 is opened, or after the user touches the button 104, or after one of the first headset 101 or the second headset 102 is removed from the headset storage box 103, the first headset 101 and the second headset 102 can page each other based on the stored MAC address, thereby establishing a Bluetooth connection.

[0160] If the first earphone 101 and the second earphone 102 have been paired, the indicator light 129 of the earphone storage box 103 will light up after the first earphone 101 and the second earphone 102 are placed in the earphone storage box 103. If the indicator light 129 is not lit, it means that the first earphone 101 and the second earphone 102 have not been paired. At this time, the user can touch other controls on the earphone storage box 103 ( Figure 1A (not shown) or long press button 104 to instruct the first headset 101 and the second headset 102 to clear the saved MAC address of each other, and then the first headset 101 and the second headset 102 can establish a Bluetooth connection between the two by scanning.

[0161] In some embodiments, since wireless communication technologies such as Bluetooth and Wi-Fi all use the 2.4 GHz frequency band, if the first headset 101 and the second headset 02, which have already established a Bluetooth pairing connection, support NFMI, the first headset 101 and the second headset 102 can switch to NFMI (not using the 2.4 GHz frequency band) to reduce interference during data transmission in the 2.4 GHz frequency band. Furthermore, the first headset 101 and the second headset 102 can also establish a wireless pairing connection using other short-range wireless communication technologies such as Wi-Fi, which are not limited in this embodiment of the present application.

[0162] It should be noted that after the first headset 101 and the second headset 102 establish a wireless connection, the first headset 101 and the second headset 102 can store each other's MAC addresses, indicating that the first headset 101 and the second headset 102 are used as a paired set / pair of devices; alternatively, the first headset 101 and the second headset 102 can correspond to the same identity identifier, indicating that the first headset 101 and the second headset 102 are used in coordination as a pair of devices, for example, to synchronously play the left and right channel signals of the same audio data. The identity identifier can be an identifier negotiated by the first headset 101 and the second headset 102 (for example, the MAC address of the first headset 101); it can also be an identifier set by the mobile phone 200 after the first headset 101 and the second headset 102 are connected to the mobile phone 200; or it can be a preset identifier, which is not limited in this application.

[0163] After the first earphone 101 and the second earphone 102 establish a wireless pairing connection, the first earphone 101 and / or the second earphone 102 can prompt the user that the TWS earphones have been connected by sound. Alternatively, the first earphone 101 and / or the second earphone 102 can prompt the user that the TWS earphones have been connected by having an indicator light that is always on or flashing or the indicator light is a specific color. Alternatively, the first earphone 101 and / or the second earphone 102 can prompt the user that the TWS earphones have been connected by displaying information such as text or icons on the display screen.

[0164] After the first headset 101 and the second headset 102 establish a wireless pairing connection, the first headset 101 may enter a connectable and discoverable state so that it can be discovered and connected by the mobile phone 200, while the second headset 102 may enter an unconnectable and undiscoverable state. In the unconnectable and undiscoverable state, the second headset 102 cannot be detected by other devices via Bluetooth and cannot establish a Bluetooth connection with other devices.

[0165] 602. The first headset 101 enters a pairing state with the mobile phone.

[0166] Before the TWS earphone establishes a Bluetooth pairing connection with the mobile phone 200, the first earphone 101 needs to first enter a pairing state with the mobile phone 200. The first earphone 101 can also be the second earphone 102.

[0167] In some embodiments, the TWS headset may include a main headset and a secondary headset. The first headset 101 or the second headset 102 may be the main headset or the secondary headset. The mobile phone 200 may first establish a Bluetooth connection with the main headset.

[0168] Among them, there can be many ways to distinguish between the main earphone and the secondary earphone. For example, the right earphone of the TWS earphone is the main earphone by default, and the left earphone is the secondary earphone. For another example, the earphone taken out of the earphone storage box 103 first is the main earphone, and the earphone taken out of the earphone storage box 103 later is the secondary earphone. For another example, the earphone inserted into the ear first is the main earphone, and the earphone inserted into the ear later is the secondary earphone. For another example, the earphone with more power in the TWS earphone is the main earphone, and the earphone with less power is the secondary earphone. For another example, the main earphone used by the user last time is defaulted to the main earphone used this time. It should be noted that during the user's use of the TWS earphone, the main and secondary earphones can be switched.

[0169] When a user uses a TWS headset to pair with the current mobile phone 200, if the user has already established a pairing relationship with the TWS headset and has not yet established a pairing relationship with the other electronic device, such as if the TWS headset has saved a pairing history with the other mobile phone (such as the MAC address of the other mobile phone), the TWS headset can only enter the pairing state after canceling the pairing relationship with the other electronic device. Exemplarily, when the TWS headset detects that the user has long pressed the pairing button on the TWS headset (for example, it can be touch button 111), the pairing relationship between the TWS headset and the other electronic device can be canceled. As another example, before removing the TWS headset from the headset storage box 103, the user can long press the button 104 on the headset storage box 103, and the headset storage box 103 can trigger the TWS headset to cancel the pairing relationship with the other electronic device. After canceling the pairing relationship between the TWS headset and the other electronic device, the first headset 101 and the second headset 102 enter the pairing state.

[0170] If the user has not paired the TWS headset with other electronic devices before, the TWS headset can automatically enter the pairing state.

[0171] 603 . The mobile phone 200 establishes a Bluetooth connection with the first headset 101 .

[0172] After the first headset 101 enters the pairing state with the mobile phone 200, the first headset 100 and the mobile phone 200 can confirm whether both parties support dual-send mode through one or more interactive processes and exchange their Bluetooth addresses (e.g., MAC addresses). The mobile phone 200 can establish a Bluetooth connection with the first headset 101 based on its own capabilities. For example, if both the mobile phone 200 and the first headset 101 support dual-send mode, the following steps in the embodiment of the present application can be executed to establish a dual-send connection between the mobile phone 200 and the TWS headset. If the mobile phone 200 does not support dual-send mode, the connection process of the monitoring, forwarding, NFMI, etc. scheme can be executed.

[0173] In the process of establishing a dual-transmission connection between the mobile phone 200 and the TWS headset, the first headset 101 and the mobile phone 200 can first confirm that both parties support the dual-transmission mode, and then establish a Bluetooth connection; or, the first headset 101 and the mobile phone 200 can also first establish a Bluetooth connection, and then confirm that both parties support the dual-transmission mode.

[0174] In the pairing connection method provided in the embodiment of the present application, see Figure 8 , the mobile phone 200 can establish a Bluetooth connection with each TWS headset in the paired TWS headset, and maintain two Bluetooth connections at the same time, so as to interact with each TWS headset separately. Audio data, service control data and synchronization data, etc., realize operations such as audio data playback and service action control, so this connection mode can be called dual-transmission mode. After establishing the dual-transmission mode connection between the mobile phone 200 and the TWS headset, the two TWS headsets can maintain a wireless connection or disconnect the wireless connection. The two TWS headsets can receive the same audio data, or the mobile phone 200 sends left-channel audio data to the first headset 101 and right-channel audio data to the second headset 102, so that the two headsets play audio data of different channels.

[0175] 604. The mobile phone 200 notifies the first headset 101 that the mobile phone 200 supports the dual-sending mode.

[0176] If the mobile phone 200 supports dual-send mode, the mobile phone 200 can notify the first headset 101 so that the first headset 101 can execute the dual-send connection process. It is understood that if the first headset 101 has already been notified of support for dual-send mode during the Bluetooth connection establishment process in step 603, step 604 may not be necessary. It is also understood that the mobile phone 200 can also notify the second headset 102 that the mobile phone 200 supports dual-send mode.

[0177] 605 . The mobile phone 200 establishes a Bluetooth connection with the second headset 102 .

[0178] After the first headset 101 determines that the mobile phone 200 also supports dual-send mode, it can execute a dual-send connection process. The first headset 101 can send the second headset 102 information (e.g., the MAC address of the second headset 102) to the mobile phone 200, and send the mobile phone 200 information (e.g., the MAC address of the mobile phone) to the second headset 102, so that the mobile phone 200 and the second headset 102 can establish a Bluetooth connection through the first headset 101. It is understood that the mobile phone 200 can also establish a Bluetooth connection with the first headset 101.

[0179] For example, in some embodiments, step 605 may include: the first headset 101 may send a connection message to the second headset 102, wherein the connection message may include the MAC address of the mobile phone 200 and instruct the second headset 102 to enter a connectable and discoverable state. The instruction for the second headset 102 to enter a connectable and discoverable state may be indicated by other content in the connection information in addition to the MAC address of the mobile phone 200, such as a specific identifier; or by a specific message or message type carrying the connection information; or by the MAC address of the mobile phone 200. Because the second headset 102 has the Bluetooth address of the first headset 101, upon receiving the other MAC address sent by the first headset 101, the second headset 102 can recognize it and enter a connectable and discoverable state, connecting to the mobile phone 200. The second headset 102 may establish a Bluetooth connection with the mobile phone 200 based on the connection information, and the Bluetooth connection between the mobile phone 200 and the first headset 101 may be maintained. After the second earphone 102 establishes a Bluetooth connection with the mobile phone 200, since the first earphone 101 has previously established a Bluetooth connection with the mobile phone 200, a dual-transmission connection is achieved between the mobile phone 200 and the two earphones of the TWS earphone.

[0180] The above connection information may also include link information such as the frequency hopping mode and clock between the mobile phone 200 and the first headset 101, so that the second headset can establish a link based on the link information between the mobile phone 200 and the first headset 101, thereby keeping synchronization with the link between the mobile phone 200 and the first headset 101, so that the first headset 101 and the second headset 102 can play stereo music.

[0181] Among them, when the first earphone 101 and the second earphone 102 are connected by BR / EDR, the first earphone 101 can send connection information to the second earphone 102 according to the SPP protocol; when the first earphone 101 and the second earphone 102 are connected by BLE, the first earphone 101 can send a connection message to the second earphone 102 according to the GATT protocol.

[0182] 606 : The wireless connection between the first headset 101 and the second headset 102 is disconnected.

[0183] After establishing a dual-transmission connection, the mobile phone 200 sends audio data to the first earphone 101 and the second earphone 102 respectively, and the first earphone 101 and the second earphone 102 synchronously play the audio signals of the corresponding channels. For example, a user can play music using the first earphone 101 and the second earphone 102. It will be understood that in some embodiments, the TWS earphone uses dual-mode Bluetooth, which supports Bluetooth BR / EDR and BLE. In dual-mode devices, the same RF front-end and antenna can be used to implement two Bluetooth solutions.

[0184] In the BLE protocol, protocols related to broadcast communication include: the Link Layer (LL), located at the bottom layer, is responsible for defining and implementing broadcast communication functions, including physical channel selection, link state definition, and PDU definition. The Host Controller Interface (HCL) abstracts all LL functions into command / event form for host use. BLE devices participating in broadcast communication can send different types of Packet Data Units (PDUs). The type of PDU sent determines the state of the BLE device involved in broadcast communication. BLE device states include Advertising, Scanning, and Initiating. Advertising (the data sender) periodically sends broadcast data; Scanning (the data receiver) scans for and receives broadcast data; Initiating (the connection initiator) scans for broadcast data with the "connectable" flag and initiates a connection request if it detects it. BLE devices in different states can send different types of PDUs.

[0185] The PDU types that can be sent in the Advertising state are: ADV_IND (conventional advertising, can carry advertising data not exceeding 31 bytes, can be connected, can be scanned), ADV_DIRECT_IND (used for point-to-point connection, and the Bluetooth addresses of both parties are known, cannot carry advertising data, can be connected by a specified device, cannot be scanned), ADV_NONCONN_IND (similar to ADV_IND, but cannot be connected, cannot be scanned), ADV_SCAN_IND (similar to ADV_IND, but cannot be connected, can be scanned).

[0186] The PDU types that can be sent in the Scanning state are: SCAN_REQ (when receiving ADV_IND or ADV_SCAN_IND type broadcast data, this PDU can be used to request the broadcaster to broadcast more information), SCAN_RSP (after the broadcaster receives the SCAN_REQ request, it responds with this PDU and transmits more data to the receiver).

[0187] The PDU types that can be sent in the Initiating state are: CONNECT_REQ (when receiving ADV_IND or ADV_DIRECT_IND type broadcast data, you can use this PDU to request to establish a connection with the other party).

[0188] In the Advertising state, the BLE protocol selects three physical channels as physical channels for broadcast communication. The selected physical channels are shown in Table 1:

[0189]

[0190] Table 1

[0191] The LL layer allows the host to select any one or more of the three physical channels listed above for broadcasting. The LL layer sends the same broadcast data once on each channel.

[0192] There is an Advertising Event in the BLE protocol, which is actually a combination of Advertising PDUs sent on all used physical channels. Because the purpose of the BLE device in the Advertising state is to broadcast 4 types of data. BLE devices can broadcast data on up to 3 physical channels, that is, the same data needs to be broadcast on multiple physical channels in sequence. Therefore, the process of broadcasting on multiple physical channels in sequence is called an Advertising Event. In addition, after some broadcasts are sent out, the receiver is allowed to respond to the request on the corresponding physical channel. After the broadcaster receives the scan request, it needs to respond on the same physical channel. These interaction processes are also calculated as an AdvertisingEvent. Advertising Event has different types, including Connectable Undirected Event, Connectable Directed Event, Scannable Undirected Event, and Non-connectable Undirected Event. Among them, Connectable Directed Event includes Low Duty Cycle and High DutyCycle. For AdvertisingEvents other than High Duty Cycle Connectable Directed Event, the Advertising cycle is mainly determined by the two parameters advInterval and advDelay. For example Figure 9 As shown, advInterval is a parameter that can be set by the host. For Scannable Undirected and Non-Connectable Undirected Advertising Events, this value must be at least 100ms; for Connectable Undirected and Low Duty Cycle Connectable Directed Advertising Events, this value must be at least 20ms. advDelay is a pseudo-random number between 0 and 10ms. The period of the High Duty Cycle Connectable Directed Event is not controlled by these parameters and can be as low as 3.75ms. However, the BLE protocol stipulates that the LL layer must exit this state within 1.28s.

[0193] The scanning state is determined by two parameters: scanWindow and scanInterval. ScanWindow determines the duration of a scan, while scanInterval identifies the interval between scans. If these two parameters have the same value, scanning is continuous. The BLE protocol stipulates that the maximum value of scanWindow and scanInterval cannot exceed 10.24 seconds, and scanWindow cannot be greater than scanInterval.

[0194] Scanning states are divided into Passive Scanning and Active Scanning. In Passive Scanning, a BLE device only receives PDUs such as ADV_DIRECT_IND, ADV_IND, ADV_SCAN_IND, and ADV_NONCONN_IND, and does not send SCAN_REQ. In Active Scanning, it not only receives PDUs but also sends SCAN_REQ and the subsequent SCAN_RSP.

[0195] The Initiating state is similar to the Scanning state. In the Initiating state, the BLE device only receives two types of messages, ADV_DIRECT_IND and ADV_IND, and sends a CONNECT_REQ request to establish a connection when the conditions are met.

[0196] The data format of BLE broadcast is as follows Figure 10 As shown, a BLE advertising packet consists of a significant part and a non-significant part. The significant part includes one or more advertising data units (AD structures). A advertising data unit consists of a length and data. The length indicates the length of the data, while the data consists of an AD data field and an AD data type field. The AD data field carries the advertising data, while the AD data type indicates the type of the advertising data. As you can see, BLE advertising packets are all 31 bytes long. If the significant part is less than 31 bytes, it is padded with zeros, and this portion of data is considered invalid.

[0197] In some embodiments, if only one earphone is in the earphone storage box 103 and the other earphone is not within the connection range of the mobile phone 200, for example, if only the first earphone 101 is in the earphone storage box, there are two scenarios. Scenario 1: The first earphone 101 and the second earphone 102 have been pre-paired by the manufacturer or paired before this use, so the first earphone 101 and the second earphone 102 have each other's MAC addresses stored. Scenario 2: The first earphone 101 and the second earphone 102 have not been paired before. It is understood that the earphone storage box 103 can determine the status of the earphones in the box. If both earphones are in the earphone storage box 103, information is sent to the first earphone 101 and the second earphone 102 via a wired or wireless method, instructing the first earphone 101 and the second earphone 102 to implement a first connection strategy. If only one earphone is in the earphone storage box 103, the information instructs the earphone in the box 103 to implement a second connection strategy. The first connection strategy uses BR / EDR. First headset 101 and second headset 102 are discovered via page scan or inquiry scan, and a Bluetooth pairing connection is established via messages such as page and page response. The HCL layer of first headset 101's Bluetooth function uses the HCL_Write_Page_Timeout command to set the Page_Timeout field to the default state. By default, the paging timeout is 5.12 seconds, meaning first headset 101 will page second headset 102 for 5.12 seconds. If a connection with second headset 102 is not established within 5.12 seconds, the first headset 101 will page mobile phone 200.

[0198] In case 1, the first headset 101 implements the second connection strategy, such as Figure 11As shown in step S1101, when the headphone storage box 103 is opened or the first headphone 101 is removed from the headphone storage box 103, the first headphone 101 and the second headphone 102 discover each other using BLE advertising. The first headphone 101's status is set to Scanning, and the scanning duty cycle is set to 100%. In other words, the parameters of the first headphone 101's scanWindow and scanInterval are set to the same, and the scanWindow parameter is set to be greater than the advertising period (advInterval + advDelay) of the second headphone 102. In step S1102, if the second headphone 102 is within the scanning range of the first headphone 101, the first headphone 101 will definitely receive the ADV_IND PDU broadcast by the second headphone 102, and the process proceeds to step S1104. If the second headphone 102 is not detected, the process proceeds to step S1103. In step S1103, the first headset 101 determines whether the scanning time exceeds the advertising cycle of the second headset 102. If so, the process proceeds to step S1105. If not, the scanning process continues. In step S1105, because the scanning time of the first headset 101 exceeds the advertising cycle of the second headset 102, the first headset 101 initiates a Bluetooth connection with the mobile phone 200. In step S1104, because the first headset 101 detects the second headset 102, the first headset 101 initiates a Bluetooth connection with the second headset 102.

[0199] The advantages of TWS earphones implementing the second connection strategy over the first connection strategy are as follows: on the one hand, the connection speed is fast, because if the first connection strategy is used, if the second earphone 102 is not within the connection range, it is necessary to wait for 5.12 seconds before the first earphone 101 can connect to the mobile phone 200, which means the user has to wait for a long time. When the second connection strategy is implemented, the advertising cycle of the second earphone 102 can be as short as 3.75ms, because the scanWindow of the first earphone 101 only needs to be greater than the advertising cycle of the second earphone 102, so the scanning time of the first earphone can be shortened to milliseconds. Implementing the second connection strategy can greatly increase the speed of connection between TWS earphones. On the other hand, it reduces power consumption, because the power consumption of paging is greater than the power consumption of scanning and broadcasting, so using BLE broadcasting and scanning can greatly reduce the power consumption of TWS earphone devices.

[0200] In some embodiments, after the first headset 101 and the second headset 102 establish a Bluetooth connection, if the distance between the first headset 101 and the second headset 102 exceeds the effective range of the Bluetooth connection, the Bluetooth connection between the first headset 101 and the second headset 102 will be disconnected. It can be understood that in addition to the Bluetooth connection disconnection caused by the distance between the devices exceeding the effective connection distance, it also includes timeout disconnection caused by link abnormality. In the above case, the first headset 101 can execute the third connection strategy, that is, first initiate paging to the second headset 102 continuously in a short period of time. If it still cannot be connected, the interval time between each paging is increased. For example, the initial interval time is t0, and the interval time of the nth paging is tn, and the interval time tn is greater than the interval time tn-1. For example, after the first headset 101 disconnects from the second headset 102, it sets the paging interval to 5s. If the connection is not successful after paging twice, the paging interval is set to 10s. After paging 4 times, if the connection is still not successful, the paging interval is set to 1 minute until the connection is successful. The first headset 101 can also execute the fourth connection strategy, such as Figure 12 As shown, in step S1201, after the first headset 101 and the second headset 102 establish a connection, the Bluetooth connection between the two headsets is disconnected because the distance between the two headsets exceeds the effective connection distance. In step S1202, the first headset 101 initiates a paging call to the second headset 102, setting the paging interval to p1 and the connection period to t. In step S1203, the first headset 101 determines whether the paging time has exceeded the connection period. If it has not exceeded the connection period, the paging call continues. If it has exceeded the connection period, the process proceeds to step S1204. In step S1204, the first headset 101 enters the scanning state using the BLE protocol, scanning for advertisements from the second headset 102. The scanInterval is set to p2, and the PDU broadcast by the second headset 102 is ADV_IND. In step S1205, the first headset 101 determines whether it has detected the second headset 102. If the first headset 101 detects the ADV_IND broadcast by the second headset 102, the process proceeds to step S1206. If the first headset 101 does not detect the second headset 102's broadcast PDU, the process returns to step S1024 and continues scanning for the second headset 102's broadcast. In step S1206, the first headset 101 detects the second headset 102's broadcast and sends a CONN_REQ PDU to the second headset 102. After receiving the CONN_REQ PDU, the second headset 102 opens the Rx window, and the first headset 101 opens the Tx window. After T_IFS time, the second headset 102 responds with an ACK PDU to the first headset 101. If the first headset 101 receives the ACK PDU, the connection between the first headset 101 and the second headset 102 is successful.

[0201] Compared with the third connection strategy, the fourth connection strategy implemented by the TWS headset can reduce power consumption and avoid blind paging of the first headset 101. In addition, the fourth connection strategy can shorten the connection cycle, allowing the first headset 101 to quickly connect to the second headset 102.

Claims

1. A method for connecting a TWS headset, characterized in that: include: The TWS earphones include a first earphone and a second earphone; The first earphone scans with a first scanning duty cycle, and the first scanning duty cycle is 100%; The second earphone performs broadcasting; If the first headset fails to scan the broadcast, determining whether the scanning time of the first headset exceeds the broadcast period of the second headset; If the scanning time of the first headset exceeds the broadcast period of the second headset, the first headset connects to the electronic device that was last paired with the first headset through Bluetooth; If the scanning time of the first headset does not exceed the broadcasting period of the second headset, the first headset continues to scan.

2. The method according to claim 1, characterized in that The TWS earphone further includes an earphone storage box, which stores the first earphone and the second earphone.

3. The method according to claim 2, characterized in that When the first earphone is taken out of the earphone receiving box, the first earphone scans with a first scanning duty cycle.

4. The method according to claim 1, wherein The scanWindow parameter of the first headset is set to be greater than the broadcast period of the second headset.

5. The method according to claim 1, wherein If the first earphone scans the broadcast transmitted by the second earphone, the first earphone initiates a Bluetooth connection with the second earphone; and the first earphone establishes a Bluetooth connection with the second earphone.

6. The method according to claim 5, characterized in that If, after the first earphone establishes a Bluetooth connection with the second earphone, the distance between the first earphone and the second earphone exceeds the effective range of the Bluetooth connection, the Bluetooth connection between the first earphone and the second earphone is disconnected; the first earphone initiates paging to the second earphone within an interval time tn, and the number of paging times is n; the interval time tn is greater than the interval time tn-1; the first earphone performs the nth paging, and the first earphone establishes a Bluetooth connection with the second earphone.

7. The method according to claim 5, characterized in that If, after the first earphone establishes a Bluetooth connection with the second earphone, the distance between the first earphone and the second earphone exceeds the effective range of the Bluetooth connection, the Bluetooth connection between the first earphone and the second earphone is disconnected; the first earphone initiates a paging call to the second earphone, and the paging cycle is t; if the first earphone and the second earphone fail to establish a Bluetooth connection within the cycle t, the first earphone enters a scanning state and scans for broadcasts sent by the second earphone.

8. A TWS headset, characterized in that: include: First earphone, second earphone, earphone storage box; The first earphone and the second earphone are provided with a microphone and a receiver; The first earphone, the second earphone and the earphone storage box also include: a wireless communication module; one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the TWS earphone, enable the TWS earphone to perform the method described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Hearing assistance system and method

    CN106465023A

  • Pairing method used between binaural Bluetooth earphones and the binaural Bluetooth earphones

    CN111464993A