CN116074793A - Bluetooth pairing method, device, system and storage medium - Google Patents

Bluetooth pairing method, device, system and storage medium Download PDF

Info

Publication number
CN116074793A
CN116074793A CN202111285181.3A CN202111285181A CN116074793A CN 116074793 A CN116074793 A CN 116074793A CN 202111285181 A CN202111285181 A CN 202111285181A CN 116074793 A CN116074793 A CN 116074793A
Authority
CN
China
Prior art keywords
bluetooth
information
electronic device
pairing
equipment
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.)
Pending
Application number
CN202111285181.3A
Other languages
Chinese (zh)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111285181.3A priority Critical patent/CN116074793A/en
Priority to PCT/CN2022/127076 priority patent/WO2023071993A1/en
Publication of CN116074793A publication Critical patent/CN116074793A/en
Pending legal-status Critical Current

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/14Direct-mode setup

Abstract

The embodiment of the application relates to the technical field of communication and provides a Bluetooth pairing method, equipment, a system and a storage medium. In a communication system consisting of a first electronic device, a second electronic device and a Bluetooth device, the Bluetooth device and the first electronic device are unpaired and the second electronic device is paired. The Bluetooth pairing method comprises the following steps: the second electronic equipment and the Bluetooth equipment establish Bluetooth connection and send notification information to the Bluetooth equipment; the Bluetooth equipment enters a pairing mode according to the notification information; the first electronic device obtains the Bluetooth address of the Bluetooth device from the second electronic device or the Bluetooth device or the third electronic device, and sends a pairing request to the Bluetooth device. The Bluetooth device is indicated to enter the pairing mode through the second electronic device, the situation that a user must operate the Bluetooth device to enable the Bluetooth device to enter the pairing mode is avoided, and the first electronic device can initiate a pairing process according to the acquired Bluetooth address of the Bluetooth device, so that successful pairing of the first electronic device and the Bluetooth device is achieved.

Description

Bluetooth pairing method, device, system and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a Bluetooth pairing method, device, system and storage medium.
Background
Bluetooth (Bluetooth) technology is a short-range wireless communication technology that is widely used in communication devices, such as smart phones, bluetooth headsets, etc.
The Bluetooth headset and the smart phone need to be paired before Bluetooth communication is carried out for the first time, and normal conversation, audio and other services can be carried out after the Bluetooth headset and the smart phone are paired. The Bluetooth headset is required to be in a pairing mode when being paired, and the inquiry request sent by the smart phone is scanned and replied, so that the smart phone can find the Bluetooth headset.
At present, for a Bluetooth headset which is not used for the first time, when the Bluetooth headset needs to carry out Bluetooth communication with equipment which is not paired, a user is required to carry out manual operation on physical keys on the Bluetooth headset, so that the Bluetooth headset can enter a pairing mode manually and can be paired with other equipment which is not paired. However, many users are not aware of the need to manually operate on the bluetooth headset, which results in the bluetooth headset not being able to communicate with other devices via bluetooth.
Disclosure of Invention
The embodiment of the application provides a Bluetooth pairing method, device, system and storage medium, which realize successful pairing of electronic equipment and Bluetooth equipment which is not used for the first time.
In a first aspect, a bluetooth pairing method is provided and applied to a communication system, wherein the communication system comprises a first electronic device, a second electronic device and a bluetooth device, the second electronic device and the bluetooth device are paired, and the first electronic device and the bluetooth device are unpaired. The Bluetooth pairing method comprises the following steps: the second electronic equipment and the Bluetooth equipment establish Bluetooth connection; the second electronic equipment sends notification information to the Bluetooth equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode; the Bluetooth equipment enters a pairing mode according to the notification information; the first electronic device acquires pairing information from the second electronic device or the Bluetooth device or the third electronic device, wherein the pairing information comprises a Bluetooth address of the Bluetooth device; and the first electronic device sends a pairing request to the Bluetooth device according to the Bluetooth address of the Bluetooth device.
According to the Bluetooth pairing method provided by the first aspect, by means of the second electronic equipment except the first electronic equipment and the Bluetooth equipment, the Bluetooth equipment can be controlled to enter the pairing mode through the second electronic equipment, so that the situation that a user can trigger the Bluetooth equipment to enter the pairing mode after operating the Bluetooth equipment is avoided, and inconvenience of operating the Bluetooth equipment by the user is eliminated. Moreover, the first electronic device can also obtain the Bluetooth address of the Bluetooth device without sending a query request to the Bluetooth device, so that the message flow of the pairing process is simplified, the realizability and efficiency of the pairing process of the Bluetooth device which is not used for the first time and the electronic device which is not paired are improved, and the use experience of a user is improved.
In a possible implementation manner, the second electronic device sends notification information to the bluetooth device, including: the second electronic equipment receives a first operation of a user; the second electronic device sends notification information to the Bluetooth device in response to the first operation.
In the implementation mode, the second electronic device is triggered to send the notification information to the Bluetooth device through the operation of the user, so that the flexibility of the operation is improved.
In a possible implementation manner, the second electronic device sends notification information to the bluetooth device, including: the second electronic device sends an L2CAP_ECHO_REQ message to the Bluetooth device, wherein the L2CAP_ECHO_REQ message comprises notification information; the bluetooth device sends an l2cap_echo_rsp message to the second electronic device.
In the implementation mode, the second electronic equipment sends the notification information to the Bluetooth equipment through the echo request, and the Bluetooth equipment is confirmed to successfully receive the notification information through the echo response, so that the success rate of sending the notification information by the second electronic equipment is improved.
In a possible implementation manner, the first electronic device obtains pairing information from the second electronic device, including: the second electronic equipment generates two-dimensional code information according to the pairing information and displays the two-dimensional code information; the first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain pairing information.
In the implementation manner, the first electronic device does not need to communicate with the second electronic device, and the pairing information in a visual form can be obtained through scanning or photographing and the like, so that the pairing information is obtained. The first electronic equipment obtains pairing information from the second electronic equipment, the number of the related equipment is small, the processing steps are few, and the implementation mode is simple.
In a possible implementation manner, before the second electronic device generates the two-dimensional code information according to the pairing information, the method further includes: the second electronic device receives a second operation of the user.
In the implementation mode, the second electronic device is triggered to generate the two-dimensional code information according to the pairing information through the operation of the user, so that the flexibility of the operation is improved.
In a possible implementation manner, the first electronic device obtains pairing information from the second electronic device, including: the second electronic device establishes communication connection with the first electronic device; the second electronic equipment sends pairing information to the Bluetooth equipment through communication connection; the first electronic device receives pairing information.
In the implementation mode, the second electronic equipment provides pairing information for the first electronic equipment through communication connection with the first electronic equipment, the number of related equipment is small, and the implementation mode is simple.
In a possible implementation manner, before the second electronic device and the first electronic device establish a communication connection, the method further includes: a third operation of the user is received.
In a possible implementation, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In this implementation, the communication connection is of multiple types, which improves the flexibility of implementation.
In a possible implementation manner, the first electronic device obtains pairing information from the bluetooth device, including: after the Bluetooth equipment enters a pairing mode according to the notification information, generating two-dimensional code information according to the pairing information, and displaying the two-dimensional code information; the first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain pairing information.
In the implementation mode, the first electronic equipment does not need to communicate with the Bluetooth equipment, and can acquire the pairing information in a visual form from the Bluetooth equipment in a scanning or photographing mode and the like, so that the pairing information is acquired, the safety of the first electronic equipment in acquiring the pairing information is improved, and the implementation mode is more diversified.
In a possible implementation manner, the third electronic device communicates with the bluetooth device, and the first electronic device obtains pairing information from the third electronic device, including: after the Bluetooth equipment enters a pairing mode according to the notification information, generating two-dimensional code information according to the pairing information; the Bluetooth equipment sends two-dimensional code information to the third electronic equipment; after receiving the two-dimension code information, the third electronic equipment displays the two-dimension code information; the first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain pairing information.
In this implementation, pairing information is provided by the bluetooth device to the third electronic device. The first electronic equipment does not need to communicate with the third electronic equipment, and can acquire the pairing information in a visual form in a scanning or photographing mode and the like, so that the pairing information is acquired, the safety of the first electronic equipment in acquiring the pairing information is improved, and the implementation modes are more diversified.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a second aspect, a bluetooth pairing method is provided and applied to a second electronic device, where the second electronic device is paired with a bluetooth device, and the bluetooth pairing method includes: establishing Bluetooth connection with Bluetooth equipment; and sending notification information to the Bluetooth device, wherein the notification information is used for indicating the Bluetooth device to enter a pairing mode.
In a possible implementation manner, sending notification information to a bluetooth device includes: receiving a first operation of a user; in response to the first operation, notification information is sent to the Bluetooth device.
In a possible implementation manner, sending notification information to a bluetooth device includes: transmitting an l2cap_echo_req message to the bluetooth device, the l2cap_echo_req message including notification information; and receiving an L2CAP_ECHO_RSP message sent by the Bluetooth device.
In a possible implementation manner, the method further includes: generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of Bluetooth equipment; and displaying the two-dimensional code information.
In a possible implementation manner, before generating the two-dimensional code information according to the pairing information, the method further includes: a second operation of the user is received.
In a possible implementation manner, the method further includes: establishing communication connection with a first electronic device, wherein the first electronic device and the Bluetooth device are unpaired; and sending pairing information to the Bluetooth device through the communication connection, wherein the pairing information comprises the Bluetooth address of the Bluetooth device.
In a possible implementation manner, before the communication connection is established with the first electronic device, the method further includes: a third operation of the user is received.
In a possible implementation, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In a possible implementation manner, sending pairing information to a bluetooth device through a communication connection includes: generating sharing information according to the pairing information; the shared information is sent to the bluetooth device over the communication connection.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a third aspect, a bluetooth pairing method is provided, applied to a bluetooth device, where the bluetooth device is unpaired with a first electronic device, and the bluetooth device is paired with a second electronic device, and the bluetooth pairing method includes: establishing Bluetooth connection with the second electronic equipment; receiving notification information sent by second electronic equipment, wherein the notification information is used for indicating Bluetooth equipment to enter a pairing mode; entering a pairing mode according to the notification information; and receiving a pairing request sent by the first electronic equipment.
In a possible implementation manner, receiving notification information sent by the second electronic device includes: receiving an L2CAP_ECHO_REQ message sent by the second electronic device, wherein the L2CAP_ECHO_REQ message comprises notification information; an l2cap_echo_rsp message is sent to the second electronic device.
In a possible implementation manner, after entering the pairing mode according to the notification information, the method further includes: generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of Bluetooth equipment; and sending the two-dimensional code information to the third electronic equipment.
In a possible implementation manner, after entering the pairing mode according to the notification information, the method further includes: generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of Bluetooth equipment; and displaying the two-dimensional code information.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a fourth aspect, a bluetooth pairing method is provided, applied to a first electronic device, where the first electronic device is unpaired with a bluetooth device, and the bluetooth device is paired with a second electronic device, and the bluetooth pairing method includes: acquiring pairing information from the second electronic device or the Bluetooth device or the third electronic device, wherein the pairing information comprises a Bluetooth address of the Bluetooth device; the third electronic device is communicated with the Bluetooth device; and sending a pairing request to the Bluetooth device according to the Bluetooth address of the Bluetooth device.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a possible implementation manner, obtaining pairing information from the second electronic device includes: scanning two-dimensional code information displayed by the second electronic equipment, wherein the two-dimensional code information is generated by the second electronic equipment according to the pairing information; and analyzing the two-dimensional code information to obtain pairing information.
In a possible implementation manner, obtaining pairing information from the second electronic device includes: establishing a communication connection with a second electronic device; pairing information is obtained from the second electronic device over the communication connection.
In a possible implementation manner, obtaining pairing information from the second electronic device through the communication connection includes: receiving sharing information sent by second electronic equipment; the sharing information is generated by the second electronic equipment according to the pairing information; and analyzing the shared information to obtain the pairing information.
In a possible implementation, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In a possible implementation manner, obtaining pairing information from a bluetooth device or a third electronic device includes: scanning two-dimensional code information displayed by the Bluetooth equipment or the third electronic equipment, wherein the two-dimensional code information is generated by the Bluetooth equipment according to the pairing information; and analyzing the two-dimensional code information to obtain pairing information.
In a fifth aspect, an electronic device is provided and applied to a third electronic device, where the third electronic device communicates with a bluetooth device, and the bluetooth pairing method includes: receiving two-dimensional code information sent by Bluetooth equipment, wherein the two-dimensional code information is generated by the Bluetooth equipment according to pairing information, and the pairing information comprises a Bluetooth address of the Bluetooth equipment; and displaying the two-dimensional code information.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a sixth aspect, there is provided an electronic device as a second electronic device, the second electronic device paired with a bluetooth device, the second electronic device including: the processing module is used for establishing Bluetooth connection with the Bluetooth equipment; the sending module is used for sending notification information to the Bluetooth equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode.
In a possible implementation manner, the processing module is further configured to: receiving a first operation of a user; and the sending module is also used for responding to the first operation and sending notification information to the Bluetooth equipment.
In a possible implementation manner, the device further comprises a receiving module; a transmitting module, configured to transmit an l2cap_echo_req message to a bluetooth device, where the l2cap_echo_req message includes notification information; and the receiving module is used for receiving the L2CAP_ECHO_RSP message sent by the Bluetooth equipment.
In a possible implementation manner, the processing module is further configured to: generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of Bluetooth equipment; and displaying the two-dimensional code information.
In a possible implementation manner, the processing module is further configured to: and before the two-dimensional code information is generated according to the pairing information, receiving a second operation of the user.
In a possible implementation manner, the processing module is further configured to: establishing communication connection with a first electronic device, wherein the first electronic device and the Bluetooth device are unpaired; and the sending module is also used for sending pairing information to the Bluetooth equipment through communication connection, wherein the pairing information comprises the Bluetooth address of the Bluetooth equipment.
In a possible implementation manner, the processing module is further configured to: a third operation of the user is received before a communication connection is established with the first electronic device.
In a possible implementation, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In a possible implementation manner, the processing module is further configured to generate sharing information according to the pairing information; and the sending module is used for sending the sharing information to the Bluetooth equipment through communication connection.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a seventh aspect, there is provided a bluetooth device unpaired with a first electronic device, the bluetooth device paired with a second electronic device, the bluetooth device comprising: the processing module is used for establishing Bluetooth connection with the second electronic equipment; the receiving module is used for receiving notification information sent by the second electronic equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode; the processing module is also used for entering a pairing mode according to the notification information; the receiving module is further used for receiving a pairing request sent by the first electronic device.
In one possible implementation manner, the device further comprises a sending module; a receiving module, configured to receive an l2cap_echo_req message sent by the second electronic device, where the l2cap_echo_req message includes notification information; and the sending module is used for sending the L2CAP_ECHO_RSP message to the second electronic device.
In one possible implementation manner, the device further comprises a sending module; the processing module is further used for generating two-dimensional code information according to pairing information after entering a pairing mode according to the notification information, wherein the pairing information comprises a Bluetooth address of the Bluetooth device; and the sending module is used for sending the two-dimensional code information to the third electronic equipment.
In a possible implementation manner, the processing module is further configured to: after entering a pairing mode according to the notification information, generating two-dimensional code information according to the pairing information, wherein the pairing information comprises a Bluetooth address of Bluetooth equipment; and displaying the two-dimensional code information.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In an eighth aspect, there is provided an electronic device as a first electronic device, the first electronic device unpaired with a bluetooth device, the bluetooth device paired with a second electronic device, the first electronic device comprising: the processing module is used for acquiring pairing information from the second electronic device or the Bluetooth device or the third electronic device, wherein the pairing information comprises the Bluetooth address of the Bluetooth device; the third electronic device is communicated with the Bluetooth device; and the sending module is used for sending a pairing request to the Bluetooth equipment according to the Bluetooth address of the Bluetooth equipment.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In one possible implementation manner, the processing module is specifically configured to: scanning two-dimensional code information displayed by the second electronic equipment, wherein the two-dimensional code information is generated by the second electronic equipment according to the pairing information; and analyzing the two-dimensional code information to obtain pairing information.
In a possible implementation manner, the processing module is configured to: establishing a communication connection with a second electronic device; pairing information is obtained from the second electronic device over the communication connection.
In a possible implementation manner, the device further comprises a receiving module; the receiving module is used for receiving the sharing information sent by the second electronic equipment; the sharing information is generated by the second electronic equipment according to the pairing information; and the processing module is used for analyzing the shared information and obtaining the pairing information.
In a possible implementation, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In a possible implementation manner, the processing module is configured to: scanning two-dimensional code information displayed by the Bluetooth equipment or the third electronic equipment, wherein the two-dimensional code information is generated by the Bluetooth equipment according to the pairing information; and analyzing the two-dimensional code information to obtain pairing information.
In a ninth aspect, there is provided an electronic device as a third electronic device, the third electronic device being in communication with a bluetooth device, the third electronic device comprising: the receiving module is used for receiving two-dimensional code information sent by the Bluetooth equipment, wherein the two-dimensional code information is generated by the Bluetooth equipment according to pairing information, and the pairing information comprises a Bluetooth address of the Bluetooth equipment; and the processing module is used for displaying the two-dimensional code information.
In a possible implementation, the pairing information further includes capability information of the bluetooth device.
In a tenth aspect, there is provided an electronic device comprising as a second electronic device a processor for coupling with a memory and reading instructions in the memory and causing the electronic device to perform the method provided in the second aspect in accordance with the instructions.
In an eleventh aspect, there is provided a bluetooth device comprising a processor for coupling with a memory and reading instructions in the memory and causing the bluetooth device to perform the method provided in the third aspect in accordance with the instructions.
In a twelfth aspect, there is provided an electronic device comprising, as a first electronic device, a processor for coupling with a memory and reading instructions in the memory and causing the electronic device to perform the method provided in the fourth aspect according to the instructions.
In a thirteenth aspect, there is provided an electronic device comprising, as a third electronic device, a processor for coupling with a memory and reading instructions in the memory and causing the electronic device to perform the method provided in the fifth aspect according to the instructions.
In a fourteenth aspect, there is provided a communication system including the second electronic device provided in the tenth aspect, the bluetooth device provided in the eleventh aspect, and the first electronic device provided in the twelfth aspect.
In a possible implementation manner, the communication system further includes a third electronic device provided in the thirteenth aspect.
A fifteenth aspect provides a program for performing the method provided in the first, second, third, fourth or fifth aspects when executed by a processor.
In a sixteenth aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer or processor, implement the method provided in the first, second, third, fourth or fifth aspects.
In a seventeenth aspect, there is provided a program product comprising a computer program stored in a readable storage medium from which at least one processor of a device can read, the at least one processor executing the computer program causing the device to carry out the method provided in the first, second, third, fourth or fifth aspects.
Drawings
FIG. 1 is a schematic diagram of a scenario of Bluetooth communication;
FIG. 2 is a message interaction diagram of the Bluetooth device and the electronic device in FIG. 1 during pairing;
fig. 3A to 3B are schematic diagrams illustrating a user operating a bluetooth device to enter a pairing mode;
FIGS. 4A-4C are a set of interface diagrams of the electronic device after turning on the Bluetooth function;
fig. 5 is a schematic diagram of a scenario of bluetooth communication applicable to the embodiments of the present application;
fig. 6 is a message interaction diagram of a bluetooth pairing method according to an embodiment of the present application;
FIGS. 7A-7F are a set of interface schematic diagrams of a second electronic device;
FIGS. 8A-8F are another set of interface schematic diagrams of a second electronic device;
fig. 9 is a message interaction diagram of a second electronic device sending notification information according to an embodiment of the present application;
fig. 10A is a schematic diagram of a format of a data packet corresponding to an l2cap_echo_req message according to an embodiment of the present application;
fig. 10B is a schematic diagram of a format of a data packet corresponding to an l2cap_echo_rsp message provided in an embodiment of the present application;
fig. 11 is a message interaction diagram of a first electronic device obtaining configuration information according to an embodiment of the present application;
fig. 12 is another message interaction diagram of the bluetooth pairing method provided in the embodiment of the present application;
Fig. 13 is another message interaction diagram of the first electronic device obtaining configuration information according to the embodiment of the present application;
fig. 14 is a message interaction diagram of a bluetooth pairing method according to an embodiment of the present application;
fig. 15 is a further message interaction diagram of the first electronic device obtaining configuration information according to the embodiment of the present application;
fig. 16 is a message interaction diagram of a bluetooth pairing method according to an embodiment of the present application;
fig. 17 is a further message interaction diagram of the first electronic device obtaining configuration information according to the embodiment of the present application;
FIG. 18 is a schematic structural view of an apparatus according to an embodiment of the present disclosure;
FIG. 19 is a schematic view of another structure of the apparatus according to the embodiment of the present application;
fig. 20 is a schematic structural diagram of an apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below with reference to the accompanying drawings.
The Bluetooth pairing method provided by the embodiment of the application is suitable for the pairing process between devices in Bluetooth communication. First, a pairing process will be described.
In bluetooth communication, a pairing process needs to be performed first before two devices perform bluetooth communication for the first time. After the two devices are paired, information such as a bluetooth address (bluetooth device address, bd_addr), a key, and the like is stored in the devices, so that bluetooth communication is possible. Subsequently, if the information such as the bluetooth address and the key stored in the two devices is not emptied, when the bluetooth communication is performed again, a bluetooth connection request can be sent between the two devices according to the bluetooth address, and the pairing process is not required to be performed again.
By way of example, fig. 1 is a schematic diagram of a scenario of bluetooth communication. As shown in fig. 1, both the electronic device 100 and the bluetooth device 200 support bluetooth functions, and the electronic device 100 and the bluetooth device 200 can perform bluetooth communication.
The types and names of the electronic device 100 and the bluetooth device 200 are not limited. Examples of some electronic devices are, for example: a wireless terminal in a cell phone, tablet, notebook, palm, wearable device, smart screen, teaching device, internet of things (internet of things, IOT) device, or smart home (smart home), etc. Optionally, the electronic device 100 has a display screen. Examples of some bluetooth devices are: bluetooth headset, bluetooth sound box, bluetooth handwriting pen, etc.
For convenience of explanation, the embodiment of the present application will be described taking the electronic device 100 as a mobile phone and the bluetooth device 200 as a bluetooth headset as an example.
Next, a message flow in the pairing process will be described. To facilitate understanding, the pairing process may include a discovery device phase and a pairing phase. In the discovery device phase, the electronic device can discover the paired bluetooth device, and interact with the bluetooth device with relevant information required in the pairing phase, such as the bluetooth address of the bluetooth device. In the pairing phase, the electronic device and the Bluetooth device can exchange information such as keys for subsequent Bluetooth communication.
Fig. 2 is a message interaction diagram of the bluetooth device and the electronic device in fig. 1 during pairing. As shown in fig. 2, the pairing process between devices in bluetooth communication may include:
s21, the Bluetooth device responds to the operation of the user on the Bluetooth device and enters a pairing mode.
Specifically, the user needs to operate the bluetooth device so that the bluetooth device enters a pairing mode. When the bluetooth device is in the pairing mode, the electronic device may search for a query request (query request) sent by the electronic device, and reply a query response (query response) to the electronic device, so that the electronic device discovers the bluetooth device. When the use states of the bluetooth devices are different, the operations of the users on the bluetooth devices can be different.
Optionally, in one implementation, the first case of using the bluetooth headset is opened. As shown on the left side of fig. 3A, the bluetooth headset includes a cover 201 and a case 202. The Bluetooth headset is never used after leaving the factory. As shown on the right side of fig. 3A, when the bluetooth headset is first opened for use, the bluetooth headset may be triggered to enter the pairing mode. Correspondingly, the Bluetooth headset enters a pairing mode in response to the operation of a user.
Alternatively, in another implementation, a scenario in which the bluetooth headset is not first used is provided. As shown on the left side of fig. 3B, the bluetooth headset has been used to communicate bluetooth with at least one electronic device. As shown on the right side of fig. 3B, when the bluetooth headset needs to perform bluetooth communication with an unpaired electronic device, or when bluetooth communication with an electronic device that has been historically paired but needs to be paired again, the user may press the physical key 203 on the box 202, triggering the bluetooth headset to enter the pairing mode. Accordingly, the bluetooth headset enters a pairing mode in response to an operation of the user pressing the physical key 203.
It should be noted that, in the embodiment of the present application, the name of the pairing mode is not limited. For example, the pairing mode may also be referred to as a pairing state or a query scan (query scan) state.
S22, the electronic equipment sends a query request (query request). Correspondingly, bluetooth devices in a pairing mode around the electronic device can scan the inquiry request and receive the inquiry request.
Specifically, after the electronic device turns on the bluetooth function, the electronic device may enter an inquiry (inquiry) state, and send an inquiry request to surrounding devices. Accordingly, if the surrounding bluetooth devices are in the pairing mode, the inquiry request may be scanned, and an inquiry response (query response) may be replied to the electronic device, so that the electronic device may discover the bluetooth device.
The execution order of S21 and S22 is not limited. For example, the user triggers the bluetooth headset to enter the pairing mode by pressing a physical key on the bluetooth headset box, and then the electronic device turns on the bluetooth function, i.e., performs S21 first and then S22. For another example, the electronic device turns on the bluetooth function first, and then the user first opens the box to trigger the bluetooth headset to enter the pairing mode using the bluetooth headset, that is, S22 is executed first and S21 is executed second.
The inquiry request includes a bluetooth address of the electronic device, and the bluetooth address may refer to related content in a bluetooth protocol, which is not described herein.
Alternatively, the electronic device may send the query request according to the first period. Alternatively, the bluetooth device in pairing mode may scan for inquiry requests according to the second period. Alternatively, the first period and the second period may be the same or different.
S23, the Bluetooth device sends a query response (query response) to the electronic device. Correspondingly, the electronic equipment receives the inquiry response sent by the Bluetooth equipment.
The inquiry response comprises the Bluetooth address of the Bluetooth device.
Specifically, after the bluetooth device in the pairing mode scans the inquiry request sent by the electronic device, an inquiry response can be returned to the electronic device according to the bluetooth address of the electronic device in the inquiry request, so that the electronic device can find the bluetooth device and continue to perform a subsequent pairing process with the electronic device.
The discovery device stage includes, but is not limited to, S21 to S23. For example, in the discovery device phase, the electronic device and the bluetooth device may also obtain at least one of the following information through interaction of messages: device name of the bluetooth device, device support characteristics (device supported feature) information of the electronic device, device support characteristics information of the bluetooth device. The device supporting feature information may also be referred to as capability information, and reference may be made to content related to a device feature (device feature) in the bluetooth protocol, which is not described herein.
By the discovery device phase, the electronic device can discover nearby paired bluetooth devices. By way of example, fig. 4A shows a schematic interface diagram of an electronic device at the discovery device stage. As shown in fig. 4A, the bluetooth main interface 40 of the mobile phone includes a bluetooth-enabled switch control 41, an open-detected switch control 42, a "device name" tab 43, a "received file" tab 44, paired devices 45, and available devices 46. The name of the handset is "handset 2" as known from the "device name" tab 43. The paired device 45 shows the device that the handset 2 historically successfully paired, e.g., handset 1. The available device 46 displays the currently paired devices found by the handset 2, for example a bluetooth headset. As shown in fig. 4A, the user may click on the bluetooth headset in the available device 46 to pair the handset 2 with the bluetooth headset. Correspondingly, the mobile phone 2 starts a pairing phase in the pairing process in response to the operation of the user.
Optionally, before pairing with the bluetooth headset, the mobile phone 2 may also display a prompt message. Illustratively, after the user clicks on the Bluetooth headset in the available device 46 in FIG. 4A, a variation of the Bluetooth master interface 40 may be seen in FIG. 4B. As shown in fig. 4B, the handset 2 pops out the pairing popup window 47 in the bluetooth main interface 40. The user operates by looking at the prompt in the pairing pop-up 47. For example, the hint information includes: "to pair with: bluetooth earphone. Also included in pairing pop-up window 47 are a cancel key and a pairing key. The user may click on the pairing button 48 to cause the handset 2 to pair with the bluetooth headset. Accordingly, the mobile phone 2 executes the message flow of the pairing phase in response to the operation of clicking the pairing key 48 by the user, specifically see S24.
And S24, the electronic equipment sends a pairing request to the Bluetooth equipment. Correspondingly, the Bluetooth device receives a pairing request sent by the electronic device.
And S25, the Bluetooth device sends a pairing response (pairing response) to the electronic device. Correspondingly, the electronic equipment receives the pairing response sent by the Bluetooth equipment.
Specifically, in the pairing stage, the electronic device may send a pairing request to the bluetooth device according to the bluetooth address of the bluetooth device, and the bluetooth device may send a pairing response to the electronic device according to the bluetooth address of the electronic device, where the pairing request and the pairing response are used to exchange configuration information, and the configuration information is used to determine a pairing mode and assign a key.
Alternatively, the configuration information may include input-output capabilities of the electronic device. Different electronic devices are different in type, different in hardware configuration and different in input and output capabilities. For example, the input-output capability may indicate at least one of: whether the electronic device can input, the input mode when the electronic device can input, whether the electronic device can display, and the like. Alternatively, the input-output capabilities of the electronic device may include any one of the following: no input and no output, only display, with display and selectable "yes/no", only keyboard, with keyboard and display.
The pairing stage includes, but is not limited to, S24 to S25. For example, in the pairing phase, it is also necessary to determine a pairing algorithm of the electronic device and the bluetooth device, establish an encryption link, and transmit a key, which can be referred to as content of pairing authentication in the bluetooth protocol, which is not described herein.
After the electronic equipment and the Bluetooth equipment are paired, information such as a secret key is stored in the equipment, and Bluetooth communication can be carried out between the electronic equipment and the Bluetooth equipment subsequently. By way of example, fig. 4C shows a schematic diagram of an interface of an electronic device after pairing of the electronic device and a bluetooth device is completed. In contrast to fig. 4A, as shown in fig. 4C, in the bluetooth main interface 40, the paired device 45 includes the handset 1 and the bluetooth headset, which indicates that the handset 2 and the bluetooth headset have completed pairing, and bluetooth communication can be performed subsequently.
S26, after the electronic equipment and the Bluetooth equipment are paired, bluetooth connection can be established for service.
The embodiment of the application does not limit the type of the service. Such as telephony services and audio services. Optionally, the call service includes, but is not limited to: voice call or video call; audio services include, but are not limited to: play music, alert tones, navigation tones, alarm clocks, games, video, etc.
Through the message flow of the pairing process shown in fig. 2, it can be known that when the bluetooth device is paired with the electronic device, the bluetooth device needs to be in a pairing mode, so that the bluetooth device can scan the inquiry request sent by the electronic device and reply to the inquiry response. Correspondingly, the electronic device discovers the Bluetooth device which can be paired, acquires the Bluetooth address of the Bluetooth device from the inquiry response sent by the Bluetooth device, and can send a pairing request to the Bluetooth device according to the Bluetooth address of the Bluetooth device subsequently to continue the pairing process.
Currently, controlling a bluetooth headset to enter a pairing mode requires a user to operate the bluetooth headset. When the Bluetooth device is used for the first time, a user opens the box to trigger the Bluetooth headset to enter a pairing mode. The bluetooth headset is used for the first time only once, and in most application scenes, the bluetooth equipment is in a used state, and at the moment, a user needs to manually operate a physical key on the bluetooth headset box to enable the bluetooth headset to enter a pairing mode. However, many users are not aware of this operation, so that the bluetooth headset which is not used for the first time cannot enter a pairing mode, and cannot complete the pairing process with the electronic device, so that subsequent bluetooth communication and service cannot be performed, and the use feeling of the user on the bluetooth headset is seriously affected.
The embodiment of the application provides a Bluetooth pairing method, by means of a third party device except electronic equipment and Bluetooth equipment, the Bluetooth equipment can be controlled to enter a pairing mode through the third party device, so that the situation that a user can trigger the Bluetooth equipment to enter the pairing mode after operating the Bluetooth equipment is avoided, and inconvenience of operating the Bluetooth equipment by the user is eliminated. Moreover, the electronic equipment can obtain the Bluetooth address of the Bluetooth equipment without sending a query request to the Bluetooth equipment, so that the message flow of the pairing process is simplified, the realizability and convenience of the pairing process of the Bluetooth equipment which is not used for the first time and the electronic equipment which is not paired are improved, and the use experience of a user is improved.
For convenience of explanation, an electronic device that needs to be paired with a bluetooth device is referred to as a first electronic device, a third party device other than the first electronic device and the bluetooth device is referred to as a second electronic device, and the bluetooth device is historically paired with the second electronic device successfully without clearing data.
Fig. 5 is a schematic diagram of a scenario of bluetooth communication applicable to the embodiments of the present application. As shown in fig. 5, the scene includes a bluetooth device, a first electronic device, and a second electronic device. The bluetooth device may be in bluetooth communication with the second electronic device. Alternatively, the first electronic device and the second electronic device may or may not communicate. Optionally, the communication between the first electronic device and the second electronic device includes, but is not limited to, at least one of: wired communication, bluetooth communication, wireless fidelity (wireless fidelity, wiFi) communication, near field communication (near field communication, NFC) or cellular communication.
Optionally, in fig. 5, a third electronic device may also be included in the scene. The bluetooth device may communicate with a third electronic device. Communication between the bluetooth device and the third electronic device includes, but is not limited to, at least one of: wired communication, bluetooth communication, wiFi communication, or NFC communication. Optionally, the first electronic device and the third electronic device may or may not communicate. The communication between the first electronic device and the third electronic device includes, but is not limited to, at least one of: wired communication, bluetooth communication, wiFi communication, NFC communication, or cellular communication.
The types and names of the first electronic device, the second electronic device, and the third electronic device may be referred to as electronic device 100 in fig. 1. Optionally, the third electronic device may also be a device for displaying information related to the bluetooth device, such as a display screen or a display, etc. The number of the first electronic device, the second electronic device and the third electronic device is not limited in the embodiment of the application.
The technical scheme of the present application is described in detail below through specific examples. The following embodiments may be combined with each other and may not be described in detail in some embodiments for the same or similar concepts or processes.
The terms "first," "second," "third," "fourth," and the like in embodiments of the present application, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Fig. 6 is a message interaction diagram of a bluetooth pairing method according to an embodiment of the present application. The bluetooth pairing method provided by the embodiment is suitable for the scene shown in fig. 5, and the execution subject relates to bluetooth equipment, first electronic equipment and second electronic equipment. Optionally, the execution body may also relate to a third electronic device. For ease of illustration, in some examples, the bluetooth device is a bluetooth headset, the first electronic device is a cell phone 1, the second electronic device is a cell phone 2, and the third electronic device is a display 3. As shown in fig. 6, the bluetooth pairing method provided in this embodiment may include:
s61, the Bluetooth device establishes Bluetooth connection with the second electronic device.
Alternatively, the bluetooth connection may comprise an asynchronous connection (asynchronous connection-oriented, ACL) connection. The ACL connection is a connection on the physical layer in the bluetooth protocol, and may refer to the relevant content in the bluetooth protocol, which is not described herein.
Optionally, the bluetooth connection may further comprise at least one of the following: a synchronous oriented link (SCO) connection, an advanced audio distribution profile (advanced audio distribution profile, A2 DP) connection, or a Hands Free Profile (HFP) connection. The SCO connection is a connection on a physical layer in the bluetooth protocol, and the A2DP connection and the HFP connection are connections on an application layer in the bluetooth protocol, which may refer to related contents in the bluetooth protocol, and are not described herein.
In this embodiment, the time for establishing bluetooth connection between the bluetooth device and the second electronic device in the application scenario is not limited.
Optionally, in an application scenario, the bluetooth device does not currently establish a bluetooth connection with the second electronic device. When the Bluetooth device needs to be paired with the first electronic device, the Bluetooth device establishes a Bluetooth connection with the second electronic device. For example, the handset 2 does not currently have bluetooth functionality on. When the Bluetooth headset needs to be paired with the mobile phone 1, the user opens the Bluetooth function of the mobile phone 2, and the mobile phone 2 can automatically establish Bluetooth connection with the Bluetooth headset.
Optionally, in another application scenario, when the bluetooth device needs to be paired with the first electronic device, the bluetooth device has already established a bluetooth connection with the second electronic device. For example, the user is listening to music played on the handset 2 via a bluetooth headset, which also needs to be paired with the handset 1.
And S62, the second electronic device sends notification information to the Bluetooth device, wherein the notification information is used for indicating the Bluetooth device to enter a pairing mode. Correspondingly, the Bluetooth device receives the notification information sent by the second electronic device.
The second electronic device sends notification information to the Bluetooth device to indicate the Bluetooth device to enter the pairing mode, so that the situation that a user must operate the Bluetooth device to enable the Bluetooth device to enter the pairing mode is avoided, inconvenience in operation of the Bluetooth device by the user is avoided, and feeling of using the Bluetooth device by the user is improved.
Alternatively, in one implementation, after the bluetooth device establishes a bluetooth connection with the second electronic device, the second electronic device may be triggered to send notification information to the bluetooth device. For example, a user may wish to pair a bluetooth headset with a handset 1, where the bluetooth headset and handset 1 are located, the user typically knows a second electronic device in the environment, e.g., handset 2. For example, the mobile phone 1 and the mobile phone 2 are mobile phones used by the user 1; alternatively, user 1 uses mobile phone 1, and user 1 knows that user 2 uses mobile phone 2. Like this, when user 1 need pair bluetooth headset with cell-phone 1, can open the bluetooth function of cell-phone 2, cell-phone 2 establishes bluetooth with bluetooth headset and is connected to trigger cell-phone 2 to send the notice information to bluetooth headset, instruct bluetooth headset to get into the mode of pairing.
Alternatively, in another implementation manner, the first operation may be performed on the second electronic device by the user, so as to trigger the second electronic device to send notification information to the bluetooth device.
The first operation of the second electronic device is not limited by the user in this embodiment. For example, the first operation by the user may be any one of the following: the method comprises the steps of performing touch operation on a related interface displayed by the second electronic device by a user, performing gesture operation on a display screen of the second electronic device by the user, performing operation on physical keys on the second electronic device by the user, inputting voice by a microphone of the second electronic device by the user, or inputting an image by a camera of the second electronic device by the user. Optionally, the second electronic device may be provided with an Application (APP) for managing the bluetooth device, and in this embodiment, the name and function of the APP are not limited, and the content and layout in the relevant interface of the APP are not limited.
The following is illustrated by way of example.
Alternatively, in one example, as shown in fig. 7A, the handset 2 is currently running a system application, displaying a bluetooth host interface 70 in the system application. It is known from the paired device 71 in the bluetooth main interface 70 that the bluetooth connection is currently made between the handset 2 and both the handset 1 and the bluetooth headset. The user may click on the bluetooth headset in the paired device 71, triggering the handset 2 to send notification information to the bluetooth headset. Accordingly, the mobile phone 2 transmits notification information to the bluetooth headset in response to the user's operation.
Optionally, the bluetooth main interface 70 includes prompt information for guiding the user to perform the first operation. For example, in fig. 7A, there is a prompt "click on bluetooth headset to enter pairing mode" below bluetooth headset.
Optionally, before the second electronic device sends the notification information to the bluetooth device, a prompt message may be displayed to the user. Illustratively, as shown in fig. 7A, the user clicks on the bluetooth headset in the paired device 71, triggering the handset 2 to send notification information to the bluetooth headset. Accordingly, as shown in fig. 7B, the cellular phone 2 pops up the pop-up window 72 in the bluetooth main interface 70 in response to the user's operation. The user operates by viewing the prompt in the pop-up window 72. For example, the hint information includes: "bluetooth headset enters pairing mode". Also included in the pop-up window 72 are a cancel button and a ok button. The user may click the ok button 73 triggering the handset 2 to send a notification message to the bluetooth headset. Accordingly, in response to the user clicking the ok button 73, the mobile phone 2 transmits notification information to the bluetooth headset, instructing the bluetooth headset to enter the pairing mode.
Alternatively, in another example, fig. 8A shows another interface diagram of the handset 2. Fig. 8A and 7A differ in that: in fig. 7A, the handset 2 runs a system application, displaying a bluetooth host interface 70 in the system application; in fig. 8A, the handset 2 runs a third party application for managing other devices in communication with the handset 2. The name, function and interface layout of the third party application are not limited in the embodiments of the present application. For example, as shown in fig. 8A, the handset 2 currently displays a "my devices" interface 80 in a third party application, and the devices that communicate with the handset 2 include: door lock 001, bluetooth headset, gateway 1 and cell-phone 1 in the house. The right side of the bluetooth headset in the interface 80 has a button 85. The user may click on button 85 triggering the handset 2 to send a notification message to the bluetooth headset. Accordingly, the cellular phone 2 ejects the pop-up window 81 in the interface 80 in response to the user's operation, see fig. 8B. The popup window 81 can be referred to as popup window 72 in fig. 7B, and the principle is similar, and will not be described herein. Optionally, the interface 80 includes prompt information for guiding the user to perform the first operation. For example, in fig. 8A, a prompt "click right button" is provided below the bluetooth headset, and the bluetooth headset enters the pairing mode.
Fig. 7A to 7B and fig. 8A to 8B are only examples, and are not limited to the relevant interface and the first operation of the user. For example, in fig. 7A or fig. 8A, the setting interface of the bluetooth headset may be accessed through a related operation of the user, and by performing a first operation in the setting interface, the mobile phone 2 is triggered to send notification information to the bluetooth headset.
Optionally, the notification information may be carried in an interaction message defined in the bluetooth protocol, or may be carried in a private message defined between the second electronic device and the bluetooth device, where the name of the message and the carrying manner of the notification information in the message are not limited in this embodiment.
Alternatively, the second electronic device may send the notification information through an Echo (Echo or Echo) channel of the logical link control and adaptation protocol (logical link control and adaptation layer protocol, L2 CAP). The ECHO protocol may refer to the CORE Host section of the bluetooth protocol, e.g., section PartA 4.8.
Fig. 9 is a message interaction diagram of a second electronic device sending notification information according to an embodiment of the present application.
As shown in fig. 9, the second electronic device sending notification information to the bluetooth device may include:
S91, the second electronic device sends an l2cap_echo_req (logical link control and adaptation protocol ECHO request) message to the bluetooth device, where the l2cap_echo_req message includes notification information. Accordingly, the bluetooth device receives the l2cap_echo_req message transmitted by the second electronic device.
S92, the bluetooth device sends an l2cap_echo_rsp (logical link control and adaptation protocol ECHO response) message to the second electronic device, where the l2cap_echo_rsp message is used to indicate that the bluetooth device receives the l2cap_echo_req message.
Specifically, in the ECHO protocol, an ECHO request (ECHO request or echo_req or l2cap_echo_req) is typically used to request a response from a remote L2CAP entity, which may be used to test a link or to transmit specific information using an optional data field. After receiving the valid ECHO request packet, the L2CAP entity replies with an ECHO response (ECHO response or echo_rsp or l2cap_echo_rsp) packet. In the present embodiment, the specific information is notification information.
Fig. 10A is a schematic diagram of a format of a data packet corresponding to an l2cap_echo_req message provided in an embodiment of the present application, and fig. 10B is a schematic diagram of a format of a data packet corresponding to an l2cap_echo_rsp message provided in an embodiment of the present application. As shown in fig. 10A, the data Packet (Packet) corresponding to the l2cap_echo_req message has the least significant bit (least significant bit, LSB) on the left and the most significant bit (most significant bit, MSB) on the right, and includes: a Code field, an Identifier field, a Length field, and a Data field. Wherein the data field is an optional field. The packet provided by the ECHO protocol may carry custom information in optional data fields. In this embodiment, notification information may be carried in the data field. The format of the data packet corresponding to the l2cap_echo_rsp message shown in fig. 10B is similar to the format of the data packet corresponding to the l2cap_echo_req message shown in fig. 10A, wherein the identifier fields in the l2cap_echo_rsp message and the l2cap_echo_req message match, and the encoding fields match. For example, the identifier field in fig. 10A and 10B has the same value. For example, the code field in fig. 10A has a value of 0x08, and the code field in fig. 10B has a value of 0x09.
S63, the Bluetooth device enters a pairing mode according to the notification information.
S64, the first electronic device acquires pairing information from the second electronic device or the Bluetooth device or the third electronic device, wherein the pairing information comprises the Bluetooth address of the Bluetooth device.
Optionally, in the first implementation, since the bluetooth device and the second electronic device have been successfully paired, the second electronic device stores the bluetooth address of the bluetooth device, and the first electronic device may obtain the bluetooth address of the bluetooth device from the second electronic device.
In the implementation mode, the second electronic device informs the Bluetooth device of entering the pairing mode, the second electronic device provides pairing information for the first electronic device, the first electronic device and the Bluetooth device are paired only by means of the second electronic device, the number of involved devices is small, processing steps are few, and the implementation mode is simple.
Optionally, the first electronic device and the second electronic device may perform wired communication or wireless communication, and the second electronic device sends pairing information to the first electronic device through a communication connection between the first electronic device and the second electronic device, and correspondingly, the first electronic device receives the pairing information sent by the second electronic device. Optionally, the wireless communication includes, but is not limited to, any of the following: bluetooth communication, wiFi communication, NFC communication, or cellular communication.
Optionally, the first electronic device and the second electronic device do not communicate, the second electronic device displays pairing information in a visual form, and the first electronic device scans the pairing information in the visual form or photographs the pairing information in the visual form, and processes the pairing information in the visual form to obtain the pairing information. Optionally, the pairing information in visual form is generated according to pairing information, for example, including but not limited to any one of the following: two-dimensional codes or bar codes.
Optionally, in a second implementation manner, the third electronic device may obtain the pairing information, and the first electronic device may obtain the pairing information from the third electronic device. The manner in which the third electronic device obtains the pairing information is not limited in this embodiment. For example, the bluetooth device and the third electronic device may perform bluetooth communication, and the third electronic device stores pairing information such as a bluetooth address of the bluetooth device. For another example, the bluetooth device may send pairing information to the third electronic device. Optionally, in order to improve the security of the pairing information, the bluetooth device may send the pairing information to the third electronic device after receiving the notification information sent by the second electronic device.
In the implementation mode, the second electronic device informs the Bluetooth device of entering a pairing mode, the third electronic device provides pairing information for the first electronic device, and the second electronic device and the third electronic device are needed to be used for pairing the first electronic device and the Bluetooth device, so that the implementation mode is flexible.
Optionally, the first electronic device and the third electronic device may perform wired communication or wireless communication, and the third electronic device sends pairing information to the first electronic device through a communication connection between the first electronic device and the third electronic device, and correspondingly, the first electronic device receives the pairing information sent by the third electronic device. Optionally, the wireless communication includes, but is not limited to, any of the following: bluetooth communication, wiFi communication, NFC communication, or cellular communication.
Optionally, the first electronic device and the third electronic device do not communicate, the third electronic device displays pairing information in a visual form, and the first electronic device scans the pairing information in the visual form or photographs the pairing information in the visual form, processes the pairing information in the visual form, and can obtain the pairing information. Optionally, the pairing information in visual form is generated according to pairing information, for example, including but not limited to any one of the following: two-dimensional codes or bar codes.
Optionally, the third electronic device is an external display device of the bluetooth device. After receiving the notification information sent by the second electronic device and entering the pairing mode, the Bluetooth device generates pairing information in a visual form according to the pairing information, and sends the pairing information in the visual form to the third electronic device. Correspondingly, the third electronic device receives and displays the pairing information in the visual form sent by the Bluetooth device.
Optionally, in a third implementation, the first electronic device may obtain the pairing information from the bluetooth device. In this implementation manner, the bluetooth device may have a display screen, and after the bluetooth device receives the notification information sent by the second electronic device and enters the pairing mode, pairing information in a visual form may be generated according to the pairing information and displayed. Correspondingly, the first electronic device scans the pairing information in the visual form or photographs the pairing information in the visual form, and processes the pairing information in the visual form to obtain the pairing information. Optionally, the pairing information in visual form includes, but is not limited to, any of the following: two-dimensional codes or bar codes.
In the implementation mode, the second electronic device informs the Bluetooth device of entering the pairing mode, the Bluetooth device provides pairing information for the first electronic device, the first electronic device and the Bluetooth device are paired only by means of the second electronic device, the number of related devices is small, and the implementation mode is simple.
The present embodiment is not limited to the execution sequence between S62 to S63 and S64. For example, the first electronic device may notify the bluetooth device to enter the pairing mode at S62, and then acquire pairing information at S64. For another example, the first electronic device may acquire the pairing information in S64, and then execute S62, and the second electronic device notifies the bluetooth device to enter the pairing mode. For another example, S62 and S64 may be performed simultaneously.
S65, the first electronic device sends a pairing request to the Bluetooth device according to the Bluetooth address of the Bluetooth device. Correspondingly, the Bluetooth device receives a pairing request sent by the first electronic device.
And S66, the Bluetooth device sends a pairing response to the first electronic device. Correspondingly, the first electronic device receives the pairing response sent by the Bluetooth device.
The pairing request and the pairing response may refer to the descriptions of S24 and S25 in fig. 2, and are not repeated here.
It can be seen that, in the application environment of the bluetooth pairing method provided in this embodiment, the bluetooth pairing method includes a bluetooth device, a second electronic device that has been successfully paired with the bluetooth device, and a first electronic device that needs to be paired with the bluetooth device. After the Bluetooth device establishes Bluetooth connection with the second electronic device, the second electronic device sends notification information to the Bluetooth device to instruct the Bluetooth device to enter a pairing mode. Moreover, the first electronic device may acquire pairing information from the second electronic device or the bluetooth device or other devices in the application environment, so that the first electronic device and the bluetooth device may complete pairing according to the pairing information. According to the Bluetooth pairing method, the Bluetooth equipment is informed to enter the pairing mode by means of the second electronic equipment except the first electronic equipment and the Bluetooth equipment, so that the situation that a user can trigger the Bluetooth equipment to enter the pairing mode after operating the Bluetooth equipment is avoided, and inconvenience of operating the Bluetooth equipment by the user is eliminated. Moreover, compared with the existing pairing process, the Bluetooth address of the Bluetooth device can be obtained by sending the inquiry request to the Bluetooth device when the Bluetooth device is in the pairing mode, so that the message flow of the pairing process is simplified, the realizability and convenience of the pairing process of the Bluetooth device which is not used for the first time and the first electronic device which is not paired are improved, and the feeling of using the Bluetooth headset by a user is improved.
Optionally, in S64, the pairing information may further include capability information of the bluetooth device.
And the capability information of the Bluetooth equipment is acquired, so that the subsequent pairing of the first electronic equipment and the Bluetooth equipment is facilitated, and the accuracy and the suitability of the pairing of the first electronic equipment and the Bluetooth equipment are improved.
The capability information may refer to the description about the device supporting feature information in fig. 2, and is not described herein.
Optionally, the capability information may further indicate a capability of the bluetooth device to support entering the pairing mode by receiving notification information sent by the second electronic device.
It should be noted that, in the embodiment, the order of acquiring the bluetooth address and the capability information of the bluetooth device by the first electronic device in S64 is not limited. Optionally, in a first implementation, the first electronic device may obtain the bluetooth address and the capability information of the bluetooth device at the same time. Optionally, in this implementation, if the first electronic device obtains the pairing information by scanning pairing information in a visual form, the pairing information in the visual form is generated according to the bluetooth address and the capability information of the bluetooth device. Optionally, in a second implementation manner, the first electronic device may acquire the bluetooth address of the bluetooth device first, and then acquire the capability information of the bluetooth device. Optionally, in a third implementation manner, the first electronic device may acquire capability information of the bluetooth device first, and then acquire a bluetooth address of the bluetooth device. Optionally, if the first electronic device acquires the bluetooth address and the capability information of the bluetooth device through message interaction with the second electronic device or the third electronic device, the bluetooth address and the capability information may be carried in one interaction message or may be carried in different interaction messages respectively.
Optionally, in S65, the sending, by the first electronic device, a pairing request to the bluetooth device according to the bluetooth address of the bluetooth device may include:
and the first electronic equipment sends a pairing request to the Bluetooth equipment according to the Bluetooth address and the capability information of the Bluetooth equipment.
The pairing of the first electronic equipment and the Bluetooth equipment is carried out through the Bluetooth address and the capability information of the Bluetooth equipment, so that the accuracy and the suitability of the pairing of the first electronic equipment and the Bluetooth equipment are improved.
Next, based on the embodiment shown in fig. 6, a specific embodiment in which the first electronic device acquires pairing information from the second electronic device or the bluetooth device or the third electronic device in S64 is provided. For convenience of explanation, pairing information is taken as an example including bluetooth address and capability information of a bluetooth device.
Optionally, in one embodiment, in S64, the first electronic device obtains the pairing information by scanning the pairing information displayed by the second electronic device in a visual form. For convenience of explanation, the pairing information in a visual form is two-dimensional code information. As shown in fig. 11, in S64, the first electronic device obtains pairing information from the second electronic device, which may include:
and S111, the second electronic device generates two-dimension code information according to the Bluetooth address and the capability information of the Bluetooth device.
Specifically, the second electronic device performs bluetooth communication with the bluetooth device, and bluetooth address and capability information of the bluetooth device are stored. The second electronic device may generate two-dimensional code information according to the bluetooth address and the capability information of the bluetooth device, so as to be provided to the first electronic device subsequently. The two-dimensional code information may be generated by using an existing algorithm, which is not described in detail in this embodiment.
Here, S111 is executed after S61, but the execution order between S111 and S62 to S63 is not limited.
Optionally, in the first implementation, S111 is performed before S62, and after the bluetooth device establishes a bluetooth connection with the second electronic device in S61, the second electronic device is triggered to perform S111. For example, the user uses handset 1 and handset 2, handset 2 successfully pairs with the bluetooth headset, and handset 1 never pairs with the bluetooth headset. Like this, when the user need pair bluetooth headset with cell-phone 1, can open the bluetooth function of cell-phone 2, cell-phone 2 establishes bluetooth with bluetooth headset and is connected, triggers cell-phone 2 and generates two-dimensional code information according to bluetooth headset's bluetooth address and ability information.
Optionally, in a second implementation, S111 is performed before S62, and the second electronic device is triggered to perform S111 by the user performing a second operation on the second electronic device.
Illustratively, as shown in fig. 7A, the handset 2 is currently running a system application, displaying a bluetooth host interface 70 in the system application. The bluetooth connection between the handset 2 and both the handset 1 and the bluetooth headset is known from the paired device 71 in the bluetooth main interface 70. The user may click on the bluetooth headset in the paired device 71, triggering the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset. Correspondingly, the mobile phone 2 responds to the operation of the user to generate two-dimensional code information.
Optionally, the bluetooth main interface 70 includes prompt information for guiding the user to perform the second operation. For example, a prompt message "click on a bluetooth headset to share pairing information of the bluetooth headset" may be displayed.
Optionally, before the second electronic device generates the two-dimensional code information according to the bluetooth address and the capability information of the bluetooth device, prompt information may be displayed to the user.
Illustratively, in one example, as shown in FIG. 7A, the user clicks on a Bluetooth headset in the paired device 71. Accordingly, as shown in fig. 7C, the cellular phone 2 pops up the pop-up window 74 in the bluetooth main interface 70 in response to the user's operation. The user operates by viewing the prompt in the pop-up window 74. For example, the hint information includes: "pairing information of bluetooth headset is displayed". Also included in the pop-up window 74 are a cancel button and a ok button. The user can click the determining button to trigger the mobile phone 2 to generate two-dimension code information according to the Bluetooth address and the capability information of the Bluetooth headset. Correspondingly, the mobile phone 2 responds to the operation of clicking the determination key by the user, and generates two-dimension code information according to the Bluetooth address and the capability information of the Bluetooth headset.
Illustratively, in another example, as shown in FIG. 7A, the user clicks on a Bluetooth headset in the paired device 71. Accordingly, as shown in fig. 7D, the cellular phone 2 pops up a pop-up window 75 in the bluetooth main interface 70 in response to the user's operation. The user operates by viewing the prompt in the pop-up window 75. For example, the hint information includes: "share pairing information of bluetooth headset". The popup 75 includes various sharing manners of pairing information, such as displaying two-dimensional codes, bluetooth sharing, wiFi sharing, and network sharing. The bluetooth sharing means that pairing information is provided for the mobile phone 1 through bluetooth communication between the mobile phone 2 and the mobile phone 1, the WiFi sharing means that pairing information is provided for the mobile phone 1 through WiFi communication between the mobile phone 2 and the mobile phone 1, and the network sharing means that pairing information is provided for the mobile phone 1 through cellular communication between the mobile phone 2 and the mobile phone 1. The pop-up window 75 further includes a cancel button and a confirm button for canceling the sharing pairing information and confirming the sharing pairing information. The user can click on the selection control 76 for displaying the two-dimensional code mode to select the sharing mode of the two-dimensional code. As shown in fig. 7E, the display state of the selection control 76 changes, and the user continues to click the ok button, triggering the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset. Correspondingly, the mobile phone 2 responds to the operation of the user and generates two-dimension code information according to the Bluetooth address and the capability information of the Bluetooth headset.
Alternatively, the second operation and the first operation may be the same operation. For example, as shown in fig. 7A, the user clicks the bluetooth headset in the paired device 71 in the bluetooth main interface 70, triggers the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset, and at the same time triggers the mobile phone 2 to send notification information to the bluetooth headset. For another example, as shown in fig. 7B, the user clicks the ok button 73 in the pop window 72, and triggers the mobile phone 2 to send notification information to the bluetooth headset, and at the same time, triggers the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset. For another example, as shown in fig. 7C, the user clicks the ok button in the pop window 74, triggers the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset, and at the same time triggers the mobile phone 2 to send notification information to the bluetooth headset. For another example, as shown in fig. 7E, the user selects the control 76 in the pop-up window 75, clicks the ok button, triggers the mobile phone 2 to generate two-dimensional code information according to the bluetooth address and capability information of the bluetooth headset, and at the same time triggers the mobile phone 2 to send notification information to the bluetooth headset.
Optionally, in a third implementation, S111 is performed after S62, and after the second electronic device sends notification information to the bluetooth device in S62, the second electronic device is triggered to perform S111.
Optionally, in a fourth implementation, S111 is performed after S62, and the second electronic device is triggered to perform S111 by the user performing a second operation on the second electronic device.
Fig. 7A to 7E are only examples, and do not limit the second operation of the second electronic device by the user. For example, the second operation by the user may be any one of the following: the method comprises the steps of performing touch operation on a related interface displayed by the second electronic device by a user, performing gesture operation on a display screen of the second electronic device by the user, performing operation on physical keys on the second electronic device by the user, inputting voice by a microphone of the second electronic device by the user, or inputting an image by a camera of the second electronic device by the user. Optionally, the second electronic device may be provided with an APP for managing the bluetooth device, and in this embodiment, the name and function of the APP are not limited, and the content and layout in the relevant interface of the APP are not limited.
And S112, the second electronic equipment displays the two-dimensional code information.
In this embodiment, the interface and the interface layout for displaying the two-dimensional code information by the second electronic device are not limited.
Illustratively, in one example, as shown in fig. 7F, the handset 2 is currently running a system application, displaying a bluetooth host interface 70 in the system application. The bluetooth main interface 70 includes a two-dimensional code interface 77. The two-dimensional code interface 77 includes two-dimensional code information and hint information. The two-dimensional code information is generated by the mobile phone 2 according to the Bluetooth address and the capability information of the Bluetooth headset. The prompt information comprises: please scan the two-dimensional code. The user performs an operation by viewing the prompt information in the two-dimensional code interface 77, for example, the two-dimensional code information is scanned by using the mobile phone 1, so that the mobile phone 1 can obtain the pairing information of the bluetooth headset.
Alternatively, in another example, as shown in fig. 8C. Fig. 8C and 7F differ in that: in fig. 7F, the handset 2 runs a system application, displaying a bluetooth host interface 70 in the system application; in fig. 8C, the mobile phone 2 runs a third party application program, where the third party application program is used to manage other devices that communicate with the mobile phone 2, and the mobile phone 2 currently displays a "my device" interface 80 in the third party application program, where the interface 80 includes a two-dimensional code interface 82. The two-dimensional code interface 82 can be referred to as the two-dimensional code interface 77 in fig. 7F, and the principle is similar, and will not be described here again.
S113, the first electronic device scans the two-dimensional code information displayed by the second electronic device.
In this embodiment, the process of the first electronic device running the scanning function is not limited, for example, the first electronic device may run an APP with the scanning function, and start the scanning function through man-machine interaction with the user.
S114, the first electronic device analyzes the two-dimensional code information to obtain the Bluetooth address and the capability information of the Bluetooth device.
It can be seen that, in the bluetooth pairing method provided in this embodiment, the first electronic device obtains pairing information of the bluetooth device from the second electronic device. Because the second electronic device and the Bluetooth headset carry out Bluetooth communication, the Bluetooth address and the capability information of the Bluetooth device are stored in the second electronic device, and the Bluetooth address and the capability information of the Bluetooth device do not need to be acquired in an additional mode. And the second electronic equipment generates and displays pairing information in a visual form according to the pairing information of the Bluetooth equipment. The first electronic equipment does not need to communicate with the second electronic equipment, and can acquire visual pairing information in a scanning or photographing mode and the like, so that the pairing information is acquired. According to the Bluetooth pairing method, the first electronic device obtains pairing information from the second electronic device, the number of related devices is small, processing steps are few, and the implementation mode is simple.
By way of example, taking a bluetooth device as a bluetooth headset, a first electronic device as a mobile phone 1, and a second electronic device as a mobile phone 2, the flow of the bluetooth pairing method provided in this embodiment is illustrated in conjunction with fig. 12.
As shown in fig. 12, the bluetooth pairing method provided in this embodiment may include:
11. the handset 2 establishes a bluetooth connection with the bluetooth headset.
12. The mobile phone 2 obtains the Bluetooth address and the capability information of the Bluetooth headset, generates a two-dimensional code according to the Bluetooth address and the capability information of the Bluetooth headset, and displays the two-dimensional code.
13. The mobile phone 2 sends notification information to the bluetooth headset, wherein the notification information is used for indicating the bluetooth headset to enter a pairing mode.
14. The bluetooth headset receives the notification information sent by the mobile phone 2 and enters a pairing mode according to the notification information.
15. The mobile phone 1 starts a scanning function to scan the two-dimensional code displayed by the mobile phone 2.
16. The mobile phone 1 analyzes the scanned two-dimensional code to obtain the Bluetooth address and capability information of the Bluetooth headset.
17. And the mobile phone 1 sends a pairing request to the Bluetooth headset according to the Bluetooth address and the capability information of the Bluetooth headset, and initiates pairing.
18. After receiving the pairing request sent by the mobile phone 1, the Bluetooth headset sends a pairing response to the mobile phone.
Alternatively, in another embodiment, in S64, the first electronic device obtains pairing information from the second electronic device through a communication connection with the second electronic device. As shown in fig. 13, in S64, the first electronic device obtains pairing information from the second electronic device, which may include:
S131, the second electronic device and the first electronic device establish communication connection. Wherein the communication connection comprises any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
In this embodiment, the time for establishing the communication connection between the second electronic device and the first electronic device is not limited, and the execution sequence between S131 and S62 to S63 is not limited.
Optionally, in the first implementation, the second electronic device and the first electronic device do not currently establish a communication connection, and after the bluetooth device establishes a bluetooth connection with the second electronic device in S61, the second electronic device and the first electronic device establish a communication connection. Alternatively, S131 may be performed before S62, or may be performed after S62, or may be performed simultaneously with S62.
In a first implementation, optionally, S131 is performed before S62, and after the bluetooth device establishes a bluetooth connection with the second electronic device in S61, the second electronic device is triggered to perform S131. The implementation is applicable to a scenario in which only the first electronic device, the second electronic device and the Bluetooth device are present in the environment. For example, the user uses handset 1 and handset 2, handset 2 successfully pairs with the bluetooth headset, and handset 1 never pairs with the bluetooth headset. When the user needs to match the Bluetooth headset with the mobile phone 1, the Bluetooth headset is electrified, and the user opens the Bluetooth functions of the mobile phone 1 and the mobile phone 2. Thus, the mobile phone 2 can search for the mobile phone 1 by bluetooth technology. After the mobile phone 2 establishes the bluetooth connection with the bluetooth headset, the mobile phone 2 can be triggered to establish communication connection with the mobile phone 1, so that pairing information of the bluetooth equipment can be sent to the mobile phone 1 subsequently. Alternatively, the mobile phone 1, the mobile phone 2 and the bluetooth headset can log in the same user account.
In the first implementation, optionally, S131 is performed before S62, and the second electronic device is triggered to perform S131 by the user performing a third operation on the second electronic device.
It should be noted that, in this embodiment, the third operation of the second electronic device is not limited by the user, and may be any operation used for sharing files or information between devices. The third operation is, for example, an operation in which the user transmits a file to the mobile phone 1 through bluetooth on the mobile phone 2. For another example, the third operation is an operation in which the user transmits information to the mobile phone 1 through the mobile network using the chat-like APP on the mobile phone 2. Alternatively, the third operation by the user may be any one of the following: the method comprises the steps of performing touch operation on a related interface displayed by the second electronic device by a user, performing gesture operation on a display screen of the second electronic device by the user, performing operation on physical keys on the second electronic device by the user, inputting voice by a microphone of the second electronic device by the user, or inputting an image by a camera of the second electronic device by the user. Optionally, the second electronic device may be provided with an APP for managing the bluetooth device, and in this embodiment, the name and function of the APP are not limited, and the content and layout in the relevant interface of the APP are not limited.
Optionally, the relevant interface of the second electronic device may include a prompt message for guiding the user to perform the third operation, and in this embodiment, the content of the prompt message is not limited.
Illustratively, as shown in FIG. 8A, the handset 2 runs a third party application for managing other devices in communication with the handset 2, and the handset 2 currently displays a "My devices" interface 80 in the third party application. The interface 80 includes the mobile phone 1, and the mobile phone 1 is not connected to the mobile phone 2 currently. The user can click the mobile phone 1 to trigger the mobile phone 2 to establish communication connection with the mobile phone 1, so that the subsequent mobile phone 2 can send pairing information of the Bluetooth device to the mobile phone 1. Accordingly, the mobile phone 2 establishes a communication connection with the mobile phone 1 in response to the operation of the user. This scenario is applicable to users knowing pairing information that needs to share bluetooth headset with the handset 1.
Optionally, before the second electronic device establishes a communication connection with the first electronic device, a prompt message may be displayed to the user.
Illustratively, as shown in FIG. 8A, the user clicks on the handset 1. Accordingly, as shown in fig. 8D, the cellular phone 2 ejects the pop-up window 83 in the interface 80 in response to the user's operation. The spring window 83 can be described with reference to the spring frame 75 in fig. 7E, and the principle is similar, and will not be described herein. The user may click on the WiFi shared selection control 84 causing the handset 2 to send pairing information to the handset 1 via WiFi communication between the handset 2 and the handset 1. As shown in fig. 8E, the display state of the selection control 84 changes, and the user continues to click the ok button, triggering the handset 2 and the handset 1 to establish a WiFi connection. Accordingly, the mobile phone 2 responds to the operation of the user and establishes a WiFi connection with the mobile phone 1.
In the first implementation manner, optionally, S131 is performed after S62, and after the second electronic device sends notification information to the bluetooth device in S62, the second electronic device is triggered to perform S131. The implementation is applicable to a scenario in which only the first electronic device, the second electronic device and the Bluetooth device are present in the environment.
In the first implementation, optionally, S131 is performed after S62, and the second electronic device is triggered to perform S131 by the user performing a third operation on the second electronic device.
Illustratively, one interface change procedure is as follows: as shown in fig. 8A, the user clicks the button 85 to trigger the mobile phone 2 to send notification information to the bluetooth headset, and at the same time, trigger the mobile phone 2 to share pairing information. In response to the user clicking the button 85, the cellular phone 2 pops up a pop-up window 83 in the interface 80 as shown in fig. 8D. The user may click on the WiFi sharing selection control 84 to cause the handset 2 to share pairing information via WiFi communication. As shown in fig. 8E, the display state of the selection control 84 changes, the user continues to click the ok button, and accordingly, the mobile phone 2 searches for surrounding devices capable of WiFi communication in response to the user clicking the ok button, and displays a WiFi device list 86, as shown in fig. 8F. In the WiFi device list 86, devices that can perform WiFi communication by the mobile phone 2 include the mobile phone 1, the mobile phone 3, and the mobile phone 4. The right side of each handset has a selection control 87. The user may click on the selection control 87 on the right side of the mobile phone 1, and click on the sharing button 88, triggering the mobile phone 2 to establish a WiFi connection with the mobile phone 1. Accordingly, the mobile phone 2 responds to the operation of the user and establishes a WiFi connection with the mobile phone 1. In this implementation, the mobile phone 2 may search and display surrounding communicable devices and display a list of devices to the user, so that the user may select a device sharing pairing information of the bluetooth headset, and the user may operate the device conveniently.
Optionally, in a second implementation, when the bluetooth device needs to be paired with the first electronic device, the second electronic device and the first electronic device have established a communication connection. For example, when the user needs to pair the handset 1 with a bluetooth headset, the handset 1 and the handset 2 have already transmitted audio files over the bluetooth connection.
And S132, the second electronic equipment generates sharing information according to the Bluetooth address and the capability information of the Bluetooth equipment.
Specifically, the second electronic device performs bluetooth communication with the bluetooth device, and bluetooth address and capability information of the bluetooth device are stored. The second electronic device generates sharing information according to the Bluetooth address and the capability information of the Bluetooth device.
The form of the shared information is not limited in this embodiment. For example, the shared information may be in any of the following forms: text format, file format or image.
Optionally, the second electronic device may encrypt the bluetooth address and the capability information of the bluetooth device to generate the shared information. The present embodiment does not limit the encryption algorithm.
S133, the second electronic device sends sharing information to the first electronic device through communication connection. Correspondingly, the first electronic device receives the sharing information sent by the second electronic device through communication connection.
S134, the first electronic device analyzes the sharing information to obtain the Bluetooth address and the capability information of the Bluetooth device.
Optionally, the first electronic device may decrypt the shared information to obtain the bluetooth address and capability information of the bluetooth device. Wherein the decryption algorithm used by the first electronic device matches the encryption algorithm used by the second electronic device.
Optionally, in an implementation manner, after receiving the sharing information, the first electronic device automatically analyzes the sharing information to obtain a bluetooth address and capability information of the bluetooth device. The mode is simple to realize.
Optionally, in another implementation, after the first electronic device receives the sharing information, the user needs to operate the second electronic device, so that the second electronic device analyzes the sharing information in response to the operation of the user. For example, the first electronic device receives the sharing information and stores the sharing information in a default folder. The user may open a default folder and click on the shared information. And the second electronic equipment responds to the clicking operation of the user and analyzes the sharing information. The method is more flexible, and the accuracy and the safety of the second electronic equipment in analyzing the shared information are improved.
It can be seen that, in the bluetooth pairing method provided in this embodiment, the first electronic device obtains pairing information of the bluetooth device from the second electronic device. Because the second electronic device and the Bluetooth headset carry out Bluetooth communication, the Bluetooth address and the capability information of the Bluetooth device are stored in the second electronic device, and the Bluetooth address and the capability information of the Bluetooth device do not need to be acquired in an additional mode. The second electronic device provides pairing information to the first electronic device through a communication connection with the first electronic device. According to the Bluetooth pairing method, the first electronic device obtains pairing information from the second electronic device, the number of related devices is small, and the implementation mode is simple.
By way of example, taking a bluetooth device as a bluetooth headset, a first electronic device as a mobile phone 1, and a second electronic device as a mobile phone 2, the flow of the bluetooth pairing method provided in this embodiment is illustrated in conjunction with fig. 14.
As shown in fig. 14, the bluetooth pairing method provided in this embodiment may include:
21. the handset 2 establishes a bluetooth connection with the bluetooth headset.
22. The mobile phone 2 sends notification information to the bluetooth headset, wherein the notification information is used for indicating the bluetooth headset to enter a pairing mode.
23. The mobile phone 2 generates shared information according to the bluetooth address and capability information of the bluetooth headset.
24. The mobile phone 2 transmits sharing information to the mobile phone 1 through a communication connection with the mobile phone 1.
25. The bluetooth headset receives the notification information sent by the mobile phone 2 and enters a pairing mode according to the notification information.
26. The mobile phone 1 receives the sharing information sent by the mobile phone 2, analyzes the sharing information, and obtains the Bluetooth address and the capability information of the Bluetooth headset.
27. And the mobile phone 1 sends a pairing request to the Bluetooth headset according to the Bluetooth address and the capability information of the Bluetooth headset, and initiates pairing.
28. After receiving the pairing request sent by the mobile phone 1, the Bluetooth headset sends a pairing response to the mobile phone.
Optionally, in another embodiment, the third electronic device is an external display device of the bluetooth device, in S64, the first electronic device may acquire the pairing information by scanning the pairing information in a visual form displayed by the third electronic device, and S64 is performed after S62. For convenience of explanation, the pairing information in a visual form is two-dimensional code information. As shown in fig. 15, in S64, the first electronic device obtains pairing information from the third electronic device, which may include:
S151, the Bluetooth device generates two-dimensional code information according to the Bluetooth address and the capability information of the Bluetooth device.
And S152, the Bluetooth device sends the two-dimensional code information to the third electronic device, and the third electronic device receives the two-dimensional code information sent by the Bluetooth device correspondingly.
And S153, displaying the two-dimensional code information by the third electronic equipment.
In this embodiment, the interface and the interface layout for displaying the two-dimensional code information by the third electronic device are not limited.
S154, the first electronic device scans the two-dimensional code information displayed by the third electronic device.
In this embodiment, the process of the first electronic device running the scanning function is not limited, for example, the first electronic device may run an APP with the scanning function, and start the scanning function through man-machine interaction with the user.
S155, the first electronic device analyzes the two-dimensional code information to obtain the Bluetooth address and the capability information of the Bluetooth device.
It can be seen that, in the bluetooth pairing method provided in this embodiment, the first electronic device obtains pairing information of the bluetooth device from the third electronic device. And after the Bluetooth equipment receives the notification information sent by the second electronic equipment, determining that the pairing mode needs to be entered. The Bluetooth device can generate visual pairing information according to the Bluetooth address and the capability information of the Bluetooth device, and display the pairing information through the third electronic device. The Bluetooth device determines to provide the pairing information, so that the security of the first electronic device for obtaining the pairing information is improved. The first electronic device does not need to communicate with the third electronic device, and can acquire visual pairing information in a scanning or photographing mode and the like, so that the pairing information is acquired. The Bluetooth pairing method improves the safety of the first electronic equipment in acquiring pairing information, and the implementation mode is more flexible.
By way of example, taking a bluetooth device as a bluetooth headset, a first electronic device as a mobile phone 1, a second electronic device as a mobile phone 2, and a third electronic device as a display 3, a flow of the bluetooth pairing method provided in this embodiment is illustrated with reference to fig. 16.
As shown in fig. 16, the bluetooth pairing method provided in this embodiment may include:
31. the handset 2 establishes a bluetooth connection with the bluetooth headset.
32. The mobile phone 2 sends notification information to the bluetooth headset, wherein the notification information is used for indicating the bluetooth headset to enter a pairing mode.
33. The Bluetooth headset receives the notification information sent by the mobile phone 2, enters a pairing mode according to the notification information, and generates a two-dimensional code according to the Bluetooth address and the capability information of the Bluetooth headset.
34. The bluetooth headset transmits the two-dimensional code to the display 3.
35. The display 3 receives the two-dimensional code sent by the Bluetooth headset and displays the two-dimensional code.
36. The mobile phone 1 starts a scanning function to scan the two-dimensional code displayed by the display 3.
37. The mobile phone 1 analyzes the scanned two-dimensional code to obtain the Bluetooth address and capability information of the Bluetooth headset.
38. And the mobile phone 1 sends a pairing request to the Bluetooth headset according to the Bluetooth address and the capability information of the Bluetooth headset, and initiates pairing.
39. After receiving the pairing request sent by the mobile phone 1, the Bluetooth headset sends a pairing response to the mobile phone.
Alternatively, in yet another embodiment, the bluetooth device itself may have a display screen, and in S64, the first electronic device may acquire the pairing information by scanning the pairing information in visual form displayed by the bluetooth device, and S64 is performed after S62. For convenience of explanation, the pairing information in a visual form is two-dimensional code information. As shown in fig. 17, in S64, the first electronic device obtains pairing information from the bluetooth device, which may include:
s171, the Bluetooth device generates two-dimension code information according to the Bluetooth address and the capability information of the Bluetooth device.
S172, displaying two-dimension code information by the Bluetooth device.
In this embodiment, the interface and the interface layout for displaying the two-dimensional code information by the bluetooth device are not limited.
S173, the first electronic device scans the two-dimensional code information displayed by the Bluetooth device.
In this embodiment, the process of the first electronic device running the scanning function is not limited, for example, the first electronic device may run an APP with the scanning function, and start the scanning function through man-machine interaction with the user.
And S174, the first electronic equipment analyzes the two-dimensional code information to obtain the Bluetooth address and the capability information of the Bluetooth equipment.
It can be seen that, in the bluetooth pairing method provided in this embodiment, the first electronic device obtains pairing information of the bluetooth device from the bluetooth device. And after the Bluetooth equipment receives the notification information sent by the second electronic equipment, determining that the pairing mode needs to be entered. The Bluetooth device can generate visual pairing information according to the Bluetooth address and the capability information of the Bluetooth device and display the pairing information. The Bluetooth device determines to provide the pairing information, so that the security of the first electronic device for obtaining the pairing information is improved. The first electronic equipment does not need to communicate with the Bluetooth equipment, and can acquire visual pairing information in a scanning or photographing mode and the like, so that the pairing information is acquired. The Bluetooth pairing method improves the safety of the first electronic equipment in acquiring pairing information, and the implementation mode is more flexible.
It will be appreciated that the first electronic device, the second electronic device, the bluetooth device and the third electronic device comprise corresponding hardware and/or software modules for performing the respective functions in order to achieve the above-described functions. The steps of an algorithm for each example described in connection with the embodiments disclosed herein may be embodied in hardware or a combination of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation is not to be considered as outside the scope of this application.
According to the embodiment of the application, the first electronic device, the second electronic device, the bluetooth device and the third electronic device may be divided into the functional modules according to the method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one module. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation. It should be noted that, in the embodiment of the present application, the names of the modules are schematic, and the names of the modules are not limited in actual implementation.
Fig. 18 is a schematic structural diagram of a device provided in an embodiment of the present application, where the device may be a first electronic device, a second electronic device, a bluetooth device, and a third electronic device in the embodiment of the present application. As shown in fig. 18, the apparatus may include: a receiving module 1801, a processing module 1802, and a transmitting module 1803.
Optionally, in an implementation manner, the device shown in fig. 18 is a second electronic device, and is configured to perform the operation of the second electronic device in the foregoing method embodiment, where the technical principles and technical effects are similar. Wherein the second electronic device is paired with the bluetooth device, the second electronic device comprising:
a processing module 1802, configured to establish a bluetooth connection with the bluetooth device;
and the sending module 1803 is configured to send notification information to the bluetooth device, where the notification information is used to instruct the bluetooth device to enter a pairing mode.
Optionally, the processing module 1802 is further configured to: receiving a first operation of a user;
the sending module 1803 is further configured to send, in response to the first operation, the notification information to the bluetooth device.
Optionally, a receiving module 1801 is further included;
the sending module 1803 is configured to send an l2cap_echo_req message to the bluetooth device, where the l2cap_echo_req message includes the notification information;
The receiving module 1801 is configured to receive an L2cap_echo_rsp message sent by the bluetooth device.
Optionally, the processing module 1802 is further configured to:
generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of the Bluetooth equipment;
and displaying the two-dimensional code information.
Optionally, the processing module 1802 is further configured to: and before the two-dimensional code information is generated according to the pairing information, receiving a second operation of the user.
Optionally, the processing module 1802 is further configured to: establishing communication connection with a first electronic device, wherein the first electronic device and the Bluetooth device are unpaired;
the sending module 1803 is further configured to send pairing information to the bluetooth device through the communication connection, where the pairing information includes a bluetooth address of the bluetooth device.
Optionally, the processing module 1802 is further configured to: a third operation of the user is received before a communication connection is established with the first electronic device.
Optionally, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
Optionally, the processing module 1802 is further configured to generate sharing information according to the pairing information;
The sending module 1803 is configured to send the sharing information to the bluetooth device through the communication connection.
Optionally, the pairing information further includes capability information of the bluetooth device.
Alternatively, in one implementation, the device shown in fig. 18 is a bluetooth device, and is configured to perform the operations of the bluetooth device in the foregoing method embodiment, where the technical principles and technical effects are similar. Wherein the bluetooth device is unpaired with the first electronic device, the bluetooth device has been paired with the second electronic device, the bluetooth device comprises:
a processing module 1802, configured to establish a bluetooth connection with the second electronic device;
a receiving module 1801, configured to receive notification information sent by the second electronic device, where the notification information is used to instruct the bluetooth device to enter a pairing mode;
the processing module 1802 is further configured to enter a pairing mode according to the notification information;
the receiving module 1801 is further configured to receive a pairing request sent by the first electronic device.
Optionally, a sending module 1803 is further included;
the receiving module 1801 is configured to receive an l2cap_echo_req message sent by the second electronic device, where the l2cap_echo_req message includes the notification information;
The sending module 1803 is configured to send an l2cap_echo_rsp message to the second electronic device.
Optionally, a sending module 1803 is further included;
the processing module 1802 is further configured to generate two-dimensional code information according to pairing information after entering a pairing mode according to the notification information, where the pairing information includes a bluetooth address of the bluetooth device;
the sending module 1803 is configured to send the two-dimensional code information to a third electronic device.
Optionally, the processing module 1802 is further configured to:
after entering a pairing mode according to the notification information, generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of the Bluetooth equipment;
and displaying the two-dimensional code information.
Optionally, the pairing information further includes capability information of the bluetooth device.
Optionally, in an implementation manner, the device shown in fig. 18 is a first electronic device, and is configured to perform the operation of the first electronic device in the foregoing method embodiment, and the technical principles and technical effects are similar. The first electronic device is unpaired with a bluetooth device, the bluetooth device is paired with a second electronic device, and the first electronic device includes:
A processing module 1802, configured to obtain pairing information from the second electronic device or the bluetooth device or a third electronic device, where the pairing information includes a bluetooth address of the bluetooth device; the third electronic device communicates with the Bluetooth device;
and a sending module 1803, configured to send a pairing request to the bluetooth device according to the bluetooth address of the bluetooth device.
Optionally, the pairing information further includes capability information of the bluetooth device.
Optionally, the processing module 1802 is specifically configured to:
scanning two-dimensional code information displayed by the second electronic equipment, wherein the two-dimensional code information is generated by the second electronic equipment according to the pairing information;
and analyzing the two-dimensional code information to obtain the pairing information.
Optionally, the processing module 1802 is configured to:
establishing communication connection with the second electronic device;
and acquiring the pairing information from the second electronic equipment through the communication connection.
Optionally, a receiving module 1801 is further included;
the receiving module 1801 is configured to receive sharing information sent by the second electronic device; the sharing information is generated by the second electronic equipment according to the pairing information;
The processing module 1802 is configured to parse the shared information to obtain the pairing information.
Optionally, the communication connection includes any one of the following: bluetooth connection, wiFi connection, or cellular communication connection.
Optionally, the processing module 1802 is configured to:
scanning two-dimensional code information displayed by the Bluetooth device or the third electronic device, wherein the two-dimensional code information is generated by the Bluetooth device according to the pairing information;
and analyzing the two-dimensional code information to obtain the pairing information.
Optionally, in an implementation manner, the device shown in fig. 18 is a third electronic device, and is configured to perform the operation of the third electronic device in the foregoing method embodiment, and the technical principles and technical effects are similar. Wherein, third electronic device communicates with bluetooth device, and third electronic device includes:
the receiving module 1801 is configured to receive two-dimensional code information sent by a bluetooth device, where the two-dimensional code information is generated by the bluetooth device according to pairing information, and the pairing information includes a bluetooth address of the bluetooth device;
the processing module 1802 is configured to display two-dimensional code information.
Optionally, the pairing information further includes capability information of the bluetooth device.
Referring to fig. 19, a structure of a device provided in an embodiment of the present application is shown, where the device may be a first electronic device, a second electronic device, a third electronic device, or a bluetooth device. The apparatus includes: a processor 1901, a receiver 1902, a transmitter 1903, a memory 1904, and a bus 1905. The processor 1901 includes one or more processing cores, and the processor 1901 executes software programs and modules to perform various functional applications and information processing. The receiver 1902 and the transmitter 1903 may be implemented as a communication component, which may be a baseband chip. The memory 1904 is connected to the processor 1901 via a bus 1905. The memory 1904 may be used for storing at least one program instruction, and the processor 1901 is used for executing at least one program instruction to implement the technical solutions of the foregoing embodiments. The implementation principle and technical effects are similar to those of the related embodiments of the method, and are not repeated here.
When the device is started, the processor can read the software program in the memory, interpret and execute the instructions of the software program, and process the data of the software program. When data is required to be transmitted through the antenna, the processor carries out baseband processing on the data to be transmitted and then outputs a baseband signal to a control circuit in the control circuit, and the control circuit carries out radio frequency processing on the baseband signal and then transmits the radio frequency signal outwards in the form of electromagnetic waves through the antenna. When data is sent to the device, the control circuit receives the radio frequency signal through the antenna, converts the radio frequency signal into a baseband signal, and outputs the baseband signal to the processor, and the processor converts the baseband signal into data and processes the data.
Those skilled in the art will appreciate that fig. 19 shows only one memory and processor for ease of illustration. In an actual device, there may be multiple processors and memories. The memory may also be referred to as a storage medium or storage device, etc., and embodiments of the present application are not limited in this regard.
As an alternative implementation, the processor may include a baseband processor, which is mainly used to process the communication data, and a central processor, which is mainly used to execute a software program and process the data of the software program. It will be appreciated by those skilled in the art that the baseband processor and the central processing unit may be integrated into one processor or may be separate processors interconnected by bus technology or the like. Those skilled in the art will appreciate that a device may include multiple baseband processors to accommodate different network formats, and that a device may include multiple central processors to enhance its processing capabilities, with the various components of the device being connectable via various buses. The baseband processor may also be referred to as a baseband processing circuit or baseband processing chip. The central processing unit may also be expressed as a central processing circuit or a central processing chip. The function of processing the communication protocol and the communication data may be built in the processor, or may be stored in a memory in the form of a software program, which is executed by the processor to realize the baseband processing function. The memory may be integrated within the processor or separate from the processor. The memory includes a Cache memory that can hold frequently accessed data/instructions.
In the embodiments of the present application, the processor may be a general purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution.
In the embodiment of the present application, the memory may be a nonvolatile memory, such as a hard disk (HDD) or a solid state drive (SS), or may be a volatile memory (volatile memory), for example, a random-access memory (RAM). The memory is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, and is not limited thereto.
The memory in the embodiments of the present application may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data. The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, a network device, a user device, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., from one website, computer, server, or data center, by wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL), or wireless (e.g., infrared, wireless, microwave, etc.) means, the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc., that contains an integration of one or more available media, the available media may be magnetic media (e.g., floppy disk, hard disk, tape), optical media (e.g., digital video disc (digital video disc, DWD), or semiconductor media (e.g., SSD), etc.
Optionally, fig. 20 is a schematic structural diagram of a device provided in an embodiment of the present application, where the device may be a bluetooth device, for example, a bluetooth headset. The bluetooth headset may include at least one processor 101, at least one memory 102, a wireless communication module 103, an audio module 104, a power module 105, and an input/output interface 106, among others. The processor may include one or more interfaces for interfacing with other components of the bluetooth headset. The Bluetooth headset is stored through the headset box. The following describes the components of the bluetooth headset in detail with reference to fig. 20.
The memory 102 may be used to store program codes, such as program codes for physically connecting a bluetooth headset with a plurality of electronic devices, for connecting a service specification between the electronic devices, for processing audio services (such as music playing, receiving/making a call, etc.) of the electronic devices, for charging the bluetooth headset, for wireless pairing connection of the bluetooth headset with other electronic devices, etc. The memory 102 may also be used to store other information, such as the priority of the electronic device.
The processor 101 may be configured to execute the above application program codes and invoke the relevant modules to implement the functions of the bluetooth headset in the embodiments of the present application. For example, the functions of physically connecting the bluetooth headset with a plurality of electronic devices, connecting service specifications, playing audio, receiving/making telephone calls and the like are realized.
The processor 101 may include one or more processing units, and the different processing units may be separate devices or may be integrated into one or more processors 101. The processor 101 may be in particular an integrated control chip or may be composed of a circuit comprising various active and/or passive components and configured to perform the functions described in the embodiments of the present application as belonging to the processor 101.
The wireless communication module 103 may be configured to support data exchange between the bluetooth headset and other electronic devices or headset boxes through a wireless communication technology, such as BT, WLAN (e.g. Wi-Fi), zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technology, etc.
In some embodiments, the wireless communication module 103 may be a bluetooth chip. The Bluetooth headset can be paired with Bluetooth chips of other electronic devices through the Bluetooth chip and establish wireless connection, so that wireless communication and service processing between the Bluetooth headset and the other electronic devices are realized through the wireless connection. In general, a bluetooth chip may support Basic Rate (BR)/enhanced rate (enhanced data rate, EDR) bluetooth and BLE, for example, may receive/transmit paging (page) information, receive/transmit BLE broadcast messages, and the like.
The wireless communication module 103 may further include an antenna, and the wireless communication module 103 may receive electromagnetic waves via the antenna, frequency-modulate and filter the electromagnetic wave signals, and transmit the processed signals to the processor 101. The wireless communication module 103 may also receive a signal to be transmitted from the processor 101, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via an antenna.
The audio module 104 may be used to manage audio data to enable the bluetooth headset to input and output audio streams. For example, the audio module 104 may obtain an audio stream from the wireless communication module 103 or transfer the audio stream to the wireless communication module 103, to implement functions of making a call through a bluetooth headset, playing music, starting/closing a voice assistant of an electronic device connected to the headset, receiving/transmitting voice data of a user, and the like. The audio module 104 may include a speaker (or earpiece, receiver) assembly for outputting an audio stream, a microphone (or microphone, microphone), microphone pickup circuitry that mates with the microphone, and the like. Speakers may be used to convert audio electrical signals into sound signals and play them. Microphones may be used to convert sound signals into audio electrical signals.
The power module 105 may be used to provide a system power for the bluetooth headset, and power each module of the bluetooth headset; the bluetooth headset is supported to receive charging inputs, etc. The power module 105 may include a power management unit (power management unit, PMU) and a battery. Wherein the power management unit may receive an external charging input; the electric signals input by the charging circuit are transformed and then supplied to the battery for charging, and the electric signals supplied by the battery can be transformed and then supplied to other modules such as an audio module 104, a wireless communication module 103 and the like; and to prevent overcharging, overdischarging, shorting, or overcurrent of the battery, etc. In some embodiments, the power module 105 may also include a wireless charging coil for wirelessly charging the bluetooth headset. In addition, the power management unit can also be used for monitoring parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance) and the like.
A plurality of input/output interfaces 106 may be used to provide a wired connection for charging or communication between the bluetooth headset and the headset case. In some embodiments, the input/output interface may be a USB interface. In other embodiments, the input/output interface 106 may be an electrical connector of the headset, through which the bluetooth headset may establish an electrical connection with an electrical connector in the headset case when the bluetooth headset is placed in the headset case, thereby charging a battery in the bluetooth headset. In other embodiments, the bluetooth headset may also be in data communication with the headset box after the electrical connection is established, e.g., may receive pairing instructions from the headset box.
In addition, the Bluetooth headset may also include a sensor 107. For example, the sensor 107 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth headset is being worn by a user. For example, the bluetooth headset may utilize a distance sensor to detect whether there is an object in the vicinity of the bluetooth headset, thereby determining whether the bluetooth headset is worn by the user. Upon determining that the bluetooth headset is being worn, the bluetooth headset may turn on the speaker.
For another example, the sensor 107 may also include an osteoinductive sensor, in combination with an osteoinductive headset. By utilizing the bone conduction sensor, the Bluetooth headset can acquire the vibration signal of the human body vocal part vibration bone block, analyze the voice signal and realize the voice function, thereby receiving the voice instruction of the user. The Bluetooth headset can also perform voice authentication according to the user voice signal obtained by the bone conduction headset so as to authenticate the user identity in business scenes such as payment transaction and the like.
For another example, the sensor 107 may further include: a touch sensor for detecting a touch operation of a user; the fingerprint sensor is used for detecting the fingerprint of the user, identifying the identity of the user and the like; an ambient light sensor, which can adaptively adjust some parameters (such as volume) according to the brightness of the perceived ambient light; and possibly other sensors.
In some embodiments, the touch sensor may detect a touch operation such as a single click, a double click, a multiple click, a long press, a heavy press, etc. of the user, and may also perform fingerprint identification of the user to authenticate the user identity in a business scenario such as a payment transaction.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on bluetooth headset. It may have more or fewer components than shown in fig. 20, may combine two or more components, or may have a different configuration of components. For example, the outer surface of the bluetooth headset may further include a key 108, an indicator (which may indicate a state of an electric quantity, an incoming/outgoing call, a pairing mode, etc.), a display screen (which may prompt a user about information), a dust screen (which may be used with an earphone), and the like. The key 108 may be a physical key or a touch key (used with a touch sensor) for triggering operations such as power on, power off, pause, play, record, start pairing, reset, etc.
In some embodiments, the Bluetooth headset is typically housed within a headset case. The earphone box may have one or more magnets inside to attract the earphone body into a cavity inside the earphone box. The earphone pod may include a battery and a plurality of input/output interfaces. In some embodiments, the input/output interface may be a box electrical connector. When a pair of box electric connectors in the earphone box are respectively electrically connected with two earphone electric connectors in the earphone body, the earphone box can charge a battery in the earphone body through a battery of the earphone box.
In other embodiments, at least one touch control may be disposed on the earphone box, and may be used to trigger the bluetooth earphone to perform functions such as pairing reset or charging the bluetooth earphone. The earphone box may be further provided with one or more power indicator lamps to prompt the user of the power level of the battery in the earphone box and the power level of the battery in each earphone body in the earphone box.
Embodiments of the present application provide a computer program product, when the computer program product runs on a device, to enable the device to execute the technical solutions in the foregoing embodiments, and the implementation principle and technical effects are similar to those of the foregoing related embodiments, which are not repeated herein. The device may be a first electronic device, a second electronic device, a third electronic device or a bluetooth device.
An embodiment of the present application provides a computer readable storage medium, on which program instructions are stored, which when executed by a device, cause the device to perform the technical solution of the above embodiment. The principle and technical effects of the present invention are similar to those of the above-described related embodiments, and will not be described in detail herein. The device may be a first electronic device, a second electronic device, a third electronic device or a bluetooth device.
In summary, the above embodiments are only for illustrating the technical solution of the present application, and are not limited thereto; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (36)

1. A bluetooth pairing method, characterized by being applied to a communication system, the communication system including a first electronic device, a second electronic device, and a bluetooth device, the second electronic device and the bluetooth device being paired, the first electronic device and the bluetooth device not being paired, the method comprising:
the second electronic equipment and the Bluetooth equipment establish Bluetooth connection;
the second electronic equipment sends notification information to the Bluetooth equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode;
the Bluetooth equipment enters a pairing mode according to the notification information;
the first electronic device obtains pairing information from the second electronic device or the Bluetooth device or the third electronic device, wherein the pairing information comprises a Bluetooth address of the Bluetooth device;
And the first electronic equipment sends a pairing request to the Bluetooth equipment according to the Bluetooth address of the Bluetooth equipment.
2. The method of claim 1, wherein the second electronic device sending notification information to the bluetooth device comprises:
the second electronic equipment receives a first operation of a user;
and the second electronic equipment responds to the first operation and sends notification information to the Bluetooth equipment.
3. The method according to claim 1 or 2, wherein the second electronic device sends notification information to the bluetooth device, comprising:
the second electronic device sends a logic link control and adaptation protocol ECHO request (L2CAP_ECHO_REQ) message to the Bluetooth device, wherein the L2CAP_ECHO_REQ message comprises the notification information;
the bluetooth device sends a logical link control and adaptation protocol ECHO response l2cap_echo_rsp message to the second electronic device.
4. The method of any of claims 1-3, wherein the first electronic device obtaining pairing information from the second electronic device comprises:
the second electronic equipment generates two-dimensional code information according to the pairing information and displays the two-dimensional code information;
The first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain the pairing information.
5. The method of claim 4, wherein before the second electronic device generates two-dimensional code information according to the pairing information, further comprising:
the second electronic device receives a second operation of the user.
6. The method of any of claims 1-3, wherein the first electronic device obtaining pairing information from the second electronic device comprises:
the second electronic equipment and the first electronic equipment are in communication connection;
the second electronic equipment sends the pairing information to the Bluetooth equipment through the communication connection;
the first electronic device receives the pairing information.
7. The method of claim 6, wherein prior to establishing the communication connection between the second electronic device and the first electronic device, further comprising:
a third operation of the user is received.
8. The method of claim 6, wherein the communication connection comprises any one of: bluetooth connection, wireless fidelity WiFi connection, or cellular communication connection.
9. The method of any of claims 1-3, wherein the first electronic device obtaining pairing information from the bluetooth device comprises:
after the Bluetooth equipment enters a pairing mode according to the notification information, generating two-dimensional code information according to the pairing information, and displaying the two-dimensional code information;
the first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain the pairing information.
10. The method of any of claims 1-3, wherein the third electronic device is in communication with the bluetooth device, the first electronic device obtaining pairing information from the third electronic device, comprising:
after the Bluetooth equipment enters a pairing mode according to the notification information, generating two-dimensional code information according to the pairing information;
the Bluetooth device sends the two-dimensional code information to the third electronic device;
after receiving the two-dimensional code information, the third electronic equipment displays the two-dimensional code information;
the first electronic equipment scans the two-dimensional code information and analyzes the two-dimensional code information to obtain the pairing information.
11. The method according to any of claims 1-10, wherein the pairing information further comprises capability information of the bluetooth device.
12. A bluetooth pairing method, applied to a second electronic device, the second electronic device paired with the bluetooth device, the method comprising:
establishing Bluetooth connection with the Bluetooth equipment;
and sending notification information to the Bluetooth equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode.
13. The method of claim 12, wherein said sending notification information to the bluetooth device comprises:
receiving a first operation of a user;
and transmitting the notification information to the Bluetooth device in response to the first operation.
14. The method according to claim 12 or 13, wherein said sending notification information to the bluetooth device comprises:
transmitting a logical link control and adaptation protocol ECHO request, l2cap_echo_req, message to the bluetooth device, the l2cap_echo_req message including the notification information;
and receiving a logic link control and adaptation protocol ECHO response (L2CAP_ECHO_RSP) message sent by the Bluetooth device.
15. The method according to any one of claims 12-14, further comprising:
generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of the Bluetooth equipment;
And displaying the two-dimensional code information.
16. The method of claim 15, further comprising, prior to generating the two-dimensional code information from the pairing information:
a second operation of the user is received.
17. The method according to any one of claims 12-14, further comprising:
establishing communication connection with a first electronic device, wherein the first electronic device and the Bluetooth device are unpaired;
and sending pairing information to the Bluetooth equipment through the communication connection, wherein the pairing information comprises the Bluetooth address of the Bluetooth equipment.
18. The method of claim 17, wherein prior to establishing a communication connection with the first electronic device, further comprising:
a third operation of the user is received.
19. The method of claim 17, wherein the communication connection comprises any one of: bluetooth connection, wireless fidelity WiFi connection, or cellular communication connection.
20. The method of claim 17, wherein said sending pairing information to the bluetooth device over the communication connection comprises:
generating sharing information according to the pairing information;
and sending the sharing information to the Bluetooth equipment through the communication connection.
21. The method according to any of claims 15-20, wherein the pairing information further comprises capability information of the bluetooth device.
22. A bluetooth pairing method, applied to a bluetooth device, the bluetooth device not paired with a first electronic device, the bluetooth device paired with a second electronic device, the method comprising:
establishing Bluetooth connection with the second electronic equipment;
receiving notification information sent by the second electronic equipment, wherein the notification information is used for indicating the Bluetooth equipment to enter a pairing mode;
entering a pairing mode according to the notification information;
and receiving a pairing request sent by the first electronic equipment.
23. The method of claim 22, wherein the receiving notification information sent by the second electronic device comprises:
receiving a logic link control and adaptation protocol ECHO request (L2CAP_ECHO_REQ) message sent by the second electronic equipment, wherein the L2CAP_ECHO_REQ message comprises the notification information;
and sending a logic link control and adaptation protocol ECHO response (L2CAP_ECHO_RSP) message to the second electronic device.
24. The method according to claim 22 or 23, further comprising, after entering a pairing mode according to the notification information:
Generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of the Bluetooth equipment;
and sending the two-dimensional code information to third electronic equipment.
25. The method according to claim 22 or 23, further comprising, after entering a pairing mode according to the notification information:
generating two-dimensional code information according to pairing information, wherein the pairing information comprises a Bluetooth address of the Bluetooth equipment;
and displaying the two-dimensional code information.
26. The method of claim 24 or 25, wherein the pairing information further comprises capability information of the bluetooth device.
27. A bluetooth pairing method, applied to a first electronic device, the first electronic device unpaired with a bluetooth device, the bluetooth device paired with a second electronic device, the method comprising:
obtaining pairing information from the second electronic device or the Bluetooth device or a third electronic device, wherein the pairing information comprises a Bluetooth address of the Bluetooth device; the third electronic device communicates with the Bluetooth device;
and sending a pairing request to the Bluetooth equipment according to the Bluetooth address of the Bluetooth equipment.
28. The method of claim 27, wherein the pairing information further comprises capability information of the bluetooth device.
29. The method of claim 27 or 28, wherein obtaining pairing information from the second electronic device comprises:
scanning two-dimensional code information displayed by the second electronic equipment, wherein the two-dimensional code information is generated by the second electronic equipment according to the pairing information;
and analyzing the two-dimensional code information to obtain the pairing information.
30. The method of claim 27 or 28, wherein obtaining pairing information from the second electronic device comprises:
establishing communication connection with the second electronic device;
and acquiring the pairing information from the second electronic equipment through the communication connection.
31. The method of claim 30, wherein the obtaining the pairing information from the second electronic device over the communication connection comprises:
receiving sharing information sent by the second electronic equipment; the sharing information is generated by the second electronic equipment according to the pairing information;
and analyzing the sharing information to obtain the pairing information.
32. The method of claim 30, wherein the communication connection comprises any one of: bluetooth connection, wireless fidelity WiFi connection, or cellular communication connection.
33. The method of claim 27 or 28, wherein obtaining pairing information from the bluetooth device or a third electronic device comprises:
scanning two-dimensional code information displayed by the Bluetooth device or the third electronic device, wherein the two-dimensional code information is generated by the Bluetooth device according to the pairing information;
and analyzing the two-dimensional code information to obtain the pairing information.
34. An electronic device comprising a processor configured to couple to a memory, read instructions in the memory and, in accordance with the instructions, cause the electronic device to perform the method of any one of claims 12-21 or to perform the method of any one of claims 27-33.
35. A bluetooth device comprising a processor for coupling with a memory and for reading instructions in the memory and for causing the bluetooth device to perform the method according to any of claims 22-26 in accordance with the instructions.
36. A computer readable storage medium storing computer instructions which, when run on a device, cause the device to perform the method of any one of claims 12-21, or to perform the method of any one of claims 22-26, or to perform the method of any one of claims 27-33.
CN202111285181.3A 2021-11-01 2021-11-01 Bluetooth pairing method, device, system and storage medium Pending CN116074793A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111285181.3A CN116074793A (en) 2021-11-01 2021-11-01 Bluetooth pairing method, device, system and storage medium
PCT/CN2022/127076 WO2023071993A1 (en) 2021-11-01 2022-10-24 Bluetooth pairing method, device, system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111285181.3A CN116074793A (en) 2021-11-01 2021-11-01 Bluetooth pairing method, device, system and storage medium

Publications (1)

Publication Number Publication Date
CN116074793A true CN116074793A (en) 2023-05-05

Family

ID=86160375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111285181.3A Pending CN116074793A (en) 2021-11-01 2021-11-01 Bluetooth pairing method, device, system and storage medium

Country Status (2)

Country Link
CN (1) CN116074793A (en)
WO (1) WO2023071993A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700084A (en) * 2023-06-14 2023-09-05 佛山市顺德区凯祥电器有限公司 Control method of heating table based on Bluetooth applet control

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9480096B1 (en) * 2015-08-25 2016-10-25 Motorola Solutions, Inc. Method, device, and system for fast wireless accessory devices pairing
CN105554908A (en) * 2015-12-31 2016-05-04 福建联迪商用设备有限公司 Method, master device, slave device and system for achieving code scanning automatic bluetooth connection
CN105578398A (en) * 2016-01-27 2016-05-11 努比亚技术有限公司 Terminal, and Bluetooth connection method
CN107172718B (en) * 2017-03-30 2020-08-25 联想(北京)有限公司 Information processing method and electronic equipment
CN112486105B (en) * 2019-09-12 2022-05-13 深圳市云海物联科技有限公司 Equipment control method and device
CN111050307A (en) * 2019-11-27 2020-04-21 深圳星康医疗科技有限公司 Method, system and computer readable storage medium for realizing Bluetooth connection based on two-dimensional bar code

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700084A (en) * 2023-06-14 2023-09-05 佛山市顺德区凯祥电器有限公司 Control method of heating table based on Bluetooth applet control
CN116700084B (en) * 2023-06-14 2024-02-06 佛山市顺德区凯祥电器有限公司 Control method of heating table based on Bluetooth applet control

Also Published As

Publication number Publication date
WO2023071993A1 (en) 2023-05-04

Similar Documents

Publication Publication Date Title
JP7378576B2 (en) Terminal device, method and system for implementing one-touch screen projection using remote control device
US20230362028A1 (en) Home device control method and device
CN112469013B (en) Bluetooth connection method and related device
CN113572731B (en) Voice communication method, personal computer, terminal and computer readable storage medium
CN112449332B (en) Bluetooth connection method and electronic equipment
CN111601199A (en) Wireless earphone box and system
CN112868244A (en) Point-to-multipoint data transmission method and device
CN113395685B (en) Bluetooth communication system and wireless communication system
CN111373713B (en) Message transmission method and device
CN104378801A (en) Method and device for having access to wireless network
CN110417582B (en) Router configuration method, terminal and router
CN114710768B (en) Bluetooth connection method and related device
CN105101339A (en) Use permission obtaining method and device
CN105163366A (en) Wireless network connection method and device
CN114499587B (en) Audio synchronization communication method, system, wireless earphone, terminal and storage medium
CN105162889A (en) Device finding method and apparatus
CN105246074A (en) Method and device for establishing connections
CN114339709A (en) Wireless communication method and terminal device
CN112789934B (en) Bluetooth service query method and electronic equipment
WO2023071993A1 (en) Bluetooth pairing method, device, system, and storage medium
CN104618987B (en) Access the method and device of network
CN113365274A (en) Network access method and electronic equipment
US7065354B2 (en) Battery charging apparatus capable of connecting a mobile phone with a wire telephone network and method for enabling the same
CN112449336B (en) Equipment capability discovery method and P2P equipment
CN105430642A (en) File transmission method and apparatus

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