Method and apparatus for establishing a data channel
By configuring CIG parameters and CIS before the audio service is launched, the problem of prolonged audio data transmission in existing technologies is solved, enabling faster audio data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2018-12-18
- Publication Date
- 2026-04-17
AI Technical Summary
In Bluetooth devices, existing technologies only establish CIG parameters and CIS after the audio service is started, resulting in long audio data transmission latency.
Before the audio service is started, CIG parameters are pre-configured and CIS is established, but CIS is not activated. When the audio service is started, CIS is activated through a small amount of air interface signaling to transmit audio data.
It effectively reduces the setup latency of CIS in CIG, thereby reducing the transmission latency of audio data.
Smart Images

Figure CN115643554B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of short-range communication, and more particularly to a method and apparatus for establishing a data channel. Background Technology
[0002] Bluetooth is a wireless technology standard that enables short-range data interaction between different devices. For example, a mobile phone can activate its Bluetooth module to interact with a Bluetooth headset at short range, allowing the headset to function as the phone's audio input / output device for voice, music, and other audio services. When using Bluetooth for short-range data interaction, different devices can transmit audio data (or audio streams) through the isochronous (ISO) channel of Bluetooth Low Energy (BLE).
[0003] BLE's ISO channel defines a transmission mechanism. Under this mechanism, a master device (M, such as the mobile phone mentioned above) can send audio data to one or more slave devices (S, such as the Bluetooth headset mentioned above). Specifically, this transmission mechanism defines a connected isochronous group (CIG), where CIG is a group concept. A CIG can include one or more connected isochronous streams (CIS). A master device can send audio data to a slave device through one CIS within a CIG. A master device can send audio data to multiple slave devices through multiple CIS within a CIG, with each slave device corresponding to one CIS. Summary of the Invention
[0004] This application provides a method and apparatus for establishing a data channel, in which all CISs corresponding to the CIG of the audio service are established before the audio service is started. Compared with establishing all CISs in the corresponding CIG after the audio service is started, the transmission latency of audio data can be effectively reduced.
[0005] The technical solution adopted in this application is as follows:
[0006] A first aspect of this application provides a method for establishing a data channel. This method can be applied to a first electronic device. The method may include: the first electronic device acquiring an audio service supported by a second electronic device and determining the CIG parameters of the CIG corresponding to the audio service; the first electronic device configuring the CIG parameters and establishing a CIS within the CIG based on the configured CIG parameters, wherein the CIS within the CIG is not activated; when the audio service is activated, the first electronic device activating the CIS within the CIG and sending an activation command to the second electronic device, the activation command being used to instruct the second electronic device to activate the CIS within the CIG; thus, the first electronic device can transmit audio data with the second electronic device through the CIS within the CIG.
[0007] The first electronic device can be a mobile phone or other electronic device, and the second electronic device can be a peripheral device such as a Bluetooth headset, or it can be the main body of a peripheral device, such as the main body of a TWS headset. When the second electronic device is the main body of a peripheral device, the CIS established by the first electronic device for each main body of the peripheral device belongs to the same CIG.
[0008] This technical solution involves configuring the CIG parameters for the audio service and establishing all CISs within the CIG before the service is activated. However, none of the CISs in the CIG are activated. When the audio service is activated, all CISs in the CIG are activated via air interface signaling of the corresponding number (the same number as the number of CISs in the CIG), allowing audio data transmission for the audio service to proceed through all CISs in the CIG. This effectively reduces the establishment latency of all CISs in the CIG, thereby reducing the audio data transmission latency.
[0009] In one possible implementation, the method may further include: upon termination of the audio service, a first electronic device may deactivate the CIS in the CIG and send a deactivation instruction to a second electronic device, which instructs the second electronic device to deactivate the CIS in the CIG; the first electronic device then stops transmitting audio data with the second electronic device through the CIS in the CIG. Thus, by deactivating the CIS in the CIG corresponding to the audio service upon termination, and instead of deleting it, the virtual link is preserved, and therefore not deleted, when the audio service is restarted, it is not necessary to establish a corresponding CIS in the CIG for that audio service, thereby reducing the transmission latency of audio data.
[0010] In another possible implementation, before the first electronic device acquires the audio services supported by the second electronic device, the method may further include: the first electronic device performing a pairing operation with the second electronic device; the first electronic device performing an operation to establish an ACL link with the second electronic device; the first electronic device acquiring the audio services supported by the second electronic device, specifically including: the first electronic device negotiating service scenarios with the second electronic device through the ACL link, and the first electronic device determining the audio services supported by the second electronic device based on the negotiation results; the first electronic device determining the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service, specifically including: the first electronic device negotiating parameters with the second electronic device through the ACL link, and the first electronic device determining the CIG parameters of the CIG corresponding to the audio service based on the parameter negotiation results. In this way, the established ACL link enables the negotiation of service scenarios and CIG parameters to determine the audio services supported by the second electronic device and obtain CIG parameters that are compatible with the audio services supported by the second electronic device, ensuring that the CIS in the pre-established CIG can meet the service requirements of the corresponding audio service.
[0011] In another possible implementation, the first electronic device is equipped with a state machine for the CIG; after the first electronic device and the second electronic device establish a CIS in the CIG, the state machine of the CIG is in a first state, which can be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the first electronic device activates the CIS in the CIG, which may specifically include: the first electronic device switches the state machine of the CIG from the first state to a second state, which can be used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
[0012] In another possible implementation, the first electronic device deactivates the CIS in the CIG, which may specifically include: the first electronic device switching the state machine of the CIG from a second state to a first state.
[0013] In another possible implementation, the first state is the open state and the second state is the audio streaming state.
[0014] In another possible implementation, the method may further include: a first electronic device establishing a correspondence between an audio service and a CIG; and when the audio service is activated, the first electronic device activating the CIS in the CIG. Specifically, this may include: when the audio service is activated, the first electronic device can activate the CIS in the CIG corresponding to the audio service according to the aforementioned correspondence. In this way, based on the maintained correspondence, the first electronic device can activate the CIS in the CIG that is compatible with the currently activated audio service, ensuring that the transmission of audio data can meet service requirements.
[0015] In another possible implementation, the CIG parameters may include at least one of the following: Quality of Service (QoS) parameters, codec parameters, and CIS parameters, wherein the CIS parameters may be transmission parameters used for data transmission and reception between the first electronic device and the second electronic device.
[0016] A second aspect of this application provides a method for establishing a data channel, which can be applied to a second electronic device. The method may include: the second electronic device establishing a CIS in a CIG, wherein the CIG corresponds to an audio service supported by the second electronic device, and the CIS in the CIG is not activated; the second electronic device receiving an activation command sent by a first electronic device; in response to the received activation command, the second electronic device activating the CIS in the CIG; and the second electronic device transmitting audio data with the first electronic device through the CIS in the CIG.
[0017] This technical solution involves configuring the CIG parameters for the audio service and establishing all CISs within the CIG before the service is activated. However, none of the CISs in the CIG are activated. When the audio service is activated, all CISs in the CIG are activated via air interface signaling of the corresponding number (the same number as the number of CISs in the CIG), allowing audio data transmission for the audio service to proceed through all CISs in the CIG. This effectively reduces the establishment latency of all CISs in the CIG, thereby reducing the audio data transmission latency.
[0018] In one possible implementation, the method may further include: a second electronic device receiving a deactivation command sent by a first electronic device; in response to the deactivation command, the second electronic device deactivating the CIS in the CIG; and the second electronic device ceasing to transmit audio data with the first electronic device through the CIS in the CIG. Thus, by deactivating the CIS in the CIG corresponding to the audio service at the end of the audio service, and preserving the virtual link instead of deleting it, it is possible to reduce the transmission latency of audio data when the audio service is restarted without having to establish a corresponding CIS in the CIG.
[0019] In another possible implementation, before the second electronic device establishes the CIS in the CIG, the method may further include: the second electronic device performing a pairing operation with the first electronic device; the second electronic device performing an ACL link establishment operation with the first electronic device; the second electronic device performing a business scenario negotiation operation with the first electronic device through the ACL link, the business scenario negotiation operation being used by the first electronic device to determine the audio services supported by the second electronic device; and the second electronic device performing a parameter negotiation operation with the first electronic device through the ACL link, the parameter negotiation operation being used by the first electronic device to determine the CIG parameters of the CIG corresponding to the audio service, the CIG parameters being used to establish the CIS in the CIG. In this way, the established ACL link enables the negotiation of business scenarios and CIG parameters, allowing the first electronic device to determine the audio services supported by the second electronic device and obtain CIG parameters that are compatible with the audio services supported by the second electronic device, ensuring that the pre-established CIS in the CIG can meet the business requirements of the corresponding audio service.
[0020] In another possible implementation, the second electronic device may have a state machine for the CIG; after the second electronic device establishes a CIS in the CIG with the first electronic device, the state machine of the CIG is in a first state, which can be used to indicate that the CIS in the CIG is not activated and cannot be used for audio data transmission; the second electronic device activates the CIS in the CIG, which may specifically include: the second electronic device switches the state machine of the CIG from the first state to a second state, which can be used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
[0021] In another possible implementation, the second electronic device deactivates the CIS in the CIG, which may specifically include: the second electronic device switching the state machine of the CIG from a second state to a first state.
[0022] In another possible implementation, the first state is the open state and the second state is the streaming state.
[0023] In another possible implementation, the CIG parameter may include at least one of the following: QoS parameter, codec parameter, and CIS parameter, wherein the CIS parameter may be a transmission parameter used for data transmission and reception between the first electronic device and the second electronic device.
[0024] A third aspect of this application provides a method for establishing a data channel. This method can be applied to a first electronic device and may include: the first electronic device acquiring audio services supported by a second electronic device; the first electronic device determining CIG parameters of a CIG corresponding to the audio service, wherein the CIG parameters can be used to establish a CIS within the CIG; the first electronic device configuring the CIG parameters and sending a CIS establishment request message to the second electronic device according to the configured CIG parameters; the first electronic device receiving a CIS establishment response message sent by the second electronic device; when the audio service is activated, the first electronic device sending a CIS establishment message to the second electronic device, wherein the CIS establishment message can be used to establish a CIS within the CIG with the second electronic device; and the first electronic device transmitting audio data with the second electronic device through the CIS within the CIG.
[0025] This technical solution involves configuring the CIG parameters corresponding to the audio service before it is activated and sending a CIS establishment request message to the second electronic device. If a CIS establishment response message is received from the second electronic device, the CIS establishment message is temporarily withheld. Instead, a CIS establishment message is sent to the second electronic device when the audio service is activated to establish the CIS within the CIG. This allows for the transmission of audio data for the audio service through the CIS in the CIG. This effectively reduces the establishment latency of all CIS within the CIG, thereby reducing the audio data transmission latency.
[0026] In one possible implementation, before the first electronic device acquires the audio services supported by the second electronic device, the method may further include: the first electronic device performing a pairing operation with the second electronic device; the first electronic device performing an operation to establish an ACL link with the second electronic device; the first electronic device acquiring the audio services supported by the second electronic device, specifically including: the first electronic device negotiating service scenarios with the second electronic device through the ACL link, and the first electronic device determining the audio services supported by the second electronic device based on the negotiation results; the first electronic device determining the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service, specifically including: the first electronic device negotiating parameters with the second electronic device through the ACL link, and the first electronic device determining the CIG parameters of the CIG corresponding to the audio service based on the parameter negotiation results. In this way, the established ACL link enables the negotiation of service scenarios and CIG parameters, allowing the first electronic device to determine the audio services supported by the second electronic device and obtain CIG parameters compatible with the audio services supported by the second electronic device, ensuring that the CIS in the pre-established CIG can meet the service requirements of the corresponding audio service.
[0027] A fourth aspect of this application provides an electronic device that may include: one or more processors, a memory, a wireless communication module, and a mobile communication module; the memory, wireless communication module, and mobile communication module are coupled to one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs a method for establishing a data channel as described in any one of the first aspects or possible implementations of the first aspect, or the third aspect or possible implementations of the third aspect. The electronic device may be the aforementioned first electronic device.
[0028] A fifth aspect of this application provides an electronic device that may include: one or more processors, a memory, a wireless communication module, a receiver, and a microphone; the memory, wireless communication module, receiver, and microphone are coupled to the processor, the memory is used to store computer program code, the computer program code including computer instructions, and when the one or more processors execute the computer instructions, the electronic device performs a method for establishing a data channel as described in any one of the second aspect or possible implementations of the second aspect. The electronic device may be the aforementioned second electronic device.
[0029] A sixth aspect of this application provides a Bluetooth system that may include: an electronic device as described in the fourth aspect, and an electronic device as described in the fifth aspect.
[0030] A seventh aspect of this application provides a computer storage medium including computer instructions that, when executed on an electronic device (such as the first electronic device described above), cause the electronic device to perform a method for establishing a data channel as described in any one of the first aspect or possible implementations of the first aspect, or the third aspect or possible implementations of the third aspect.
[0031] An eighth aspect of this application provides a computer storage medium including computer instructions that, when executed on an electronic device (such as the second electronic device described above), cause the electronic device to perform a method for establishing a data channel as described in any one of the second aspect or possible implementations of the second aspect.
[0032] In a ninth aspect, this application provides a computer program product that, when run on a computer, causes the computer to execute the data channel establishment method described in any of the preceding claims.
[0033] Understandably, the electronic devices described in the fourth and fifth aspects above, the Bluetooth system described in the sixth aspect, the computer storage medium described in the seventh and eighth aspects, and the computer program product described in the ninth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here. Attached Figure Description
[0034] Figure 1 This is a schematic diagram of the composition of a Bluetooth system provided in an embodiment of this application;
[0035] Figure 2 This is a schematic diagram of the earbud structure of a TWS earphone provided in an embodiment of this application;
[0036] Figure 3 This is a schematic diagram illustrating a product form of a TWS earphone provided in an embodiment of this application;
[0037] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0038] Figure 5 A schematic diagram of a data channel provided in an embodiment of this application;
[0039] Figure 6 A schematic diagram illustrating the composition of a Bluetooth transmission framework provided in an embodiment of this application;
[0040] Figure 7 This application provides a schematic diagram of a CIS establishment process.
[0041] Figure 8 A flowchart illustrating a method for establishing a data channel provided in an embodiment of this application;
[0042] Figure 9 This application provides a schematic diagram of the state transition of a CIG.
[0043] Figure 10 A schematic diagram of the time-domain distribution of different CIGs between the left and right earbuds of a mobile phone and a TWS earphone, provided for an embodiment of this application;
[0044] Figure 11 A schematic diagram of the time-domain distribution of different CIGs between the left and right earbuds of a mobile phone and a TWS earphone, provided as an embodiment of this application;
[0045] Figure 12 This application provides a schematic diagram of the composition of a Bluetooth device according to some embodiments. Detailed Implementation
[0046] Currently, the parameters (referred to as CIG parameters) of a CIG used to transmit audio data for different audio services may vary. To adapt to different audio services, the CIG parameters for that specific audio service are typically configured after the audio service is started, and all CISs within the CIG are established based on the configured CIG parameters. Establishing one CIS within a CIG requires at least three air interface signaling calls. Taking a CIG containing two CISs as an example, at least six air interface signaling calls are needed to establish all CISs within that CIG. Furthermore, audio data transmission can only proceed after all CISs within the CIG are established, which inevitably increases the audio data transmission latency.
[0047] This application provides a method and apparatus for establishing a data channel. Before the audio service is started, the CIG parameters corresponding to the audio service have been configured, and all CISs in the CIG have been established. However, none of the CISs in the CIG are activated. When the audio service is started, all CISs in the CIG only need to be activated through the corresponding number of air interface signaling (the number of signaling is the same as the number of CISs in the CIG) to transmit the audio data of the audio service through all CISs in the CIG. Continuing with the example of a CIG containing two CISs, when the audio service is started, only two air interface signalings need to be activated to transmit the audio data. In this way, the establishment latency of all CISs in the CIG is effectively reduced, thereby reducing the transmission latency of the audio data.
[0048] In this embodiment, the CIG parameters can be used to establish all CISs within a CIG. For example, the CIG parameters may include one or more of the following: Quality of Service (QoS) parameters, codec parameters, and CIS parameters. QoS parameters may include parameters representing transmission quality such as latency, packet loss rate, and throughput. Codec parameters may include parameters affecting audio quality such as encoding method and compression ratio. CIS parameters may include CIG anchor points, ISO intervals, and CIS identifiers (IDs), etc. A CIG may include multiple CIG events (CIG_events). A CIG anchor point is the start time of the corresponding CIG event. An ISO interval is the time between two consecutive CIG anchor points. Each CIG event belongs to an ISO interval in time.
[0049] Additionally, it should be noted that in this embodiment, all CISs within the CIG are not activated, which can also be understood as the CIG being inactive. Correspondingly, activating all CISs within the CIG can also be understood as activating the CIG itself. That is, before the audio service is started, the CIG parameters for the audio service have been configured, and all CISs within the CIG have been established, but the CIG is not activated. When the audio service is started, simply activating the CIG is sufficient for the transmission of audio data for the audio service. Furthermore, in this embodiment, "all CISs within the CIG are not activated" (or "the CIG is not activated") can mean that all CISs within the CIG are virtual links, and there is no actual data transmission or reception on any of the CISs within the CIG; their actual duty cycle is 0.
[0050] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0051] like Figure 1 As shown, the data channel establishment method provided in this application embodiment can be applied to a Bluetooth system composed of peripheral device 101 and electronic device 102.
[0052] The peripheral device 101 and the electronic device 102 can establish a Bluetooth connection. Based on the established Bluetooth connection, short-range data interaction can be achieved between the peripheral device 101 and the electronic device 102. For example, the peripheral device 101 and the electronic device 102 can transmit audio data based on the Bluetooth connection. For instance, based on the Bluetooth connection, the peripheral device 101 can act as an audio input / output device for the electronic device 102 to enable voice calls. Furthermore, based on the Bluetooth connection, the peripheral device 101 can act as an output device for the electronic device 102, such as playing music through a speaker.
[0053] In some embodiments, the peripheral device 101 may be a wireless headset, wireless speaker, wireless bracelet, wireless in-vehicle device, wireless smart glasses, etc., and includes a main body. For example, the electronic device 102 may act as a master device to transmit audio data to the peripheral device 101, which acts as a slave device, through a CIS in a CIG. The wireless headset may be a headphone, in-ear monitor, or other portable listening device. As another example, the electronic device 102 may act as a master device to transmit audio data to multiple peripheral devices 101, which act as slave devices, through multiple CISs in a CIG, with each CIS corresponding one-to-one with a different peripheral device 101.
[0054] In other embodiments, the peripheral device 101 can also be a true wireless stereo (TWS) headset, a Bluetooth speaker, smart glasses, or other similar device. It comprises two main bodies that do not require a wired connection and can cooperate and work together. For example, the electronic device 102 can act as a master device, transmitting audio data to the two main bodies of the peripheral device 101 (both main bodies of the peripheral device 101 are slave devices) through two CISs in a CIG. The two CISs correspond one-to-one with the two main bodies of the peripheral device 101.
[0055] As an example, Figure 1 The peripheral device 101 shown is exemplified by a TWS earphone. This TWS earphone comprises two main components (e.g., earphone bodies), referred to as the left earbud 101-1 and the right earbud 101-2. The left earbud 101-1 and the right earbud 101-2 do not require a wire connection and can cooperate and work together, such as to achieve stereo playback. The electronic device 102 can act as a master device, transmitting audio data to the left earbud 101-1 and the right earbud 101-2, which act as slave devices, respectively, through two CISs in a CIG. In this embodiment, the structure of the left earbud 101-1 and the right earbud 101-2 of the TWS earphone can be as follows... Figure 2 As shown, this will be described in detail in the following embodiments. Of course, for a peripheral device 101 containing two main bodies, electronic device 102 can also transmit audio data to one of the main bodies of the device through a CIS in a CIG, and the other main body of the device can obtain the audio data sent by electronic device 102 by listening or forwarding.
[0056] In some embodiments, the electronic device 102 may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, media player, television set, etc. This application embodiment does not impose any special limitations on the specific form of the device. In this application embodiment, the structure of the electronic device 102 may be as follows: Figure 4 As shown, this will be described in detail in the following embodiments.
[0057] It should be noted that the first electronic device in this application can be the aforementioned electronic device 102. The second electronic device in this application can be the aforementioned peripheral device 101, or a component of the peripheral device 101.
[0058] Please refer to Figure 2 This is a structural schematic diagram of an earbud (left or right earbud) for a TWS earphone provided in an embodiment of this application. Figure 2 As shown, the earbuds of TWS earphones may include: a processor 201, a memory 202, a sensor 203, a wireless communication module 204, at least one receiver 205, at least one microphone 206, and a power supply 207.
[0059] The memory 202 can be used to store application code, such as application code for establishing a Bluetooth connection with another earbud of the TWS earphone, and application code for enabling the earbud to pair with the aforementioned electronic device 102 via Bluetooth. The processor 201 can control the execution of the aforementioned application code to realize the function of the earbud of the TWS earphone in this embodiment of the application.
[0060] The memory 202 may also store a Bluetooth address for uniquely identifying the earbud, and the Bluetooth address of another earbud associated with the TWS earphone. Additionally, the memory 202 may store connection data of electronic devices that have previously been successfully paired with the earbud via Bluetooth. For example, this connection data could be the Bluetooth address of an electronic device that has successfully paired with the earbud. Based on this connection data, the earbud can automatically pair with the electronic device via Bluetooth without needing to configure the connection, such as performing authentication. The aforementioned Bluetooth address can be a Media Access Control (MAC) address.
[0061] Sensor 203 can be a distance sensor or a proximity light sensor. The earbud's processor 201 can determine whether the earbud is being worn by a user using this sensor 203. For example, the earbud's processor 201 can use a proximity light sensor to detect whether there is an object near the earbud, thereby determining whether the earbud is being worn by a user. When it is determined that the earbud is being worn, the earbud's processor 201 can turn on the receiver 205. In some embodiments, the earbud may also include a bone conduction sensor, integrated into a bone conduction headset. The bone conduction sensor can acquire vibration signals from the vibrating bone segments of the sound chamber, and the processor 201 can parse the voice signals to implement control functions corresponding to the voice signals. In other embodiments, the earbud may also include a touch sensor or a pressure sensor, used to detect the user's touch and press operations, respectively. In other embodiments, the earbud may also include a fingerprint sensor, used to detect the user's fingerprint, identify the user's identity, etc. In other embodiments, the earbud may also include an ambient light sensor, and the earbud's processor 201 can adaptively adjust parameters such as volume based on the brightness of the ambient light sensed by the ambient light sensor.
[0062] The wireless communication module 204 is used to support short-range data interaction between the left and right earbuds of the TWS earphones, and between the earbuds and various electronic devices, such as the electronic device 102 described above. In some embodiments, the wireless communication module 204 can be a Bluetooth transceiver. The earbuds of the TWS earphones can establish a Bluetooth connection with the electronic device 102 through the Bluetooth transceiver to achieve short-range data interaction between the two.
[0063] The receiver 205, also known as a "handpiece", can be used to convert audio electrical signals into sound signals and play them. For example, when the earbuds of TWS earphones are used as the audio output device of the aforementioned electronic device 102, the receiver 205 can convert the received audio electrical signals into sound signals and play them.
[0064] Microphone 206, also known as a "microphone" or "voice transducer," is used to convert sound signals into audio electrical signals. For example, when the earbuds of TWS earphones are used as the audio input device of the aforementioned electronic device 102, microphone 206 can collect the user's voice signal and convert it into an audio electrical signal when the user speaks (such as making a call or sending a voice message). The aforementioned audio electrical signal is the audio data in the embodiments of this application.
[0065] The power source 207 can be used to power the various components contained in the earbuds of the TWS earphones. In some embodiments, the power source 207 can be a battery, such as a rechargeable battery.
[0066] Typically, TWS earbuds come with an earphone case (e.g., Figure 3 As shown in 301). Figure 3 As shown, the earphone case 301 may include a cavity 301-1 and a lid 301-2. The cavity 301-1 can be used to store the left and right ear tips of the TWS earphones. (As shown in the diagram...) Figure 1 ,like Figure 3 As shown, the cavity 301-1 of the earphone case 301 can be used to store the left earbud 101-1 and the right earbud 101-2 of the TWS earphones. Additionally, the earphone case 301 can also charge the left and right earbuds of the TWS earphones. Accordingly, in some embodiments, the earbuds of the aforementioned TWS earphones may further include an input / output interface 208.
[0067] The input / output interface 208 can be used to provide any wired connection between the earbuds of the TWS earphones and the charging case (such as the cavity 301-1 of the charging case 301 described above). In some embodiments, the input / output interface 208 can be an electrical connector. For example, when the earbuds of the TWS earphones are placed in the cavity 301-1 of the charging case 301, the earbuds can be electrically connected to the charging case 301 (such as to the input / output interface of the charging case 301) through the electrical connector. After the electrical connection is established, the charging case 301 can charge the power supply 207 of the TWS earbuds. After the electrical connection is established, the earbuds of the TWS earphones can also communicate data with the charging case 301. For example, the processor 201 of the TWS earphones can receive a pairing command from the charging case 301 through the electrical connection. The pairing command is used to instruct the processor 201 of the TWS earphones to turn on the wireless communication module 204, thereby enabling the earbuds of the TWS earphones to pair with the electronic device 102 using a corresponding wireless communication protocol (such as Bluetooth).
[0068] Of course, the earbuds of the aforementioned TWS earbuds may also not include the input / output interface 208. In this case, the earbuds can achieve charging or data communication functions based on the Bluetooth connection established between the wireless communication module 204 and the earphone case 301.
[0069] In some embodiments, the earphone case (such as earphone case 301 described above) may also include components such as a processor and a memory. The memory can be used to store application code, which is executed by the processor of earphone case 301 to realize the functions of earphone case 301. For example, when a user opens the lid 301-2 of earphone case 301, the processor of earphone case 301 executes the application code stored in the memory, and can send pairing commands to the earbuds of TWS earphones in response to the user opening the lid 301-2.
[0070] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the earbuds of TWS earphones. They can have more than Figure 2 The number of components shown may be more or less, and two or more components may be combined, or different component configurations may be used. For example, the earbud may also include components such as an indicator light (which can indicate the earbud's battery level, etc.) and a dust filter (which can be used with the earpiece). Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application-specific integrated circuits.
[0071] It should be noted that the structure of the left and right earbuds of TWS earbuds can be identical. For example, both the left and right earbuds of TWS earbuds can include... Figure 2The components shown. Alternatively, the structures of the left and right earbuds of TWS earbuds can also be different. For example, one earbud of a TWS earbud (such as the right earbud) may include... Figure 2 The components shown are shown, and another earbud (such as the left earbud) may include... Figure 2 Other components besides microphone 206.
[0072] Please refer to Figure 4 This is a method provided in the embodiments of this application. Figure 1 The diagram shows the structure of electronic device 102 in the Bluetooth system. Figure 4 As shown, the electronic device 102 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a proximity sensor 180B, a fingerprint sensor 180C, a touch sensor 180D, a bone conduction sensor 180E, etc.
[0073] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 102. In other embodiments, the electronic device 102 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0074] Processor 110 may include one or more processing units, such as 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). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 may be used to execute the processes in S803, S804, and S805 of the following embodiments, which involve determining the audio services supported by the TWS earphones, determining the CIG parameters compatible with the audio services, and performing CIG configuration.
[0075] The controller can be the nerve center and command center of the electronic device 102. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0076] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0077] In some embodiments, the processor 110 may include one or more interfaces. 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, etc.
[0078] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device 102.
[0079] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0080] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0081] 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 and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0082] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the electronic device 102 to perform its shooting function. The processor 110 and the display screen 194 communicate via the DSI interface to enable the electronic device 102 to perform its display function.
[0083] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0084] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge electronic device 102, and can also be used for data transfer between electronic device 102 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0085] It is understood that the interface connection relationships between the modules illustrated in this embodiment are merely illustrative and do not constitute a structural limitation on the electronic device 102. In other embodiments, the electronic device 102 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0086] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 102. While charging the battery 142, the charging management module 140 can also supply power to the electronic device via the power management module 141.
[0087] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, external memory, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0088] The wireless communication function of electronic device 102 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0089] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 102 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0090] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 102. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0091] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0092] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 102, 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), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0093] In some embodiments, antenna 1 of electronic device 102 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 102 to communicate with networks and other devices via 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 technologies, etc. The 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 satellite-based augmentation systems (SBAS). For example, in this embodiment, the electronic device 102 can utilize the wireless communication module 160 to establish a Bluetooth connection with a peripheral device via wireless communication technology, such as Bluetooth (BT). Based on the established Bluetooth connection, the electronic device 102 can send voice data to and receive voice data from the peripheral device. For instance, the wireless communication module 160 can be used to perform the pairing, ACL link establishment, and CIS establishment processes in S801, S802, and S805 of the following embodiments. The wireless communication module 160 can also be used to perform the data interaction processes with the peripheral device based on the established connection in S803, S804, and S806 of the following embodiments, such as business scenario negotiation, parameter negotiation, and audio data transmission.
[0094] Electronic device 102 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU performs mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0095] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 102 may include one or N displays 194, where N is a positive integer greater than 1.
[0096] Electronic device 102 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0097] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.
[0098] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 102 may include one or N cameras 193, where N is a positive integer greater than 1.
[0099] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when electronic device 102 selects a frequency point, the DSP can perform Fourier transforms on the frequency energy.
[0100] Video codecs are used to compress or decompress digital video. Electronic device 102 may support one or more video codecs. Thus, electronic device 102 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0101] An NPU (Neural Processing Unit) is a neural network (NN) computing processor that, by borrowing from the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, rapidly processes input information and can continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices 102, such as image recognition, facial recognition, speech recognition, and text understanding.
[0102] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 102. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0103] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 102 by running the instructions stored in the internal memory 121. For example, in this embodiment, the processor 110 can establish a Bluetooth connection with a peripheral device via the wireless communication module 160 and perform short-range data interaction with the peripheral device by executing the instructions stored in the internal memory 121, thereby enabling audio services such as voice and music through the peripheral device. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 102 (such as audio data, phonebook, etc.). Furthermore, the internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. In this embodiment, wireless communication technology, such as Bluetooth, is used between the electronic device 102 and the peripheral device. After a Bluetooth connection is established, the electronic device 102 can store the Bluetooth address of the peripheral device in the internal memory 121. In some embodiments, when the peripheral device is a device containing two main components, such as TWS earbuds, the left and right earbuds of the TWS earbuds each have their own Bluetooth address. The electronic device 102 can associate and store the Bluetooth addresses of the left and right earbuds of the TWS earbuds in the internal memory 121.
[0104] Electronic device 102 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0105] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0106] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 102 can listen to music or make hands-free calls through the speaker 170A.
[0107] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 102 receives a telephone call or voice message, the receiver 170B can be brought close to the ear to receive the voice.
[0108] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call, sending a voice message, or needing to trigger certain functions of electronic device 102 through a voice assistant, the user can speak by bringing their mouth close to microphone 170C, inputting sound signals into microphone 170C. Electronic device 102 may have at least one microphone 170C. In some embodiments, electronic device 102 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 102 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify sound sources, and perform directional recording, etc.
[0109] In this embodiment, when the electronic device 102 establishes a Bluetooth connection with a peripheral device, such as a TWS earphone, the TWS earphone can be used as an audio input / output device for the electronic device 102. For example, the audio module 170 can receive audio electrical signals transmitted by the wireless communication module 160, enabling functions such as answering calls and playing music through the TWS earphone. For instance, during a user's phone call, the TWS earphone can collect the user's voice signal, convert it into an audio electrical signal, and send it to the wireless communication module 160 of the electronic device 102. The wireless communication module 160 transmits this audio electrical signal to the audio module 170. The audio module 170 can convert the received audio electrical signal into a digital audio signal, encode it, and transmit it to the mobile communication module 150. The mobile communication module 150 then transmits it to the other end of the call to enable communication. As another example, when a user plays music using the media player on the electronic device 102, the application processor can transmit the audio electrical signal corresponding to the music played by the media player to the audio module 170. The audio module 170 then transmits this audio electrical signal to the wireless communication module 160. The wireless communication module 160 can send audio electrical signals to the TWS earphones so that the TWS earphones can convert the audio electrical signals into sound signals and play them.
[0110] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0111] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 102 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 102 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 102 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example, when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.
[0112] The proximity sensor 180B may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The electronic device 102 emits infrared light outward through the LED. The electronic device 102 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 102. When insufficient reflected light is detected, the electronic device 102 can determine that there is no object near the electronic device 102. The electronic device 102 may use the proximity sensor 180B to detect when a user holds the electronic device 102 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180B can also be used in holster mode and pocket mode for automatic unlocking and screen locking.
[0113] The fingerprint sensor 180C is used to collect fingerprints. The electronic device 102 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0114] Touch sensor 180D, also known as a "touch panel," can be located on display screen 194. The touch sensor 180D and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180D detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180D may also be located on the surface of electronic device 102, in a different position than display screen 194.
[0115] The bone conduction sensor 180E can acquire vibration signals. In some embodiments, the bone conduction sensor 180E can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180E can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180E can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals based on the vibration signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180E to realize voice functionality. The application processor can parse heart rate information based on the blood pressure signals acquired by the bone conduction sensor 180E to realize heart rate detection functionality.
[0116] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 102 can receive button input and generate key signal inputs related to user settings and function control of electronic device 102.
[0117] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.
[0118] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0119] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 102. The electronic device 102 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 102 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 102 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 102 and cannot be separated from the electronic device 102.
[0120] In the transmission mechanism defined by the ISO channel in BLE, a CIG (Grouping Group) is defined. A CIG can include one or more CIS (Channel Interfaces). A master device can send audio data for an audio service to a slave device through one CIS within a CIG. A master device can send audio data for an audio service to multiple slave devices through multiple CISs within a CIG, with each CIS corresponding to a specific slave device.
[0121] The aforementioned CIS can be established through an asynchronous connection-oriented (ACL) link between the master and slave devices. The CIS can be a unidirectional or bidirectional link. For example, combined with... Figure 5 ,like Figure 5 As shown in (a), the master device (M) can establish an ACL link with the slave device (S), referred to as ACL link a. Through ACL link a, the master device can interact with the slave device via stream control to establish CIS_a. CIS_a is a unidirectional link from the master device to the slave device. The master device can send audio data to the slave device through CIS_a. Figure 5 As shown in (b), the master device (M) can establish an ACL link with the slave device (S), referred to as ACL link b. Through this ACL link b, the master device can interact with the slave device to exchange flow control and establish a CIS_b. This CIS_b is a bidirectional link from the master device to the slave device and from the slave device to the master device. The master device can send audio data to the slave device through this CIS_b, and the slave device can also send audio data to the master device through this CIS_b. Figure 5As shown in (c), the master device (M) can establish ACL links with two slave devices, S1 and S2, respectively, referred to as ACL link c1 and ACL link c2. Through ACL link c1, the master device can interact with S1 to exchange flow control, establishing CIS_c1. Through ACL link c2, the master device can interact with S2 to exchange flow control, establishing CIS_c2. CIS_c1 is a unidirectional link from the master device to the slave device, and CIS_c2 is a bidirectional link from the master device to the slave device and from the slave device to the master device. The master device can send audio data to S1 through CIS_c1. The master device can send audio data to S2 through CIS_c2, and S2 can also send audio data to the master device through CIS_c2.
[0122] In some embodiments, the audio service in this application can refer to a service or application that provides audio functions (such as audio playback, audio recording, etc.). For example, audio services can be categorized according to different applications, such as voice, music, games, video, voice assistants, navigation sounds, alarms, and notification sounds (such as application notification sounds, which could be email, SMS, etc.). As another example, audio services can be categorized according to the different services they provide, such as media audio, voice, and background sound. The specific categorization method is not limited in this embodiment.
[0123] Audio services involve audio-related data transmission, such as the audio data itself, content control for controlling audio playback, and flow control for creating the aforementioned CIS. Taking audio services as categorized into media audio, voice, and background sound as an example, audio data can correspond to media data, voice data, and background sound data depending on the specific audio service. For example, media data can include sounds from music, recordings, videos, games, and navigation. Voice data can include sounds during voice calls. Background sound data can include prompts. Content control can include media control, call control, and volume control. For example, media control can include commands such as pause, play, previous track, and next track. Call control can include commands such as answering calls, hanging up, rejecting calls, voice dialing, keeping the call open, and calling back. Volume control can include commands such as decreasing volume and increasing volume.
[0124] In order for the above audio services to be implemented via Bluetooth technology, devices using Bluetooth communication (such as the above electronic device 102 and peripheral device 101) need to follow a certain Bluetooth transmission framework. Figure 6This is a schematic diagram illustrating the composition of a Bluetooth transmission framework provided in an embodiment of this application. Figure 6 As shown, the Bluetooth transmission framework may include an application layer, a host, a host controller interface (HCI), and a controller.
[0125] The application layer can include applications such as telephone applications and multimedia applications (e.g., music players and video players).
[0126] The host device can include various Bluetooth application profiles and transport protocols. These include: Hands-free profile (HFP), Advanced Audio Distribution Profile (A2DP), Audio / Video Remote Control Profile (AVRCP), Generic Access Profile (GAP), Generic Attribute Profile (GATT), Audio / Video Distribution Transport Protocol (AVDTP), Audio / Video Control Transport Protocol (AVCTP), Service Discovery Protocol (SDP), Radio Frequency Communications Protocol (RFCOMM), and Logical Link Control and Adaptation Protocol (L2CAP). Interoperable devices require the same application profile to communicate. Different applications require different application profiles.
[0127] HCI is located between the host and the controller, and can provide a unified interface for upper-layer protocols to enter the link layer of the controller and a unified way to enter the baseband of the controller.
[0128] The controller may include a link layer (LL), a baseband, and a wireless radio frequency (Bluetooth radio frequency) unit. The link layer manages communication between devices, handling link establishment, authentication, and configuration. The baseband primarily performs the conversion between radio frequency signals and digital or voice signals, implementing the baseband protocol and other low-level connection procedures. The wireless radio frequency unit transmits and receives Bluetooth signals. In some embodiments, the host can be implemented in the device's access point (AP). The controller can be implemented in the device's Bluetooth chip. In other embodiments, the host and controller can be implemented in the same processor or controller within the device, in which case HCI is optional.
[0129] For example, in combination Figure 6 ,like Figure 7 As shown, taking the establishment of a CIS between a master device and a slave device as an example, the specific process of establishing a CIS for transmitting audio data is explained (see [link]). Figure 7 (See section 702). Before CIS is established, the master device must implement the CIG parameter configuration process (see section 702). Figure 7 (referring to 701 in the original text). Both the master and slave devices have a host and a link layer (LL), and the host and LL can communicate via HCI.
[0130] First, the master device can implement the CIG parameter configuration process. This CIG parameter, negotiated between the master and slave devices, is used to create the CIS. For example, such as... Figure 7 As shown in section 701, the host of the master device sets the CIG parameters. For example, the host of the master device can send the HCI command "LE Set CIG parameters" to the LL of the master device via HCI. After receiving the HCI command, the LL of the master device can return a response message to the host of the master device, such as "command complete". The host of the master device initiates the creation of the CIS. For example, the host of the master device can send the HCI command "LE createCIS" to the LL of the master device via HCI. After receiving the HCI command, the LL of the master device can return a response message to the host of the master device, such as "HCI command status".
[0131] Then, the master device can establish a CIS with the slave device. Before establishing the CIS, an ACL link has already been established between the master and slave devices. For example, such as... Figure 7As shown in section 702, the master device's LL sends a CIS establishment request message, such as the air interface request message LL_CIS_REQ, to the slave device's LL via the ACL link to request the creation of a CIS. The slave device's LL initiates a CIS creation request to the slave device's host. For example, the slave device's LL can send an HCI command "LE CIS request" to the slave device's host via HCI. The slave device's host can accept the CIS creation request from the slave device's LL. For example, the slave device's host can send an HCI command "LE accept CIS" to the slave device's LL via HCI. After receiving the HCI command, the slave device's LL can return a response message, such as "command status," to the slave device's host. The slave device's LL can also send a CIS establishment response message, such as the air interface response message LL_CIS_RSP, to the master device via the ACL link to indicate to the master device that the slave device agrees to the CIS establishment. The master device's LL can send a CIS establishment message, such as the air interface notification message LL_CIS_IND, to the slave device's LL via the ACL link to notify the slave device's LL that the CIS establishment is complete. Additionally, the master device's LL can send the HCI command "LE CIS establish" to the master device's host via HCI to notify the master device's host that the CIS establishment is complete. Similarly, the slave device's LL can send the HCI command "LE CIS establish" to the master device's host via HCI to notify the slave device's host that the CIS establishment is complete.
[0132] At this point, the CIS between the master and slave devices is complete. Once the CIS is activated, audio data can be transmitted between the master and slave devices based on this CIS.
[0133] In this embodiment, the electronic device can act as a master device, and the peripheral device or its main body can act as a slave device. Before the audio service is activated, the electronic device and the peripheral device can perform the aforementioned actions. Figure 7 The diagram illustrates the configuration process for CIG parameters and the establishment process for CIS to complete the configuration of the CIG parameters for this audio service and the establishment of all CIS within the CIG. However, the CIG itself is not activated; that is, all CIS within the CIG are not activated. When the audio service is started, the electronic device can activate the CIG (i.e., activate all CIS within the CIG) to transmit the audio data for the audio service.
[0134] For example, electronic devices and peripheral devices can establish ACL links. Based on the established ACL link, the electronic device can negotiate service scenarios with the peripheral device to determine the audio services supported by the peripheral device. For each supported audio service, before the audio service is started, the electronic device can negotiate parameters with the peripheral device to determine the CIG parameters that can adapt to the audio service. According to the negotiated CIG parameters, the electronic device and the peripheral device can configure the CIG parameters of the audio service and establish all CISs in the CIG according to the configured CIG parameters, but do not activate the CIG. Furthermore, the electronic device can maintain the correspondence between audio services and CIGs. For example, different CIGs have different CIG identifiers, and the electronic device can maintain the correspondence between audio services and CIG identifiers. When an audio service is started, the electronic device can determine the CIG corresponding to the audio service according to the maintained correspondence and activate the CIG, thus enabling the transmission of audio data for that audio service. When the audio service ends, the electronic device can also deactivate the CIG corresponding to the audio service, that is, stop data transmission and reception on all CISs in that CIG.
[0135] For ease of understanding, the following embodiments use a mobile phone as the electronic device and a TWS earphone as the peripheral device. The TWS earphone includes two main earpieces, a left earbud and a right earbud. The mobile phone transmits audio data to the left and right earbuds of the TWS earphone via two CISs in the same CIG. This will be used as an example to describe in detail the data channel establishment method provided in this application embodiment. Figure 8 As shown, the method may include:
[0136] The S801 TWS earbuds' left and right earbuds are paired with the phone via Bluetooth.
[0137] For example, when a user wants to use the TWS earbuds, they can open the lid of the TWS earbuds' charging case. The left and right earbuds of the TWS earbuds will automatically power on, or power on after the function button is pressed. If the left and right earbuds have not been paired via Bluetooth before, they can automatically pair via Bluetooth, or they can pair via Bluetooth after the pairing function button is pressed. If the left and right earbuds have already been paired via Bluetooth, the pairing process can be omitted. After Bluetooth pairing is complete, a Bluetooth connection can be established between the left and right earbuds of the TWS earbuds. Then, either the left or right earbud of the TWS earbuds (e.g., the right earbud) can send a pairing broadcast. If the phone has Bluetooth enabled, the phone can receive the pairing broadcast and notify the user that a relevant Bluetooth device (e.g., the TWS earbuds) has been scanned. When the TWS earbuds are selected as a connection device on the phone, the phone can pair with the right earbud of the TWS earbuds via Bluetooth. Of course, if the phone and the right earbud of the TWS earphone have already been paired via Bluetooth, the Bluetooth pairing process can be skipped. In other words, after receiving the pairing broadcast mentioned above, the phone can automatically pair with the right earbud via Bluetooth.
[0138] After the right earbud completes Bluetooth pairing with the phone, it can send the phone's Bluetooth address to the left earbud via the Bluetooth connection with the left earbud, and instruct the left earbud to broadcast a pairing message. In this way, the phone can receive the pairing message from the left earbud and pair with it via Bluetooth.
[0139] In some embodiments, the right earbud of the TWS earphone can also send the Bluetooth address of the left earbud to the mobile phone, indicating to the mobile phone that the left and right earbuds are two entities of the same peripheral device. When audio data needs to be transmitted to the left and right earbuds of the TWS earphones subsequently, the mobile phone can transmit the audio data to the right and left earbuds respectively through two CISs in the same CIG. This achieves playback-level synchronization of audio data between the right and left earbuds. In this embodiment, playback-level synchronization of audio data between the right and left earbuds can mean that the left and right earbuds of the TWS earphones can respectively receive audio data sent by the mobile phone through two CISs in the same CIG, and for the user, the left and right earbuds can play the received audio data at the same time.
[0140] It should be noted that the above-described process of pairing the left and right earbuds of the TWS earbuds with a mobile phone via Bluetooth is only one example. In some embodiments, the mobile phone may first pair with the left earbud of the TWS earbud via Bluetooth, and then the left earbud sends the mobile phone's Bluetooth address to the right earbud and notifies the right earbud to send a pairing broadcast, so that the right earbud can pair with the mobile phone via Bluetooth. In other embodiments, the left and right earbuds of the TWS earbuds can send pairing broadcasts separately after being powered on, so that the left and right earbuds can pair with the mobile phone via Bluetooth respectively. In addition, in the embodiments of this application, the triggering condition for the left or right earbud of the TWS earbuds to send a pairing broadcast can be that the lid of the TWS earbuds case is opened, or the left and right earbuds of the TWS earbuds complete Bluetooth pairing, or the left or right earbud of the TWS earbuds is removed from the earbuds case, or the pairing function button is pressed, or other triggering conditions. The pairing function button can be located on the TWS earphone charging case. For example, if the charging case has a pairing function button, pressing the button will cause either the left or right earphone to send a pairing announcement. Alternatively, the pairing function button can be located on the left or right earphone itself. For instance, if the left and / or right earphone has a pairing function button, pressing the button will cause the corresponding earphone to send a pairing announcement.
[0141] S802, the mobile phone establishes ACL links with the left and right earbuds of the TWS earphone respectively.
[0142] After a mobile phone pairs with the left and right earbuds of the TWS earbuds via Bluetooth, the phone can establish ACL links with each earbud separately. For example, the phone can establish ACL link 1 with the left earbud and ACL link 2 with the right earbud. Taking the establishment of ACL link 1 with the left earbud as an example: The phone sends a request to the left earbud to establish the ACL link. The left earbud responds after receiving the request. Once the phone receives the response from the left earbud, ACL link 1 is established.
[0143] In some embodiments, it can be assumed that after a user triggers Bluetooth pairing between the left and right earbuds of the TWS earbuds and the mobile phone (e.g., the user opens the lid of the TWS earbud case, or the user takes the left and right earbuds out of the case), they intend to use the TWS earbuds to perform a certain audio service function, such as playing music or making phone calls. Therefore, in this embodiment, after S802, the electronic device can configure the CIG parameters of the audio service with the peripheral device, and establish all CIS in the CIG. Specifically, this may include the following: S803-S805.
[0144] S803 and the mobile phone negotiate the service scenarios with the left and right earbuds of the TWS earphones respectively to determine the audio services supported by the TWS earphones.
[0145] In some embodiments, after the ACL links between the mobile phone and the left and right earbuds are established respectively, the mobile phone can negotiate service scenarios with the left and right earbuds based on the established ACL links. For example, taking the negotiation of service scenarios between the mobile phone and the left earbud of the TWS earphone as an example, combined with the example in S802 above, the mobile phone can send a query command to the left earbud through ACL link 1. This query command is used to obtain the audio services supported by the left earbud. After receiving the query command, the left earbud can return the audio services supported by the left earbud to the mobile phone through ACL link 1. Similarly, the mobile phone can also negotiate service scenarios with the right earbud through ACL link 2 so that the right earbud can return the audio services supported by the right earbud. Based on the audio services supported by the left and right earbuds respectively, the mobile phone can determine the audio services supported by the TWS earphone. For example, the mobile phone can use audio services supported by both left and right earbuds as the audio services supported by the TWS earphone.
[0146] Generally, the left and right earbuds of TWS earbuds support the same audio services. Therefore, in some embodiments, the mobile phone can negotiate the service scenario with only one of the left and right earbuds (such as the left earbud). That is, the above-described S803 can be replaced by the mobile phone negotiating the service scenario with either the left or right earbud of the TWS earbud (such as the left earbud) to determine the audio services supported by the TWS earbud. The audio services supported by the left earbud are the audio services supported by the TWS earbud.
[0147] After the mobile phone determines the audio services supported by the TWS earphones, the following S804-S805 can be executed for each supported audio service.
[0148] The S804 and the mobile phone negotiate parameters with the left and right earbuds of the TWS earphones respectively to determine the CIG parameters that can be adapted to audio services.
[0149] For example, for one audio service (referred to as audio service 1) supported by the TWS earphones as determined by the mobile phone in S803, the mobile phone can negotiate parameters with the left and right earbuds respectively based on the ACL link established with the left and right earbuds. For example, this parameter negotiation may include one or more of the following: negotiation of QoS parameters, negotiation of codec parameters, and negotiation of CIS parameters. Correspondingly, the CIG parameters that can adapt to audio service 1 may include one or more of the following: QoS parameters, codec parameters, and CIS parameters.
[0150] For example, regarding audio service 1 supported by TWS earbuds, taking the parameter negotiation between the mobile phone and the left earbud of the TWS earbuds as an example, combined with the example in S802 above, the specific process of parameter negotiation may include the following steps:
[0151] Step a: The mobile phone can send a parameter negotiation message to the left earpiece via ACL link 1. This parameter negotiation message can carry CIG parameters corresponding to the audio service 1. In some embodiments, the CIG parameters corresponding to the audio service 1 can be predefined.
[0152] Step b: The left earpiece receives a parameter negotiation message sent by the mobile phone via ACL link 1. If the left earpiece agrees with the CIG parameters carried in the parameter negotiation message, it can return a confirmation message to the mobile phone; if the left earpiece disagrees with the parameters carried in the parameter negotiation message or agrees with some of the parameters carried in the parameter negotiation message, it can return a continue negotiation message to the mobile phone to continue parameter negotiation with the mobile phone until the left earpiece returns a confirmation message to the mobile phone.
[0153] Step c: The mobile phone receives the confirmation message returned by the left earpiece via ACL link 1. The mobile phone obtains the parameter negotiation result with the left earpiece based on the confirmation message.
[0154] Similarly, for audio service 1 supported by TWS earbuds, the mobile phone can also negotiate parameters with the right earbud through ACL link 2 to obtain the parameter negotiation result with the right earbud. Based on the parameter negotiation result obtained with the left and right earbuds, the mobile phone can determine the CIG parameters that can be adapted to audio service 1.
[0155] Of course, the phone can also negotiate parameters with only one of the left and right earbuds of the TWS earphones (such as the left earbud). In other words, the S804 can be replaced by the phone negotiating parameters with either the left or right earbud of the TWS earphones (such as the left earbud) to determine the CIG parameters compatible with the audio service. The parameter negotiation result obtained with the left earbud is the CIG parameter compatible with that audio service.
[0156] S805 and the mobile phone configure the CIG parameters and establish CIS with the left and right earbuds of the TWS earphones respectively.
[0157] For example, after the mobile phone determines the CIG parameters that can be adapted to an audio service (such as audio service 1 mentioned above), it can configure the CIG parameters for audio service 1 and establish CIS with the left and right earbuds respectively. The mobile phone can establish CIS 1 with the left earbud and CIS 2 with the right earbud. CIS 1 and CIS 2 are contained in the same CIG, which corresponds to audio service 1. For example, the mobile phone can configure the CIG parameters according to the determined CIG parameters that can be adapted to audio service 1. The CIG parameter configuration process can be found in [reference needed]. Figure 7 The 701 shown will not be elaborated upon here. After configuring the CIG parameters, the phone can establish CIS 1 with the left earbud and CIS 2 with the right earbud. The procedures for establishing CIS between the phone and the left earbud, and between the phone and the right earbud, can be found in the respective documentation. Figure 7 The 702 shown here will not be described in detail here.
[0158] Thus, by executing S804-S805 for each audio service supported by the TWS earbuds, the mobile phone and the left and right earbuds of the TWS earbuds can complete the configuration of CIG parameters adapted to the corresponding audio service and the establishment of all CIS in the corresponding CIG before the corresponding audio service is activated. Generally, as in S803 above, the mobile phone determines that the audio services supported by the TWS earbuds include: audio service 1, audio service 2, ..., audio service n. n can be an integer greater than or equal to 1. After executing S804-S805 for each audio service supported by the TWS earbuds, the mobile phone and the left and right earbuds of the TWS earbuds can complete the configuration of CIG parameters adapted to audio service 1, audio service 2, ..., and audio service n respectively, and the establishment of all CIS in the corresponding CIG.
[0159] S806: When the mobile phone determines that a certain audio service is enabled, it activates the CIG corresponding to that audio service for the transmission of audio data for that audio service.
[0160] Furthermore, in this embodiment, since audio services 1, 2, ..., and n are not currently enabled, after configuring the CIG parameters compatible with audio services 1, 2, ..., and n, and establishing all CIS within the corresponding CIG, between the phone and the left and right earbuds of the TWS earphones, the CIGs corresponding to audio services 1, 2, ..., and n do not need to be activated. That is, all CIS within the CIGs corresponding to audio services 1, 2, ..., and n do not need to be activated. For example, taking audio service 1 as an example, after configuring the CIG parameters compatible with audio service 1, and establishing CIS 1 and CIS 2 within the corresponding CIG, between the phone and the left and right earbuds of the TWS earphones, the CIG corresponding to audio service 1 does not need to be activated; that is, CIS 1 and CIS 2 are not activated. Instead, when the phone determines that a certain audio service is enabled, the CIG corresponding to that audio service is activated, that is, all CIS included in that CIG are activated. For example, when the mobile phone determines that audio service 1 is enabled, it activates the CIG corresponding to audio service 1, that is, it activates CIS 1 and CIS 2 included in the CIG.
[0161] When an audio service is enabled, audio data is transmitted using the CIG corresponding to that audio service in order to adapt to it. In some embodiments, the mobile phone can maintain a mapping between different audio services and CIGs. For example, different CIGs have different CIG identifiers. Continuing with the example of audio services supported by TWS earphones including: audio service 1, audio service 2, ..., audio service n (e.g., voice, music, games, video, voice assistant, navigation sounds, alarms, prompts, etc.), the electronic device can maintain a mapping between different audio services and CIG identifiers. As shown in Table 1, audio service 1 corresponds to the CIG identified as CIG_1, audio service 2 corresponds to the CIG identified as CIG_2, ..., audio service n corresponds to the CIG identified as CIG_n.
[0162] Table 1
[0163] audio business CIG logo Audio service 1 CIG_1 Audio Service 2 CIG_2 … Audio services n CIG_n
[0164] In this way, when the mobile phone determines that a certain audio service is enabled, it can determine the CIG identifier corresponding to the audio service according to Table 1, and then activate the corresponding CIG according to the CIG identifier for the transmission of audio data of the audio service.
[0165] It should be noted that the above example illustrates the process of executing S804 and S805 for each audio service to complete the CIG parameter configuration and the establishment of all CIS in the corresponding CIG. In other words, one audio service can be considered to correspond to one CIG, as shown in Table 1. Of course, there may be scenarios where different audio services correspond to the same CIG, meaning multiple (two or more) audio services have the same CIG parameters. For example, music, games, videos, voice assistants, and navigation sounds can be considered multimedia audio services, and their corresponding CIG parameters may be the same. Alarm and notification sounds can be considered background sounds, and their CIG parameters may also be the same. Therefore, in some embodiments, after the mobile phone determines the audio services supported by the TWS earphones, it can first obtain the CIG parameters corresponding to all audio services. Then, the mobile phone executes the above-mentioned S805 for these audio services with the same CIG parameters to complete the CIG parameter configuration and the establishment of all CIS in the corresponding CIG. That is, multiple audio services can be considered to correspond to one CIG. Similarly, mobile phones can maintain a mapping between different audio services and CIG identifiers. Based on this mapping, when an audio service is activated, the mobile phone can activate the CIG corresponding to that audio service to transmit audio data.
[0166] In some embodiments, deactivating a CIG can be implemented by having the phone and TWS earbuds each set a state machine for each CIG. After configuring the CIG parameters and establishing all CISs within the corresponding CIG between the phone and the left and right earbuds of the TWS earbuds, the phone and TWS earbuds can each set the state of the CIG to a first state. This first state indicates that all CISs within the CIG have been established, but none of the CISs in the CIG are activated; it is a virtual link and cannot be used for actual data transmission and reception. Activating a CIG can be implemented by having the phone and TWS earbuds each change the state of the CIG from the first state to a second state when the corresponding audio service is enabled. This second state indicates that all CISs within the CIG are activated and can be used for actual data transmission and reception. When the CIG's state machine is in the second state, the phone can transmit audio data to the left and right earbuds of the TWS earbuds through all the CISs in the CIG.
[0167] For example, such as Figure 9As shown, a state machine can be set for the CIG, which can include four states: idle, configured, open, and streaming. The phone and TWS earphones can maintain state synchronization through this state machine. The open state can be the first state mentioned above, and the streaming state can be the second state mentioned above. For example, after the phone and TWS earphones complete Bluetooth pairing and ACL link establishment, the CIG's state machine is in the idle state. After the phone and TWS earphones complete service scenario negotiation and parameter negotiation, the CIG's state machine switches from the idle state to the configured state. After the phone's CIG parameters are configured and the CIS is established, the CIG's state machine switches from the configured state to the open state. In the open state, all CIS in the CIG have been established, but all CIS in the CIG are virtual links and cannot be used for actual data transmission and reception. In this embodiment, before the corresponding audio service is started, the CIG corresponding to the audio service is in the open state. After the audio service is started, the CIG's state machine switches from the open state to the streaming state. In Streaming mode, the mobile phone can transmit audio data of the audio service to the left and right earbuds of the TWS earphone through all CIS in the CIG.
[0168] In some embodiments, when the audio service ends, the CIG corresponding to the audio service can also be deactivated, that is, data transmission and reception on all CISs in that CIG can be stopped. A specific implementation of deactivating the CIG can be: when the corresponding audio service ends, the mobile phone and TWS earphones can change the state of the CIG from the second state described above to the first state described above, so as to stop data transmission and reception on all CISs in that CIG. For example, continuing with... Figure 9 For example, when the audio service ends, the mobile phone and TWS earphones can switch the CIG state machine from the Streaming state to the open state.
[0169] The following example illustrates the specific process of S806. Taking the audio services supported by TWS earphones as an example, we have two services: Audio Service 1 (music service) and Audio Service 2 (voice service).
[0170] Prior to the activation of these audio services, the CIG parameters for music and voice services were configured between the mobile phone and the left and right earbuds of the TWS earbuds, and all CIS in the corresponding CIGs were established. The correspondence between music and voice services and CIG identifiers is shown in Table 2.
[0171] Table 2
[0172] audio business CIG logo Music business CIG_1 Voice services CIG_2
[0173] As shown in Table 2, music services correspond to CIG_1 (referred to as CIG 1), and voice services correspond to CIG_2 (referred to as CIG 2). Neither CIG 1 nor CIG 2 is activated, meaning there is no actual data transmission or reception on the CIS within CIG 1 and CIG 2. Furthermore, the time-domain resources occupied by CIG 1 and CIG 2 may or may not overlap. For example, ... Figure 10 The diagram shows the time-domain distribution of CIG1 and CIG2 between the left and right earbuds of a mobile phone and a TWS earphone. Furthermore, both CIG1 and CIG2 include two CIS. For example, CIG1 includes CIS 1_1 and CIS 1_2, and CIG2 includes CIS 2_1 and CIS 2_2.
[0174] Each CIS within a CIG can maintain the CIG anchor point and ISO interval. A CIG can include multiple CIG events (CIG_event). The CIG anchor point is the start time of the corresponding CIG event. The ISO interval is the time between two consecutive CIG anchor points. Each CIG event belongs to an ISO interval in time. For example, see... Figure 10 As shown, CIG 1 can include multiple CIG events, such as CIG 1 event (X), CIG 1 event (X+1), and CIG 1 event (X+2). The CIG 1(X) anchor point is the start time of CIG 1 event (X). The CIG 1(X+1) anchor point is the start time of CIG 1 event (X+1). The CIG 1(X+2) anchor point is the start time of CIG 1 event (X+2). The CIG 1(X) anchor point and the CIG 1(X+1) anchor point are two consecutive CIG anchor points. The CIG 1 ISO interval is the time between the CIG 1(X) anchor point and the CIG 1(X+1) anchor point. For example, in CIG 1, CIS 1_1 and CIS 1_2 maintain the CIG anchor points of CIG 1, such as CIG 1(X) anchor point, CIG 1(X+1) anchor point, CIG 1(X+2) anchor point, etc., and maintain the ISO interval of CIG 1, such as CIG 1 ISO interval. In CIG 2, CIS 2_1 and CIS 2_2 maintain the CIG anchor points of CIG 2, such as CIG 2(X) anchor point, CIG 2(X+1) anchor point, etc., and maintain the ISO interval of CIG 2, such as CIG 2 ISO interval.
[0175] When the phone confirms that the music service is enabled, it activates the CIG 1 corresponding to that music service. For example, when a user opens a music player to play music, the phone can confirm that the music service is enabled. When the phone confirms that the music service is enabled, it can determine the CIG corresponding to the music service according to Table 2, that is, determine the CIG with the CIG identifier CIG_1. In other words, CIG 1 is the CIG corresponding to the music service.
[0176] The mobile phone can switch the state machine of CIG 1 from the open state to the streaming state. Additionally, the mobile phone can send activation commands to the left and right earbuds of the TWS earbuds respectively. These activation commands instruct the left and right earbuds to activate the CIS in CIG 1. For example, the mobile phone can send this activation command to the left and right earbuds respectively via the ACL link between them. The activation command can carry the identifier of CIG 1. After receiving the activation command, the left and right earbuds of the TWS earbuds can switch the state machine of CIG 1 from the open state to the streaming state. In this way, the mobile phone 1 and the left and right earbuds of the TWS earbuds can transmit audio data for the music service through CIS 1_1 and CIS 1_2 in CIG 1. For example, as... Figure 11 As shown, based on the maintained CIG 1 anchor point and ISO interval, the left and right earbuds of the mobile phone 1 can transmit audio data for the music service through CIS 1_1 and CIS 1_2 in CIG1. Meanwhile, CIG 2, corresponding to the voice service, remains inactive. Furthermore, each CIS in the CIG can maintain parameters such as the maximum data size for M-to-S transmission, the maximum data size for S-to-M transmission, the longest time interval for M-to-S data packets at the link layer, and the longest time interval for S-to-M data packets at the link layer, used for audio data transmission and reception.
[0177] In some embodiments, when a user wants to end music playback, they can trigger the end of music playback on the mobile phone or TWS earbuds. In response to this trigger, the mobile phone can determine that the music service has ended. Upon determining that the music service has ended, the mobile phone can switch the state machine of CIG 1 from the Streaming state to the open state. Additionally, the mobile phone can send deactivation commands to the left and right earbuds of the TWS earbuds respectively. These deactivation commands instruct the left and right earbuds of the TWS earbuds to deactivate the CIS in CIG 1. For example, the mobile phone can send the deactivation command to the left and right earbuds respectively via the ACL link between the mobile phone and the left and right earbuds. After receiving the deactivation command, the left and right earbuds of the TWS earbuds can switch the state machine of CIG 1 from the Streaming state to the open state. Thus, the deactivation of CIG 1 is complete. After the CIS in CIG 1 is deactivated, the CIS in CIG 1 can no longer be used for audio data transmission; that is, the mobile phone and the left and right earbuds of the TWS earbuds stop transmitting and receiving audio data on CIS 1_1 and CIS 1_2 in CIG 1.
[0178] In some other embodiments, if a user receives an incoming call while playing music through the left and right earbuds of the TWS earbuds, the phone can determine that the voice service is enabled in response to the user's action of answering the call. Upon determining that the voice service is enabled, the phone can activate CIG 1 corresponding to the music service. The phone can also determine the CIG corresponding to the voice service according to Table 2, that is, determine the CIG with the CIG identifier CIG_2, meaning CIG 2 is the CIG corresponding to the voice service. The phone can switch the state machine of the aforementioned CIG 2 from the open state to the streaming state. The phone can also send activation commands to the left and right earbuds of the TWS earbuds respectively. These activation commands can carry the identifier of CIG 2. For example, the phone can send this activation command to the left and right earbuds respectively through the ACL link between the phone and the left and right earbuds. After receiving the activation command, the left and right earbuds of the TWS earbuds can switch the state machine of CIG 2 from the open state to the streaming state. In this way, audio data transmission for the voice service can be achieved between the mobile phone 1 and the left and right earbuds of the TWS earphone through CIS 2_1 and CIS 2_2 in CIG2. For example, as Figure 11 As shown, based on the maintained CIG 2's CIG anchor point and ISO interval, audio data transmission for the voice service can be achieved between the mobile phone 1 and the left and right earbuds of the TWS earphone through CIG 2's CIG 2_1 and CIG 2_2. After the call ends, the mobile phone and the left and right earbuds of the TWS earphone can deactivate CIG 2 and activate CIG 1, thus continuing audio data transmission between the mobile phone and the left and right earbuds of the TWS earphone through the CIS included in CIG 1.
[0179] In other embodiments, when a certain audio service is being implemented through the left and right earbuds of the TWS earphones, if another audio service is active, the phone and the left and right earbuds of the TWS earphones may not deactivate the currently active CIG. Instead, the audio data of the other audio service can be mixed (or superimposed) with the audio data of the currently playing audio service and then transmitted through the CIG in the currently active CIG. For example, the TWS earphones also support audio service 3, such as a notification sound service. The notification sound service corresponds to a CIG identified as CIG_3 (e.g., referred to as CIG3). Currently, music is being played through the left and right earbuds of the TWS earphones, and the phone receives an SMS message. At this time, the phone can determine that the notification sound service is active. The phone may not activate the CIG 3 corresponding to the notification sound service, but instead superimpose the SMS notification sound with the currently playing music and transmit it to the left and right earbuds of the TWS earphones through CIS 1_1 and CIS 1_2 in CIG1. When the phone is currently connected to the TWS earphones but not performing any audio services, when the phone receives an SMS message, it can activate the CIG 3 corresponding to the notification sound service to transmit the corresponding audio data.
[0180] As can be seen in this embodiment, the CIG parameters corresponding to the audio service are configured and all CISs in the CIG are established before the audio service is started. However, all CISs in the CIG are not activated. When the audio service is started, all CISs in the CIG are activated only through the corresponding number of air interface signaling (the number of signaling entries is the same as the number of CISs in the CIG), and the audio data of the audio service can be transmitted through all CISs in the CIG. In this way, the establishment latency of all CISs in the CIG is effectively reduced, thereby reducing the transmission latency of audio data.
[0181] In other embodiments of this application, the mobile phone determines the audio services supported by the TWS earphones. For each supported audio service, before the audio service is activated, the mobile phone can negotiate parameters with the TWS earphones to determine the CIG parameters corresponding to the audio service. Then, it only configures the corresponding CIG parameters without establishing the CIS within the CIG. See also... Figure 7As shown, the absence of CIS establishment within the CIG refers to the following: For each CIS in the CIG, the mobile phone sends an air interface request message LL_CIS_REQ to the earbud of the TWS earphone to request CIS creation. Upon receiving this message, the earbud can accept the CIS creation request and then send an air interface response message LL_CIS_RSP to the mobile phone. After receiving this response message, the mobile phone temporarily refrains from replying with an air interface notification message LL_CIS_IND to the earbud. Instead, when the audio service is activated, the mobile phone sends the LL_CIS_IND message to the earbud to notify it that the CIS establishment is complete. Afterward, audio data can be transmitted between the mobile phone and the earbud through the CIS in the CIG. This reduces the establishment latency of all CIS in the CIG, thereby reducing the audio data transmission latency.
[0182] Other embodiments of this application provide a Bluetooth device that can be applied to the aforementioned electronic devices, such as mobile phones. Figure 12 As shown, the Bluetooth device may include: a link establishment module 1201, an application identification module 1202, a data path establishment module 1203, and a data path activation module 1204.
[0183] The link establishment module 1201 can be used to establish an ACL link with peripheral devices, such as the left and right earbuds of a TWS earphone. For example, it can be used to execute S802 in the above embodiment.
[0184] The application identification module 1202 can be used to obtain the audio services supported by the left and right earbuds of the TWS earphone. For example, it can be used to execute S803 in the above embodiment. The application identification module 1202 can also be used to negotiate parameters with the left and right earbuds of the TWS earphone to obtain CIG parameters that can adapt to the audio services. For example, it can be used to execute S804 in the above embodiment. The application identification module 1202 can also be used to establish a correspondence between the audio services supported by the left and right earbuds of the TWS earphone and the CIG parameters, such as the correspondence shown in Table 1 or Table 2 in the above embodiment.
[0185] The data path establishment module 1203 can be used to configure CIG parameters and establish CIS within the CIG with the left and right earbuds of the TWS earphone according to the configured CIG parameters. For example, it can be used to execute S805 in the above embodiment. In this case, none of the CIS within the CIG are activated.
[0186] The data path activation module 1204 can be used to activate the CIS in the CIG corresponding to the audio service when the audio service is started. For example, it can be used to execute S806 in the above embodiment. The data path activation module 1204 can also be used to send activation commands to the left and right earbuds of the TWS earphone so that the left and right earbuds of the TWS earphone activate the CIS in the corresponding CIG.
[0187] It should be noted that, in this embodiment, the specific descriptions of the link establishment module 1201, application identification module 1202, data path establishment module 1203, and data path activation module 1204 can be found in the detailed descriptions of the corresponding contents in the above embodiments, and will not be repeated here. Furthermore, as an example, the link establishment module 1201 can be as described above... Figure 4 The wireless communication module 160 in the illustrated embodiment. The application identification module 1202, data path establishment module 1203, and data path activation module 1204 may each integrate the above-mentioned... Figure 4 The wireless communication module 160 and the processor 110 in the illustrated embodiment are modules with corresponding functions.
[0188] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0190] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0191] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0192] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0193] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for establishing a data channel, characterized in that, Applied to a first electronic device, the method includes: The first electronic device acquires the audio services supported by the second electronic device; The first electronic device determines the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service; The first electronic device is configured with CIG parameters, and establishes a connection-based isochronous audio stream (CIS) in the CIG with the second electronic device according to the configured CIG parameters. The CIS in the CIG is not activated. When the first electronic device starts the audio service, the first electronic device activates the CIS in the CIG; The first electronic device sends an activation command to the second electronic device, the activation command being used to instruct the second electronic device to activate the CIS in the CIG; The first electronic device transmits audio data to the second electronic device through the CIS in the CIG; The first electronic device is equipped with the state machine of the CIG; Before the audio service is started, the state machine of the CIG is in the first state, which indicates that the CIS in the CIG is not activated and cannot be used for audio data transmission.
2. The method according to claim 1, characterized in that, The method further includes: When the first electronic device terminates the audio service, the first electronic device deactivates the CIS in the CIG; The first electronic device sends a deactivation command to the second electronic device, the deactivation command being used to instruct the second electronic device to deactivate the CIS in the CIG; The first electronic device stops transmitting audio data to the second electronic device through the CIS in the CIG.
3. The method according to claim 1 or 2, characterized in that, Before the first electronic device acquires the audio services supported by the second electronic device, the process also includes: The first electronic device performs a pairing operation with the second electronic device; The first electronic device performs the operation of establishing an asynchronous connection-oriented ACL link with the second electronic device; The first electronic device obtains the audio services supported by the second electronic device, including: the first electronic device performs an operation to negotiate a service scenario with the second electronic device through the ACL link, and the first electronic device determines the audio services supported by the second electronic device based on the negotiation result of the service scenario; The first electronic device determines the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service, including: the first electronic device performs an operation to negotiate parameters with the second electronic device through the ACL link, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service based on the parameter negotiation result.
4. The method according to claim 1 or 2, characterized in that, The first electronic device activates the CIS in the CIG by: the first electronic device switching the state machine of the CIG from the first state to the second state, the second state being used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
5. The method according to claim 4, characterized in that, The first electronic device deactivates the CIS in the CIG, including: The first electronic device switches the state machine of the CIG from the second state to the first state.
6. The method according to claim 4, characterized in that, The first state is the open state, and the second state is the audio streaming state.
7. The method according to claim 1, 2, 5, or 6, characterized in that, The method further includes: the first electronic device establishing a correspondence between the audio service and the CIG; When the first electronic device starts the audio service, the first electronic device activates the CIS in the CIG, including: when the first electronic device starts the audio service, the first electronic device activates the CIS in the CIG corresponding to the audio service according to the correspondence.
8. The method according to claim 1, 2, 5, or 6, characterized in that, The CIG parameters include at least one of the following: Quality of Service (QoS) parameters, codec parameters, and CIS parameters, wherein the CIS parameters are transmission parameters used for data transmission and reception between the first electronic device and the second electronic device.
9. A method for establishing a data channel, characterized in that, Applied to a second electronic device, the method includes: The second electronic device establishes a connection-based isochronous audio stream CIS in a connection-based isochronous stream group (CIG) with the first electronic device. The CIG corresponds to the audio services supported by the second electronic device, and the CIS in the CIG is not activated. The second electronic device receives the activation command sent by the first electronic device; In response to the activation command, the second electronic device activates the CIS in the CIG; The second electronic device transmits audio data to the first electronic device via the CIS in the CIG; The second electronic device is equipped with the state machine of the CIG; Before the audio service is started, the state machine of the CIG is in the first state, which indicates that the CIS in the CIG is not activated and cannot be used for audio data transmission.
10. The method according to claim 9, characterized in that, The method further includes: The second electronic device receives the deactivation command sent by the first electronic device; In response to the deactivation instruction, the second electronic device deactivates the CIS in the CIG; The second electronic device stops transmitting audio data with the first electronic device through the CIS in the CIG.
11. The method according to claim 9 or 10, characterized in that, Before the second electronic device establishes the connection-based isochronous audio stream CIS in the connection-based isochronous stream group CIG, the following is also included: The second electronic device performs a pairing operation with the first electronic device; The second electronic device performs the operation of establishing an asynchronous connection-oriented ACL link with the first electronic device; The second electronic device performs a service scenario negotiation operation with the first electronic device through the ACL link. The service scenario negotiation operation is used by the first electronic device to determine the audio services supported by the second electronic device. The second electronic device performs an operation to negotiate parameters with the first electronic device through the ACL link. The operation of negotiating parameters is used by the first electronic device to determine the CIG parameters of the CIG corresponding to the audio service. The CIG parameters are used to establish the CIS in the CIG.
12. The method according to claim 9 or 10, characterized in that, The second electronic device activates the CIS in the CIG, including: the second electronic device switches the state machine of the CIG from the first state to the second state, the second state being used to indicate that the CIS in the CIG is activated and can be used for audio data transmission.
13. The method according to claim 12, characterized in that, The second electronic device deactivates the CIS in the CIG, including: The second electronic device switches the state machine of the CIG from the second state to the first state.
14. The method according to claim 12, characterized in that, The first state is the open state, and the second state is the audio streaming state.
15. The method according to claim 11, characterized in that, The CIG parameters include at least one of the following: Quality of Service (QoS) parameters, codec parameters, and CIS parameters, wherein the CIS parameters are transmission parameters used for data transmission and reception between the first electronic device and the second electronic device.
16. A method for establishing a data channel, characterized in that, Applied to a first electronic device, the method includes: The first electronic device acquires the audio services supported by the second electronic device; The first electronic device determines the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service, and the CIG parameters are used to establish the connection-based isochronous audio stream (CIS) in the CIG. The first electronic device configures CIG parameters and sends a CIS establishment request message to the second electronic device according to the configured CIG parameters; The first electronic device receives the CIS establishment response message sent by the second electronic device; The first electronic device sends a CIS establishment message to the second electronic device, the CIS establishment message being used to establish a CIS in the CIG with the second electronic device; When the first electronic device activates the audio service, it transmits audio data to the second electronic device through the CIS in the CIG.
17. The method according to claim 16, characterized in that, Before the first electronic device acquires the audio services supported by the second electronic device, the process also includes: The first electronic device performs a pairing operation with the second electronic device; The first electronic device performs the operation of establishing an asynchronous connection-oriented ACL link with the second electronic device; The first electronic device obtains the audio services supported by the second electronic device, including: the first electronic device performs an operation to negotiate a service scenario with the second electronic device through the ACL link, and the first electronic device determines the audio services supported by the second electronic device based on the negotiation result of the service scenario; The first electronic device determines the CIG parameters of the connection-based isochronous stream group (CIG) corresponding to the audio service, including: the first electronic device performs an operation to negotiate parameters with the second electronic device through the ACL link, and the first electronic device determines the CIG parameters of the CIG corresponding to the audio service based on the parameter negotiation result.
18. An electronic device, characterized in that, include: One or more processors, memory, wireless communication modules, and mobile communication modules; The memory, the wireless communication module, and the mobile communication module are coupled to the one or more processors. The memory is used to store computer program code, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the data channel establishment method as described in any one of claims 1-8 and 16-17.
19. An electronic device, characterized in that, include: One or more processors, memory, wireless communication modules, receivers, and microphones; The memory, the wireless communication module, the receiver, and the microphone are coupled to the processor. The memory is used to store computer program code, which includes computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the data channel establishment method as described in any one of claims 9-15.
20. A Bluetooth system, characterized in that, The Bluetooth system includes: The electronic device as claimed in claim 18, and the electronic device as claimed in claim 19.
21. A computer storage medium, characterized in that, It includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method for establishing a data channel as described in any one of claims 1-8 and 16-17.
22. A computer storage medium, characterized in that, It includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method for establishing a data channel as described in any one of claims 9-15.
Citation Information
Patent Citations
A method and apparatus for establishing a data channel
CN113039822B