Bluetooth communication system, bluetooth connection method, electronic device, and storage medium
By determining device version and parameter changes before Bluetooth connection, and directly obtaining or interacting with necessary information, the Bluetooth connection latency problem is solved, resulting in faster connection speeds and resource optimization.
Patent Information
- Application Number
- CN202011063166.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-30
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2040-09-30
AI Technical Summary
The Bluetooth connection process involves longer latency due to parameter negotiation and information exchange, which affects the connection speed.
Before connecting via Bluetooth, it checks if the versions of the electronic devices are the same. If they are the same, it directly obtains the Bluetooth connection parameters of the other device from the local machine. If they are different, it checks if the parameters have changed and only exchanges the changed information to establish a connection.
It simplifies the information exchange process during Bluetooth connection, improves connection speed, and avoids resource waste.
Smart Images

Figure CN114339696B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and more particularly to a Bluetooth communication system, a Bluetooth connection method, an electronic device and a storage medium. BACKGROUND
[0002] At present, in order to ensure that different electronic devices can establish a connection with each other, the two devices usually need to perform parameter negotiation and information interaction according to a protocol standard process, and then establish a connection according to the negotiated information.
[0003] However, the process of parameter negotiation and information interaction involves a large amount of Bluetooth parameter information interaction, and parameter negotiation and information interaction need to be performed every time a connection is established. This process will occupy a certain time in the Bluetooth connection process, thereby causing a long Bluetooth connection delay. Therefore, how to shorten the Bluetooth connection delay is a technical problem to be solved. SUMMARY
[0004] The present application provides a Bluetooth communication system, a Bluetooth connection method, an electronic device and a storage medium, which can solve the problem of long Bluetooth connection delay caused by parameter negotiation and information interaction in the related art Bluetooth connection process.
[0005] In a first aspect, the present application provides a Bluetooth connection method, which is applied to a Bluetooth communication system including a first electronic device and a second electronic device, and includes the following steps: the first electronic device sends first version information of the first electronic device to the second electronic device, the first version information being used to indicate the version of the first electronic device; the first electronic device receives confirmation information sent by the second electronic device, the confirmation information being used to indicate that the version of the second electronic device is the same as the version of the first electronic device; and the first electronic device establishes a Bluetooth connection with the second electronic device according to first Bluetooth connection parameters, wherein the first Bluetooth connection parameters are Bluetooth connection parameters corresponding to the version of the first electronic device.
[0006] Since the version of the second electronic device is the same as the version of the first electronic device, the Bluetooth connection parameters of the second electronic device are the same as the Bluetooth connection parameters of the first electronic device. Thus, the first electronic device can directly call the Bluetooth connection parameters common to the two devices to establish a Bluetooth connection when it learns that the versions of the two devices are the same.
[0007] Through the above scheme, when two electronic devices need to establish a Bluetooth connection, it can be determined whether the versions of the two electronic devices are consistent, and it is further determined whether the Bluetooth connection parameters need to be interacted: if the versions are consistent, the Bluetooth connection parameters of the two devices are consistent, and then the Bluetooth connection parameters of the other device can be directly obtained from the local device to establish the Bluetooth connection without interaction of the Bluetooth connection parameters, so that the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0008] In a possible embodiment, before two devices establish a Bluetooth connection, a paging establishment process needs to be first completed between the two devices.
[0009] In a possible implementation of the first aspect, the method further includes:
[0010] In a case where the version of the second electronic device is different from the version of the first electronic device, the first electronic device receives first parameter change indication information sent by the second electronic device, and the first parameter change indication information is used to indicate change content of the Bluetooth connection parameter of the second electronic device.
[0011] The first electronic device determines information used to establish a Bluetooth connection with the second electronic device according to the first parameter change indication information.
[0012] Through the above scheme, for the case where the versions of the two devices are different, if the two devices have been paired and connected before and the information of the opposite device is stored, the two devices can first determine whether the information of the opposite device has changed relative to the information used last time, if the information of the opposite device has changed, the changed information is interacted to establish a connection; if the information of the opposite device has not changed, the information does not need to be interacted, and the stored information of the opposite device can be directly called to establish a connection.
[0013] In a possible embodiment, the first electronic device determines information used to establish a Bluetooth connection with the second electronic device according to the first parameter change indication information, including:
[0014] If the first parameter change indication information indicates that there is change content, the first electronic device determines second Bluetooth connection parameters of the second electronic device according to the stored Bluetooth connection parameters of the second electronic device and the change content indicated by the first parameter change indication information.
[0015] The first electronic device establishes a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the second Bluetooth connection parameter.
[0016] The first electronic device determines the second Bluetooth connection parameter of the second electronic device according to the stored Bluetooth connection parameter of the second electronic device and the change content indicated by the first parameter change indication information, and the determination includes:
[0017] The first electronic device updates the stored Bluetooth connection parameter of the second electronic device according to the change content indicated by the first parameter change indication information, and obtains the latest second Bluetooth connection parameter of the second electronic device.
[0018] In another possible embodiment, the first electronic device determines the information used to establish the Bluetooth connection with the second electronic device according to the first parameter change indication information, and the determination includes:
[0019] If the first parameter change indication information indicates no change content, the first electronic device obtains the stored Bluetooth connection parameter of the second electronic device from the first electronic device locally.
[0020] The first electronic device establishes the Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the stored Bluetooth connection parameter of the second electronic device.
[0021] In the case that the versions of the two devices are different, if the first parameter change indication information indicates that the first Bluetooth connection parameter has no change content, the two devices do not need to interact information, and can directly call the stored information of the opposite device to establish the connection. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0022] In a possible implementation of the first aspect, the second electronic device is further configured to obtain the first parameter change indication information in a mask marking manner.
[0023] Through the above scheme, the two devices can identify the information or nodes of the local device that have changed, and then the two devices interact the information identification. In this way, when establishing the connection, the two devices can identify which information has changed according to the information identification, and re-negotiate the interaction of the changed information, without interacting and negotiating the information that has not changed. In this way, part of the connection interaction process can be omitted. Therefore, the connection establishment process can be simplified, the Bluetooth connection speed can be improved, and the waste of air interface interaction resources can be avoided.
[0024] In a possible implementation of the first aspect, the method further includes:
[0025] In the case that the version of the second electronic device is different from the version of the first electronic device, the first electronic device sends a second request message to the second electronic device, and the second request message includes the first Bluetooth connection parameter of the first electronic device.
[0026] The first electronic device receives a second response message sent by the second electronic device, and the second response message includes second Bluetooth connection parameters of the second electronic device.
[0027] The first electronic device establishes a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameters and the second Bluetooth connection parameters.
[0028] In the above solution, if the Bluetooth communication protocol versions supported by the two devices are the same, the two devices can directly obtain the Bluetooth connection parameters of the other device from the local device without interacting the Bluetooth connection parameters, and can establish a Bluetooth connection without re-executing the parameter negotiation and information interaction process. If the Bluetooth communication protocol versions supported by the two devices are different, the two devices can interact information according to the traditional protocol standard process and then establish a connection. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0029] In a possible implementation manner of the first aspect, the first electronic device sends first version information of the first electronic device to the second electronic device, including: the first electronic device sends a first request message to the second electronic device, and the first request message includes the first version information.
[0030] The first electronic device receives confirmation information sent by the second electronic device, including: the first electronic device receives a first response message of the first request message sent by the second electronic device, and the first response message includes the confirmation information.
[0031] In a possible implementation manner of the first aspect, the first Bluetooth connection parameters are static parameters, and the method further includes:
[0032] The first electronic device sends third Bluetooth connection parameters of the first electronic device which dynamically change to the second electronic device; the first electronic device receives fourth Bluetooth connection parameters of the second electronic device which dynamically change and are sent by the second electronic device; and the first electronic device establishes a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameters, the third Bluetooth connection parameters and the fourth Bluetooth connection parameters.
[0033] The first aspect introduces the process of establishing Bluetooth connection in different ways respectively in the case of same version and different versions of two devices, which is realized based on not considering dynamic factors in the process of establishing connection. In actual implementation, in the case of same version of two devices, the two devices may also need to negotiate some dynamic change parameters, such as connection establishment request, clock, frequency hopping parameter, etc. For these dynamic change information and operation, the two devices can interact according to the normal process.
[0034] In the second aspect, the application provides another Bluetooth connection method, which comprises:
[0035] The first electronic device receives first parameter change indication information sent by the second electronic device, and the first parameter change indication information is used to indicate the change content of the first Bluetooth connection parameter of the second electronic device.
[0036] If the first parameter change indication information indicates the change content, the first electronic device determines the second Bluetooth connection parameter of the second electronic device according to the stored first Bluetooth connection parameter and the change content indicated by the first parameter change indication information.
[0037] The first electronic device establishes Bluetooth connection with the second electronic device according to the second Bluetooth connection parameter of the second electronic device and the third Bluetooth connection parameter of the first electronic device.
[0038] Through the above scheme, when two electronic devices need to establish Bluetooth connection, it can be determined whether the Bluetooth connection parameter of the opposite device has changed, and it can be further determined whether the Bluetooth connection parameter needs to be interacted or which Bluetooth connection parameter needs to be interacted: if the Bluetooth connection parameter of the opposite device has changed, only the changed information can be interacted to establish Bluetooth connection, so that the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0039] The third Bluetooth connection parameter is the Bluetooth connection parameter corresponding to the first electronic device and stored locally by the first electronic device, which can be directly called from the local first electronic device.
[0040] Optionally, if the Bluetooth connection parameter of the second electronic device has changed, the first electronic device can obtain the changed Bluetooth connection parameter of the second electronic device, and update the stored Bluetooth connection parameter of the second electronic device of the first electronic device by using the Bluetooth connection parameter.
[0041] In a possible implementation manner of the second aspect, before the first electronic device receives the first parameter change indication information sent by the second electronic device, the method further comprises:
[0042] The first electronic device sends a first request message to the second electronic device, where the first request message is used to request to establish a Bluetooth connection with the second electronic device.
[0043] The first electronic device receives first parameter change indication information sent by the second electronic device, including:
[0044] The first electronic device receives the first response message of the first request message sent by the second electronic device, and the first response message includes the first parameter change indication information.
[0045] It should be noted that the above is an example of obtaining change information of the opposite device by the local device. In actual implementation, the local device can also send local change information to the opposite device to instruct the opposite device to refresh the stored information when the information changes. In this way, the two devices can interact with the information change part when establishing a connection, which can simplify the connection establishment process, improve the Bluetooth connection speed, and avoid wasting air interface interaction resources.
[0046] In a possible implementation manner of the second aspect, the method further includes: in a case where the first parameter change indication information indicates no change content, the first electronic device establishes a Bluetooth connection with the second electronic device according to the stored first Bluetooth connection parameter and the third Bluetooth connection parameter.
[0047] Through the above scheme, when two electronic devices need to establish a Bluetooth connection, it can be determined whether the Bluetooth connection parameter of the opposite device has changed, and further determine whether the Bluetooth connection parameter needs to be interacted or which Bluetooth connection parameter needs to be interacted: if the Bluetooth connection parameter of the opposite device has not changed, the Bluetooth connection parameter of the opposite device stored in the local device can be directly obtained to establish a Bluetooth connection without interaction; if the Bluetooth connection parameter of the opposite device has changed, only the changed information can be interacted to establish a Bluetooth connection, which can simplify the information interaction link in the Bluetooth connection process and improve the Bluetooth connection speed.
[0048] In a possible implementation manner of the second aspect, the first parameter change indication information is information obtained by marking in a mask manner. In this way, the two devices can identify the information or nodes that have changed in the local device, and then the two devices interact with the information identification, so that the two devices can identify which information has changed according to the information identification when establishing a connection, and re-negotiate the interaction of the changed information, without interacting and negotiating the information that has not changed. In this way, part of the connection interaction process can be omitted. Therefore, the present application can simplify the connection establishment process, improve the Bluetooth connection speed, and avoid wasting air interface interaction resources.
[0049] It should be noted that for the connection between non-peer-to-peer devices other than the peer-to-peer device such as TWS earphones (such as earphone connection to mobile phone), the method provided in the second aspect can be used to omit part of the connection interaction process. For example, for a Bluetooth connection combination such as earphone and mobile phone, since the opposite end information cannot be obtained before pairing, the information cannot be extracted from the local as such as TWS earphone. The opposite end static configuration and capability information are obtained after the establishment and negotiation of exchange according to the standard process at the first time of establishing pairing. The information of the opposite end device is recorded by the local device, and if the information of the opposite end device does not change at the next time of establishing connection, the negotiation and exchange can be omitted again; or the information of the opposite end device has a part of change, and only the changed information is interacted, so that all the parameters for Bluetooth connection are obtained, and then the Bluetooth connection can be established. In this way, the connection establishment process can be simplified, the Bluetooth connection speed can be improved, and the waste of air interface interaction resources can be avoided.
[0050] In a third aspect, the present application provides an electronic device, which comprises units for performing the method in the first aspect. The electronic device can correspond to the method described in the first aspect, and the related description of the units in the electronic device can refer to the description of the first aspect, which will not be repeated here for brevity.
[0051] In a fourth aspect, the present application provides an electronic device, which comprises units for performing the method in the second aspect. The electronic device can correspond to the method described in the second aspect, and the related description of the units in the electronic device can refer to the description of the second aspect, which will not be repeated here for brevity.
[0052] In a fifth aspect, the present application provides a Bluetooth communication system, which comprises a first electronic device and a second electronic device.
[0053] The first electronic device is configured to send first version information of the first electronic device to the second electronic device, wherein the first version information is used to indicate the version of the first electronic device.
[0054] The second electronic device is configured to receive the first version information sent by the first electronic device, and send confirmation information to the first electronic device according to the first version information, wherein the confirmation information is used to indicate that the version of the second electronic device is the same as the version of the first electronic device.
[0055] The first electronic device is further configured to receive the confirmation information sent by the second electronic device, and establish Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter.
[0056] The first Bluetooth connection parameter is a Bluetooth connection parameter corresponding to a version of the first electronic device.
[0057] The Bluetooth communication system corresponds to the method described in the first aspect, and the first electronic device and the second electronic device are described in the first aspect. For brevity, the description is not repeated here.
[0058] In a sixth aspect, the present application provides a Bluetooth communication system, which includes a first electronic device and a second electronic device.
[0059] The second electronic device is configured to send first parameter change indication information to the first electronic device, the first parameter change indication information being used to indicate a change content of a first Bluetooth connection parameter of the second electronic device.
[0060] The first electronic device is configured to receive the first parameter change indication information sent by the second electronic device, and determine a second Bluetooth connection parameter of the second electronic device according to the stored first Bluetooth connection parameter and the change content indicated by the first parameter change indication information.
[0061] The first electronic device is further configured to establish a Bluetooth connection with the second electronic device according to the second Bluetooth connection parameter of the second electronic device and a third Bluetooth connection parameter of the first electronic device.
[0062] The Bluetooth communication system corresponds to the method described in the second aspect, and the first electronic device and the second electronic device are described in the second aspect. For brevity, the description is not repeated here.
[0063] In a seventh aspect, the present application provides an electronic device, which includes a processor and a memory coupled to the processor. The memory is configured to store computer programs or instructions, and the processor is configured to execute the computer programs or instructions stored in the memory, so that the method in the first aspect and any possible implementation manner thereof is executed.
[0064] In an eighth aspect, the present application provides an electronic device, which includes a processor and a memory coupled to the processor. The memory is configured to store computer programs or instructions, and the processor is configured to execute the computer programs or instructions stored in the memory, so that the method in the second aspect and any possible implementation manner thereof is executed.
[0065] In a ninth aspect, the present application provides a computer readable storage medium, which stores a computer program (also referred to as instructions or codes) for implementing the method in the first aspect and / or the method in the second aspect.
[0066] For example, the computer program, when executed by a computer, causes the computer to perform the method in the first aspect and / or the method in the second aspect and any possible implementation manner thereof.
[0067] In a tenth aspect, the present application provides a chip (for example, a Bluetooth chip) comprising a processor. The processor is configured to read and execute a computer program stored in a memory, so as to perform the method in the first aspect and / or the method in the second aspect and any possible implementation manner thereof.
[0068] Optionally, the chip further comprises a memory, and the memory is connected to the processor through a circuit or a wire.
[0069] In an eleventh aspect, the present application provides a chip system comprising a processor. The processor is configured to read and execute a computer program stored in a memory, so as to perform the method in the first aspect and / or the method in the second aspect and any possible implementation manner thereof.
[0070] When the electronic device is a chip system, the chip system can be composed of a chip (for example, a Bluetooth chip) or can comprise a chip and other discrete devices.
[0071] In a twelfth aspect, the present application provides a computer program product comprising a computer program (also referred to as instructions or codes). The computer program, when executed by a computer, causes the computer to implement the method in the first aspect and / or the method in the second aspect and any possible implementation manner thereof.
[0072] It can be understood that the electronic device, the Bluetooth communication system, the computer readable storage medium, the computer program product or the method provided in the above are all used in the Bluetooth connection method provided in the above, and thus the beneficial effects achieved thereby can refer to the beneficial effects in the corresponding Bluetooth connection method.
[0073] These aspects or other aspects of the present application will be more apparent in the following description of the embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0074] Figure 1 FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present application.
[0075] Figure 2 FIG. 2 is a schematic diagram of a Bluetooth protocol architecture provided by an embodiment of the present application.
[0076] Figure 3 FIG. 3 is a schematic diagram of a Bluetooth connection method provided by an embodiment of the present application.
[0077] Figure 4Fig. 2 is a flowchart of a Bluetooth connection method according to an embodiment of the present application.
[0078] Figure 5 Fig. 3 is a flowchart of a Bluetooth connection method according to an embodiment of the present application.
[0079] Figure 6 Fig. 4 is a schematic diagram of device pairing in a Bluetooth connection method according to an embodiment of the present application.
[0080] Figure 7 Fig. 5 is a flowchart of a Bluetooth connection method according to an embodiment of the present application.
[0081] Figure 8 Fig. 6 is a schematic structural block diagram of an electronic device according to an embodiment of the present application.
[0082] Figure 9 Fig. 7 is a schematic structural block diagram of an electronic device according to an embodiment of the present application.
[0083] Figure 10 Fig. 8 is a hardware schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0084] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0085] In the description of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can mean that A exists alone, A and B exist together, and B exists alone. In addition, in the description of the present application, unless otherwise specified, "multiple" means two or more. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, "first" and "second" and the like in the embodiments of the present application are used to distinguish different objects or to distinguish different processing of the same object, rather than to describe the specific order of the object.
[0086] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0087] Figure 1 A schematic diagram of the architecture of the communication system involved in various exemplary embodiments of this application is shown. For example... Figure 1 As shown, the communication system 100 may include multiple electronic devices supporting wireless communication technology. For example, the communication system 100 may include a Bluetooth headset 11 and a mobile phone 12, wherein the Bluetooth headset 11 includes a first earpiece 01 and a second earpiece 02, and the Bluetooth headset 11 and the mobile phone 12 can establish and maintain a wireless connection through wireless communication technology; in addition, the first earpiece 01 and the second earpiece 02 can also be independent electronic devices supporting wireless communication technology, and can establish and maintain a wireless connection with each other through wireless communication technology. As another example, the communication system 100 may also include a mobile phone 13, and the mobile phone 12 and the mobile phone 13 can establish and maintain a wireless connection through wireless communication technology.
[0088] Optionally, the aforementioned wireless communication technology can be Bluetooth (BT), such as traditional Bluetooth or Bluetooth Low Energy (BLE), or general 2.4G / 5G frequency band wireless communication technology, etc.
[0089] Optionally, the communication system 100 described above may include, for example: Figure 1The Bluetooth earphone and the mobile phone shown in the figure, of course, can also include a tablet computer, a wireless sound box, a wireless bracelet, a wireless car, wireless smart glasses, a wireless watch, an augmented reality (AR) / virtual reality (VR) device, a media player (such as an MP3, an MP4, etc.), a notebook computer, an ultra-mobile personal computer (UMPC), a personal digital assistant (PDA), a television, or a smart watch, and the like, which are electronic devices supporting a wireless communication technology. The device type of the electronic devices in the communication system 100 is not limited in the embodiments of the present application. Wireless connections (such as Bluetooth connections) can be established and maintained between the electronic devices through the wireless communication technology. It should be noted that the electronic devices capable of supporting Bluetooth functions are also referred to as Bluetooth devices.
[0090] For example, the electronic device is a Bluetooth earphone. The Bluetooth earphone can have various types, such as an earplug type, an in-ear type, a head-mounted type, an ear cover type, or a hanging ear type Bluetooth earphone. The Bluetooth earphone can include a first part and a second part respectively worn on the left ear and the right ear of a user, and can be connected through a connecting line, such as a neckband type Bluetooth earphone. The Bluetooth earphone can also be two independent parts, such as a true wireless stereo (TWS) earphone.
[0091] In the present application, the Bluetooth earphone is an earphone supporting a Bluetooth communication protocol. The Bluetooth communication protocol can be a traditional Bluetooth protocol, or a BLE low-power Bluetooth protocol. Of course, it can also be other new Bluetooth protocol types to be released in the future. From the version of the Bluetooth protocol, the version of the Bluetooth communication protocol can be any of the following versions: 1.0 series version, 2.0 series version, 3.0 series version, 4.0 series version, and other series versions to be released in the future.
[0092] For example, the Bluetooth earphone is a TWS earphone. As shown in Figure 1 The TWS earphone 11 includes a first earphone 01 and a second earphone 02, and a Bluetooth module is arranged in each of the first earphone 01 and the second earphone 02. The first earphone 01 and the second earphone 02 can perform data transmission through a Bluetooth protocol. The Bluetooth communication protocol versions of the two earphones can be the same or different. From the appearance, the first earphone 01 and the second earphone 02 of the TWS earphone 11 are not connected by a connecting line, and have the advantages of convenient carrying and easy use. Optionally, the first earphone 01 and the second earphone 02 can each include a microphone, that is, the first earphone 01 and the second earphone 02 have the functions of audio playback and audio acquisition in addition to the function of audio playback.
[0093] In actual implementation, the user can use the TWS earphone 11 in a dual-ear mode or a single-ear mode. In the single-ear mode, the user wears the first earphone 01 or the second earphone 02 to listen to music or make / receive a call or perform other audio services. In the dual-ear mode, the user wears the first earphone 01 and the second earphone 02 to listen to music or make / receive a call or perform other audio services. In the dual-ear mode, the two earphones have a master earphone and a slave earphone. In addition, the master and slave roles of the two earphones can be switched based on different conditions during use of the TWS earphone. For example, the earphone with a higher power level can be switched to the master earphone, and the earphone with a lower power level can be switched to the slave earphone. For another example, assuming that the user wears the first earphone 01 and the second earphone 02, the first earphone 01 is the master earphone, and the second earphone 02 is the slave earphone, if the user removes the first earphone 01, the second earphone 02 can be switched from the slave earphone to the master earphone, and the first earphone 01 is switched from the master earphone to the slave earphone or stops working after a preset time or directly stops working.
[0094] On the one hand, in the single-ear mode, if the user wears the first earphone 01 and does not wear the second earphone 02, the first earphone 01 is the master earphone, the master earphone and the mobile phone can be paired and establish a wireless connection through information interaction and parameter negotiation, so as to realize wireless communication and service processing between the master earphone and the mobile phone through the wireless connection. For example, as shown in FIG. 1B, the mobile phone 12 and the first earphone 01 can establish a wireless connection through information interaction and parameter negotiation. If the mobile phone 12 initiates an audio service, the mobile phone 12 can send an audio signal to the first earphone 01, and the first earphone 01 plays the audio signal after receiving the audio signal. Figure 1
[0095] On the other hand, in the dual-ear mode, if the user wears the first earphone 01 and the second earphone 02, the first earphone 01 and the second earphone 02 are the master earphone and the slave earphone respectively, the master earphone and the slave earphone can be paired and establish a wireless connection through information interaction and parameter negotiation, so as to realize wireless communication and service processing between the master earphone and the slave earphone.
[0096] On the other hand, in the dual-ear mode, if the user wears the first earphone 01 and the second earphone 02, the master earphone and the slave earphone can be paired and establish a wireless connection through information interaction and parameter negotiation, and the master earphone and the mobile phone can also be paired and establish a wireless connection through wireless communication technology. Thus, the mobile phone and the master earphone, and the master earphone and the slave earphone are connected wirelessly, communicate wirelessly, and process services. For example, as shown in FIG. 1C, the mobile phone 12, the first earphone 01, and the second earphone 02 can establish a wireless connection through information interaction and parameter negotiation. If the mobile phone 12 initiates an audio service, the mobile phone 12 can send an audio signal to the first earphone 01, and the first earphone 01 plays the audio signal after receiving the audio signal. Figure 1 As shown, the mobile phone 12 and the first earphone 01 can establish wireless connection through information interaction and parameter negotiation; similarly, the first earphone 01 and the second earphone 02 can establish wireless connection through information interaction and parameter negotiation. For example, if the mobile phone 12 initiates an audio service, the mobile phone 12 can send an audio signal to the first earphone 01, and the first earphone 01 sends the audio signal to the second earphone 02 after receiving the audio signal, so that the first earphone 01 and the second earphone 02 play the audio signal respectively.
[0097] In some embodiments, the Bluetooth earphone can support one or more of the following applications: HSP (headset profile) application, HFP (hands-free profile) application, A2DP (advanced audio distribution profile) application. Among them, the HSP application represents the earphone application, which provides the basic functions required for communication between the mobile phone and the earphone, and the Bluetooth earphone can be used as the audio input and output interface of the mobile phone. The HFP application represents the hands-free application, and the HFP application adds some extended functions on the basis of the HSP application. The Bluetooth earphone can control the call process of the mobile phone, such as answering, hanging up, rejecting, voice dialing, etc. The A2DP application is an advanced audio transmission application, which supports the transmission of stereo audio stream.
[0098] In the above Figure 1 As shown in the communication system 100, the devices need to follow the Bluetooth protocol to realize Bluetooth connection and information exchange. Like the open system interconnection reference model (OSI), the Bluetooth technology also adopts a layered structure, forming a Bluetooth protocol stack from the bottom layer to the top layer, and each layer protocol defines the functions to be completed and the data packet format to be used, to ensure the interoperability between Bluetooth products. Among them, the core protocols of Bluetooth include baseband protocol, link management protocol LMP, logical link control and adaptation protocol L2CAP, and service discovery protocol SDP, etc. For the convenience of understanding the embodiments of the present application, Figure 2 A schematic diagram of the Bluetooth protocol architecture is shown. The following will be explained in combination with Figure 2 The several Bluetooth protocols involved in the embodiments of the present application are explained and described, so as to facilitate the understanding of the persons skilled in the art.
[0099] (1) Baseband protocol, which is the protocol between baseband and link control layer, is used to ensure the physical connection between Bluetooth devices in piconet by radio frequency. The radio frequency system of Bluetooth is a frequency modulation system, any packet is sent in the designated time slot and frequency. It uses the query and paging process to synchronize the sending frequency and clock between different devices, and provides two physical connection modes for baseband data packets, synchronous connection oriented link (SCO) and asynchronous connectionless (ACL), and multiple data transmission can be realized on the same radio frequency; SCO and extended SCO (eSCO) can be used to transmit communication data with high time requirements. ACL is suitable for data packets, SCO is suitable for voice and combination of voice and data. A special channel is allocated for different data types (including connection management information and control information). Various user modes can be used to transmit voice between Bluetooth devices, and connection-oriented voice packets only need to be transmitted through the baseband, without reaching L2CAP. Voice mode is relatively simple in Bluetooth system, and voice can be transmitted by opening Bluetooth voice connection.
[0100] (2) Link manager protocol (LMP), which is responsible for the establishment and setting of connection between Bluetooth devices. LMP performs identity authentication and encryption through connection initiation, exchange and verification, determines the size of baseband data packet through negotiation; also controls the energy saving mode and working cycle of wireless device, and the connection state of device unit in piconet.
[0101] (3) Logical link control and adaptation protocol (L2CAP), L2CAP is the upper layer protocol of baseband protocol, which can be considered to work in parallel with LMP. The difference between L2CAP and LMP is that when service data does not pass through LMP, L2CAP provides services for upper layer. L2CAP provides logical channel, called L2CAP channel. L2CAP provides connection-oriented and connectionless data services for upper layer protocol, which adopts multi-channel technology, segmentation and recombination technology, group extraction technology. L2CAP allows high layer protocol to send and receive data packets with a length of 64k bytes. Although baseband protocol provides two connection types of SCO and ACL, L2CAP only supports ACL.
[0102] (4) Service discovery protocol (SDP), which plays a vital role in discovering services in the Bluetooth technology framework, is the basis of all user modes. By using SDP, the information and service types of devices can be queried, and the corresponding connection between Bluetooth devices can be established.
[0103] Currently, the connection process between different electronic devices needs to be implemented according to a protocol standard process, which includes a connection information interaction process. Specifically, in the connection process, according to the protocol standard process, some parameter negotiation and information interaction between electronic devices are needed, such as exchange of LMP feature support, version specification, key parameter negotiation, SDP service query, etc. In particular, SDP service query needs to establish an L2CAP channel first and then query, and the process is relatively time-consuming. Therefore, the above connection information interaction process will occupy a certain time in the Bluetooth connection process, causing a long Bluetooth connection delay. How to reduce the Bluetooth connection delay to improve user experience is a technical problem to be solved.
[0104] In view of the above, the present application proposes a Bluetooth connection method based on the above system architecture, which can simplify the connection information interaction process between devices. The Bluetooth connection method is applied to the Bluetooth communication system, which includes a first electronic device and a second electronic device, and the Bluetooth connection method is used to establish a Bluetooth connection between the first electronic device and the second electronic device.
[0105] Since the information of the opposite device that needs to be obtained and negotiated in the Bluetooth connection process is fixed or can be modified (semi-static change) in the device life cycle, these information can be regarded as known information without repeated negotiation and acquisition at each connection if there is no change. In particular, the software and hardware of the two earphones of TWS earphones are the same, so most of the static information or semi-static information of the two earphones is consistent. Therefore, the present application provides the following two possible implementation modes to simplify the information interaction link in the Bluetooth connection process.
[0106] In the first implementation mode, the present application provides a Bluetooth connection method, which can first determine whether the versions of two electronic devices are consistent when the two electronic devices need to establish a Bluetooth connection, and further determine whether the Bluetooth connection parameters need to be interacted: if the versions are consistent, the Bluetooth connection parameters of the two devices are consistent, then the Bluetooth connection parameters of the opposite device can be obtained directly from the local device to establish a Bluetooth connection without interaction, which can simplify the information interaction link in the Bluetooth connection process and improve the Bluetooth connection speed.
[0107] In the second embodiment, the embodiment of the present application provides another Bluetooth connection method. When two electronic devices need to establish a Bluetooth connection, it can be determined whether the Bluetooth connection parameters of the opposite device have changed, and it can be further determined whether the Bluetooth connection parameters need to be interacted or which Bluetooth connection parameters need to be interacted: if the Bluetooth connection parameters of the opposite device have not changed, the Bluetooth connection parameters of the opposite device stored in the local device can be directly obtained to establish the Bluetooth connection without interaction of the Bluetooth connection parameters; if the Bluetooth connection parameters of the opposite device have changed, only the changed information can be interacted to establish the Bluetooth connection. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0108] The Bluetooth connection method provided by the first embodiment of the present application and the Bluetooth connection method provided by the first embodiment will be described below with reference to the accompanying drawings.
[0109] Figure 3 is a flowchart of a Bluetooth connection method according to the first embodiment of the present application. As shown in FIG. 3, the method 300 includes the following steps S301-S305. Figure 3
[0110] S301, the first electronic device sends first version information to the second electronic device, and the second electronic device receives the first version information sent by the first electronic device.
[0111] In the first embodiment, the first version information can be used to indicate the version of the first electronic device. The version of the electronic device mentioned here can refer to the version of the Bluetooth communication protocol supported or recently updated by the electronic device, such as 1.0 series version, 2.0 series version, 3.0 series version, 4.0 series version, or other series version to be released in the future. For example, the first version information of the first electronic device indicates that the Bluetooth communication protocol supported by the first electronic device is the 4.0 series version. Of course, the version of the electronic device can also refer to the system version or software version of the electronic device, which can be determined according to actual use requirements, and the embodiment of the present application is not limited.
[0112] Optionally, in the first embodiment, when the first electronic device scans or discovers the second electronic device, the first electronic device can send the first version information to the second electronic device to initiate the Bluetooth connection. The scanning or discovery process can be achieved by Bluetooth communication technology, which is the process of establishing paging between the first electronic device and the second electronic device, or can be achieved by other wireless communication technology (such as near field communication technology), which can be determined according to actual use requirements, and the embodiment of the present application is not limited. For the convenience of description, the Bluetooth connection after the paging of both devices is completed will be described below as an example.
[0113] Optionally, the first electronic device not only sends the first version information to the second electronic device, but also instructs the second electronic device to determine whether the Bluetooth communication protocol versions of the first electronic device and the second electronic device are consistent.
[0114] It should be noted that the electronic device that initiates the connection can be referred to as a master device, and the electronic device that accepts the connection can be referred to as a slave device. Here, the first electronic device sends the first version information to the second electronic device, which is equivalent to initiating the connection, and the first electronic device is the master device; the second electronic device receives the first version information and can be the slave device.
[0115] S302, the second electronic device determines whether the first version information and the second version information are the same.
[0116] The second version information is used to indicate the version of the second electronic device. For a description of the second version information, refer to the detailed description of the first version information above, which will not be repeated here.
[0117] In actual implementation, taking TWS earphones as an example, the Bluetooth communication protocol versions of the first earphone and the second earphone can be the same, for example, the Bluetooth communication protocol versions supported by the two earphones are both 4.0 series versions; or the Bluetooth communication protocol versions of the first earphone and the second earphone can also be different, for example, the Bluetooth communication protocol version supported by the first earphone is 3.0 series version, and the Bluetooth communication protocol version supported by the second earphone is 4.0 series version.
[0118] In the embodiments of the present application, the second electronic device can determine whether the version of the second electronic device is the same as the version of the first electronic device according to the first version information and the second version information, and then determine the subsequent execution steps according to the determination result: on the one hand, if the second electronic device determines that the first version information and the second version information are the same, that is, the Bluetooth communication protocol versions supported by the two Bluetooth devices are the same, then the steps S303-S305 described below are continued to be executed; on the other hand, if the second electronic device determines that the first version information and the second version information are different, that is, the Bluetooth communication protocol versions supported by the two Bluetooth devices are different, then the steps S307 or S311 described below are continued to be executed.
[0119] S303, if the versions are the same, the second electronic device sends confirmation information to the first electronic device, and the first electronic device receives the confirmation information sent by the second electronic device.
[0120] The confirmation information is used to indicate that the version of the second electronic device is the same as the version of the first electronic device. If the version of the first electronic device is the same as the version of the second electronic device, and the Bluetooth connection parameters corresponding to the same version are the same, the Bluetooth connection parameters stored locally by the first electronic device are the same as the Bluetooth connection parameters stored locally by the second electronic device. For ease of description, the Bluetooth connection parameters corresponding to the same version are referred to as first Bluetooth connection parameters in the first embodiment.
[0121] In S304, the first electronic device acquires the first Bluetooth connection parameters from the first electronic device locally, and the second electronic device acquires the first Bluetooth connection parameters from the second electronic device locally.
[0122] The first Bluetooth connection parameters are the Bluetooth connection parameters corresponding to the version of the first electronic device.
[0123] In S305, the first electronic device and the second electronic device establish Bluetooth connection according to the first Bluetooth connection parameters.
[0124] In the first embodiment, if the versions are consistent, that is, the Bluetooth connection parameters of the two devices are consistent, the Bluetooth connection parameters do not need to be exchanged, for example, the characteristics support and version specifications of LMP do not need to be exchanged, and SDP service query does not need to be performed, but the Bluetooth connection parameters of the opposite device can be directly acquired from the local device, so that Bluetooth connection can be established. In this way, the information exchange link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0125] In a possible embodiment, before the two devices initiate Bluetooth connection, the paging establishment process needs to be first completed between the two devices. For example, referring to Figure 3 Before S301, the method 300 can further include S306.
[0126] In S306, the first electronic device and the second electronic device establish paging.
[0127] For example, it is assumed that the second electronic device is in a discoverable and connectable state, can be discovered through a broadcast message, and the first electronic device is in a listening state, can discover other electronic devices by scanning the broadcast message. The message broadcasted by the second electronic device can carry the device identifier or Bluetooth address of the second electronic device. If the first electronic device scans the broadcast message, the first electronic device can discover the second electronic device according to the device identifier or Bluetooth address carried in the broadcast message, and then send a paging message to the second electronic device. If the first electronic device returns a paging response to the second electronic device, the first electronic device and the second electronic device successfully page.
[0128] Further, after the paging is successful, the first electronic device can send the first version information to the second electronic device, that is, initiate a connection to the second electronic device, and in the case where it is judged that the versions of the first electronic device and the second electronic device are the same, the first electronic device directly calls the Bluetooth connection parameters common to both devices to establish a Bluetooth connection.
[0129] Through the Bluetooth connection method provided in the present application, when two electronic devices need to establish a Bluetooth connection, it can be first judged whether the versions of the two electronic devices are consistent, and it is further determined whether the Bluetooth connection parameters need to be interacted: if the versions are consistent, the Bluetooth connection parameters of the two devices are consistent, then the Bluetooth connection parameters of the other device can be directly obtained from the local device without interacting the Bluetooth connection parameters to establish a Bluetooth connection, so that the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0130] The Bluetooth connection method in the case where the versions of the two devices are the same is described above, and for the case where the versions of the two devices are different, if the two devices have been paired and connected before and the information of the opposite device is stored, the two devices can first judge whether the information of the opposite device has changed compared with the information used in the last connection, such as the information of the opposite device has changed, then the changed information can be interacted to establish a connection; if the information of the opposite device has not changed, then the stored information of the opposite device can be directly called to establish a connection without interacting the information.
[0131] For example, in the case where the versions of the two devices are different, the first electronic device can first judge whether the information of the second electronic device has changed compared with the information used in the last connection, such as the information of the second electronic device has changed, then the changed information can be interacted to establish a connection; if the information of the second electronic device has not changed, then the stored information of the second electronic device can be directly called to establish a connection without interacting the information. Figure 3 For example, in the case where the versions of the two devices are different, the first electronic device can first judge whether the information of the second electronic device has changed compared with the information used in the last connection, such as the information of the second electronic device has changed, then the changed information can be interacted to establish a connection; if the information of the second electronic device has not changed, then the stored information of the second electronic device can be directly called to establish a connection without interacting the information. Figure 4 For example, in the case where the versions of the two devices are different, the first electronic device can first judge whether the information of the second electronic device has changed compared with the information used in the last connection, such as the information of the second electronic device has changed, then the changed information can be interacted to establish a connection; if the information of the second electronic device has not changed, then the stored information of the second electronic device can be directly called to establish a connection without interacting the information.
[0132] S307, in the case where the confirmation information indicates that the version of the second electronic device is different from the version of the first electronic device, the first electronic device receives the first parameter change indication information sent by the second electronic device.
[0133] The first parameter change indication information is used to indicate the change content of the Bluetooth connection parameters of the second electronic device;
[0134] For example, the first parameter change indication information indicates that the frequency hopping parameter of the second electronic device has changed, at this time the two devices need to negotiate the information for the frequency hopping parameter, so that the two devices are consistent in the frequency hopping parameter, so that the connection can be established faster.
[0135] Optionally, in the first embodiment, when the confirmation information indicates that the version of the second electronic device is different from the version of the first electronic device, the first electronic device can send a first request message to the second electronic device, the first request message being used to request to establish a Bluetooth connection with the second electronic device. Correspondingly, the second electronic device can send a first response message to the first electronic device according to the first request message after receiving the first request message, the first response message comprising first parameter change indication information. Further, the first electronic device can obtain the first parameter change indication information from the first response message after receiving the first response message.
[0136] S308, if the first parameter change indication information indicates that there is change content, the first electronic device determines the second Bluetooth connection parameter of the second electronic device according to the stored Bluetooth connection parameter of the second electronic device and the change content indicated by the first parameter change indication information.
[0137] For example, if the Bluetooth connection parameter of the opposite device changes, the local device can obtain the changed Bluetooth connection parameter of the opposite device and update the stored Bluetooth connection parameter of the opposite device with the Bluetooth connection parameter.
[0138] It should be noted that the Bluetooth connection parameter of the second electronic device is the Bluetooth connection parameter of the second electronic device stored locally by the first electronic device and used by the second electronic device during the last connection, which can be directly obtained from the first electronic device. The first electronic device can refresh or replace the Bluetooth connection parameter of the second electronic device by the received first parameter change indication information to obtain the latest Bluetooth connection parameter (i.e. the second Bluetooth connection parameter) of the second electronic device.
[0139] S309, the first electronic device establishes a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the second Bluetooth connection parameter.
[0140] The second Bluetooth connection parameter is the latest Bluetooth connection parameter of the first electronic device stored locally by the first electronic device, which can also be directly called from the first electronic device.
[0141] In the first embodiment, the local device obtains the changed Bluetooth connection parameter of the opposite device and updates the stored Bluetooth connection parameter of the opposite device with the Bluetooth connection parameter. The local device can establish a Bluetooth connection by using the updated Bluetooth connection parameter of the opposite device and the Bluetooth connection parameter of the local device, without the need to interact with the Bluetooth connection parameter that has not changed. This can simplify the information interaction link in the Bluetooth connection process and improve the Bluetooth connection speed.
[0142] The above is described for the case where the first parameter change indication information indicates that there is change content of the first Bluetooth connection parameter. Next, the case where the first parameter change indication information indicates that there is no change content of the first Bluetooth connection parameter is described. As shown in FIG. 3, the Bluetooth connection method provided by the embodiments of the present application further includes the following S310. Figure 4
[0143] S310, if the first parameter change indication information indicates that there is no change content, the first electronic device establishes the Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the stored Bluetooth connection parameter of the second electronic device.
[0144] In the first embodiment, if the first parameter change indication information indicates that there is no change content of the first Bluetooth connection parameter in the case where the versions of the two devices are different, the two devices do not need to interact information, for example, do not need to exchange the characteristic support and version specification of the LMP, and do not need to perform the SDP service query, but can directly call the stored information of the opposite device to establish the connection. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed is improved.
[0145] It should be noted that the above S308-S309 and the above S310 are executed alternatively, that is, the embodiments of the present application execute S308 and S309 when the first parameter change indication information indicates that there is change content, and execute S310 when the first parameter change indication information indicates that there is no change content.
[0146] It should be further noted that the above S303-S305 and the above S307-S309 (or S307 and S310) are executed alternatively, that is, the embodiments of the present application execute S303-S305 when the versions of the two devices are the same, and execute S307-S309 (or S307 and S310) when the versions of the two devices are different.
[0147] Optionally, in the first embodiment, since part of the information can be changed in the case of version upgrade, the embodiments of the present application can adopt the mask recording mode, and each omitted process point is mapped to a mask bit. If the information of the local device is changed, the mask bit is marked. When the connection paging is established, the two devices exchange the mask marks first. If the information is changed, the two devices initiate the corresponding negotiation interaction in the subsequent process for the changed part.
[0148] Specifically, the second electronic device can mark the change content of the Bluetooth connection parameter of the second electronic device by using the mask mark mode to obtain the first parameter change indication information. Of course, the first electronic device can also mark the change content of the Bluetooth connection parameter of the first electronic device by using the mask mark mode to obtain the second parameter change indication information.
[0149] For example, the mask bits may include 0 and 1. The information part that has not changed may be marked as 0, and the information part that has changed may be marked as 1. Of course, the information part that has not changed may also be marked as 1, and the information part that has changed may be marked as 0. The specific method can be determined according to the actual use requirements, and this application embodiment does not limit it.
[0150] For example, taking the marking rule of marking the unchanged information part as 0 and the changed information part as 1 as an example, when the first electronic device receives the first parameter change indication information marked with mask bits sent by the second electronic device, it can perform information interaction update and negotiation for the information part marked 1 according to the above marking rule.
[0151] Through the above scheme, both devices can identify changes to information or nodes on their own devices, and then exchange these information identifiers. When establishing a connection, both devices can identify which information has changed based on these identifiers and renegotiate the interaction for the changed information, eliminating the need to interact and negotiate for unchanged information. This simplifies the connection establishment process, improves Bluetooth connection speed, and avoids wasting air interface resources.
[0152] The above combination Figure 4 This describes a Bluetooth connection method for situations where the versions of the two devices are different. Specifically, when the versions of the two devices differ, the method involves exchanging parameter change indication information and determining the information to be exchanged based on this information. The following section combines... Figure 5 This describes another Bluetooth connection method, where devices with different versions can connect via Bluetooth through a standard parameter negotiation and interaction process. Combined with... Figure 3 ,like Figure 5 As shown, the Bluetooth connection method provided in this application may further include the following steps S311-S312.
[0153] S311, if the versions are different, the second electronic device sends a first negative message to the first electronic device, and the first electronic device receives the first negative message sent by the second electronic device.
[0154] The first negative information is used to indicate that the version of the second electronic device is different from the version of the first electronic device.
[0155] S312. The first electronic device and the second electronic device exchange their respective Bluetooth connection parameters to establish a Bluetooth connection.
[0156] Specifically, in the case that the two electronic devices support different versions of Bluetooth communication protocol, the two electronic devices perform a standard parameter negotiation interaction process, negotiate and interact information, and then establish a Bluetooth connection according to the negotiated information.
[0157] Specifically, in the case that the second electronic device supports a different version from the first electronic device, the first electronic device sends a connection request message to the second electronic device, the connection request message including the Bluetooth connection parameters of the first electronic device. The second electronic device receives the connection request message sent by the second electronic device, and according to the connection request message, sends a response message to the first electronic device, the response message including the Bluetooth connection parameters of the second electronic device. Further, the first electronic device receives the response message sent by the second electronic device, and then the first electronic device and the second electronic device establish a Bluetooth connection according to the Bluetooth connection parameters of the first electronic device and the Bluetooth connection parameters of the second electronic device.
[0158] It should be noted that the above is only an exemplary description, and the description of the standard parameter negotiation interaction process can refer to the related description of the standard parameter negotiation interaction process in the related art, which will not be described here.
[0159] It should be noted that the above is an exemplary description of the first electronic device sending the first version information to initiate the connection, and in actual implementation, the embodiments of the present application are not limited thereto, for example, the first electronic device can also send a connection request message to other electronic devices to initiate the connection, and carry the first version information through the connection request message.
[0160] Specifically, as shown in FIG. 2, the first electronic device 1 and the second electronic device 2 perform a standard parameter negotiation interaction process, and then establish a Bluetooth connection according to the negotiated information. Figure 5As shown, in a case where the first electronic device establishes a page with the second electronic device, the first electronic device can send a first request message to the second electronic device, the first request message being used to request to establish a Bluetooth connection with the second electronic device, and the first request message comprising first version information. Correspondingly, upon receiving the first request message, the second electronic device can compare the first version information and second version information according to the first request message, obtain a comparison result, and then send a first response message to the first electronic device, the first response message comprising confirmation information. Further, upon receiving the first response message, the first electronic device can determine whether the first electronic device and the second electronic device have the same version according to the first response message. On one hand, if the versions are the same, the two devices can establish a Bluetooth connection by using the first Bluetooth connection parameter corresponding to the same version shared by the two devices, without the need of information interaction, so as to simplify the Bluetooth connection process. On the other hand, if the versions are different, the second electronic device sends a second response message to the first electronic device, and the first electronic device receives the second response message sent by the second electronic device, the second response message comprising first negative information. Further, the first electronic device and the second electronic device interact with each other the Bluetooth connection parameters to establish a Bluetooth connection. That is, upon determining that the first electronic device and the second electronic device have different versions according to the second response message, the first electronic device follows the protocol standard process of information negotiation and interaction, and then establishes a Bluetooth connection with the second electronic device by using the negotiated information.
[0161] In summary, in the first embodiment, if the Bluetooth communication protocol versions supported by the two devices are the same, the two devices can directly obtain the Bluetooth connection parameters of the opposite device from the local device without the need of information interaction, and then establish a Bluetooth connection. If the Bluetooth communication protocol versions supported by the two devices are different, the two devices establish a connection by following the traditional protocol standard process of information interaction.
[0162] The above introduces the process of establishing Bluetooth connection in different ways under the condition of same version and different version of the two devices, which is realized based on not considering dynamic factors in the process of establishing connection, that is, the first Bluetooth connection parameter is a static parameter. In actual implementation, under the condition of same version of the two devices, the two devices may also need to negotiate some dynamic changing parameters when connecting, such as connection establishment request, clock, frequency hopping parameter, etc. For these dynamic changing information and operation, the two devices can interact according to the normal process. The first request message and the first response message can also be used to carry the dynamic changing parameters to be negotiated. Assuming that the first electronic device and the second electronic device are of the same version, after the first electronic device and the second electronic device are paired, some information and operation of the two devices may dynamically change. In this case, the first electronic device and the second electronic device can interact the dynamic changing parameters, and then establish Bluetooth connection according to the first Bluetooth connection parameter and the dynamic changing parameters.
[0163] For example, the first electronic device sends the dynamic changing third Bluetooth connection parameter of the first electronic device to the second electronic device. Then, the second electronic device receives the third Bluetooth connection parameter, and sends the dynamic changing fourth Bluetooth connection parameter of the second electronic device to the first electronic device according to the third Bluetooth connection parameter. Then, the first electronic device can establish Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter, the third Bluetooth connection parameter and the fourth Bluetooth connection parameter. The third Bluetooth connection parameter can include at least one of the following: connection request, clock, frequency hopping parameter, etc. Similarly, the fourth Bluetooth connection parameter can include at least one of the following: connection response, clock, frequency hopping parameter, etc. In this way, the two devices can negotiate and interact the dynamic changing parameters in the case of obtaining the static parameters of the opposite device, and realize Bluetooth connection.
[0164] In the embodiment of the present application, for the information that does not change after Bluetooth pairing is established, the process of negotiation and interaction when establishing connection again can be omitted by the Bluetooth connection method provided by the present application. For the information that may change semi-statically with version upgrade, the changing information can be distinguished and identified by marking, and the information can be refreshed by negotiation and interaction when connection is established again.
[0165] In this way, the common Bluetooth connection parameters of the two devices of the same version can be shared when establishing Bluetooth connection, and do not need to be transmitted to the opposite device, only some dynamic changing parameters need to be negotiated and interacted, and then Bluetooth connection can be established through the common Bluetooth connection parameters and the negotiated dynamic changing parameters, so that the Bluetooth connection process can be simplified and the Bluetooth connection speed can be improved.
[0166] It should be noted that the Bluetooth connection method provided by the first embodiment of the present application can be applied to the scenario of establishing Bluetooth connection between electronic devices of the same model. For example, the first electronic device and the second electronic device are a first earphone and a second earphone of a TWS earphone, respectively. Optionally, the first earphone is a master earphone, and the second earphone is a slave earphone; or the first earphone is a slave earphone, and the second earphone is a master earphone, which is not limited in the embodiments of the present application.
[0167] For example, for the scenario of interconnection between two ears of a TWS earphone, generally, the two earphones of the TWS earphone work together, and the left earphone and the right earphone are peer devices, so in addition to the parameters that need to be dynamically negotiated, the information of the opposite ear can be obtained by the ear itself. In addition, considering that some information will change with the upgrade of the software version, and these information are not dynamically changed, therefore, these information can be bound with the version, if the versions of the left ear and the right ear are inconsistent, the negotiation and interaction process needs to be performed, and the interaction can be cut off after the versions of the left ear and the right ear are upgraded to be consistent.
[0168] When the left ear and the right ear are paged, the consistency of the versions of the left ear and the right ear is checked first. On the one hand, if the versions of the left ear and the right ear are consistent, the earphone obtains the information from the earphone itself instead of the opposite ear through the process interaction. For the dynamically changed information and operations, such as connection establishment request, clock, frequency hopping parameter, etc., the normal process is performed for interaction. On the other hand, if the versions of the left ear and the right ear are inconsistent, the negotiation and interaction are completed according to the standard Bluetooth connection establishment process.
[0169] In summary, when the two earphones of the TWS earphone are connected, as long as the versions of the two earphones are consistent, it can be considered that the information related to the versions and capabilities of the two earphones is consistent. For the static information of the opposite earphone, it can be directly obtained from the earphone itself, instead of the way of obtaining the Bluetooth connection parameters through negotiation and interaction in the related art. In this way, the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved. Compared with the existing scheme in which the standard parameter negotiation and interaction process is completed every time when the TWS dual earphones are first paired and subsequently connected, in the Bluetooth connection method provided by the embodiments of the present application, the TWS dual earphones can omit part of the negotiation and exchange process when they are first paired and subsequently connected, so that the connection establishment delay can be shortened.
[0170] Of course, the Bluetooth connection method described above can also be applied to the scenario of establishing Bluetooth connection between electronic devices of different models (for example, the first electronic device and the second electronic device are a mobile phone and a sound box, respectively).
[0171] It should be noted that the Bluetooth connection method provided by the embodiments of the present application can be applied not only to the scenario of each Bluetooth connection after the devices are paired, but also to the scenario of the first pairing connection between the devices. When the two electronic devices are connected for the first time, it can be determined whether the Bluetooth communication protocol versions supported by the two electronic devices are the same. If the versions are the same, the two devices use the Bluetooth connection parameters or information common to both devices to pair and establish a Bluetooth connection. If the versions are different, the Bluetooth connection parameters or information of the two devices are exchanged according to the standard parameter negotiation interaction process to pair and connect.
[0172] In the connection process of the related art, the protocol standard process is usually followed, that is, the two parties need to negotiate and exchange information, and then establish a connection according to the negotiated information. For known information common to both parties, if the negotiation and information exchange are repeated every time the connection is established, the air interface interaction resources will be wasted. Compared with the related art, the Bluetooth connection method provided by the embodiments of the present application first determines whether the versions of the two devices are the same when establishing a connection, that is, if the versions are the same and the connection parameters of the two devices are the same, it is not necessary to repeat the negotiation and information exchange, and the Bluetooth connection parameters of the opposite device can be directly obtained from the local device to establish a Bluetooth connection. In this way, the connection establishment process can be simplified, the Bluetooth connection speed can be improved, and the waste of air interface interaction resources can be avoided.
[0173] It should be noted that the embodiments of the present application include but are not limited to the implementation mode described above, that is, one device determines whether the versions of the two devices are the same, and then informs the opposite device of the determination result. In actual implementation, the embodiments of the present application can also include other possible implementation modes, for example, the two devices can exchange their respective version information, and then determine whether the versions of the two devices are the same. For example, the first electronic device sends first version information to the second electronic device, the second electronic device sends second version information to the first electronic device, the first electronic device compares the first version information of the local device with the second version information of the opposite device to determine whether the versions of the two devices are the same, and the second electronic device compares the second version information of the local device with the first version information of the opposite device to determine whether the versions of the two devices are the same. The implementation mode of the present application for determining whether the versions of the devices are the same according to the device version information can include a plurality of possible modes, which are determined according to actual use requirements, and the embodiments of the present application are not limited.
[0174] The above is described in combination with Figures 3-5 The Bluetooth connection method provided by the first embodiment of the present application is introduced, and the Bluetooth connection method provided by the second embodiment of the present application is described below. Figure 6 and Figure 7 The Bluetooth connection method provided by the second embodiment of the present application is described.
[0175] First, it should be noted that in the second embodiment, it is assumed that the first electronic device and the second electronic device have been paired before establishing this connection, and both devices have stored the Bluetooth connection parameters or information of the other device on their local devices for future retrieval when the two devices reconnect. The following will combine... Figure 6 An example illustrates the pairing process between electronic devices.
[0176] like Figure 6 As shown in (a), the first electronic device currently displays a settings interface 51. The first electronic device receives the user's selection of the Bluetooth option 52 in the settings interface 51, as follows: Figure 6 As shown in (b), the first electronic device, in response to a user operation, displays a Bluetooth settings interface 53. This interface 53 shows that Bluetooth is enabled and includes a list of paired devices 54 and a list of available devices 55. For example, the paired device list 54 includes mobile phone 1 and mobile phone 2, and the available device list 55 includes FreeBuds 3, a smartwatch, and a Bluetooth speaker. The first electronic device receives the user's selection of the FreeBuds 3 item in the available device list 55. Figure 6 As shown in (c), in response to a user operation, the first electronic device displays a Bluetooth pairing request interface 56 on the Bluetooth settings interface 53 to prompt the user whether to pair with the FreeBuds 3 earphones. The first electronic device receives the user's selection of the pairing item 57 in the Bluetooth pairing request interface 56. In response to the user operation, the first electronic device interacts and negotiates with the FreeBuds 3 earphones, such as... Figure 6 As shown in (d), the first electronic device hides the Bluetooth pairing request interface 56 and updates the Bluetooth settings interface 53, adding the FreeBuds 3 item to the list of paired devices 54. Thus, the first electronic device completes pairing with the earphones, and at this point, the first electronic device stores the earphones' Bluetooth connection parameters.
[0177] Since the electronic devices acquire the Bluetooth connection parameters of the other device, such as attribute information and feature information, upon initial pairing, they can avoid the need to exchange and acquire these parameters again during subsequent connections if the information remains unchanged, thus saving connection latency introduced by information exchange. Furthermore, if some of this information changes due to version upgrades or other reasons, both devices can exchange and refresh the changed information as needed during connection establishment.
[0178] Figure 7 This is a flowchart illustrating a Bluetooth connection method according to the second embodiment of this application, with reference to... Figure 7 As shown, the method 400 includes the following steps S401-S405.
[0179] S401, the first electronic device and the second electronic device establish paging.
[0180] First of all, it needs to be pointed out that before S401, the first electronic device and the second electronic device have been paired, and the first electronic device stores the Bluetooth connection parameters of the second electronic device (supposed to be called the first Bluetooth connection parameters), and the second electronic device stores the Bluetooth connection parameters of the first electronic device (supposed to be called the third Bluetooth connection parameters).
[0181] S402, the second electronic device sends the first parameter change indication information to the first electronic device, and the first electronic device receives the first parameter change indication information sent by the second electronic device.
[0182] Among them, the first parameter change indication information is used to indicate the change content of the first Bluetooth connection parameters of the second electronic device.
[0183] Exemplarily, the first parameter change indication information indicates that the frequency hopping parameter of the second electronic device has changed, at this time, both devices need to conduct information negotiation on the frequency hopping parameter, so that both devices keep consistent on the frequency hopping parameter, so as to establish connection faster.
[0184] Optionally, in the second embodiment, in the case that the second electronic device scans or discovers the first electronic device, the second electronic device can send the first parameter change indication information to the first electronic device to initiate Bluetooth connection. Or, in the case that the first electronic device scans or discovers the second electronic device, the first electronic device can send a connection request message to the second electronic device to initiate connection, and the second electronic device sends the first parameter change indication information to the first electronic device in the case that the connection request message is received. Exemplarily, in the case that the first electronic device establishes paging with the second electronic device, the first electronic device can send a first request message to the second electronic device, the first request message is used to request to establish Bluetooth connection with the second electronic device. Correspondingly, the second electronic device can send a first response message to the first electronic device according to the first request message after receiving the first request message, the first response message includes the first parameter change indication information. Further, the first electronic device can obtain the first parameter change indication information from the first response message after receiving the first response message.
[0185] It needs to be pointed out that here the first electronic device sends the first request message to the second electronic device, which is equivalent to initiating connection, at this time the first electronic device is the master device; the second electronic device receives the first request message and feeds back the first response message to the first electronic device, which is equivalent to accepting connection, at this time the second electronic device can be the slave device.
[0186] In the second embodiment, the paging establishment procedure needs to be completed between the two devices first before the two devices initiate the Bluetooth connection. The description of establishing the paging for the first electronic device and the second electronic device can refer to the detailed description of establishing the paging between the devices in the first embodiment above, which will not be repeated here.
[0187] S403, if the first parameter change indication information indicates that there is change content, the first electronic device determines the second Bluetooth connection parameter of the second electronic device according to the stored first Bluetooth connection parameter and the change content indicated by the first parameter change indication information.
[0188] For example, if the Bluetooth connection parameter of the opposite device changes, the local device can obtain the changed Bluetooth connection parameter of the opposite device, and update the first Bluetooth connection parameter of the opposite device stored in the local device by using the Bluetooth connection parameter.
[0189] It should be noted that the first Bluetooth connection parameter is the Bluetooth connection parameter corresponding to the second electronic device stored locally in the first electronic device, which can be directly obtained from the local first electronic device. The first electronic device can refresh or replace the first Bluetooth connection parameter by using the received first parameter change indication information to obtain the latest Bluetooth connection parameter (i.e., the second Bluetooth connection parameter) of the second electronic device.
[0190] S404, the first electronic device and the second electronic device establish the Bluetooth connection according to the second Bluetooth connection parameter and the third Bluetooth connection parameter.
[0191] The third Bluetooth connection parameter is the Bluetooth connection parameter corresponding to the first electronic device stored locally in the first electronic device, which can also be directly called from the local first electronic device.
[0192] In the second embodiment, the local device obtains the changed Bluetooth connection parameter of the opposite device, and updates the Bluetooth connection parameter of the opposite device stored in the local device by using the Bluetooth connection parameter. The local device can establish the Bluetooth connection by using the updated Bluetooth connection parameter of the opposite device and the Bluetooth connection parameter of the local device, without the need to interact with the Bluetooth connection parameter that has not changed. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0193] S405, if the first parameter change indication information indicates that there is no change content, the first electronic device and the second electronic device establish the Bluetooth connection according to the stored first Bluetooth connection parameter and the third Bluetooth connection parameter.
[0194] In the second embodiment, if the first parameter change indication information indicates that the Bluetooth connection parameter of the second electronic device has no change content, the information of the opposite device need not be interacted, and the stored information of the opposite device can be directly called to establish the connection. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0195] It should be noted that the above S403-S404 and the above S405 are executed alternatively, that is, the application executes S403-S404 when the first parameter change indication information indicates that there is change content, and executes S405 when the first parameter change indication information indicates that there is no change content.
[0196] It should be noted that the above is an example of obtaining the change information of the opposite device by the local device, and in actual implementation, the local device can also send the local change information to the opposite device to instruct the opposite device to refresh the stored information when the information is changed. In this way, the devices on both sides can interact with the information change part when the connection is established, which can simplify the connection establishment process, improve the Bluetooth connection speed, and avoid waste of air interface interaction resources.
[0197] For example, the first electronic device can send second parameter change indication information to the second electronic device, and the second electronic device receives the second parameter change indication information sent by the second electronic device. The second parameter change indication information is used to indicate the change content of the Bluetooth connection parameter of the first electronic device. Then, the second electronic device can determine the third Bluetooth connection parameter of the first electronic device according to the change content indicated by the second parameter change indication information.
[0198] For example, the second parameter change indication information indicates that the clock parameter of the first electronic device has changed, and at this time, the devices on both sides need to negotiate the information of the clock parameter, so that the devices on both sides are consistent in the clock parameter, so that the connection can be established faster.
[0199] Optionally, the first electronic device can carry the second parameter change indication information in the first request message when sending the first request message to the second electronic device.
[0200] Similar to that the first electronic device refreshes or replaces the Bluetooth connection parameter of the second electronic device stored in the local end according to the first parameter change indication information, the second electronic device can refresh or replace the Bluetooth connection parameter of the first electronic device stored in the local end according to the second parameter change indication information, to obtain the latest Bluetooth connection parameter of the first electronic device. Further, after the second electronic device determines the latest Bluetooth connection parameter of the first electronic device, and the first electronic device determines the latest second Bluetooth connection parameter of the second electronic device, the second electronic device and the first electronic device can establish Bluetooth connection according to the latest Bluetooth connection parameter of the second electronic device and the latest Bluetooth connection parameter of the first electronic device. In this way, the two devices can interact with the information change part when establishing connection, so that the connection establishment process can be simplified, the Bluetooth connection speed can be improved, and the waste of air interface interaction resources can be avoided.
[0201] By the Bluetooth connection method provided in the present application, when two electronic devices need to establish Bluetooth connection, it can be determined whether the Bluetooth connection parameter of the opposite device has changed, and it is further determined whether the Bluetooth connection parameter needs to be interacted or which Bluetooth connection parameter needs to be interacted: if the Bluetooth connection parameter of the opposite device has not changed, the Bluetooth connection parameter of the opposite device stored in the local device can be directly obtained to establish Bluetooth connection without interaction; if the Bluetooth connection parameter of the opposite device has changed, only the changed information can be interacted to establish Bluetooth connection, so that the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0202] It should be noted that for the connection between non-peer-to-peer devices other than TWS earphones (such as earphone connection to mobile phone), part of the connection interaction process can be omitted by using the method provided in the second embodiment. Specifically, for the Bluetooth connection combination of earphone and mobile phone, since the opposite end information cannot be obtained before pairing, the information cannot be extracted from the local end as in the TWS earphone. However, when pairing is established for the first time, the opposite end static configuration and capability information are obtained after the standard process of establishment and negotiation exchange. The local device records the information of the opposite device, and the negotiation exchange can be omitted when establishing connection next time.
[0203] Optionally, in the Bluetooth connection method provided in the second embodiment of the present application, if part of the information changes due to version upgrade or other reasons, the devices can mark the changed information, and when the devices interact and identify that the opposite device has information change, the information change part can be interacted and refreshed as needed when establishing connection. For example, the first parameter change indication information can be information obtained by marking in a mask manner.
[0204] In the second embodiment, since part of the information can be changed in the version upgrade and the like, the application adopts the mode of mask recording, and each omitted flow point is mapped to a mask bit. If the information of the local device is changed, the mask bit is marked. When the connection paging is established, the devices of both parties first exchange the mask marks, and if the information has been changed, the devices of both parties initiate the corresponding negotiation interaction for the changed part in the subsequent flow.
[0205] For example, the mask bit can include 0 and 1, and the information part that has not been changed can be marked as 0, and the information part that has been changed can be marked as 1. Of course, the information part that has not been changed can also be marked as 1, and the information part that has been changed can be marked as 0. The specific determination can be made according to the actual use requirement, and the embodiments of the application are not limited.
[0206] For example, taking the marking rule that the information part that has not been changed is marked as 0 and the information part that has been changed is marked as 1 as an example, the first electronic device receives the first parameter change indication information marked by the second electronic device using the mask bit, and can update and negotiate the information interaction for the information part marked as 1 according to the above marking rule.
[0207] Through the above scheme, the devices of both parties can identify the information or node of the local device that has been changed, and then the devices of both parties interact the information identification. In this way, when the connection is established, the devices of both parties can identify which information has been changed according to the information identification, and re-negotiate the interaction for the changed information, without interacting and negotiating for the information that has not been changed. In this way, part of the connection interaction flow can be omitted. Therefore, the application can simplify the connection establishment flow, can improve the Bluetooth connection speed, and can avoid the waste of air interface interaction resources.
[0208] It should be noted that the difference between the second embodiment and the first embodiment of the TWS earphone dual-ear connection scene is that the second embodiment needs to record the information of the opposite device after obtaining it through the first pairing, and uses the mask bit to indicate the subsequent change of the information. Considering the conventional Bluetooth connection combination, by storing the information of the opposite device by the local device, some unnecessary negotiation interaction can be trimmed in the case that the information does not change or changes partially. For example, if the information does not change, the connection-based information negotiation and exchange will not be triggered. For another example, if the information changes, the corresponding negotiation interaction is initiated for the changed part. Therefore, through the improvement of the application scheme, the interaction flow can be trimmed in the connection, and the connection speed can be accelerated.
[0209] In the connection process of the related art, the protocol standard process is usually followed, that is, both parties need to negotiate and interact information, and then establish a connection according to the negotiated information. For some unchanging information, if the negotiation and information interaction are repeated every time the connection is established, the air interface interaction resources will be wasted. Compared with the related art, the scheme of the present application can be used for unchanging information, and does not need to interact and obtain again at the time of connection. For information that changes due to version upgrade or other reasons, the information change part can be interacted as needed at the time of connection establishment, so that the connection delay caused by information interaction can be shortened. Therefore, the present application can improve the Bluetooth connection speed and avoid the waste of air interface interaction resources.
[0210] In summary, the Bluetooth connection method provided by the present application can be applied to the following scene 1 and scene 2, and the information interaction and parameter negotiation in the connection process can be omitted by using the Bluetooth connection method.
[0211] Scene 1: After the first pairing connection, the information that does not change in the product life cycle is recorded in the connection parties, and the interaction is not performed again at the next connection.
[0212] Scene 2: For information that may change semi-statically, the information interaction and parameter negotiation in the connection process are omitted by using the method described in a) or b).
[0213] a) The information associated with the version is exchanged after the connection paging is successful. If the version has not been updated, it is confirmed that the information has not changed compared with the last connection, and the subsequent process does not need to be negotiated and exchanged again.
[0214] b) The information item is identified by bit mask. After the connection paging is successful, the mask bits are exchanged. If there is no change, negotiation and exchange are not needed in the subsequent process. If the information changes, the corresponding negotiation and interaction are initiated for the changed part.
[0215] Each embodiment described herein can be an independent scheme, or can be combined according to the inherent logic to achieve different technical effects, and these schemes all fall within the protection scope of the present application.
[0216] The embodiments of the present application do not particularly limit the specific structure of the execution subject of the method provided by the embodiments of the present application, as long as the execution subject can implement the method provided by the embodiments of the present application by running a program in which the code of the method provided by the embodiments of the present application is recorded. For example, the execution subject of the method provided by the embodiments of the present application can be the first electronic device, or a functional module in the first electronic device that can call and execute a program. To implement each function in the method provided by the embodiments of the present application, the first electronic device can include a hardware structure and / or a software module, and implement the above functions in the form of hardware structure, software module, or hardware structure plus software module. Whether a certain function in the above functions is implemented in the form of hardware structure, software module, or hardware structure plus software module depends on the specific application of the technical solution and the design constraint conditions.
[0217] Figure 8 A schematic block diagram of an electronic device 700 provided by the embodiments of the present application is shown. The electronic device 700 includes a transceiver unit 701 and a processing unit 702.
[0218] The transceiver unit 701 is configured to, in a case where the electronic device 700 establishes a paging with a second electronic device, send first version information of the electronic device 700 to the second electronic device, the first version information being used to indicate a version of the electronic device 700.
[0219] The transceiver unit 701 is further configured to receive confirmation information sent by the second electronic device, the confirmation information being used to indicate that the version of the second electronic device is the same as the version of the electronic device 700.
[0220] The processing unit 702 is configured to establish a Bluetooth connection with the second electronic device according to first Bluetooth connection parameters, wherein the first Bluetooth connection parameters are Bluetooth connection parameters corresponding to the version of the electronic device 700.
[0221] In a possible embodiment, the transceiver unit 701 is further configured to, in a case where the version of the second electronic device is different from the version of the electronic device 700, receive first parameter change indication information sent by the second electronic device, the first parameter change indication information being used to indicate a change content of the Bluetooth connection parameters of the second electronic device.
[0222] The processing unit 702 is further configured to determine second Bluetooth connection parameters of the second electronic device according to the stored Bluetooth connection parameters of the second electronic device and the change content indicated by the first parameter change indication information.
[0223] The processing unit 702 is further configured to establish a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameters and the second Bluetooth connection parameters.
[0224] In a possible implementation, the transceiver 701 is further configured to, if the first parameter change indication information indicates that the first Bluetooth connection parameter is not changed, establish the Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the stored Bluetooth connection parameter of the second electronic device.
[0225] In a possible implementation, the first parameter change indication information is information obtained by marking in a mask marking manner.
[0226] In a possible implementation, the transceiver 701 is specifically configured to send a first request message to the second electronic device and receive a first response message of the first request message sent by the second electronic device; the first request message comprises first version information, and the first response message comprises confirmation information.
[0227] In a possible implementation, the first Bluetooth connection parameter is a static parameter; the transceiver 701 is further configured to send a third Bluetooth connection parameter of the electronic device 700 which changes dynamically to the second electronic device, and receive a fourth Bluetooth connection parameter of the second electronic device which changes dynamically and is sent by the second electronic device; and the processor 702 is further configured to establish the Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter, the third Bluetooth connection parameter and the fourth Bluetooth connection parameter.
[0228] In a possible implementation, the transceiver 701 is further configured to, if the confirmation information indicates that the version of the second electronic device is different from the version of the electronic device 700, send a second request message to the second electronic device, where the second request message comprises the first Bluetooth connection parameter of the electronic device 700.
[0229] The transceiver 701 is further configured to receive a second response message sent by the second electronic device, where the second response message comprises a second Bluetooth connection parameter of the second electronic device.
[0230] The processor 702 is further configured to establish the Bluetooth connection with the second electronic device according to the first Bluetooth connection parameter and the second Bluetooth connection parameter.
[0231] The electronic device 700 according to the embodiments of the present application can correspond to the method steps performed by the first electronic device described in the first embodiment of the present application, and the above and other operations and / or functions of the modules in the electronic device 700 are respectively for realizing the corresponding processes of the method, and for the sake of brevity, will not be described here.
[0232] The electronic device provided by the embodiments of the present application can determine whether the versions of two electronic devices are consistent when establishing a Bluetooth connection with another electronic device, and further determine whether the Bluetooth connection parameters need to be interacted: if the versions are consistent and the Bluetooth connection parameters of the two devices are consistent, the Bluetooth connection parameters do not need to be interacted, and the Bluetooth connection parameters of the other device can be directly obtained from the local device to establish the Bluetooth connection, so that the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed can be improved.
[0233] Figure 9 A schematic block diagram of an electronic device 800 provided by the embodiments of the present application is shown. The electronic device 800 includes a transceiver unit 801 and a processing unit 802.
[0234] The transceiver unit 801 is configured to receive first parameter change indication information sent by a second electronic device, the first parameter change indication information being used to indicate change content of first Bluetooth connection parameters of the second electronic device.
[0235] The processing unit 802 is configured to determine second Bluetooth connection parameters of the second electronic device according to the stored first Bluetooth connection parameters and the change content indicated by the first parameter change indication information.
[0236] The processing unit 802 is further configured to establish a Bluetooth connection with the second electronic device according to the second Bluetooth connection parameters of the second electronic device and third Bluetooth connection parameters of a first electronic device.
[0237] In a possible embodiment, the transceiver unit 801 is further configured to, before receiving the first parameter change indication information sent by the second electronic device, send a first request message to the second electronic device, the first request message being used to request to establish a Bluetooth connection with the second electronic device; and the transceiver unit 801 is further configured to receive a first response message sent by the second electronic device in response to the first request message, the first response message including the first parameter change indication information.
[0238] In a possible embodiment, the processing unit 802 is further configured to, in a case where the first parameter change indication information indicates that the first Bluetooth connection parameters are not changed, establish a Bluetooth connection with the second electronic device according to the stored first Bluetooth connection parameters and the third Bluetooth connection parameters.
[0239] In a possible embodiment, the first parameter change indication information is information obtained by using a mask marking manner.
[0240] The electronic device provided in the embodiments of the present application can determine whether the Bluetooth connection parameter of the other device changes when establishing a Bluetooth connection with the other electronic device, further determine whether the Bluetooth connection parameter needs to be interacted or which Bluetooth connection parameter needs to be interacted, and only interact the changed information to establish the Bluetooth connection if the Bluetooth connection parameter of the other device changes. In this way, the information interaction link in the Bluetooth connection process can be simplified, and the Bluetooth connection speed is improved.
[0241] Figure 10 FIG. 1 is a schematic diagram of an electronic device 200 provided in the embodiments of the present application. The electronic device 200 can be an example of the Bluetooth earphone or the mobile phone described in the embodiments of the present application. Figure 1 As shown in FIG. 1, the electronic device 200 can include a processor 201, a memory 202, a wireless communication module 203, an audio module 204, a power module 205, and the like. These components can communicate with each other through one or more communication buses or signal lines (not shown in the figure). Figure 10 The components of the electronic device will be specifically introduced below. Figure 2
[0242] The processor 201 is the control center of the electronic device, and connects various parts of the electronic device through various interfaces and lines. The processor 201 executes various functions of the electronic device and processes data by running or executing the application program stored in the memory 202 and calling the data stored in the memory 202. The processor 201 can include one or more processing units, and different processing units can be independent devices or integrated in one or more processors 201. The processor 201 can be an integrated control chip, or can be composed of a circuit including various active and / or passive components, and the circuit is configured to perform the functions described in the embodiments of the present application that belong to the processor 201. Taking the Bluetooth earphone 11 as an example, the processor 201 can be used to execute the related application program and call the related module to realize the functions of the Bluetooth earphone 11 in the embodiments of the present application. For example, the processor 201 can be used to realize the physical connection and / or service specification connection between the Bluetooth earphone 11 and the mobile phone 12.
[0243] It should be appreciated that the processor 201 can be a central processing unit (CPU) in the embodiments of the present application. The processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. Alternatively, the processor 201 can be one or more integrated circuits for performing related programs to implement the technical solutions provided by the embodiments of the present application.
[0244] The memory 202 is used to store application programs and data, and the processor 201 performs various functions of the electronic device and data processing by running the application programs and data stored in the memory 202. The memory 202 mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application program required by a function; the data storage area can store data created when the electronic device is used. Taking the Bluetooth headset 11 as an example, the memory 202 can store program codes for physical connection and / or service specification connection between the Bluetooth headset 11 and the mobile phone 12, program codes for charging the Bluetooth headset 11, and program codes for wireless pairing connection between the Bluetooth headset 11 and the mobile phone 12, etc.
[0245] In addition, the memory 202 can include read-only memory, random access memory, and can also include non-volatile memory such as disk storage devices, flash memory devices or other volatile solid-state memory devices, etc., and provide instructions and data to the processor 201. The memory 202 can store various operating systems. The above-mentioned memory 202 can be independent of the processor 201 and connected to the processor 201 through the above-mentioned communication bus; or the memory 202 can also be integrated with the processor 201.
[0246] The wireless communication module 203 can be used to support wireless connection and wireless communication between electronic devices through wireless communication technology, for example, in combination with Figure 1 As shown, the Bluetooth headset 11 and the mobile phone 12 can realize data exchange through respective wireless communication modules 203. In some embodiments, the wireless communication module 203 can be a Bluetooth chip. As shown in combination with Figure 1As shown, the Bluetooth earphone 11 can pair with the Bluetooth chip of the mobile phone 12 and establish a wireless connection through the Bluetooth chip, so as to realize wireless communication and service processing between the Bluetooth earphone 11 and the mobile phone 12 through the wireless connection. Generally, the Bluetooth chip can support basic rate (BR) / enhanced data rate (EDR) Bluetooth and BLE, for example, can receive / transmit page information, receive / transmit BLE broadcast messages, etc.
[0247] In addition, the wireless communication module 203 can further include an antenna, and the wireless communication module 203 receives electromagnetic waves via the antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 201. The wireless communication module 203 can also receive signals to be sent from the processor 201, frequency modulate them, amplify them, and radiate them as electromagnetic waves via the antenna.
[0248] The audio module 204 can be used to manage audio data and realize input and output of audio streams of the electronic device. The audio module 204 can include a speaker 2041 (or called earpiece, receiver) component for outputting audio streams, a microphone 2042 (or called microphone, microphone), a microphone sound receiving circuit cooperating with the microphone, etc. The speaker 2041 can be used to convert audio electrical signals into sound signals and play them. The microphone 2042 can be used to convert sound signals into audio electrical signals.
[0249] The power module 205 can supply power to various components, such as the power module 205 including a battery and a power management chip. The battery can be logically connected to the processor 201 through the power management chip, so as to realize functions such as management of charging, discharging, and power consumption management through the power module 205.
[0250] In some embodiments, the electronic device can also include a display (or display screen), or can not include a display. The display can be used to display the display interface of the APP, such as the currently playing song, etc. The display includes a display panel, which can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a quantum dot light emitting diode (QLED), etc. In some embodiments, a touch sensor can be provided in the display to form a touch screen, and the embodiments of the present application are not limited in this regard. The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the processor 201 to determine the touch event type. The processor 201 can provide visual output related to the touch operation through the display.
[0251] In some embodiments, the electronic device can also include more devices, such as a USB interface, a sensor, etc., and the embodiments of the present application will not be described in detail. Figure 2 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application-specific integrated circuits. It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation of the electronic device. The electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements.
[0252] Optionally, the electronic device 200 can also include a bus. The memory 202 and the wireless communication module 203 can be connected to the processor 201 through the bus. The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0253] In one possible implementation, Figure 10 The processor 201 in the electronic device 200 shown can correspond to the processing unit 702 in the apparatus 700 in Figure 8 the wireless communication module 203 can correspond toFigure 8 The transceiver unit 701 in the device 700. Furthermore, the above and other operations and / or functions of each unit in the electronic device 700 are respectively for implementing the corresponding flow of the method, and for the sake of brevity, will not be described in detail here. When the electronic device 200 is running, the processor 201 executes computer execution instructions in the memory 202 to perform the operation steps of the above method through the electronic device 700.
[0254] In one possible implementation, Figure 10 The processor 201 in the illustrated electronic device 200 can correspond to Figure 9 The processing unit 802 and the wireless communication module 203 in the device 800 can correspond to Figure 9 The transceiver unit 801 in the device 800. Furthermore, the above and other operations and / or functions of each unit in the electronic device 800 are respectively for implementing the corresponding flow of the method, and for the sake of brevity, will not be described in detail here. When the electronic device 200 is running, the processor 201 executes computer execution instructions in the memory 202 to perform the operation steps of the above method through the electronic device 800.
[0255] It should be noted that the electronic device in this application embodiment can be a mobile terminal or a non-mobile terminal. For example, a mobile terminal can be a mobile phone, wireless headset, wireless speaker, wireless bracelet, tablet computer, laptop computer, PDA, vehicle terminal, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc., while a non-mobile terminal can be a personal computer (PC), television (TV), ATM, or self-service machine, etc., and this application embodiment does not make specific limitations.
[0256] Optionally, embodiments of this application also provide an electronic device, including as follows: Figure 9 The processor 201 and memory 202 shown are stored in the memory 202 and can run on the processor 201. When the computer program is executed by the processor 201, it implements the various processes of the Bluetooth connection method embodiment described above and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0257] Optionally, in some embodiments, this application also provides a computer-readable medium storing program code that, when run on a computer, causes the computer to perform the methods described in the above aspects.
[0258] Optionally, in some embodiments, the embodiments of the present application further provide a computer program product, which comprises computer program codes, and when the computer program codes run on a computer, the computer is caused to execute the method in the above aspects.
[0259] In the embodiments of the present application, the terminal device comprises a hardware layer, an operating system layer running above the hardware layer, and an application layer running on the operating system layer. The hardware layer can comprise a central processing unit (CPU), a memory management unit (MMU), a memory (also referred to as a main memory), and the like. The operating system of the operating system layer can be any one or more computer operating systems that implement business processing through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. The application layer can comprise a browser, a contact list, word processing software, instant messaging software, and the like.
[0260] Various aspects or features of the present application can be implemented as methods, apparatus, or articles of manufacture using standard programming and / or engineering techniques. The term "article of manufacture" as used herein can encompass one or more computer-readable media having computer program instructions tangibly embodied therein. The computer-readable media can include, but is not limited to, magnetic storage devices (e.g., hard disk; floppy disk; magnetic strips in credit cards; etc.), optical disks (e.g., compact disk (CD); digital versatile disk (DVD); etc.), smart cards, and flash memory devices (e.g., erasable programmable read-only memory (EPROM); electrically erasable programmable read-only memory (EEPROM); etc.). The computer-readable media can also include, but are not limited to, computer- readable media that stores data for use by or in connection with an instruction execution system, apparatus, or device.
[0261] The various storage media described herein can represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" can include, without being limited to, wireless channels and various other media capable of storing, containing, and / or carrying instruction(s) and / or data.
[0262] It should be appreciated that a processor as mentioned herein can be any known processor, controller, microcontroller, microprocessor, central processing unit (CPU), digital signal processor (DSP), application specific integrated circuit (ASIC), field programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. The processor can be a general purpose processor, a special purpose processor, a general purpose processor configured specifically for some purpose, or the like.
[0263] It should also be appreciated that a memory as mentioned herein can be any known storage components, including without limitation random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically EPROM (EEPROM), flash memory, or the like. The memory can be a volatile memory or non-volatile memory, or can include both volatile and non-volatile memory. By way of example and not limitation, a volatile memory can include a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous DRAM (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a synchlink DRAM (SLDRAM), a direct rambus RAM (DR RAM), or the like. By way of further example and not limitation, a non-volatile memory can include a ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), a flash memory, or the like.
[0264] It should be noted that when the processor is a general purpose processor, a DSP, an ASIC, a FPGA, or other programmable logic device, discrete gate or transistor logic, discrete hardware components, the memory (storage module) can be integrated in the processor.
[0265] It should also be noted that the memory described herein is intended to include, but is not limited to, the above examples and any equivalents.
[0266] Those skilled in the art can clearly understand that the units and steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0267] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
[0268] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the above-mentioned units or modules is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.
[0269] The units described above as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or they can be distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0270] In addition, each functional unit in each embodiment of the present application can be integrated into one unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0271] If the above functions are realized in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application, or the part that contributes to the prior art, or part of the technical solutions, can be embodied in the form of a computer software product stored in a storage medium, and the computer software product includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium can include, but is not limited to, a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0272] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0273] The above description is merely a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A Bluetooth communication system, characterized in that, The system includes a first electronic device and a second electronic device; The first electronic device is configured to send first version information to the second electronic device, wherein the first version information is used to indicate the version of the first electronic device; the version of the electronic device is the version of the Bluetooth communication protocol supported by the electronic device or the most recently updated version. The second electronic device is configured to receive the first version information sent by the first electronic device, and send confirmation information to the first electronic device according to the first version information, wherein the confirmation information is used to indicate that the version of the second electronic device is the same as the version of the first electronic device; The first electronic device is further configured to receive the confirmation information sent by the second electronic device, and establish a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameters obtained locally from the first electronic device; wherein, the first Bluetooth connection parameters are the Bluetooth connection parameters corresponding to the version of the first electronic device; The second electronic device is further configured to send a first parameter change indication information to the first electronic device if it is determined that the version of the first electronic device is different from the version of the second electronic device based on the version of the first electronic device indicated by the first version information. The first electronic device is also used for: The device receives a first parameter change indication message sent by the second electronic device. The first parameter change indication message is used to indicate whether the Bluetooth connection parameters of the second electronic device have changed and the content of the change. If the first parameter change indication information indicates that there is a change, then the second Bluetooth connection parameter of the second electronic device is determined according to the stored Bluetooth connection parameters of the second electronic device and the change indicated by the first parameter change indication information. A Bluetooth connection is established with the second electronic device based on the first Bluetooth connection parameters and the second Bluetooth connection parameters.
2. The system according to claim 1, characterized in that, The first electronic device is further configured to establish a Bluetooth connection with the second electronic device based on the first Bluetooth connection parameters and the stored Bluetooth connection parameters of the second electronic device if the first parameter change indication information indicates that there is no change.
3. The system according to claim 1, characterized in that, The second electronic device is further configured to use a masking method to mark the changes in the Bluetooth connection parameters of the second electronic device, thereby obtaining the first parameter change indication information.
4. The system according to claim 1, characterized in that, The first electronic device is further configured to send a second request message to the second electronic device when the version of the second electronic device is different from the version of the first electronic device, the second request message including the first Bluetooth connection parameters of the first electronic device; The second electronic device is further configured to receive the second request message sent by the second electronic device, and send a second response message to the first electronic device according to the second request message, wherein the second response message includes the second Bluetooth connection parameters of the second electronic device; The first electronic device is further configured to receive the second response message sent by the second electronic device, and establish a Bluetooth connection with the second electronic device according to the first Bluetooth connection parameters and the second Bluetooth connection parameters.
5. The system according to any one of claims 1 to 4, characterized in that, The first electronic device is specifically used to send a first request message to the second electronic device, the first request message including the first version information; The second electronic device is specifically configured to receive the first request message sent by the first electronic device, and send a first response message to the first electronic device according to the first request message, wherein the first response message includes the confirmation information; The first electronic device is further configured to receive the first response message sent by the second electronic device.
6. The system according to claim 1, characterized in that, The first Bluetooth connection parameter is a static parameter; The first electronic device is specifically used to send dynamically changing third Bluetooth connection parameters of the first electronic device to the second electronic device; The second electronic device is specifically used to receive the third Bluetooth connection parameters and, based on the third Bluetooth connection parameters, send the dynamically changing fourth Bluetooth connection parameters of the second electronic device to the first electronic device. The first electronic device is specifically used to establish a Bluetooth connection with the second electronic device based on the first Bluetooth connection parameters, the third Bluetooth connection parameters, and the fourth Bluetooth connection parameters.
7. A Bluetooth communication system, characterized in that, The system includes a first electronic device and a second electronic device; The second electronic device is specifically configured to receive a first request message sent by the first electronic device, and compare the first version information and the second version information according to the first version information included in the first request message to obtain a comparison result, and send a first response message to the first electronic device, wherein the first response message includes first parameter change indication information; The first electronic device is further configured to receive the first response message sent by the second electronic device; The second electronic device is used to send a first parameter change indication information to the first electronic device when a paging is established with the first electronic device. The first parameter change indication information is used to indicate the change content of the first Bluetooth connection parameter of the second electronic device. The first Bluetooth connection parameter is the Bluetooth connection parameter corresponding to the second electronic device stored locally by the first electronic device. The first electronic device is configured to receive the first parameter change indication information sent by the second electronic device, and determine the second Bluetooth connection parameters of the second electronic device according to the stored first Bluetooth connection parameters and the change content indicated by the first parameter change indication information; the first electronic device is further configured to establish a Bluetooth connection with the second electronic device according to the second Bluetooth connection parameters of the second electronic device and the third Bluetooth connection parameters of the first electronic device, wherein the third Bluetooth connection parameters are the Bluetooth connection parameters corresponding to the first electronic device stored locally by the first electronic device.
8. The system according to claim 7, characterized in that, The first electronic device is also used for: If the first parameter change indication information indicates that the first Bluetooth connection parameters have not changed, a Bluetooth connection is established with the second electronic device based on the stored first Bluetooth connection parameters and the third Bluetooth connection parameters.
9. The system according to claim 7 or 8, characterized in that, The second electronic device is further configured to mark the changes in the first Bluetooth connection parameters of the second electronic device using a masking method before sending the first parameter change indication information to the first electronic device, thereby obtaining the first parameter change indication information.
10. A Bluetooth connection method, characterized in that, The method includes: The first electronic device sends a first version information to the second electronic device, the first version information being used to indicate the version of the first electronic device; the version of the electronic device is the version of the Bluetooth communication protocol that the electronic device supports or has recently updated. The first electronic device receives a confirmation message sent by the second electronic device, the confirmation message indicating that the version of the second electronic device is the same as the version of the first electronic device; The first electronic device establishes a Bluetooth connection with the second electronic device based on the first Bluetooth connection parameters obtained locally from the first electronic device. Wherein, the first Bluetooth connection parameter is the Bluetooth connection parameter corresponding to the version of the first electronic device; The method further includes: If the version of the second electronic device is different from the version of the first electronic device, the device receives a first parameter change indication message sent by the second electronic device. The first parameter change indication message is used to indicate the change content of the Bluetooth connection parameters of the second electronic device. The second Bluetooth connection parameters of the second electronic device are determined based on the stored Bluetooth connection parameters of the second electronic device and the change content indicated by the first parameter change indication information. A Bluetooth connection is established with the second electronic device based on the first Bluetooth connection parameters and the second Bluetooth connection parameters.
11. The method according to claim 10, characterized in that, The method further includes: If the first parameter change indication information indicates that the first Bluetooth connection parameter has not changed, then a Bluetooth connection is established with the second electronic device based on the first Bluetooth connection parameter and the stored Bluetooth connection parameter of the second electronic device.
12. The method according to claim 10, characterized in that, The first parameter change indication information is information obtained by using a mask marking method.
13. The method according to claim 10, characterized in that, The method further includes: If the version of the second electronic device is different from the version of the first electronic device, the first electronic device sends a second request message to the second electronic device, the second request message including the first Bluetooth connection parameters of the first electronic device; The first electronic device receives a second response message sent by the second electronic device, the second response message including the second Bluetooth connection parameters of the second electronic device; The first electronic device establishes a Bluetooth connection with the second electronic device based on the first Bluetooth connection parameters and the second Bluetooth connection parameters.
14. The method according to any one of claims 10 to 13, characterized in that, The first electronic device sends first version information to the second electronic device, including: The first electronic device sends a first request message to the second electronic device, the first request message including the first version information; The first electronic device receives confirmation information sent by the second electronic device, including: The first electronic device receives a first response message to the first request message sent by the second electronic device, the first response message including the confirmation information.
15. The method according to claim 10, characterized in that, The first Bluetooth connection parameter is a static parameter; The method further includes: The first electronic device sends dynamically changing third Bluetooth connection parameters of the first electronic device to the second electronic device; The first electronic device receives the dynamically changing fourth Bluetooth connection parameters sent by the second electronic device. The first electronic device establishes a Bluetooth connection with the second electronic device based on the first Bluetooth connection parameters, the third Bluetooth connection parameters, and the fourth Bluetooth connection parameters.
16. A Bluetooth connection method, characterized in that, The method includes: A first electronic device sends a first request message to a second electronic device, the first request message being used to request the establishment of a Bluetooth connection with the second electronic device; the first request message includes first version information; The first electronic device receives a first parameter change indication message sent by a second electronic device, including: the first electronic device receiving a first response message to a first request message sent by the second electronic device, the first response message including the first parameter change indication message, the first parameter change indication message being used to indicate the change content of the first Bluetooth connection parameter of the second electronic device; the first Bluetooth connection parameter being the Bluetooth connection parameter corresponding to the second electronic device stored locally by the first electronic device; wherein, after receiving the first request message, the second electronic device compares the first version information and the second version information according to the first request message, obtains the comparison result, and sends a first response message to the first electronic device; The first electronic device determines the second Bluetooth connection parameters of the second electronic device based on the stored first Bluetooth connection parameters and the change content indicated by the first parameter change indication information; the first electronic device establishes a Bluetooth connection with the second electronic device based on the second Bluetooth connection parameters of the second electronic device and the third Bluetooth connection parameters of the first electronic device, wherein the third Bluetooth connection parameters are the Bluetooth connection parameters corresponding to the first electronic device stored locally on the first electronic device.
17. The method according to claim 16, characterized in that, The method further includes: If the first parameter change indication information indicates that there is no change, the first electronic device establishes a Bluetooth connection with the second electronic device based on the stored first Bluetooth connection parameters and the third Bluetooth connection parameters.
18. The method according to claim 16 or 17, characterized in that, The first parameter change indication information is information obtained by marking it using a masking method.
19. An electronic device, characterized in that, The device includes a processor coupled to a memory, the processor being configured to execute a computer program or instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 10 to 15 and / or the method as described in any one of claims 16 to 18.
20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 10 to 15 and / or the method as described in any one of claims 16 to 18.
Citation Information
Patent Citations
Bluetooth equipment communication control method and device, terminal equipment and storage medium
CN107889092A
Method for modifying Bluetooth pairing code, Bluetooth device and Bluetooth module
CN109525974A
Service connection system and method for bluetooth device
US20090233550A1