CN113329381B - Method for establishing Bluetooth connection and electronic equipment - Google Patents

Method for establishing Bluetooth connection and electronic equipment Download PDF

Info

Publication number
CN113329381B
CN113329381B CN202110470339.8A CN202110470339A CN113329381B CN 113329381 B CN113329381 B CN 113329381B CN 202110470339 A CN202110470339 A CN 202110470339A CN 113329381 B CN113329381 B CN 113329381B
Authority
CN
China
Prior art keywords
bluetooth
link
transmission interval
command
connection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110470339.8A
Other languages
Chinese (zh)
Other versions
CN113329381A (en
Inventor
牛永民
刘秀华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202110470339.8A priority Critical patent/CN113329381B/en
Publication of CN113329381A publication Critical patent/CN113329381A/en
Application granted granted Critical
Publication of CN113329381B publication Critical patent/CN113329381B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/18Management of setup rejection or failure

Landscapes

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

Abstract

The application provides a method for establishing Bluetooth connection and electronic equipment, relates to the technical field of Bluetooth, and can improve the success rate of establishing Bluetooth connection between the electronic equipment and a plurality of Bluetooth peripherals simultaneously and meet various use requirements of users on the electronic equipment. The electronic equipment responds to a first trigger event and sends a first connection request to the first Bluetooth peripheral; the first connection request is used for requesting to establish a call link of a first transmission interval with the first Bluetooth peripheral; the electronic equipment responds to the operation of a user for requesting to establish Bluetooth connection with the second Bluetooth peripheral equipment and sends a second connection request to the second Bluetooth peripheral equipment; the second connection request is used for requesting to establish an asynchronous connectionless ACL link with the second Bluetooth peripheral; the electronic equipment automatically sends a third connection request to the first Bluetooth peripheral equipment in response to the failure of establishing the ACL link; the third connection request is for requesting a call link for establishing a second transmission interval with the first bluetooth peripheral. The second transmission interval is longer than the first transmission interval.

Description

Method for establishing Bluetooth connection and electronic equipment
Technical Field
The present application relates to the field of bluetooth technologies, and in particular, to a method for establishing a bluetooth connection and an electronic device.
Background
Bluetooth is an open global specification for wireless data and voice communications, and is based on low-cost short-range wireless connectivity, a special short-range wireless technology connection that can establish a communication environment for communication devices. Due to the advantages of wide equipment application range and high safety and interference resistance, the Bluetooth technology is applied to numerous short-distance communication scenes. For example, the method is applied to scenes such as answering a call by an earphone, controlling a computer by a mouse, transmitting files in a short distance and the like.
Moreover, the existing electronic equipment generally supports simultaneous establishment of bluetooth connection with a plurality of bluetooth peripherals, and further can simultaneously meet various use requirements of users on the electronic equipment. For example, the mobile phone can establish a bluetooth connection with a bluetooth headset and a vehicle-mounted terminal at the same time. Therefore, the mobile phone can be controlled on the central control screen of the vehicle-mounted terminal while the Bluetooth headset is used for answering the incoming call of the mobile phone.
However, the inventors found in the course of carrying out the embodiments of the present application that: in the prior art, the electronic device is supported to establish bluetooth connection with a plurality of bluetooth peripherals at the same time. However, in practice, in the process of establishing the bluetooth connection between the electronic device and the bluetooth peripheral a and performing the voice call by using the bluetooth peripheral a, if the electronic device initiates a connection request with the bluetooth peripheral B, the problem that the electronic device and the bluetooth peripheral B cannot establish the bluetooth connection is likely to occur. The electronic equipment cannot establish Bluetooth connection with the Bluetooth peripheral B, and cannot perform data transmission with the Bluetooth peripheral B, so that various use requirements of users on the electronic equipment cannot be met simultaneously.
Therefore, a scheme for improving the success rate of the electronic device simultaneously establishing the bluetooth connection with the multiple bluetooth peripherals is needed.
Disclosure of Invention
The application provides a method for establishing Bluetooth connection and an electronic device, which can improve the success rate of establishing Bluetooth connection between the electronic device and a plurality of Bluetooth peripherals at the same time and meet various use requirements of users on the electronic device at the same time.
In a first aspect, an embodiment of the present application provides a method for establishing a bluetooth connection, where the method may be applied to an electronic device. The electronic device supports simultaneous establishment of bluetooth connections with a first bluetooth peripheral and a second bluetooth peripheral. The electronic equipment and the first Bluetooth peripheral both support a telephone hands-free protocol HFP, so that the transmission of audio data of a voice call can be completed between the electronic equipment and the first Bluetooth peripheral by establishing a call link. The electronic equipment responds to a first trigger event and sends a first connection request to the first Bluetooth peripheral; the first connection request is used for requesting a call link establishing a first transmission interval with a first Bluetooth peripheral device, the first transmission interval comprises m time slots, m is a positive integer, and the call link comprises a synchronous connection-oriented SCO link or an enhanced synchronous connection-oriented eSCO link. After the call link of the first transmission interval is successfully established, the electronic equipment performs call voice transmission with the first Bluetooth peripheral equipment according to the first transmission interval. The electronic equipment responds to the operation of a user for requesting to establish Bluetooth connection with a second Bluetooth peripheral, and sends a second connection request to the second Bluetooth peripheral; the second connection request is for requesting establishment of an ACL link with a second bluetooth peripheral device. The electronic equipment automatically sends a third connection request to the first Bluetooth peripheral equipment in response to the failure of establishing the ACL link; the third connection request is used for requesting to establish a call link of a second transmission interval with the first Bluetooth peripheral, the second transmission interval comprises n time slots, n is greater than m, and n is a positive integer. And after the call link of the second transmission interval is successfully established, the electronic equipment performs call voice transmission with the second Bluetooth peripheral equipment according to the second transmission interval.
In summary, with the method of the embodiment of the present application, after the electronic device establishes the call link with the first bluetooth peripheral device for the first transmission interval, in the process of performing the call voice transmission with the first bluetooth peripheral device by the electronic device according to the first transmission interval, if the ACL link established between the electronic device and the second bluetooth peripheral device fails, the electronic device is triggered to renegotiate with the first bluetooth peripheral device to establish the call link with the longer transmission interval. In this way, the electronic device may actively trigger a renegotiation for a longer length transmission interval.
It should be understood that, after renegotiating the second transmission interval with a longer length, in the process of performing the call voice transmission with the first bluetooth peripheral device by the electronic device according to the second transmission interval, the electronic device may establish the ACL link with the second bluetooth peripheral device in more idle slots, so as to improve the success rate of establishing the ACL link. After the ACL link is successfully established between the electronic device and the second bluetooth peripheral, the electronic device may further perform data transmission with the second bluetooth peripheral in the process of performing voice call by using the first bluetooth peripheral. Thereby simultaneously meeting various use requirements of users on the electronic equipment.
In a possible design of the first aspect, the first trigger event is an event of answering or making a voice call. Therefore, the call link with the first Bluetooth peripheral can be triggered and initiated by answering or dialing the call. The call LINK is an eSCO LINK, the first connection request is an LMP _ eSCO _ LINK _ REQ command, and a TeSCO field in the LMP _ eSCO _ LINK _ REQ command is used to indicate a first transmission interval. The call LINK is an SCO LINK, the first connection request is an LMP _ SCO _ LINK _ REQ command, and a TSCO field in the LMP _ SCO _ LINK _ REQ command is used for indicating the first transmission interval.
That is to say, with the method of the embodiment of the present application, a request may be initiated by using a corresponding over-the-air password for establishing different call links. And, using the TeSCO field in the over-the-air password to accurately send a request to the first bluetooth peripheral to establish a talk link with the first bluetooth peripheral for the first transmission interval.
In a possible design manner of the first aspect, the electronic device includes a bluetooth host and a bluetooth chip. Wherein, the bluetooth host can be understood as the bluetooth application layer of the electronic device. The electronic device sends a first connection request to the first bluetooth peripheral in response to the first trigger event, including: and the Bluetooth host responds to the first trigger event and sends a fourth connection request to the Bluetooth chip. The fourth connection request is used for indicating the Bluetooth chip to request to establish a communication link with the first Bluetooth peripheral. The bluetooth chip receives a fourth connection request from the bluetooth host. And then, the Bluetooth chip responds to the received fourth connection request and sends a first connection request to the first Bluetooth peripheral.
That is to say, with the method of the embodiment of the present application, when the application layer has a requirement for establishing a communication link, a request for establishing the communication link may be sequentially sent to the first bluetooth peripheral device through the bluetooth host and the bluetooth chip. Thus, the call link can be established according to the requirements of the application layer.
In a possible design manner of the first aspect, the call link is an eSCO link, and the fourth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the talk link is an SCO link and the fourth Connection request is an HCI _ Setup _ synchronization _ Connection command.
That is to say, with the method of the embodiment of the present application, the bluetooth host may initiate a request using a corresponding HCI command for establishing different call links.
In a possible design manner of the first aspect, after the electronic device sends the first connection request to the first bluetooth peripheral in response to the first trigger event, the method further includes: the electronic equipment receives an LMP _ ACCEPTED _ EXT command from a first Bluetooth peripheral; the LMP _ ACCEPTED _ EXT command is used to instruct the electronic device and the first bluetooth peripheral device to successfully establish a call link of the first transmission interval.
In a possible design manner of the first aspect, the electronic device includes a bluetooth host and a bluetooth chip. The electronic device receives an LMP _ ACCEPTED _ EXT command from a first bluetooth peripheral, and the LMP _ ACCEPTED _ EXT command includes: the bluetooth chip receives an LMP _ ACCEPTED _ EXT command from the first bluetooth peripheral. Then, the method further comprises: the Bluetooth chip responds to the received LMP _ ACCEPTED _ EXT command and sends an HCI _ Synchronous _ Connection _ Complete command to the Bluetooth host; the HCI _ Synchronous _ Connection _ Complete command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of a first transmission interval; the Transmission Interval field in the HCI _ synchronization _ Connection _ Complete command is used to indicate the first Transmission Interval.
That is to say, by using the method of the embodiment of the present application, the message of successfully establishing the call link of the first transmission interval is sent to the bluetooth host, so that the bluetooth host confirms that the call link is established. So that transmission of voice data of the call voice can be started.
In a possible design manner of the first aspect, after the electronic device sends the second connection request to the second bluetooth peripheral in response to an operation of the user requesting to establish a bluetooth connection with the second bluetooth peripheral, the method further includes: the electronic equipment receives a page timeout message from the second Bluetooth peripheral, wherein the page timeout message is used for indicating that the electronic equipment and the second Bluetooth peripheral fail to establish an ACL link. It should be understood that receiving the page timeout message indicates that the ACL link establishment is timed out, i.e., the ACL link establishment fails. Thus, the ACL link failure can be explicitly established according to the received page timeout message.
In a possible design manner of the first aspect, the call LINK is an eSCO LINK, the third connection request is an LMP _ eSCO _ LINK _ REQ command, and a TeSCO field in the LMP _ eSCO _ LINK _ REQ command is used to indicate the second transmission interval. The call LINK is an SCO LINK, the third connection request is an LMP _ SCO _ LINK _ REQ command, and the TSCO field in the LMP _ SCO _ LINK _ REQ command is used to indicate the second transmission interval.
That is to say, with the method of the embodiment of the present application, a request may be initiated by using a corresponding over-the-air password for establishing different call links. And, using the TeSCO field in the over-the-air password to accurately send a request to the first bluetooth peripheral to establish a talk link with the first bluetooth peripheral for a second transmission interval.
In a possible design manner of the first aspect, the electronic device includes a bluetooth host and a bluetooth chip. The electronic device receives a page timeout message from a second bluetooth peripheral, including: the Bluetooth chip receives a page timeout message from the second Bluetooth peripheral. The above-mentioned electronic equipment responds to and establishes the ACL link failure, send the third connection request to the first bluetooth peripheral hardware automatically, including: and the Bluetooth chip automatically sends a third connection request to the first Bluetooth peripheral in response to receiving the page timeout message.
That is to say, with the method according to the embodiment of the present application, the bluetooth chip automatically sends the third connection request to the first bluetooth peripheral device according to the received page timeout event. Namely: the renegotiation is initiated by the bluetooth chip. That is, the timing to initiate the renegotiation is determined by the bluetooth chip. Therefore, the renegotiation can be initiated and completed without any change to the Bluetooth host.
In a possible design manner of the first aspect, the electronic device includes a bluetooth host and a bluetooth chip. The electronic device receives a page timeout message from a second bluetooth peripheral, including: the Bluetooth chip receives a page timeout message from the second Bluetooth peripheral. And the Bluetooth chip sends a page timeout message to the Bluetooth host. The Bluetooth host receives a page timeout message from the Bluetooth chip. The above-mentioned electronic equipment responds to and establishes the ACL link failure, send the third connection request to the first bluetooth peripheral hardware automatically, including: the Bluetooth host automatically sends a transmission interval modification command and a fifth connection request to the Bluetooth chip in response to receiving the page timeout message; the transmission interval modification command is used for indicating the Bluetooth chip to modify the transmission interval, and the fifth connection request is used for indicating the Bluetooth chip to establish a call link with the first Bluetooth peripheral based on the modified transmission interval request. The bluetooth chip receives a transmission interval modification command and a fifth connection request from the bluetooth host. And the Bluetooth chip automatically sends a third connection request to the first Bluetooth peripheral in response to receiving the fifth connection request.
That is to say, with the method of the embodiment of the present application, the bluetooth host automatically sends the fifth connection request to the bluetooth chip according to the received page timeout message, and then the bluetooth chip sends the third connection request to the first bluetooth peripheral in response to receiving the fifth connection request. I.e. a renegotiation is initiated by the bluetooth host. That is, the bluetooth host determines the timing for initiating the renegotiation, and the bluetooth chip only needs to execute the command for renegotiation. Therefore, renegotiation can be initiated and completed without changing the Bluetooth chip.
In a possible design of the first aspect, the transmission interval modification command is a private host control interface HCI command; the call link is an eSCO link, and the fifth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the talk link is an SCO link, and the fifth Connection request is an HCI _ Setup _ synchronization _ Connection command.
That is to say, with the method of the embodiment of the present application, the bluetooth host may initiate a request using a corresponding HCI command for establishing different call links.
In a possible design manner of the first aspect, the electronic device includes a bluetooth host and a bluetooth chip. After the electronic device automatically sends the third connection request to the first bluetooth peripheral device in response to the failure to establish the ACL link, the method further includes: the Bluetooth chip receives an LMP _ ACCEPTED _ EXT command from the first Bluetooth peripheral, wherein the LMP _ ACCEPTED _ EXT command is used for indicating the electronic equipment and the first Bluetooth peripheral to successfully establish a call link of a second transmission interval. The Bluetooth chip sends an HCI _ synchronization _ Connection _ Changed command to the Bluetooth host in response to receiving the LMP _ ACCEPTED _ EXT command; the HCI _ Synchronous _ Connection _ Changed command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of a second transmission interval; the Transmission Interval field in the HCI _ synchronization _ Connection _ Changed command is used to indicate the second Transmission Interval. The bluetooth host receives the HCI _ synchronization _ Connection _ Changed command from the bluetooth chip.
That is to say, by using the method of the embodiment of the present application, the message of successfully establishing the call link of the second transmission interval is sent to the bluetooth host, so that the bluetooth host confirms that the call link is established. So that transmission of voice data of the call voice can be started.
In a possible design of the first aspect, different bluetooth peripherals support call links with different transmission intervals with other devices; wherein, different transmission intervals are specifically: transmission intervals comprising different numbers of slots. The first bluetooth peripheral supports a talk link establishing a second transmission interval with the electronic device, the second transmission interval comprising n time slots. Therefore, the electronic equipment can establish the communication links with different transmission intervals with different Bluetooth peripherals, and the matching degree of the established communication links is improved.
In a possible design manner of the first aspect, the automatically sending, by the electronic device, a third connection request to the first bluetooth peripheral in response to failure of establishing the ACL link includes: the electronic device automatically sends a third connection request to the first bluetooth peripheral device in response to a failure to establish the ACL link, in the event that the electronic device receives a first slave device page response from the second bluetooth peripheral device.
That is to say, with the method provided in this embodiment of the present application, after the electronic device detects that the ACL link is established overtime and receives a First slave device connection response (First slave page response), the electronic device and the First bluetooth peripheral renegotiate a call link for establishing a second transmission interval. In this way, the ACL link can be excluded from being timed out due to an increase in distance, and the reasonableness of renegotiation can be improved.
In a second aspect, an embodiment of the present application further provides an electronic device, where the electronic device supports simultaneous bluetooth connection with a first bluetooth peripheral and a second bluetooth peripheral, and both the electronic device and the first bluetooth peripheral support a phone hands-free protocol HFP. The electronic device includes a display screen, a memory, and one or more processors. The display screen, the memory and the processor are coupled. The memory is for storing computer program code comprising computer instructions that, when executed by the processor, cause the electronic device to perform the steps of: the electronic equipment responds to a first trigger event and sends a first connection request to the first Bluetooth peripheral; the first connection request is used for requesting to establish a call link of a first transmission interval with a first Bluetooth peripheral, the first transmission interval comprises m time slots, m is a positive integer, and the call link comprises a synchronous connection-oriented SCO link or an enhanced synchronous connection-oriented eSCO link; after the call link of the first transmission interval is successfully established, the electronic equipment performs call voice transmission with the first Bluetooth peripheral equipment according to the first transmission interval; the electronic equipment responds to the operation of a user for requesting to establish Bluetooth connection with a second Bluetooth peripheral, and sends a second connection request to the second Bluetooth peripheral; the second connection request is used for requesting to establish an asynchronous connectionless ACL link with the second Bluetooth peripheral; the electronic equipment automatically sends a third connection request to the first Bluetooth peripheral equipment in response to the failure of establishing the ACL link; the third connection request is used for requesting to establish a call link of a second transmission interval with the first Bluetooth peripheral, the second transmission interval comprises n time slots, n is greater than m, and n is a positive integer; and after the call link of the second transmission interval is successfully established, the electronic equipment performs call voice transmission with the second Bluetooth peripheral equipment according to the second transmission interval.
In a possible embodiment of the second aspect, the first triggering event is an event of answering or making a voice call; the communication LINK is an eSCO LINK, the first connection request is an LMP _ eSCO _ LINK _ REQ command, and a TeSCO field in the LMP _ eSCO _ LINK _ REQ command is used for indicating a first transmission interval; the call LINK is an SCO LINK, the first connection request is an LMP _ SCO _ LINK _ REQ command, and the TSCO field in the LMP _ SCO _ LINK _ REQ command is used to indicate the first transmission interval.
In one possible design of the second aspect, the electronic device includes a bluetooth host and a bluetooth chip.
The computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the Bluetooth host responds to the first trigger event and sends a fourth connection request to the Bluetooth chip; the fourth connection request is used for indicating the Bluetooth chip to request to establish a communication link with the first Bluetooth peripheral; the Bluetooth chip receives a fourth connection request from the Bluetooth host; and the Bluetooth chip responds to the received fourth connection request and sends a first connection request to the first Bluetooth peripheral.
In a possible design manner of the second aspect, the call link is an eSCO link, and the fourth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the talk link is an SCO link and the fourth Connection request is an HCI _ Setup _ synchronization _ Connection command.
In a possible design of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the electronic equipment receives an LMP _ ACCEPTED _ EXT command from a first Bluetooth peripheral; the LMP _ ACCEPTED _ EXT command is used to instruct the electronic device and the first bluetooth peripheral device to successfully establish a call link of the first transmission interval.
In one possible design of the second aspect, the electronic device includes a bluetooth host and a bluetooth chip.
The computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the bluetooth chip receives an LMP _ ACCEPTED _ EXT command from the first bluetooth peripheral. The Bluetooth chip responds to the received LMP _ ACCEPTED _ EXT command and sends an HCI _ Synchronous _ Connection _ Complete command to the Bluetooth host; the HCI _ Synchronous _ Connection _ Complete command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of a first transmission interval; the Transmission Interval field in the HCI _ synchronization _ Connection _ Complete command is used to indicate the first Transmission Interval.
In a possible design of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the electronic equipment receives a page timeout message from the second Bluetooth peripheral, wherein the page timeout message is used for indicating that the electronic equipment and the second Bluetooth peripheral fail to establish an ACL link.
In a possible design manner of the second aspect, the call LINK is an eSCO LINK, the third connection request is an LMP _ eSCO _ LINK _ REQ command, and a TeSCO field in the LMP _ eSCO _ LINK _ REQ command is used to indicate the second transmission interval; the call LINK is an SCO LINK, the third connection request is an LMP _ SCO _ LINK _ REQ command, and the TSCO field in the LMP _ SCO _ LINK _ REQ command is used to indicate the second transmission interval.
In one possible design of the second aspect, the electronic device includes a bluetooth host and a bluetooth chip.
The computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the Bluetooth chip receives a page timeout message from a second Bluetooth peripheral; and the Bluetooth chip automatically sends a third connection request to the first Bluetooth peripheral in response to receiving the page timeout message.
In one possible design of the second aspect, the electronic device includes a bluetooth host and a bluetooth chip.
The computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the Bluetooth chip receives a page timeout message from a second Bluetooth peripheral; the Bluetooth chip sends a page timeout message to the Bluetooth host; the Bluetooth host receives a page timeout message from the Bluetooth chip. The Bluetooth host automatically sends a transmission interval modification command and a fifth connection request to the Bluetooth chip in response to receiving the page timeout message; the transmission interval modification command is used for indicating the Bluetooth chip to modify the transmission interval, and the fifth connection request is used for indicating the Bluetooth chip to establish a communication link with the first Bluetooth peripheral based on the modified transmission interval request; the Bluetooth chip receives a transmission interval modification command and a fifth connection request from the Bluetooth host; and the Bluetooth chip automatically sends a third connection request to the first Bluetooth peripheral in response to receiving the fifth connection request.
In a possible design of the second aspect, the transmission interval modification command is a private host control interface HCI command; the call link is an eSCO link, and the fifth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the talk link is an SCO link, and the fifth Connection request is an HCI _ Setup _ synchronization _ Connection command.
In one possible design of the second aspect, the electronic device includes a bluetooth host and a bluetooth chip. The computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the Bluetooth chip receives an LMP _ ACCEPTED _ EXT command from a first Bluetooth peripheral, wherein the LMP _ ACCEPTED _ EXT command is used for indicating the electronic equipment and the first Bluetooth peripheral to successfully establish a call link of a second transmission interval; the Bluetooth chip sends an HCI _ synchronization _ Connection _ Changed command to the Bluetooth host in response to receiving the LMP _ ACCEPTED _ EXT command; the HCI _ Synchronous _ Connection _ Changed command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of a second transmission interval; a Transmission Interval field in the HCI _ synchronization _ Connection _ Changed command is used to indicate a second Transmission Interval; the bluetooth host receives the HCI _ synchronization _ Connection _ Changed command from the bluetooth chip.
In a possible embodiment of the second aspect, different bluetooth peripherals support call links with different transmission intervals with other devices; wherein, different transmission intervals are specifically: a transmission interval comprising a different number of slots; the first bluetooth peripheral supports a talk link establishing a second transmission interval with the electronic device, the second transmission interval comprising n time slots.
In a possible design of the second aspect, the computer instructions, when executed by the processor, cause the electronic device to further perform the steps of: the electronic device automatically sends a third connection request to the first bluetooth peripheral device in response to a failure to establish the ACL link, in the event that the electronic device receives a first slave device page response from the second bluetooth peripheral device.
In a third aspect, an embodiment of the present application provides a chip system, where the chip system is applied to an electronic device including a display screen and a memory; the chip system includes one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the interface circuit is to receive a signal from a memory of the electronic device and to send the signal to the processor, the signal comprising computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in the first aspect and any one of its possible designs.
In a fourth aspect, the present application provides a computer storage medium comprising computer instructions which, when run on a server, cause the server to perform the method of establishing a bluetooth connection according to any one of the first aspect.
In a fifth aspect, the present application provides a computer program product for causing a server to perform the method of establishing a bluetooth connection according to any one of the first aspect when the computer program product is run on the server.
It is to be understood that the electronic device according to the second aspect, the system chip according to the third aspect, the computer storage medium according to the fourth aspect, and the computer program product according to the fifth aspect are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the electronic device according to the second aspect, the computer storage medium according to the fourth aspect, and the computer program product according to the fifth aspect may refer to the beneficial effects of the corresponding method provided above, and are not described herein again.
Drawings
Fig. 1 is a schematic diagram of an application scenario provided in an embodiment of the present application;
fig. 2 is a diagram illustrating a correspondence relationship between transmission intervals and time slots according to an embodiment of the present application;
fig. 3 is a schematic diagram of a paging procedure provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a time slot occupied by a data packet according to an embodiment of the present application;
fig. 5 is a hardware configuration diagram of a mobile phone according to an embodiment of the present application;
fig. 6a is a flowchart of a method for establishing a bluetooth connection according to an embodiment of the present application;
fig. 6b is a schematic diagram of a bluetooth setup interface according to an embodiment of the present application;
fig. 7a is a schematic diagram of a first transmission interval according to an embodiment of the present application;
fig. 7b is a schematic diagram of a first transmission interval according to an embodiment of the present application;
fig. 8 is a schematic architecture diagram of a bluetooth system according to an embodiment of the present application;
fig. 9 is an interaction diagram of a bluetooth device according to an embodiment of the present application;
fig. 10 is a flowchart of another method for establishing a bluetooth connection according to an embodiment of the present application;
fig. 11 is an interaction diagram of another bluetooth device provided in an embodiment of the present application;
fig. 12 is an interaction diagram of another bluetooth device provided in an embodiment of the present application;
fig. 13 is a flowchart of another method for establishing a bluetooth connection according to an embodiment of the present application;
fig. 14 is an interaction diagram of another bluetooth device provided in an embodiment of the present application;
fig. 15 is an interaction diagram of another bluetooth device provided in an embodiment of the present application;
fig. 16 is a flowchart of another method for establishing a bluetooth connection according to an embodiment of the present application;
fig. 17 is a structural diagram of a system chip according to an embodiment of the present application.
Detailed Description
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present embodiment, "a plurality" means two or more unless otherwise specified.
The embodiment of the application provides a method for establishing Bluetooth connection, which can be applied to a Bluetooth communication system provided by the embodiment of the application. The bluetooth communication system may include an electronic device, a first bluetooth peripheral, and a second bluetooth peripheral. The first electronic device, the first Bluetooth peripheral and the second Bluetooth peripheral all support Bluetooth communication. In the Bluetooth communication system, the electronic equipment and the first Bluetooth peripheral are paired and establish Bluetooth connection, and the electronic equipment utilizes the first Bluetooth peripheral to carry out voice communication. That is, the electronic device and the first bluetooth peripheral device need to support a phone Hands-free Profile (HFP). It should be understood that, on the premise that the electronic device and the first bluetooth peripheral both support the HFP protocol, the electronic device and the first bluetooth peripheral can only complete the transmission of the audio data of the voice call by establishing a call link therebetween. The electronic device also supports simultaneous establishment of bluetooth connections with a plurality of bluetooth peripherals. Specifically, in the process of playing the audio data by the first bluetooth peripheral, the electronic device may execute the method of the embodiment of the present application to establish a bluetooth connection with the second bluetooth peripheral.
For example, the electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) \ Virtual Reality (VR) device, and the like, and the embodiment of the present application does not particularly limit the specific form of the electronic device.
The first Bluetooth peripheral can be a Bluetooth device with audio data playing and collecting functions. For example, the first bluetooth peripheral may be a bluetooth headset, a bluetooth speaker, a vehicle-mounted terminal with a bluetooth function, a tablet computer, a smart watch, a smart bracelet, or other wearable devices with audio data playing and collecting functions. The second bluetooth peripheral may be any bluetooth device having a bluetooth function. For example, the second bluetooth peripheral may be a bluetooth device such as a notebook computer, a tablet computer, a bluetooth watch, an intelligent bracelet, a vehicle-mounted terminal with a bluetooth function, a bluetooth speaker, or a bluetooth headset.
For example, the method of the embodiment of the present application is described by taking the above-mentioned electronic device as the mobile phone 100 shown in fig. 1, the first bluetooth peripheral device as the bluetooth headset 110 shown in fig. 1, and the second bluetooth peripheral device as the in-vehicle terminal 120 shown in fig. 1 as an example.
Therein, the handset 100 may establish a physical link with the bluetooth headset 110 for implementing bluetooth communication. More common physical links include Asynchronous Connection Less (ACL) links, Synchronous Connection Ordered (SCO) links, and Enhanced synchronous Connection ordered (eSCO) links.
The ACL link is mainly used for data communication which is insensitive to time requirements. For example, for listening to songs, audio data is transmitted from a cell phone to a headset. The SCO/eSCO link is two conventional call links, mainly used for data communication that is relatively sensitive to time requirements, especially for the transmission of audio data for voice calls.
It should be noted that, during the bluetooth communication between the mobile phone 100 and the bluetooth headset 110, in order to implement the functions of playing and collecting the call voice through the bluetooth headset 110, the mobile phone 100 may establish an eSCO/SCO connection with the bluetooth headset 110. In response to a user request to establish a connection with the bluetooth headset 110, the mobile phone 100 may first establish an ACL link with the bluetooth headset 110. The handset 100 can then further establish an eSCO/SCO link with the bluetooth headset 110 when the handset 100 answers or makes a call.
In the process of establishing the eSCO/SCO link between the handset 100 and the bluetooth headset 110, a transmission interval (transmission interval) is negotiated between the two devices. The transmission interval is the time duration between the start times (instant) of two consecutive eSCO/SCO. Wherein the duration is clocked in slots (slots). For example, transmission interval is specifically: time between two seconds consecutive SCO/SCO instances measured in slots. 1 slot refers to a 625 microsecond long time slice in an eSCO/SCO link used to transmit a data packet. In general, 1 slot can be considered as the time required to transmit 1 packet from one bluetooth device to another bluetooth device. In other words, the transmission of 1 packet takes 1 slot.
Generally, at least 2 slots of 1 transmission interval (transmission interval) are used for transmission of audio data between the handset 100 and the bluetooth headset 110. And, since the eSCO link has the highest priority, the transmission of audio data cannot be interrupted by other traffic. Accordingly, the handset 100 or the bluetooth headset 110 can only interact with other devices within the remaining slots (herein referred to as idle slots for short) not occupied by the transmission of audio data.
For example, assume that an eSCO link with transmission interval of 6slots is established between the handset 100 and the bluetooth headset 110. As shown in fig. 2, 1 transmission interval (transmission interval) includes 6slots, where 2 slots are used for audio data transmission, and the handset 100 or the bluetooth headset 110 can only interact with other devices in 4 free slots.
From the above description it follows that: the mobile phone 100 and the bluetooth headset 110 may perform eSCO/SCO data transmission (i.e., audio data transmission) in 2 slots of each transmission interval. In the application scenario shown in fig. 1, the mobile phone 100 may establish a bluetooth connection with the vehicle-mounted terminal 120 in 4 idle slots in each transmission interval.
For example, in the scenario shown in fig. 1, it is assumed that the mobile phone 100 has already completed pairing with the vehicle-mounted terminal 120, but an ACL link is not yet established, and a process of establishing the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 is a paging (page) process. Wherein, the mobile phone 100 can be used as a master device to initiate bluetooth connection with a slave device (such as the vehicle-mounted terminal 120), or the vehicle-mounted terminal 120 can be used as a master device to initiate bluetooth connection with a slave device (such as the mobile phone 100). As shown in FIG. 3, the page process generally includes the following steps 1-4:
step 1: the master initiates a page request to the slave. The page request is typically transmitted using an ID packet, which occupies 1 slot. The page request is used to request that an ACL link be established with the slave device. The master device can initiate page requests at different frequency points. For example, a page request f (k) is issued at frequency k, and a page request f (k +1) is issued at frequency k + 1.
Step 2: after receiving the page request sent by the master device, the slave device returns a First slave device page response (First slave page response) to the master device. The First slot page response is usually transmitted using ID packets, which occupy 1 slot. The First slave page response is used to indicate that the slave accepts to establish an ACL link. When receiving the page request f (k) sent by the master device at frequency point k, the slave device returns a first slave device page response f (k) to the master device.
And step 3: after receiving the First slave page response returned by the slave device, the Master device sends a Master page response (Master page response) to the slave device. The Master page response is transmitted using FHS (frequency Hopping sequence) packets, which occupy 1 slot. The Master page response is used to negotiate a frequency hopping sequence with the slave device.
And 4, step 4: after receiving the Master page response sent by the Master device, the slave device returns a Second slave page response (Second slave page response) to the Master device. The Second slot page response is typically transmitted using ID packets, which occupy 1 slot. The Second slave page response is used to indicate that the hopping sequence negotiation is consistent.
That is, step 1 to step 4 of the page process occupy 1 slot respectively, and theoretically, only 4 free slots are needed to establish an ACL link between the mobile phone 100 and the vehicle-mounted terminal 110. As can be seen from fig. 2: in the case that 1 transmission interval (transmission interval) includes 6slots, then 4 free slots are just available for the mobile phone 100 to establish bluetooth connection with the in-vehicle terminal 120.
For example, as shown in fig. 4, 1 transmission interval (transmission interval) includes 6 slots. Theoretically: the data packet for transmitting the audio data includes a data packet 410 and a data packet 420. The data packet 410 is used for transmitting audio data sent by the mobile phone 100 to the bluetooth headset 110 during a call, and occupies 1 slot; the data packet 420 is used to transmit audio data sent by the bluetooth headset 110 to the mobile phone 100 during a call, and also occupies 1 slot. Namely: the audio data transmission occupies 2 slots in total. Data packet 430, data packet 440, data packet 450, and data packet 460 of the page process, where data packet 430 is used to transmit a paging (page) request, and occupies the 1 st idle slot; the data packet 440 is used to transmit a First slave page response (First slot page response) occupying the 2 nd idle slot; the data packet 450 is used to transmit a Master page response (Master page response) and occupies the 3 rd idle slot; the data packet 460 is used to transmit a Second slave page response (Second slave page response), occupying the 4 th free slot.
It should be understood that data packets 410 and 420 may be any data packet capable of carrying voice over calls, including, but not limited to, an EV3 packet, an EV4 packet, an EV5 packet, a 2-EV3 packet, a 2-EV5 packet, a 3-EV3 packet, or a 3-EV5 packet.
However, in some practical cases, if the slave device does not feed back a page response (slot page response) to the master device in time, the above-mentioned page procedure needs more slots to complete. Thus, the mobile phone 100 and the vehicle-mounted terminal 120 cannot complete bluetooth connection within 4 idle slots.
Alternatively, in other practical cases, if the mobile phone 100 and the vehicle-mounted terminal 120 are not paired, the mobile phone 100 needs to complete the pairing with the vehicle-mounted terminal 120 before the ACL link can be established. Obviously, the idle slot required for the process of pairing the mobile phone 100 and the vehicle-mounted terminal 120 and establishing the ACL link is more than that required for the process of establishing only the ACL link. Thus, the mobile phone 100 and the vehicle-mounted terminal 120 cannot complete bluetooth connection within 4 idle slots.
Alternatively, in other practical cases, if the audio data between the handset 100 and the bluetooth headset 110 involves retransmission, the slot occupied by the audio data transmission will exceed 2 and the remaining slots will be reduced. For example, if the bluetooth headset 110 does not respond in time with audio data sent by the mobile phone 100 to the bluetooth headset 110, the mobile phone 100 retransmits the audio data to the bluetooth headset 110. At this time, even if the bluetooth headset 110 returns response data, it takes at least 3 slots. Corresponding to fig. 2, then the free slots will be less than 4. Thus, the mobile phone 100 and the vehicle-mounted terminal 120 cannot complete bluetooth connection in the idle slot.
In summary, in consideration of various practical situations, the mobile phone 100 and the vehicle-mounted terminal 120 are most likely to be unable to establish an ACL link in an idle slot. Thereafter, if the page process is continuously performed, the page process is interrupted by audio data transmission in the next transmission interval (transmission interval). Moreover, if the page process is interrupted, the problem of frequency hopping error is very likely to occur, which causes the time-out of ACL link establishment and finally leads to ACL link establishment failure.
That is, when the mobile phone 100 has already established the eSCO/SCO link with the bluetooth headset 110 and a voice call is performed using the bluetooth headset 110, it is highly likely that the mobile phone 100 fails to establish the ACL link with the in-vehicle terminal 120 due to an insufficient number of idle slots.
The embodiment of the application provides a method for establishing a bluetooth connection, which is applied to a mobile phone 100, and the mobile phone 100 supports simultaneous establishment of a bluetooth connection with bluetooth peripherals (such as a bluetooth headset 110 and a vehicle-mounted terminal 120).
Specifically, in the process that the mobile phone 100 and the bluetooth headset 110 successfully establish the eSCO/SCO link of the first transmission interval and the bluetooth headset 110 is used for voice call, the mobile phone 100 responds to the operation that the user triggers the connection establishment with the in-vehicle terminal 120, and the mobile phone 100 establishes the ACL link with the in-vehicle terminal 120. In case the ACL link between the mobile phone 100 and the in-vehicle terminal 120 fails to be established, the mobile phone 100 renegotiates the eSCO/SCO link for the second transmission interval with the bluetooth headset 110. Wherein the first transmission interval comprises m slots, the second transmission interval comprises n slots, and n is greater than m. That is, in the process of using the bluetooth headset 110 to perform a voice call by the mobile phone 100, if the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 fails, the mobile phone 100 and the bluetooth headset 110 are triggered to renegotiate a transmission interval including more slots. It should be understood that more slots are included in the transmission interval, the number of idle slots will increase accordingly, and further, more idle slots are available in the process of establishing the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120.
Then, in response to the operation of the user triggering the connection establishment with the vehicle-mounted terminal 120 again, the mobile phone 100 may establish the ACL link using more idle slots, so as to improve the probability of successfully establishing the ACL link. Moreover, after the ACL links between the mobile phone 100 and the vehicle-mounted terminal 120 are successfully established, the mobile phone 100 can communicate with the vehicle-mounted terminal 120 through the bluetooth headset 110 and transmit data to the vehicle-mounted terminal 120, so as to satisfy various user requirements of the user on the electronic device.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings. In the embodiment of the present application, an example in which the electronic device is a mobile phone is described, and a hardware structure of the electronic device is introduced. As shown in fig. 5, the mobile phone 100 may include a processor 510, an external memory interface 520, an internal memory 521, a Universal Serial Bus (USB) interface 530, a charging management module 540, a power management module 541, a battery 542, an antenna 1, an antenna 2, a mobile communication module 550, a wireless communication module 560, an audio module 570, a speaker 570A, a receiver 570B, a microphone 570C, an earphone interface 570D, a sensor module 580, a button 590, a motor 591, an indicator 592, a camera 593, a display 594, a Subscriber Identification Module (SIM) card interface 595, and the like.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic device. In other embodiments, an electronic device may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 510 may include one or more processing units, such as: processor 510 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
It should be understood that the interface connection relationship between the modules illustrated in this embodiment is only an exemplary illustration, and does not constitute a limitation on the structure of the electronic device. In other embodiments, the electronic device may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 540 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 540 may receive charging input from a wired charger via the USB interface 530. In some wireless charging embodiments, the charging management module 540 may receive the wireless charging input through a wireless charging coil of the electronic device 500. The charging management module 540 may also provide power to the electronic device through the power management module 541 while charging the battery 542.
The power management module 541 is used to connect the battery 542, the charging management module 540 and the processor 510. The power management module 541 receives input from the battery 542 and/or the charging management module 540, and provides power to the processor 510, the internal memory 521, the external memory, the display 594, the camera 593, the wireless communication module 560, and the like. The power management module 541 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 541 may also be disposed in the processor 510. In other embodiments, the power management module 541 and the charging management module 540 may be disposed in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 550, the wireless communication module 560, the modem processor, the baseband processor, and the like.
The wireless communication module 560 may provide a solution for wireless communication applied to the electronic device 500, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 560 may be one or more devices integrating at least one communication processing module. The wireless communication module 560 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 510. The wireless communication module 560 may also receive a signal to be transmitted from the processor 510, frequency-modulate it, amplify it, and convert it into electromagnetic waves via the antenna 2 to radiate it.
The electronic device implements display functions via the GPU, the display screen 594, and the application processor. The GPU is an image processing microprocessor connected to a display screen 594 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 510 may include one or more GPUs that execute program instructions to generate or alter display information.
The electronic device may implement a capture function via the ISP, the camera 593, the video codec, the GPU, the display screen 594, and the application processor. The ISP is used to process the data fed back by the camera 593. The camera 593 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. In some embodiments, the electronic device may include 1 or N cameras 593, N being a positive integer greater than 1.
The external memory interface 520 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device. The external memory card communicates with the processor 510 through the external memory interface 520 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 521 may be used to store computer-executable program code, including instructions. The processor 510 executes various functional applications of the electronic device and data processing by executing instructions stored in the internal memory 521. For example, the processor 510 may display different content on the display screen 584 in response to a user's manipulation to expand the display screen 594 by executing instructions stored in the internal memory 521. The internal memory 521 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The data storage area can store data (such as audio data, phone book and the like) created in the using process of the electronic device. In addition, the internal memory 521 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device may implement an audio function through the audio module 570, the speaker 570A, the receiver 570B, the microphone 570C, the headphone interface 570D, and the application processor, etc. Such as music playing, recording, etc.
The keys 590 include a power-on key, a volume key, etc. The keys 590 may be mechanical keys. Or may be touch keys. The electronic device may receive a key input, and generate a key signal input related to user settings and function control of the electronic device. The motor 591 may generate a vibration indication. The motor 591 can be used for incoming call vibration prompt and also can be used for touch vibration feedback. Indicator 592 can be an indicator light that can be used to indicate a charge status, a charge change, a message, a missed call, a notification, etc. The SIM card interface 595 is used to connect a SIM card. The SIM card can be connected to and disconnected from the electronic device by being inserted into the SIM card interface 595 or being pulled out of the SIM card interface 595. The electronic equipment can support 1 or N SIM card interfaces, and N is a positive integer greater than 1.
The methods in the following embodiments can be implemented in the mobile phone 100 having the above hardware structure, and the method in the embodiments of the present application will be described below by taking establishing an eSCO link between the mobile phone 100 and the bluetooth headset 110 as an example. It should be understood that in practice, the method of the embodiments of the present application may also be implemented by replacing the eSCO link with an SCO link.
The embodiment of the present application provides a method for establishing a bluetooth connection, where the method is applied to a mobile phone 100, and the mobile phone 100 supports simultaneous establishment of a bluetooth connection with multiple bluetooth devices (e.g., a bluetooth headset 110 and a vehicle-mounted terminal 120). As shown in fig. 6a, the method of establishing a bluetooth connection includes S610-S630.
S610, the handset 100 negotiates with the bluetooth headset 110 to establish an eSCO link for the first transmission interval. The first transmission interval comprises m slots.
It should be noted that before S610, an eSCO link is not established between the handset 100 and the bluetooth headset 110, in this embodiment, in order to distinguish a process in which the handset 100 and the bluetooth headset 110 negotiate multiple times to establish an eSCO link, a process in which an eSCO link of a first transmission interval is negotiated in S610 is referred to as a first negotiation. Accordingly, in the following, in the case where the eSCO link already exists, the process of negotiating to establish the eSCO link of the second transmission interval (i.e., S630) is referred to as renegotiation.
In the first negotiation, the negotiated transmission interval (transmission interval) is the first transmission interval. The first transmission interval is determined by the hardware configuration of the handset 100 and the bluetooth headset 110. The first transmission interval is a transmission interval supported by both the handset 100 and the bluetooth headset 110.
In some embodiments, the first negotiation may be triggered by a first triggering event, which may be an event to answer or place a voice call. For example, when the handset 100 detects that a call is placed, then the establishment of an eSCO connection is triggered. Therefore, eSCO connection can be timely triggered and established according to service requirements.
Further, the handset 100 sends a first connection request to the bluetooth headset 110 in response to the first trigger event, the first connection request requesting that an eSCO link for a first transmission interval be established with the bluetooth headset 110. The first transmission interval includes m slots, m being a positive integer. In a specific implementation, the first connection request may be an over-the-air password LMP _ eSCO _ LINK _ REQ sent by the handset 100 to the bluetooth headset 110. It should be understood that an over-the-air password refers to a command for communication between bluetooth devices. The over-the-air password is defined by the Link Manager Protocol (LMP).
As specified in the LMP protocol shown in table 1 below, the air password LMP _ eSCO _ LINK _ REQ carries a plurality of parameter contents.
TABLE 1
Figure BDA0003045122640000121
Wherein the TeSCO field indicates a transmission interval (transmission interval). The TeSCO field is used to indicate the first transmission interval when negotiating for the first time. That is, the first transmission interval is carried in the air password LMP _ eSCO _ LINK _ REQ. For example, the TeSCO field has a value of 6slots ═ 3.750ms, which indicates that the transmission interval is 6slots, specifically 3.75 ms.
And, the eSCO handle in table 1 above is a handle of the eSCO link. For example, the value of eSCO handle may be 0x01, indicating that the handle of the eSCO link is 1. eSCO LT _ ADDR is the eSCO link that needs to be defined in an active state. The host is not allowed to reassign the active eSCO links to other LT _ ADDRs. I.e., does not allow the host to reassign active eSCO links to other LT _ ADDRs. That is, the eSCO LT _ ADDR is specifically the eSCO connection with less active on an additional LT _ ADDR that is needed to be defined, the master is not allowed to be driven to re-associated with an active eSCO link to a differential LT _ ADDR. For example, the value of eSCO LT _ ADDR can be 2, indicating that the number of active eSCO links that the host is restricted from reassigning to other LT _ ADDRs is 2. Timing control flags are used to avoid clock wrap around in the sequence, using one of two initialization rules. Wherein, the 1 st bit timing control flag parameter is valid. That is, the Timing control flags may be specifically: this parameter is used to the adjacent clock wrap-around and around the sequence, using one of the two initial linking rules, the only bit1 of the timing control flag parameter is valid. DeSCO is the backoff duration for the eSCO link. For example, the value of DeSCO may be 0slot — 0, indicating that the compensation period is 0. WeSCO is the size of the eSCO retransmission window. For example, the value WeSCO may be 4slots ═ 2.500ms, which means that the retransmission window is 4slots, specifically 2.5 ms. eSCO packet type M- > S is the type of packet in eSCO that the master sends to the slave. For example, the value of eSCO packet type M- > S may be 2-EV3 package. eSCO packet type S- > M is the type of packet in eSCO that is sent from the slave to the master. For example, the value of eSCO packet type S- > M may be 2-EV3 package. packet length M- > S is the length of a packet sent by the master to the slave. packet length S- > M is the length of a packet sent from the slave to the master. For example, the values of packet length M- > S and packet length S- > M may each be 60 bytes (byte). air mode is an over-the-air mode. For example, the air mode value may be Transparent Data, indicating that the air mode is Transparent Data. The Negotiation state is a parameter used to better implement negotiable. That is, the negotiation state may be specifically this is used to be able to enable the negotiation of the negotiation parameters. For example, the Negotiation state may have a value of 0x00, indicating a negotiable parameter of 0.
After the handset 100 sends the first connection request to the bluetooth headset 110 and the bluetooth headset 110 accepts establishment of the eSCO link for the first transmission interval, the bluetooth headset 110 may send a command to the handset 100 to accept establishment of the eSCO link to inform the handset 100 of successful establishment of the eSCO link. In a particular implementation, the command to accept establishment of the eSCO link is an over-the-air password LMP _ ACCEPTED _ EXT. Accordingly, the bluetooth headset 110 transmits an LMP _ ACCEPTED _ EXT command to the handset 100. Handset 100 receives LMP _ ACCEPTED _ EXT command from bluetooth headset 110. The LMP _ ACCEPTED _ EXT command is received by the handset 100, which indicates that the handset 100 and the bluetooth headset 110 successfully establish the call link of the first transmission interval.
S620, in the process that the mobile phone 100 uses the bluetooth headset 110 to perform the voice call, the mobile phone 100 responds to the operation of the user requesting to establish connection with the vehicle-mounted terminal 120, and the mobile phone 100 establishes an ACL link with the vehicle-mounted terminal 120.
After the eSCO link is successfully established between the handset 100 and the bluetooth headset 110, the handset 100 may perform voice (i.e., audio data) transmission for a call with the bluetooth headset 110 according to a first transmission interval, so that audio for answering or making a voice call by the handset 100 may be played from the bluetooth headset 110, and meanwhile, the bluetooth headset 110 may collect voice input and transmit the voice input to the handset 100 until the call is ended or the eSCO link is disconnected. This process is a process of the mobile phone 100 using the bluetooth headset 110 to perform a voice call. For example, the first transmission interval is 6, and the handset 100 sends a data packet of audio data to the bluetooth headset 110 every 6 slots.
In the process of the mobile phone 100 using the bluetooth headset 110 to perform a voice call, if the mobile phone 100 receives an operation of a user requesting to establish a bluetooth connection with the in-vehicle terminal 120, it indicates that there is a need to establish an ACL link between the mobile phone 100 and the in-vehicle terminal 120.
The operation of requesting the bluetooth connection with the vehicle-mounted terminal 120 may be an operation of clicking a control connected to the vehicle-mounted terminal 120, or may be a gesture requesting the bluetooth connection with the vehicle-mounted terminal 120. The cellular phone 100 transmits a second connection request to the in-vehicle terminal 120 in response to an operation of the user requesting connection establishment with the in-vehicle terminal 120. The second connection request is for requesting establishment of an ACL link with the in-vehicle terminal 120.
For example, the mobile phone 100 may receive a user's touch operation (e.g., click operation) on a selected hot zone 650 of the in-vehicle terminal 120 in the bluetooth application interface 640 shown in fig. 6 b. The mobile phone 100 may initiate a second connection request to establish an ACL link with the in-vehicle terminal 120 in response to a user's touch operation on the selected hot zone 650.
The cellular phone 100 transmits a second connection request to the in-vehicle terminal 120. Then, the mobile phone 100 and the vehicle-mounted terminal 120 may execute a page action of establishing an ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 in an idle slot of the first transmission interval. For a specific page process, refer to fig. 3, which is not described herein again. It should be noted that if the mobile phone 100 and the in-vehicle terminal 120 are not paired, the pairing is performed before the page operation is performed.
The result of establishing the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 includes success of establishing the ACL link or failure of establishing the ACL link. If the ACL link is successfully established, the ACL link can be subsequently used to transmit data between the mobile phone 100 and the in-vehicle terminal 120. Therefore, when the bluetooth headset 110 is used for voice bluetooth communication, data transmission between the mobile phone 100 and the in-vehicle terminal 120 can be achieved, and multiple use requirements of the user can be met.
Otherwise, if the ACL link is failed to be established, S630 is executed to trigger renegotiation.
S630, when the mobile phone 100 detects that the ACL link between the mobile phone 100 and the in-vehicle terminal 120 fails to be established, the mobile phone 100 automatically initiates an eSCO link that negotiates with the bluetooth headset 110 to establish the second transmission interval. The second transmission interval comprises n slots, n being greater than m, n and m both being positive integers.
If the page process between the mobile phone 100 and the vehicle-mounted terminal 120 is not completed within the preset time, the mobile phone 100 receives a connection timeout message from the vehicle-mounted terminal 120. The mobile phone 100 receives the connection timeout message, which indicates that the mobile phone 100 detects that the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 fails to be established. In some embodiments, the connection timeout message is a page timeout message.
Unlike establishing an ACL link, the renegotiation in S630 is initiated automatically by the handset 100 upon detecting a failure to establish an ACL link without user triggering. Therefore, renegotiation can be automatically triggered, and intelligent adjustment of the transmission interval is realized.
Specifically, the handset 100 automatically sends a third connection request to the bluetooth headset 110 in response to a failure to establish the ACL link. The third connection request is for requesting establishment of an eSCO link with the bluetooth headset 110 for a second transmission interval, the second transmission interval including n slots, n > m, n being a positive integer. In a particular implementation, the third connection request is the LMP _ eSCO _ LINK _ REQ command.
As previously specified by the LMP protocol shown in table 1, the TeSCO field in the air password LMP _ eSCO _ LINK _ REQ indicates a transmission interval (transmission interval). Unlike the first negotiation: in the renegotiation process, the TeSCO field carried in the air password LMP _ eSCO _ LINK _ REQ is used to indicate the second transmission interval. The second transmission interval comprises a number m of slots that is larger than the number n of slots comprised by the first transmission interval.
Further, after the handset 100 sends the third connection request to the bluetooth headset 110 and the bluetooth headset 110 accepts to establish the eSCO link for the second transmission interval, the bluetooth headset 110 may send a command to the handset 100 to accept to establish the eSCO link to inform the handset 100 of the successful establishment of the eSCO link. In a particular implementation, the command to accept establishment of the eSCO link is an over-the-air password LMP _ ACCEPTED _ EXT. Accordingly, the bluetooth headset 110 transmits an LMP _ ACCEPTED _ EXT command to the handset 100. Handset 100 receives LMP _ ACCEPTED _ EXT command from bluetooth headset 110. The handset 100 receives the LMP _ ACCEPTED _ EXT command, which indicates that the handset 100 and the bluetooth headset 110 successfully establish the eSCO link for the second transmission interval.
After the mobile phone 100 and the bluetooth headset 110 successfully establish the eSCO link for the second transmission interval, the mobile phone 100 may perform voice (i.e., audio data) transmission with the bluetooth headset 110 according to the second transmission interval.
Generally, the number of slots included in a transmission interval is more or less in positive correlation with the level of traffic compatibility. That is to say, the smaller the number of slots included in a transmission interval is, the smaller the number of idle slots is, the less services can be processed in the idle slots are, and the weaker the service compatibility is; on the contrary, the more the number of slots included in the transmission interval is, the more the number of idle slots is, the more services can be processed in the idle slots, and the stronger the service compatibility is.
In order to clarify the respective service compatibility of the first transmission interval obtained by the first negotiation and the second transmission interval obtained by the renegotiation, the following example is compared with fig. 7a and 7 b. Where the first negotiated transmission interval shown in fig. 7a comprises 6slots and the second renegotiated transmission interval shown in fig. 7b comprises 12 slots.
For example, the first transmission interval in fig. 7a includes 6slots, a packet of audio data may occupy 2 slots, and the number of free slots is 4. However, very few services can be completed in 4slots, and other services cannot be processed generally. The second transmission interval in fig. 7b is 12 slots, and a data packet of audio data occupies 2 slots, so that the number of idle slots is 10, and other services can be processed in the 10 idle slots. For example, it may be used for the handset 100 to interact with other bluetooth devices. Therefore, compared with 6slots, the number of free slots in 12 slots is more, and the capacity of compatibly processing other services is stronger. For example, the page process of FIG. 3 is likely to fail within 4 free slots of FIG. 7a, while the page process can be successfully completed within 10 free slots of FIG. 7 b.
Therefore, the transmission interval is modified from the first transmission interval to the second transmission interval, and the length of the second transmission interval is longer than that of the first transmission interval, so that the service compatibility can be improved. In practical implementation, the second transmission interval may be determined based on the support of the hardware of the handset 100 and the bluetooth headset 110 on the transmission interval and based on the influence of the transmission interval on the call quality, so that under the eSCO link of the second transmission interval, service compatibility and call quality may be ensured at the same time.
It should be noted that different bluetooth peripherals support call links with different transmission intervals established with other devices; wherein, different transmission intervals are specifically: including different numbers of slot transmission intervals. Accordingly, before establishing the eSCO link for the second transmission interval, the handset 100 may first determine the second transmission interval supported by the bluetooth headset 110 and then send the eSCO link for the second transmission interval to the bluetooth headset 110. That is, the second transmission interval including n slots is a transmission interval supported by the bluetooth headset 110. If the bluetooth headset 110 does not support the second transmission interval, it may cause failure of establishing the eSCO link of the second transmission interval, thereby affecting the voice call.
In summary, with the method for establishing a bluetooth connection provided in the embodiment of the present application, in the process of performing a call voice transmission with the bluetooth headset 110 by the mobile phone 100 according to the first transmission interval, if the ACL link established between the mobile phone 100 and the vehicle-mounted terminal 120 fails, the mobile phone 100 is triggered to automatically renegotiate with the bluetooth headset 110 to establish the eSCO link of the second transmission interval. In this way, the handset 100 can actively trigger a renegotiation, and then negotiate to obtain an eSCO link with a longer transmission interval.
It should be appreciated that after renegotiating the eSCO link with a longer transmission interval, the handset 100 can engage in a talk voice transmission with the bluetooth headset 110 for the first transmission interval, and thus more idle slots can remain in each transmission interval. Then, if the mobile phone 100 receives the request for the user to trigger the connection establishment with the vehicle-mounted terminal 120 again, the ACL links between the mobile phone 100 and the vehicle-mounted terminal 120 can be established in the more idle slots, so that the success rate of establishing the ACL links is improved. After the ACL link is successfully established between the mobile phone 100 and the vehicle-mounted terminal 120, the mobile phone 100 may further perform data transmission with the vehicle-mounted terminal 120 during a voice call using the bluetooth headset 110. Thereby simultaneously meeting various use requirements of users on the electronic equipment.
Further, the bluetooth communication is specifically performed by a bluetooth core system in the bluetooth devices (such as the mobile phone 100, the bluetooth headset 110, and the in-vehicle terminal 120). Herein, for ease of understanding, the bluetooth core system of the bluetooth device is simplified to be represented as a 3-layer structure shown in fig. 8. As shown in fig. 8, the bluetooth core system can be abstracted as a bluetooth HOST (HOST), a bluetooth Controller (Controller), and a HOST Controller Interface (HCI).
Here, HOST can be understood as bluetooth Application layer (User Application). For example, assuming that the mobile phone system is an Android system, the mobile phone HOST is a bluetooth application provided in the Android system. The HOST may receive an operation of a user and may transmit a corresponding command (command) to the controller in response to the operation of the user. For example, in S620, the HOST of the mobile phone 100 may send a request (i.e., a second connection request) for establishing an ACL link with the in-vehicle terminal 120 to the controller of the mobile phone 100 in response to the user triggering an operation of establishing a bluetooth connection with the in-vehicle terminal 120 to request establishment of an ACL link with the in-vehicle terminal 120. Or the HOST may also send a corresponding command (command) to the controller based on the traffic demand. For example, if the handset 100 starts to answer a call, the HOST of the handset 100 may send a command (i.e., a fourth connection request hereinafter) to the controller of the handset 100 to establish an eSCO link, on the premise that the handset 100 and the bluetooth headset 110 have established an ACL link.
The Controller may also be understood as a bluetooth chip that may execute a command issued by HOST and return a return value event (event) to HOST.
And, communication between the HOST and the controller is accomplished based on the HCI. And the command sent by the HOST is sent to the controller through the HCI. The event returned by the controller is notified to HOST via HCI. That is, the HCI functions as an intermediate layer. The command and event for transmission between HOST and controller are defined by the HCI protocol in the bluetooth protocol specification. For convenience of description, commands and events transmitted between the HOST and the controller are collectively referred to herein as HCI commands.
In addition, communication between bluetooth devices is achieved through over-the-air passwords between controllers of two bluetooth devices. The over-the-air password is defined by a Link Manager Protocol (LMP).
In some embodiments, the complete process of the first negotiation of the handset 100 with the bluetooth headset 110 is shown in fig. 9. Generally, if there is a call request from the handset 100, then a request to establish an eSCO link should be sent from the handset 100 to the bluetooth headset 110.
As shown in fig. 9, the first negotiation process is as follows:
1. the HOST of the handset 100 sends a fourth connection request to the controller of the handset 100. The fourth connection request is used to indicate that the handset 100 requests to establish a call link with the bluetooth headset 110. The controller of handset 110 may then receive a fourth connection request from HOST of handset 100. In a specific implementation, the fourth Connection request may be an HCI command HCI _ Enhanced _ Setup _ synchronization _ Connection. The HCI command carries an identifier of a data packet supported by the handset 100. Wherein, the data packet includes but is not limited to EV3 packet, EV4 packet, EV5 packet, 2-EV3 packet, 2-EV5 packet, 3-EV3 packet and/or 3-EV5 packet.
2. The controller of the handset 100 sends a return value Command, which may be the HCI Command HCI _ Command _ Status, to the HOST of the handset 100.
3. The controller of the handset 110 sends the first connection request to the bluetooth headset 110 (which may specifically be the controller of the bluetooth headset 110) in response to receiving the fourth connection request. That is, the first connection request is initiated after the controller of the handset 100 receives the fourth connection request. In this way, the first connection request may be sent to the bluetooth headset 110 according to the requirements of the bluetooth application layer. Thereby the demand of accurate laminating bluetooth application layer. In a particular implementation, the first connection request may be an over-the-air password LMP _ eSCO _ LINK _ REQ.
At first negotiation, the TeSCO field in LMP _ eSCO _ LINK _ REQ is used to indicate the first transmission interval. That is, the first transmission interval is carried in the air password LMP _ eSCO _ LINK _ REQ. For example, the value of TeSCO is 6slots ═ 3.750ms, which means that the transmission interval is 6slots, specifically 3.75 ms.
4. The controller of the bluetooth headset 110 sends a Request to set up an eSCO link, which may be an HCI command HCI _ Connection _ Request, to the HOST of the bluetooth headset 110.
5. The HOST of the bluetooth headset 110 transmits a command to Accept the Synchronous Connection Request, which may be an HCI command HCI _ Accept _ synchronization _ Connection _ Request, to the controller of the bluetooth headset 110. The HCI command carries an identifier of a data packet supported by the bluetooth headset 110. Wherein, the data packet includes but is not limited to EV3 packet, EV4 packet, EV5 packet, 2-EV3 packet, 2-EV5 packet, 3-EV3 packet and/or 3-EV5 packet.
6. The controller of bluetooth headset 110 sends a return value Command, which may be HCI _ Command _ Status, to the HOST of bluetooth headset 110.
7. The bluetooth headset 110 sends a command to the controller of the handset 100 to accept the establishment of the eSCO link. The command to accept establishment of the eSCO link may be an over-the-air password LMP _ ACCEPTED _ EXT. The controller of the handset 100 receives the LMP _ ACCEPTED _ EXT command, which indicates that the handset 100 and the bluetooth headset 110 successfully establish the call link of the first transmission interval.
By this point, the eSCO establishment is complete and the eSCO Synchronous connection begins (synchronized connection started).
8. The controller of the handset 100 sends an HCI _ synchronization _ Connection _ Complete command to the HOST of the handset 100 in response to receiving the LMP _ ACCEPTED _ EXT command; the HCI _ synchronization _ Connection _ Complete command is used to instruct the handset 100 and the bluetooth headset 110 to successfully establish a call link of the first transmission interval.
The HCI protocol, as shown in table 2 below, specifies that HCI _ synchronization _ Connection _ Complete carries a number of parameter contents.
TABLE 2
Figure BDA0003045122640000171
Wherein the Transmission Interval field in the HCI _ synchronization _ Connection _ Complete command is used to indicate the first Transmission Interval. That is, the HOST of the handset 100 and the HOST of the bluetooth headset 110 may be notified of successful establishment of the eSCO link for the first transmission interval, respectively, through the HCI _ synchronization _ Connection _ Complete command. For example, the value of the Transmission Interval field may be 3.75ms (6 slots), indicating that the Transmission Interval is 6slots, specifically 3.75 ms. Thus, after receiving the LMP _ ACCEPTED _ EXT command, the controller of the mobile phone 100 further sends an HCI _ synchronization _ Connection _ Complete command to the HOST of the mobile phone 100, so that the HOST of the mobile phone 100 can timely receive a message that the eSCO link is successfully established. Therefore, the communication voice transmission can be started in time, and the communication delay is avoided.
And, Status in table 2 above is whether the connection was successfully completed. When the value of Status is 0x00, it indicates that the Connection is successfully completed, i.e., the Connection is successfully completed. When the value of Status is 0x01 to 0xFF, it indicates that the Connection failed to complete. Connection _ Handle is a Handle to the ACL link. For example, the value of Connection handle may be 0x0E00, indicating that the handle of the ACL link is 14. BD ADDR is another connecting device that forms a connection. In other words, the Connection _ Handle may be the other connected device for the Connection. For example, the value of BD _ ADDR may be F4: BC: DA:2E:9A:11, indicating the address of another device. The Retransmission Window is the size of the Retransmission Window, indicated by the slot. That is, The transmission Window may be The size of The transmission Window measured in slots. For example, the value of Retransmission Window may be 2.4ms (4 slots), meaning that the Retransmission Window is 4slots, specifically 2.4 ms. RX _ Packet _ Length is the byte Length of the eSCO payload in the receiving direction. That is, RX _ Packet _ Length may specifically be Length in bytes of the eSCO payload in the receive direction. TX _ Packet _ Length is the byte Length of the eSCO payload in the transport direction. That is, TX _ Packet _ Length may be Length in bytes of the eSCO payload in the transmit direction. For example, the values of RX _ Packet _ Length and TX _ Packet _ Length may both be 60 bytes (byte). air mode is an over-the-air mode. For example, the air mode value may be Transparent Data, indicating that the air mode is Transparent Data.
After the handset 100 and the bluetooth headset 110 complete the first negotiation using the process shown in fig. 9, the first transmission interval is also determined. The first Transmission Interval may be the value of the TeSCO field in the air password LMP _ eSCO _ LINK _ REQ, and also the value of the Transmission Interval field in the HCI command HCI _ synchronization _ Connection _ Complete.
The embodiment of the present application provides a method for establishing a bluetooth connection, where the method is applied to a mobile phone 100, and the mobile phone 100 supports simultaneous establishment of a bluetooth connection with multiple bluetooth devices (e.g., a bluetooth headset 110 and a vehicle-mounted terminal 120). In this embodiment, the renegotiation is initiated by the bluetooth HOST (HOST) of the handset 100. Specifically, as shown in fig. 10, S630 is specifically S1010.
S1010, after the HOST of the mobile phone 100 receives the connection timeout message returned by the controller of the mobile phone 100, the HOST of the mobile phone 100 automatically initiates a request to renegotiate the eSCO link with the bluetooth headset 110, so that the controller of the mobile phone 100 and the bluetooth headset 110 negotiate to establish the eSCO link with the second transmission interval. The second transmission interval comprises n slots, n being greater than m, n and m both being positive integers.
Specifically, the controller of the handset 100 receives a page timeout message from the second bluetooth peripheral. The controller of the handset 100 sends a page timeout message to the HOST of the handset 100. The HOST of the handset 100 receives the page timeout message from the controller of the handset 100. Thus, the HOST of the handset 100 can learn that the ACL link establishment is timed out. The HOST of the handset 100 then automatically initiates a third connection request to the bluetooth headset 110 to cause the controller of the handset 100 to renegotiate the eSCO link with the bluetooth headset 110 to establish the second transmission interval.
In some embodiments, the process of initiating a renegotiation and establishing an eSCO link for the second transmission interval by the bluetooth HOST (HOST) of the handset 100 is as shown in fig. 11:
1. the HOST of the handset 100 automatically sends a transmission interval modification command to the controller of the handset 100 and sends a fifth connection request in response to receiving the page timeout message. Wherein the transmission interval modification command is used to instruct a controller of the handset 100 to modify a transmission interval (transmission interval). The fifth connection request is for instructing the controller of the handset 100 to request establishment of an eSCO link with the bluetooth headset 110 based on the modified transmission interval.
In some embodiments, the transmission interval modification command is a private HCI command. Private HCI commands refer to custom commands, not commands in the HCI protocol. The fifth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command. Similarly, the HCI _ Enhanced _ Setup _ synchronization _ Connection carries an identifier of a data packet supported by the mobile phone 100. Data packets include, but are not limited to, EV3 packets, EV4 packets, EV5 packets, 2-EV3 packets, 2-EV5 packets, 3-EV3 packets, and/or 3-EV5 packets.
Unlike the first negotiation: upon renegotiation, the HOST of the handset 100 sends a private HCI command to the controller of the handset 100. The controller of the handset 100 modifies the first transmission interval to the second transmission interval in response to receiving the private HCI command. Then, the HOST of the handset 100 transmits a fifth connection request to the controller of the handset 100. The fifth Connection request may be an HCI command HCI _ Enhanced _ Setup _ synchronization _ Connection for the controller of the handset 100 to request establishment of a talk link for the second transmission interval with the bluetooth headset 110 in response to receiving the HCI _ Enhanced _ Setup _ synchronization _ Connection command.
Among them, the private HCI command can be flexibly defined by those skilled in the art. In some embodiments, no parameter is included in the private HCI command, i.e., the private HCI command is an empty command. For example, the private HCI command whose content is empty is shown in table 3 below.
TABLE 3
Figure BDA0003045122640000181
In this embodiment, after the controller of the handset 100 receives the private HCI command with empty content, the controller may modify the first transmission interval to the second transmission interval. Wherein the second transmission interval is determined by the controller of the handset 100 according to the transmission intervals supported by the controller of the handset 100 and the controller of the bluetooth headset 110.
In other embodiments, no parameter is included in the private HCI command, i.e., the private HCI command is a parameter-containing command. The HCI command with the parameter carries a field indicating a second transmission interval. For example, the HCI command containing the reference is shown in table 4 below.
TABLE 4
Figure BDA0003045122640000191
In table 4 above, the Transmission Interval field in the HCI _ Enhanced _ Setup _ synchronization _ Connection _ modification command is used to indicate the second Transmission Interval.
In this embodiment, after the controller of the handset 100 receives the private HCI command containing the parameter, the first transmission interval may be modified to be the second transmission interval. Wherein the second transmission interval is indicated by a parameter in the private HCI command with the parameter.
2. The controller of the handset 100 sends a return value Command, which may be the HCI Command HCI _ Command _ Status, to the HOST of the handset 100.
3. The controller of the handset 100 automatically sends a third connection request to the controller of the bluetooth headset 110 in response to receiving the fifth connection request. The third connection request may be an over-the-air password LMP _ eSCO _ LINK _ REQ.
The difference from the first negotiation shown in fig. 9 is that: in the renegotiation process, the TeSCO field carried in the air password LMP _ eSCO _ LINK _ REQ is used to indicate the second transmission interval. The length of the second transmission interval is greater than the length of the first transmission interval.
4. The controller of the bluetooth headset 110 sends a command to the controller of the handset 100 to accept the establishment of the eSCO link, which may be an over-the-air password LMP _ ACCEPTED _ EXT.
Note that unlike the procedure for establishing an eSCO link in the first negotiation shown in fig. 9: during the renegotiation process, on the one hand, the eSCO link already exists, and thus there is no establishment procedure for the eSCO link from scratch, without the HOST of the bluetooth headset 110 performing the action of establishing the eSCO link. On the other hand, modification of the transmission interval (transmission interval) only affects the logic of the controller to transmit data. Based on this, during the renegotiation process, the renegotiation command is not passed through to the HOST of the bluetooth headset 110. Therefore, the interactive process can be reduced, and the efficiency of renegotiation is improved.
At this point, the eSCO link change is complete (synchronized connection changed), i.e., the renegotiation process is complete.
5. The controller of handset 100 receives the LMP _ ACCEPTED _ EXT command from bluetooth headset 110. The controller of the handset 100 sends an HCI _ synchronization _ Connection _ Changed command to the HOST of the handset 100 in response to receiving the LMP _ ACCEPTED _ EXT command. The HCI _ synchronization _ Connection _ Changed command is used to instruct the handset 100 to successfully establish an eSCO link for the second transmission interval with the bluetooth headset 110.
The HCI protocol, as shown in table 5 below, specifies that the HCI command HCI _ synchronization _ Connection _ Changed carries a plurality of parameter contents.
TABLE 5
Figure BDA0003045122640000192
Figure BDA0003045122640000201
Wherein the Transmission Interval field in the HCI _ synchronization _ Connection _ Changed command is used to indicate the second Transmission Interval. For example, the value of the Transmission Interval field may be 3.75ms (6 slots), indicating that the Transmission Interval is 6slots, specifically 3.75 ms. In this way, after receiving the LMP _ ACCEPTED _ EXT command, the controller of the handset 100 further transmits an HCI _ synchronization _ Connection _ Changed command to the HOST of the handset 100. After receiving the HCI _ synchronization _ Connection _ Changed command, the HOST of the handset 100 can timely obtain a message that the eSCO link of the second transmission interval is successfully modified.
In addition, the meanings of the remaining fields in table 5 above can be referred to the relevant description about table 2, and are not repeated here.
Through the above-described flow of fig. 11, HOST of the handset 100 automatically initiates a renegotiation in response to receiving the page timeout message. The eSCO link for the first transmission interval established by the first negotiation may be modified to the eSCO link for the second transmission interval by a renegotiation. For example, the first negotiation establishes 6slot eSCO links, and 12 slot eSCO links are obtained through renegotiation.
Illustratively, assume that the first transmission interval is 6slots and the second transmission interval is 12 slots. As shown in fig. 12, the overall process of the method for establishing a bluetooth connection provided in this embodiment is as follows:
1. the HOST of the handset 100 sends a fourth Connection request (e.g., HCI command HCI _ Enhanced _ Setup _ synchronization _ Connection command) to the bluetooth headset 110. The fourth connection request is used to instruct the controller of the handset 100 to request that an eSCO link be established with the bluetooth headset 110.
2. The HOST of the handset 100 receives a command to successfully establish an eSCO link with 6slots transmission intervals: after the controller of the handset 100 sends the first connection request (e.g., LMP _ eSCO _ LINK _ REQ) to the bluetooth headset 110, the controller of the handset 100 receives the return (e.g., LMP _ ACCEPTED _ EXT) from the bluetooth headset 110. After receiving the command LMP _ ACCEPTED _ EXT for accepting the Synchronous Connection request, the controller of the handset 100 returns a command (for example, HCI _ synchronization _ Connection _ Complete) for successfully establishing an eSCO link with a transmission interval of 6slots to the HOST of the handset 100. The transmission interval (transmission interval) carried in the air password LMP _ eSCO _ LINK _ REQ and the HCI command HCI _ synchronization _ Connection _ Complete is 6 slots.
3. The HOST of the mobile phone 100 sends a second connection request to the in-vehicle terminal 120: in the process of using the bluetooth headset 110 to perform voice call by the mobile phone 100, the HOST of the mobile phone 100 sends a second connection request to the in-vehicle terminal 120 in response to an operation of triggering connection establishment with the in-vehicle terminal 120 by the user, requesting establishment of an ACL link with the in-vehicle terminal 120 (as shown in the page process of fig. 3).
4. The HOST of the handset 100 receives the connection timeout message: in the page process, if the interaction of the ID packet or the FHS packet is interrupted by the data packet transmission of the audio data, a frequency hopping error occurs, which leads to an timeout of establishing the ACL link. At this time, the controller of the mobile phone 100 may receive a connection timeout (page timeout) message returned by the in-vehicle terminal 120. Then, the controller of the mobile phone 100 sends the page timeout message to the HOST of the mobile phone 100, so that the HOST of the mobile phone 100 can receive the page timeout message.
5. The HOST of the handset 100 sends a transmission interval modification command and a fifth connection command to the controller of the handset 100. The HOST of the handset 100, upon receiving the page timeout message, automatically sends a transmission interval modification command and a fifth Connection command (e.g., HCI _ Enhanced _ Setup _ synchronization _ Connection) to the controller of the handset 100 to request the controller of the handset 100 to modify the transmission interval to 12 slots, and sends a third Connection request to the bluetooth headset 110. The third connection request is used to instruct the remaining bluetooth headsets 110 of the handset 100 to establish eSCO links with 12 slots transmission intervals.
In summary, with the method for establishing a bluetooth connection provided in the embodiment of the present application, the HOST of the mobile phone 100 initiates a renegotiation according to the received page timeout message. That is, the HOST of the handset 100 determines the timing for initiating the renegotiation, and the controller of the handset 100 only needs to execute the command of the renegotiation. Thus, renegotiation can be initiated and completed without any change to the controller of the handset 100.
The embodiment of the present application provides a method for establishing a bluetooth connection, where the method is applied to a mobile phone 100, and the mobile phone 100 supports simultaneous establishment of a bluetooth connection with multiple bluetooth devices (e.g., a bluetooth headset 110 and a vehicle-mounted terminal 120). In this embodiment, the renegotiation is initiated by a bluetooth chip (controller) of the handset 100. Specifically, as shown in fig. 13, S630 is specifically S1310.
S1310, after the controller of the handset 100 receives the connection timeout message, the controller of the handset 100 automatically initiates a request to negotiate with the bluetooth headset 110 to establish an eSCO link with the second transmission interval, so as to negotiate with the bluetooth headset 110 to establish the eSCO link with the second transmission interval. The second transmission interval comprises n slots, n being greater than m, n and m both being positive integers.
In contrast to the exemplary embodiment according to fig. 10: in this embodiment, the controller of the handset 100 automatically initiates renegotiation after detecting that the ACL link establishment is timed out.
Specifically, the controller of the mobile phone 100 receives the page timeout message from the in-vehicle terminal 120. After the controller of the mobile phone 100 receives the page timeout message, it can know that the ACL link is established overtime. Then, the controller of the handset 100 automatically initiates a third connection request to the bluetooth headset 110. The third connection request is for instructing the handset 100 to establish an eSCO link with the bluetooth headset 110 for a second transmission interval.
In some embodiments, the process of automatically initiating renegotiation and establishing the eSCO link for the second transmission interval by the controller of the handset 100 is as shown in fig. 14:
1. the controller of the handset 100 automatically sends a third connection request to the bluetooth headset 110 in response to receiving the page timeout message. The third connection request may be an over-the-air password LMP _ eSCO _ LINK _ REQ. The value of the TeSCO field carried in the air password LMP _ eSCO _ LINK _ REQ is the second transmission interval.
In this embodiment, after the controller of the handset 100 detects the connection timeout, the controller of the handset 100 directly sends the air password LMP _ eSCO _ LINK _ REQ to the bluetooth headset 110 to renegotiate the eSCO LINK of the second transmission interval. Instead of sending the renegotiated HCI command HCI _ Enhanced _ Setup _ synchronization _ Connection to the controller of the handset 100 after receiving the page timeout message returned by the controller of the handset 100, the HOST of the handset 100 sends the air password LMP _ eSCO _ LINK _ REQ to the bluetooth headset 110.
2. The controller of the bluetooth headset 110 sends a command to the controller of the handset 100 to accept the synchronous connection, which may be an over-the-air password LMP _ ACCEPTED _ EXT.
Likewise, during the renegotiation process, the renegotiation command is not passed through to the HOST of the bluetooth headset 110. Therefore, the interactive process can be reduced, and the efficiency of renegotiation is improved.
At this point, the eSCO link change is complete (synchronized connection changed), i.e., the renegotiation process is complete.
3. The controller of handset 100 receives the LMP _ ACCEPTED _ EXT command from bluetooth headset 110. The controller of the handset 100 sends an HCI _ synchronization _ Connection _ Changed command to the HOST of the handset 100 in response to receiving the LMP _ ACCEPTED _ EXT command. The HCI _ synchronization _ Connection _ Changed command is used to instruct the handset 100 and the bluetooth headset 110 to successfully establish a call link of the second transmission interval.
As shown in table 5, the HCI _ synchronization _ Connection _ Changed command carries a Transmission Interval field, and the Transmission Interval field is used to indicate the second Transmission Interval.
Through the above-mentioned flow of fig. 14, the controller of the handset 100 automatically initiates a renegotiation, which may modify the eSCO link of the first transmission interval established by the first negotiation into the eSCO link of the second transmission interval through the renegotiation.
Illustratively, assume that the length of the first transmission interval is 6slots and the length of the second transmission interval is 12 slots. As shown in fig. 15, the overall process of the method for establishing a bluetooth connection provided in this embodiment is as follows:
1. the controller of the handset 100 receives the fourth connection request sent by the HOST of the handset 100: when there is a voice call demand, the HOST of the handset 100 sends a fourth connection request to the controller of the handset 100 requesting that an eSCO link be established with the bluetooth headset 110. The fourth Connection request may be an HCI _ Enhanced _ Setup _ synchronization _ Connection command. The controller of the handset 100 may then receive a fourth connection request.
2. The controller of the handset 100 sends a first connection request to the bluetooth headset 110: the first connection request is used to instruct the handset 100 and the bluetooth headset 110 to establish an eSCO link with a transmission interval of 6 slots. The first connection request may be LMP _ eSCO _ LINK _ REQ, and the TeSCO field in LMP _ eSCO _ LINK _ REQ has a value of 6 slots.
3. The controller of the handset 100 receives a command returned by the bluetooth headset 110 to accept the synchronous connection request: after agreeing to establish an eSCO link with 6slots transmission intervals, the bluetooth headset 110 returns a command to the controller of the handset 100 to accept the synchronous connection request. The controller of the handset 100 may then receive the command to accept the synchronous connection request. The command to accept the synchronous connection request may be LMP _ ACCEPTED _ EXT.
4. The controller of the handset 100 sends a command to successfully establish an eSCO link with 6slots transmission intervals to the HOST of the handset 100. The command to successfully establish an eSCO link with a Transmission Interval of 6slots may be HCI _ synchronization _ Connection _ Complete, where the value of the Transmission Interval field in HCI _ synchronization _ Connection _ Complete is 6 slots.
5. The controller of the handset 100 detects a connection timeout: in the process of the mobile phone 100 using the bluetooth headset 110 for voice call, the HOST of the mobile phone 100 requests the ACL link to be established with the in-vehicle terminal 120 in response to the user operation requesting the connection to be established with the in-vehicle terminal 120 (as shown in the page process of fig. 3). When the page process is interrupted by the data packet of the audio data, a frequency hopping error occurs, and the ACL link establishment is overtime. At this time, the controller of the handset 100 detects a connection timeout (page timeout).
6. The controller of the handset 100 transmits a third connection request to the bluetooth headset 110. The third connection request may be LMP _ eSCO _ LINK _ REQ, where the value of the TeSCO field carried in LMP _ eSCO _ LINK _ REQ is 12 slots. After receiving the page timeout message, the controller of the handset 100 automatically sends a renegotiation to establish an eSCO link with a transmission interval of 12 slots.
In summary, with the method for establishing a bluetooth connection provided in the embodiment of the present application, the controller of the mobile phone 100 initiates a renegotiation according to the received page timeout event. That is, the opportunity to initiate renegotiation is detected by the controller of the handset 100. Thus, renegotiation can be initiated and completed without any change to the HOST of the handset 100.
Further, during the call of the mobile phone 100 and the voice call using the bluetooth headset 110, the ACL link establishment between the mobile phone 100 and the vehicle-mounted terminal 120 may not be failed due to the small idle slots.
For example, in the scenario shown in fig. 1, as the vehicle drives away from the mobile phone 100, the distance between the in-vehicle terminal 120 and the mobile phone 100 gradually increases, and eventually exceeds the bluetooth communication range. At this time, if the mobile phone 100 requests establishment of the ACL link with the in-vehicle terminal 120, a result of timeout of establishment of the ACL link between the mobile phone 100 and the in-vehicle terminal 120 may also occur.
If the ACL link between the mobile phone 100 and the vehicle-mounted terminal 120 fails to be established due to less idle slots, even after renegotiation and establishment of the eSCO link at the second transmission interval, when the mobile phone 100 requests establishment of the ACL link with the vehicle-mounted terminal 120 again, the connection cannot be successful. Meanwhile, as the transmission interval becomes longer, it is also possible to affect the call quality.
Based on this, in other embodiments, a method for establishing a bluetooth connection is provided, which is applied to the mobile phone 100, and the mobile phone 100 supports simultaneous establishment of bluetooth connections with a plurality of bluetooth devices (e.g., the bluetooth headset 110 and the vehicle terminal 120). In this embodiment, the above-described case where the ACL link times out due to an increase in distance can be excluded. Specifically, as shown in fig. 16, S630 includes S1610.
S1610, in response to the failure to establish the ACL link, the handset 100 automatically sends a third connection request to the bluetooth headset if the handset 100 receives a first slave page response from the bluetooth headset 110.
If the mobile phone 100 receives a First slave page response (First slave page response) returned by the vehicle-mounted terminal 120, indicating that the distance between the vehicle-mounted terminal 120 and the mobile phone 100 is within the bluetooth communication range, renegotiating an eSCO link with a longer transmission interval.
If the mobile phone 100 does not receive the First slave page response (First slave page response) returned by the vehicle-mounted terminal 120, it indicates that the distance between the vehicle-mounted terminal 120 and the mobile phone 100 is not within the bluetooth communication range, and it is not necessary to renegotiate the eSCO link with a longer transmission interval.
It should be understood that in the page procedure shown in fig. 3, in a case where the mobile phone 100 does not receive the First slave page response (First slave page response) returned by the vehicle-mounted terminal 120, the mobile phone 100 will not naturally issue a Master page response (Master page response) for the First slave page response. Based on this, in other embodiments, the mobile phone 100 may determine whether the mobile phone 100 issues a master paging response to the in-vehicle terminal 120. If the signal is sent out, the distance between the vehicle-mounted terminal 120 and the mobile phone 100 can be indicated to be within the Bluetooth communication range.
In summary, with the method for establishing a bluetooth connection provided in the embodiment of the present application, after the mobile phone 100 detects that the ACL link is established overtime, the mobile phone 100 determines whether to receive a first slave device paging response returned by the vehicle-mounted terminal 120. And upon determining that the first slave connection response is received, the handset 100 renegotiates the eSCO link with the bluetooth headset 110 to establish the second transmission interval. In this way, the ACL link can be excluded from being timed out due to an increase in distance, and the reasonableness of renegotiation can be improved.
In the previous embodiment, the method of establishing a bluetooth connection was described with only one renegotiation. In other embodiments, after renegotiating the eSCO link for the second transmission interval, if the handset 100 detects the ACL link timeout again, the handset 100 may be triggered to negotiate again with the bluetooth headset 110 to establish the eSCO link for the third transmission interval. The third transmission interval includes p slots, p being greater than n. And, can so circulate. Therefore, when the free slot is too small and the ACL link fails, the success of the ACL link can be finally ensured.
In the above embodiments, the case where the call link is an eSCO link has been described as an example. While in other embodiments the telephony link is an SCO link. When the call link is an SCO link, the procedure for establishing the SCO link between the handset 100 and the bluetooth headset 110 is basically similar to the procedure for establishing the eSCO link between the handset 100 and the bluetooth headset 110 in the foregoing embodiment. The difference is the correspondence of the different commands used in establishing the SCO link and establishing the eSCO link shown in table 6 below.
TABLE 6
Command to establish eSCO link Command to establish SCO link
LMP_eSCO_LINK_REQ LMP_SCO_LINK_REQ
HCI_Enhanced_Setup_Synchronous_Connection HCI_Setup_Synchronous_Connection
Referring to table 6, in contrast to establishing an eSCO link: in the process of establishing the SCO LINK, the LMP _ eSCO _ LINK _ REQ command in the foregoing embodiment needs to be replaced with LMP _ SCO _ LINK _ REQ. Wherein, when the SCO LINK of the first transmission interval is established, the TeSCO field in the LMP _ SCO _ LINK _ REQ is used for indicating the first transmission interval. When the SCO LINK of the second transmission interval is established, the TeSCO field in the LMP _ SCO _ LINK _ REQ is used to indicate the second transmission interval.
And in the process of establishing the SCO link, the HCI _ Enhanced _ Setup _ synchronization _ Connection command in the foregoing embodiment needs to be replaced with HCI _ Setup _ synchronization _ Connection.
It should be understood that commands not listed in table 6 indicate that they are common in both establishing SCO links and establishing eSCO links.
Other embodiments of the present application provide an electronic device, which may include: the display screen (e.g., a touch screen), memory, and one or more processors. The display screen, memory and processor are coupled. The memory is for storing computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device may perform the various functions or steps of the above-described method embodiments. The structure of the electronic device may refer to the structure of the cellular phone 100 shown in fig. 5.
The embodiment of the present application further provides a chip system, as shown in fig. 17, the chip system 1700 includes at least one processor 1701 and at least one interface circuit 1702. The processor 1701 and the interface circuit 1702 may be interconnected by wires. For example, the interface circuit 1702 may be used to receive signals from other devices, such as a memory of an electronic device. As another example, the interface circuit 1702 may be used to send signals to other devices, such as the processor 1701. Illustratively, the interface circuit 1702 may read instructions stored in memory and send the instructions to the processor 1701. The instructions, when executed by the processor 1701, may cause the electronic device to perform the various steps in the embodiments described above. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
The embodiment of the present application further provides a computer storage medium, where the computer storage medium includes computer instructions, and when the computer instructions are run on the electronic device, the electronic device is enabled to execute each function or step executed by the mobile phone in the foregoing method embodiment.
The embodiment of the present application further provides a computer program product, which when running on a computer, causes the computer to execute each function or step executed by the mobile phone in the above method embodiments.
Through the description of the above embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A method for establishing Bluetooth connection is characterized in that the method is applied to an electronic device, the electronic device supports simultaneous establishment of Bluetooth connection with a first Bluetooth peripheral and a second Bluetooth peripheral, and the electronic device and the first Bluetooth peripheral both support a telephone hands-free protocol HFP;
the electronic equipment responds to a first trigger event and sends a first connection request to the first Bluetooth peripheral; the first connection request is used for requesting a call link establishing a first transmission interval with the first bluetooth peripheral, where the first transmission interval includes m slots, m is a positive integer, and the call link includes a synchronous connection-oriented SCO link or an enhanced synchronous connection-oriented eSCO link;
after the call link of the first transmission interval is successfully established, the electronic equipment performs call voice transmission with the first Bluetooth peripheral equipment according to the first transmission interval;
the electronic equipment responds to an operation of a user for requesting to establish Bluetooth connection with the second Bluetooth peripheral equipment and sends a second connection request to the second Bluetooth peripheral equipment; the second connection request is used for requesting to establish an asynchronous connectionless ACL link with the second Bluetooth peripheral;
the electronic equipment automatically sends a third connection request to the first Bluetooth peripheral equipment in response to the failure of establishing the ACL link; the third connection request is used for requesting to establish a call link of a second transmission interval with the first Bluetooth peripheral, the second transmission interval comprises n time slots, n is greater than m, and n is a positive integer; the second transmission interval comprises a greater number of idle time slots than the first transmission interval;
and after the call link of the second transmission interval is successfully established, the electronic equipment performs call voice transmission with a second Bluetooth peripheral according to the second transmission interval.
2. The method of claim 1, wherein the first triggering event is an event of answering or making a voice call; the talk LINK is the eSCO LINK, the first connection request is an LMP _ eSCO _ LINK _ REQ command, and a TeSCO field in the LMP _ eSCO _ LINK _ REQ command is used to indicate the first transmission interval;
the call LINK is an SCO LINK, the first connection request is an LMP _ SCO _ LINK _ REQ command, and a TSCO field in the LMP _ SCO _ LINK _ REQ command is used to indicate the first transmission interval.
3. The method of claim 1, wherein the electronic device comprises a bluetooth host and a bluetooth chip;
the electronic device sends a first connection request to the first Bluetooth peripheral in response to a first trigger event, including:
the Bluetooth host responds to a first trigger event and sends a fourth connection request to the Bluetooth chip; the fourth connection request is used for indicating the Bluetooth chip to request to establish a communication link with the first Bluetooth peripheral;
the Bluetooth chip receives the fourth connection request from the Bluetooth host;
and the Bluetooth chip responds to the fourth connection request and sends the first connection request to the first Bluetooth peripheral.
4. The method of claim 3, wherein the telephony link is the eSCO link, and wherein the fourth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the call link is the SCO link, and the fourth Connection request is an HCI _ Setup _ synchronization _ Connection command.
5. The method of claim 1, wherein after the electronic device sends a first connection request to the first Bluetooth peripheral in response to a first triggering event, the method further comprises:
the electronic device receiving an LMP _ ACCEPTED _ EXT command from the first Bluetooth peripheral; the LMP _ ACCEPTED _ EXT command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of the first transmission interval.
6. The method of claim 5, wherein the electronic device comprises a Bluetooth host and a Bluetooth chip;
the electronic device receiving an LMP _ ACCEPTED _ EXT command from the first bluetooth peripheral, comprising: the Bluetooth chip receives an LMP _ ACCEPTED _ EXT command from the first Bluetooth peripheral;
the method further comprises the following steps: the Bluetooth chip sends an HCI _ synchronization _ Connection _ Complete command to the Bluetooth host in response to receiving the LMP _ ACCEPTED _ EXT command; the HCI _ Synchronous _ Connection _ Complete command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of the first transmission interval; a Transmission Interval field in the HCI _ synchronization _ Connection _ Complete command is used to indicate the first Transmission Interval.
7. The method of any of claims 1-6, wherein after the electronic device sends a second connection request to a second Bluetooth peripheral in response to a user operation requesting establishment of a Bluetooth connection with the second Bluetooth peripheral, the method further comprises:
the electronic equipment receives a page timeout message from the second Bluetooth peripheral, wherein the page timeout message is used for indicating that the ACL link established between the electronic equipment and the second Bluetooth peripheral fails.
8. The method of claim 7, wherein the telephony LINK is the eSCO LINK, wherein the third connection request is an LMP _ eSCO _ LINK _ REQ command, and wherein a TeSCO field of the LMP _ eSCO _ LINK _ REQ command is used to indicate the second transmission interval;
the call LINK is the SCO LINK, the third connection request is an LMP _ SCO _ LINK _ REQ command, and a TSCO field in the LMP _ SCO _ LINK _ REQ command is used to indicate the second transmission interval.
9. The method of claim 8, wherein the electronic device comprises a bluetooth host and a bluetooth chip;
the electronic device receives a page timeout message from the second bluetooth peripheral, including:
the Bluetooth chip receives the page timeout message from the second Bluetooth peripheral;
wherein the electronic device automatically sends a third connection request to the first bluetooth peripheral in response to a failure to establish the ACL link, comprising:
and the Bluetooth chip automatically sends the third connection request to the first Bluetooth peripheral in response to receiving the page timeout message.
10. The method of claim 8, wherein the electronic device comprises a bluetooth host and a bluetooth chip;
the electronic device receives a page timeout message from the second bluetooth peripheral, including:
the Bluetooth chip receives the page timeout message from the second Bluetooth peripheral;
the Bluetooth chip sends the page timeout message to the Bluetooth host;
the Bluetooth host receives the page timeout message from the Bluetooth chip;
wherein the electronic device automatically sends a third connection request to the first bluetooth peripheral in response to a failure to establish the ACL link, comprising:
the Bluetooth host automatically sends a transmission interval modification command and a fifth connection request to the Bluetooth chip in response to receiving the page timeout message; the transmission interval modification command is used for indicating the Bluetooth chip to modify a transmission interval, and the fifth connection request is used for indicating the Bluetooth chip to establish a call link with a first Bluetooth peripheral based on the modified transmission interval request;
the Bluetooth chip receives the transmission interval modification command and the fifth connection request from the Bluetooth host;
and the Bluetooth chip automatically sends the third connection request to the first Bluetooth peripheral in response to receiving the fifth connection request.
11. The method of claim 10, wherein the transmission interval modification command is a private Host Control Interface (HCI) command; the call link is an eSCO link, and the fifth Connection request is an HCI _ Enhanced _ Setup _ synchronization _ Connection command; the call link is an SCO link, and the fifth Connection request is an HCI _ Setup _ synchronization _ Connection command.
12. The method of any of claims 1-6, wherein the electronic device comprises a Bluetooth host and a Bluetooth chip;
after the electronic device automatically sending a third connection request to the first Bluetooth peripheral in response to a failure to establish the ACL link, the method further comprises:
the Bluetooth chip receives an LMP _ ACCEPTED _ EXT command from the first Bluetooth peripheral, wherein the LMP _ ACCEPTED _ EXT command is used for indicating that the electronic equipment and the first Bluetooth peripheral successfully establish a call link of the second transmission interval;
the Bluetooth chip sends an HCI _ synchronization _ Connection _ Changed command to the Bluetooth host in response to receiving the LMP _ ACCEPTED _ EXT command; the HCI _ Synchronous _ Connection _ Changed command is used for indicating the electronic equipment and the first Bluetooth peripheral equipment to successfully establish a call link of the second transmission interval; a Transmission Interval field in the HCI _ synchronization _ Connection _ Changed command is used to indicate the second Transmission Interval;
the bluetooth host receives the HCI _ synchronization _ Connection _ Changed command from the bluetooth chip.
13. The method of any of claims 1-6, wherein different Bluetooth peripherals support telephony links with other devices that establish different transmission intervals; wherein the different transmission intervals specifically include: a transmission interval comprising a different number of slots;
the first Bluetooth peripheral supports a call link establishing the second transmission interval with the electronic device, wherein the second transmission interval comprises n time slots.
14. The method of any of claims 1-6, wherein the electronic device automatically sending a third connection request to the first Bluetooth peripheral device in response to a failure to establish the ACL link, comprises:
and the electronic equipment responds to the failure of establishing the ACL link and automatically sends the third connection request to the first Bluetooth peripheral equipment under the condition that the electronic equipment receives a first slave equipment paging response from the second Bluetooth peripheral equipment.
15. An electronic device, wherein the electronic device supports simultaneous bluetooth connections with a first bluetooth peripheral and a second bluetooth peripheral, both the electronic device and the first bluetooth peripheral supporting a phone hands free protocol HFP;
the electronic device comprises a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the memory for storing computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the method of any of claims 1-14.
16. A computer-readable storage medium having instructions stored therein, which when run on an electronic device, cause the electronic device to perform the method of any of claims 1-14.
CN202110470339.8A 2021-04-28 2021-04-28 Method for establishing Bluetooth connection and electronic equipment Active CN113329381B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110470339.8A CN113329381B (en) 2021-04-28 2021-04-28 Method for establishing Bluetooth connection and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110470339.8A CN113329381B (en) 2021-04-28 2021-04-28 Method for establishing Bluetooth connection and electronic equipment

Publications (2)

Publication Number Publication Date
CN113329381A CN113329381A (en) 2021-08-31
CN113329381B true CN113329381B (en) 2022-03-11

Family

ID=77413965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110470339.8A Active CN113329381B (en) 2021-04-28 2021-04-28 Method for establishing Bluetooth connection and electronic equipment

Country Status (1)

Country Link
CN (1) CN113329381B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114007209A (en) * 2021-10-28 2022-02-01 歌尔光学科技有限公司 BLE-based data transmission method and device and BLE master equipment
CN114745705A (en) * 2022-03-24 2022-07-12 Oppo广东移动通信有限公司 Communication chip, Bluetooth communication equipment and data transmission method
CN116033597B (en) * 2022-08-08 2023-12-12 荣耀终端有限公司 Bluetooth connection method and device, electronic equipment and storage medium
CN115942253B (en) * 2023-02-01 2023-08-04 荣耀终端有限公司 Prompting method and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102036125A (en) * 2009-09-29 2011-04-27 徐佳义 Portable digital radio group navigation system
CN102396293A (en) * 2009-10-26 2012-03-28 联发科技股份有限公司 Systems and methods for enhancing coexistence efficiency for multi-radio terminals
CN110381485A (en) * 2019-06-14 2019-10-25 华为技术有限公司 Bluetooth communication method, TWS bluetooth headset and terminal
CN110602683A (en) * 2019-09-26 2019-12-20 RealMe重庆移动通信有限公司 Bluetooth control method, device, mobile terminal and storage medium
CN111294784A (en) * 2020-05-13 2020-06-16 深圳市汇顶科技股份有限公司 Data transmission method, device, chip, electronic equipment and storage medium
CN111818503A (en) * 2020-09-08 2020-10-23 深圳市汇顶科技股份有限公司 Voice communication method, system, chip, electronic equipment and storage medium
CN112449332A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Bluetooth connection method and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102397285B1 (en) * 2014-07-31 2022-05-12 엘지전자 주식회사 Method and apparatus for controlling electronic device in wireless communication system supporting bluetooth communication
KR102322917B1 (en) * 2014-07-31 2021-11-08 엘지전자 주식회사 Method and apparatus for controlling electronic device in wireless communication system supporting bluetooth communication
US11115902B2 (en) * 2018-09-11 2021-09-07 Qualcomm Incorporated Broadcast isochronous relay over ESCO
CN113225693B (en) * 2019-04-18 2022-04-15 华为技术有限公司 Bluetooth connection method, equipment and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102036125A (en) * 2009-09-29 2011-04-27 徐佳义 Portable digital radio group navigation system
CN102396293A (en) * 2009-10-26 2012-03-28 联发科技股份有限公司 Systems and methods for enhancing coexistence efficiency for multi-radio terminals
CN110381485A (en) * 2019-06-14 2019-10-25 华为技术有限公司 Bluetooth communication method, TWS bluetooth headset and terminal
CN112449332A (en) * 2019-08-30 2021-03-05 华为技术有限公司 Bluetooth connection method and electronic equipment
CN110602683A (en) * 2019-09-26 2019-12-20 RealMe重庆移动通信有限公司 Bluetooth control method, device, mobile terminal and storage medium
CN111294784A (en) * 2020-05-13 2020-06-16 深圳市汇顶科技股份有限公司 Data transmission method, device, chip, electronic equipment and storage medium
CN111818503A (en) * 2020-09-08 2020-10-23 深圳市汇顶科技股份有限公司 Voice communication method, system, chip, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Speech recognition over bluetooth ACL and SCO links: a comparison;M.Russo,et al;《Second IEEE consumer communications and networking conference》;20050106;全文 *
蓝牙4.0底层核心技术协议研究与实现;徐金苟;《中国优秀硕士学位论文辑》;20121231;全文 *

Also Published As

Publication number Publication date
CN113329381A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN113329381B (en) Method for establishing Bluetooth connection and electronic equipment
CN113382397B (en) Bluetooth connection method, device and system
KR100675840B1 (en) Device and method for providing hands-free function in mobile phone using zigbee
CN113572731B (en) Voice communication method, personal computer, terminal and computer readable storage medium
CN112822663B (en) Bluetooth connection method and related device
US11683850B2 (en) Bluetooth reconnection method and related apparatus
CN111601199A (en) Wireless earphone box and system
CN115190389A (en) Audio data transmission method and equipment applied to TWS earphone single-ear and double-ear switching
CN108738008B (en) Bluetooth pairing method and system
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
JP2002186022A (en) Wearable terminal system
CN111629366B (en) Interaction method and device between Bluetooth devices, storage medium and electronic device
US11930542B2 (en) Source device switching method and device through Bluetooth connection information sharing
WO2021138914A1 (en) Method and apparatus for indicating data transmission, communication device and storage medium
WO2023284378A1 (en) Call control method and electronic device
WO2021057655A1 (en) Information indication method, device, and system
CN109275058B (en) Dual mode earphone system, bluetooth device and cable
WO2021129128A1 (en) Wireless charging method for mobile terminal and mobile terminal
CN113473291A (en) Communication method, earphone cabin and WIFI earphone
KR20050006707A (en) Remote cotrol method in wireless communication terminal
CN113114798B (en) Method for acquiring Internet protocol IP address and electronic equipment
CN113810887B (en) Bluetooth protocol connection method and device, storage medium and related equipment
CN116033597B (en) Bluetooth connection method and device, electronic equipment and storage medium
CN112469014A (en) Method and electronic equipment for configuring Bluetooth connection parameters
CN116074986B (en) Bluetooth connection method, device and system

Legal Events

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