CN117956546A - Device reconnection method, electronic device, storage medium and chip - Google Patents

Device reconnection method, electronic device, storage medium and chip Download PDF

Info

Publication number
CN117956546A
CN117956546A CN202410358551.9A CN202410358551A CN117956546A CN 117956546 A CN117956546 A CN 117956546A CN 202410358551 A CN202410358551 A CN 202410358551A CN 117956546 A CN117956546 A CN 117956546A
Authority
CN
China
Prior art keywords
electronic device
time node
broadcast message
bluetooth
wake
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410358551.9A
Other languages
Chinese (zh)
Inventor
云泽霖
金杰
李子荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202410358551.9A priority Critical patent/CN117956546A/en
Publication of CN117956546A publication Critical patent/CN117956546A/en
Pending legal-status Critical Current

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a device reconnection method, electronic equipment, a storage medium and a chip. In the method, a second electronic device (such as a Bluetooth headset) can send a wake-up signal to a first electronic device (such as a mobile phone), the wake-up signal comprises a first time node, the mobile phone can scan the Bluetooth headset based on the first time node after receiving the wake-up signal, and after scanning a broadcast message, the mobile phone can send a connection request to the Bluetooth headset so as to enable the mobile phone to be connected back to the Bluetooth headset. Compared with the scheme that the Bluetooth headset transmits broadcast messages in a random broadcast period and the mobile phone scans in a random broadcast period in the related scheme, the method and the device have the advantages that the Bluetooth headset transmits the broadcast messages in a fixed time node, and the mobile phone scans based on the fixed time node, so that the broadcast messages can be rapidly scanned, the mobile phone can be rapidly connected with the Bluetooth headset, the connection time between the Bluetooth headset and the mobile phone is reduced, and the user experience is improved.

Description

Device reconnection method, electronic device, storage medium and chip
Technical Field
The present application relates to the field of terminals, and in particular, to a device reconnection method, an electronic device, a storage medium, and a chip.
Background
At present, the bluetooth technology is widely applied to various devices, such as audio devices, internet of things devices, intelligent home devices and the like, and brings convenience to life and work of people.
In the context of applying bluetooth technology, two devices, i.e., an electronic device and a bluetooth device, are generally included, where the electronic device may be any device with a bluetooth connection function, for example, a mobile phone, a computer, etc., and the bluetooth device may be any device with a bluetooth connection function, for example, a bluetooth headset, a bluetooth bracelet, etc. The electronic device may establish a connection with one or more bluetooth devices to exchange data. For low power requirements or manual operation, bluetooth devices may be disconnected from electronic devices for the following reasons: the user manually operates the Bluetooth device or the Bluetooth device automatically enters a power-saving dormant state, the distance between the Bluetooth device and the electronic device is too long, and the electronic device and the Bluetooth device are interfered by interference signals in the process of exchanging data. After the electronic device is disconnected from the bluetooth device, if the bluetooth device needs to be used continuously, the bluetooth device needs to reestablish connection with the electronic device.
In the related scheme, when the Bluetooth device and the electronic device reestablish connection, a broadcasting period of the broadcasting message sent by the Bluetooth device, a broadcasting channel of the broadcasting message sent by the Bluetooth device, a scanning period of the electronic device, a broadcasting channel scanned by the electronic device and the like have strong randomness, so that the broadcasting channel scanned by the electronic device may not coincide with the broadcasting channel of the Bluetooth device due to the strong randomness, so that the Bluetooth device and the electronic device are easy to consume longer time in a reconnection manner, and user experience is affected.
Disclosure of Invention
The application provides a device reconnection method, an electronic device, a storage medium and a chip, which can reduce the reconnection time length of Bluetooth devices and the electronic device and improve the user experience.
In a first aspect, a method for connecting back a device is provided, where the method is applied to a first electronic device (such as a mobile phone), and the first electronic device establishes a connection with a second electronic device (such as a bluetooth headset), and the method includes:
Receiving a wake-up signal sent by the second electronic device in response to a back-connection event, where the back-connection event is used to instruct the first electronic device and the second electronic device to carry out back-connection, and the wake-up signal includes a first time node (such as 10 th millisecond shown in fig. 9) at which the second electronic device sends a target broadcast message; scanning a target broadcast message sent by second electronic equipment based on a first time node in the wake-up signal; and under the condition that the target broadcast message is scanned, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
In the related art, the first electronic device scans the random broadcast channel at the random time node, which results in that the second electronic device is connected back to the first electronic device to consume a long time, which affects the user experience. In the embodiment of the application, the wake-up signal received by the first electronic device comprises the first time node of the broadcast message sent by the second electronic device, and the first electronic device can scan based on the first time node of the broadcast message sent by the second electronic device, so that the first electronic device scans at the fixed time node, and compared with the related scheme that the first electronic device scans at the random time node, the first electronic device can rapidly scan the broadcast message sent by the second electronic device, so that the first electronic device is connected with the second electronic device, the connection time of the first electronic device and the second electronic device can be reduced, and the user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, the wake-up signal further includes a first broadcast channel for the second electronic device to send the target broadcast message; and scanning a target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, including: and scanning the target broadcast message sent by the second electronic equipment based on the first time node and the first broadcast channel in the wake-up signal.
In the embodiment of the application, the wake-up signal received by the first electronic device comprises the first time node and the first broadcast channel of the broadcast message sent by the second electronic device, and the first electronic device can scan based on the first time node and the first broadcast channel of the broadcast message sent by the second electronic device, so that the first electronic device scans at the fixed time node and the fixed broadcast channel, and compared with the related scheme that the first electronic device scans the random broadcast channel at the random time node, the first electronic device can rapidly scan the broadcast message sent by the second electronic device, so that the first electronic device is connected with the second electronic device in a back way, the connection time of the first electronic device and the second electronic device in a back way can be reduced, and the user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, the wake-up signal further includes a second time node for the second electronic device to send the target broadcast message, where the second time node is later than the first time node; and, the method further comprises: under the condition that the target broadcast message is not scanned, scanning the target broadcast message sent by the second electronic equipment based on a second time node in the wake-up signal; and under the condition that the target broadcast message is scanned based on the second time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
According to the embodiment of the application, under the condition that the first electronic equipment does not scan the target broadcast message, the target broadcast message sent by the second electronic equipment is scanned based on the second time node in the wake-up signal; under the condition that the target broadcast message is scanned based on the second time node, a connection request is sent to the second electronic equipment, so that the first electronic equipment and the second electronic equipment are connected back, interference of signal interference and other reasons on the connection back can be reduced, reliability of the connection back of the first electronic equipment and the second electronic equipment is improved, and user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, the wake-up signal further includes a second time node at which the second electronic device sends the target broadcast message, and a second broadcast channel at which the second electronic device sends the target broadcast message, where the second time node is later than the first time node; and, the method further comprises: under the condition that the target broadcast message is not scanned, scanning the target broadcast message sent by the second electronic equipment based on a second time node and a second broadcast channel in the wake-up signal; and sending a connection request to the second electronic equipment under the condition that the target broadcast message is scanned based on the second time node and the second broadcast channel, so that the first electronic equipment and the second electronic equipment are connected back.
According to the embodiment of the application, under the condition that the first electronic equipment does not scan the target broadcast message, the target broadcast message sent by the second electronic equipment can be scanned based on the second time node and the second broadcast channel in the wake-up signal; under the condition that the target broadcast message is scanned based on the second time node and the second broadcast channel, a connection request is sent to the second electronic equipment, so that the first electronic equipment and the second electronic equipment are connected back, interference of signal interference and other reasons on the connection back can be reduced, reliability of the connection back of the first electronic equipment and the second electronic equipment is improved, and user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, scanning, based on a first time node in the wake-up signal, a target broadcast packet sent by the second electronic device includes: based on a first time node in the wake-up signal, scanning a target broadcast message sent by the second electronic device in a target scanning window, wherein the first time node is a starting time node of a scanning period, the scanning period comprises a plurality of scanning windows, the target scanning window is one of the scanning windows, and the scanning windows are used for indicating a scanning time sequence of the first electronic device to the second electronic device.
In a related scheme, for example, referring to fig. 1, when the electronic device performs scanning, the electronic device continuously performs scanning within a scanning window of a scanning period, so that power consumption of the electronic device may be increased.
With reference to the first aspect, in certain implementations of the first aspect, after receiving the wake-up signal in response to the loopback event, the method further includes: determining a signal strength of the wake-up signal based on the wake-up signal; and determining a target scanning window based on the signal intensity of the wake-up signal and the corresponding relation, wherein the corresponding relation is the corresponding relation between a plurality of numerical ranges of the signal intensity and a plurality of scanning windows, one numerical range corresponds to one scanning window, and the numerical range of the signal intensity corresponding to the scanning window with the previous scanning time sequence in the plurality of scanning windows is larger than the numerical range of the signal intensity corresponding to the scanning window with the subsequent scanning time sequence.
According to the embodiment of the application, the first electronic device can accurately determine the target scanning window according to the signal intensity of the wake-up signal and the corresponding relation between the numerical range comprising a plurality of signal intensities and a plurality of scanning windows.
With reference to the first aspect, in some implementations of the first aspect, the second electronic device establishes an over-connection with a plurality of host devices, where the plurality of host devices includes a first host device, the first host device is an electronic device corresponding to a smallest distance among a plurality of distances between the plurality of host devices and the second electronic device, and the first electronic device is the first host device, and the target scanning window is a scanning window with an earliest scanning time sequence among the plurality of scanning windows; or the first electronic device is one device except the first host device in the plurality of host devices, and the target scanning window is one scanning window except the scanning window with the earliest scanning time sequence in the plurality of scanning windows.
In the related scheme, in the process of connecting back the bluetooth device and the plurality of electronic devices, it is assumed that the distances between the plurality of electronic devices and the bluetooth device are different, for example, the plurality of electronic devices may be an electronic device a and an electronic device B, the distance between the electronic device a and the bluetooth device is relatively close to the distance between the electronic device B and the bluetooth device, after the bluetooth device is disconnected from the electronic device a and the electronic device B, the user wants the bluetooth device to reestablish connection with the electronic device a close to the bluetooth device, however, in the related scheme, because of the relatively strong randomness of the broadcasting period of the bluetooth device, the broadcasting channel of the bluetooth device sent by the broadcasting message, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like, the bluetooth device may reestablish connection with the electronic device B far from the distance, but not reestablish connection with the electronic device a near from the distance, for example, the bluetooth device sends the broadcasting message through the broadcasting channel 39, the electronic device B far from the broadcasting channel is scanned by the electronic device a just near electronic device a scans the broadcasting channel 38, and in this case, the bluetooth device B is reestablished with the electronic device a near distance. In this way, the electronic device that reestablishes connection with the bluetooth device may not be the target device that the user wants to connect to (the target device may be an electronic device that is closer to the bluetooth device), reducing the user experience.
In the embodiment of the application, when the first electronic device is the electronic device corresponding to the minimum distance in the distances between the plurality of host devices and the second electronic device, the target scanning window is the scanning window with the earliest scanning time sequence in the plurality of scanning windows, and the first electronic device can scan the second electronic device based on the first time node and the target scanning window, so that the second electronic device can be accurately and quickly newly established to be connected with the first electronic device closest to the second electronic device in the plurality of host devices, and the user experience is improved.
In addition, when the first electronic device is not the electronic device corresponding to the smallest distance among the distances between the plurality of host devices and the second electronic device, the target scanning window is one scanning window except the scanning window with the earliest scanning time sequence among the plurality of scanning windows, and when the electronic device closest to the second electronic device among the plurality of host devices is not successfully connected with the second electronic device due to signal interference and other reasons, the first electronic device can be connected with the second electronic device based on the first time node and the target scanning window, so that the reliability of the second electronic device reconnection is ensured.
With reference to the first aspect, in some implementations of the first aspect, the second electronic device establishes a connection with a plurality of host devices, where the plurality of host devices includes the second host device, the second host device is an electronic device that establishes a connection with the second electronic device at a latest time in the plurality of host devices, and the target broadcast packet includes an identifier of the first electronic device.
In the related scheme, in the process that a user uses the Bluetooth device, the Bluetooth device is disconnected from the electronic device due to the fact that the Bluetooth device is too far away from the electronic device, interference signals interfere with the electronic device in the process of exchanging data with the Bluetooth device, and the like. For example, in the process that the user is talking by using the bluetooth headset, the bluetooth headset is disconnected from the mobile phone. Other electronic devices connected to bluetooth devices, such as tablets, notebook computers, etc., are also present in this scenario. For convenience of description, the electronic device that has been connected to the bluetooth device last time is referred to as the electronic device 1, for example, a mobile phone. The other electronic devices connected to the bluetooth device are referred to as electronic devices 2, such as tablet, notebook, etc. The user wants to re-establish the connection between the bluetooth device and the electronic device 1, but in the related connection scheme, because the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like have strong randomness, the bluetooth device may re-establish the connection with the electronic device 2, but not establish the connection with the electronic device 1. For example, the bluetooth device sends a broadcast message via broadcast channel 39, electronic device 2 just scans broadcast channel 39, and electronic device 1 scans broadcast channel 38, in which case the bluetooth device reestablishes a connection with electronic device 2 without electronic device 1 reestablishing a connection. In this way, the electronic device with which the bluetooth device re-establishes a connection may not be the electronic device 1 to which the user wants to connect, reducing the user experience.
In the embodiment of the application, in the case that the first electronic device is the electronic device which is connected with the second electronic device at the latest in the plurality of host devices (the first electronic device is the electronic device which is connected with the Bluetooth device last time), the target broadcast message sent by the second electronic device can include the identifier of the first electronic device (the target message can be called as a directional broadcast message), and the first electronic device can scan the directional broadcast message sent by the second electronic device based on the first time node, so that other host devices except the first electronic device in the plurality of host devices can be prevented from scanning the directional broadcast message, the second electronic device can be quickly and accurately connected back with the first electronic device, and the user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, the second electronic device establishes a connection with the plurality of host devices, where the plurality of host devices includes a second host device, the second host device is an electronic device that establishes a connection with the second electronic device at a latest time in the plurality of host devices, where a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device other than the second host device and the first electronic device establishes a connection with the second electronic device in the plurality of hosts, the wake-up signal further includes a third time node, where the third time node is later than the first time node, where a target broadcast message sent by the second electronic device at the first time node includes an identifier of the second host device, and where the target broadcast message sent by the second electronic device at the third time node includes an identifier of the first electronic device; and after scanning the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, the method further includes: under the condition that the target broadcast message is not scanned based on the first time node, scanning the target broadcast message sent by the second electronic equipment based on a third time node in the wake-up signal; and under the condition that the target broadcast message is scanned based on the third time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
In the embodiment of the application, when the second electronic device reestablishes connection with one of the plurality of host devices, the second electronic device may reestablish connection with the second host device (the second electronic device is the electronic device which is connected with the second electronic device last time), specifically, the second electronic device sends the target broadcast message at the first time node, where the target broadcast message includes the identifier of the second host device, the second host device may scan the target broadcast message sent by the second electronic device based on the first time node, and the second host device may scan the target broadcast message originally sent by the second electronic device to the second host device in a targeted manner, but the second host device fails to scan the target broadcast message due to signal interference, the distance between the second host device and the second electronic device being too far, and the like, and at this time, the second electronic device fails to receive the connection request sent by the second host device, so that the second electronic device and the second host device fails to be connected back to work. Then, the second electronic device may reestablish connection with the first electronic device (the time node at which the first electronic device establishes connection with the second electronic device is earlier than the time node at which the second host device establishes connection with the second electronic device, and later than the time node at which the host devices except the second host device and the first electronic device establish connection with the second electronic device in the plurality of hosts), specifically, the second electronic device sends a target broadcast message at the third time node, where the target broadcast message includes an identifier of the first electronic device, the first electronic device may scan, based on the third time node, the target broadcast message that the second electronic device directs to the first electronic device, where the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned based on the third time node, so that the first electronic device and the second electronic device may be connected back, where the second electronic device fails to be connected with the electronic device last time, and the second electronic device may be connected back to the first electronic device, where the second electronic device is reliably connected back.
In a second aspect, a method for connecting back a device is provided and applied to a second electronic device, where the second electronic device establishes a connection with a first electronic device, and the method includes: responding to a reconnection event, sending a wake-up signal to the first electronic equipment, wherein the wake-up signal comprises a first time node, the wake-up signal is used for indicating the first electronic equipment to scan a target broadcast message based on the first time node, and the target broadcast message is used for indicating reconnection of the first electronic equipment and the second electronic equipment; and sending the target broadcast message at the first time node.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node for sending the target broadcast message, the second electronic device sends the target broadcast message at the first time node, and then the first electronic device can scan the second electronic device at the first time node after receiving the wake-up signal, so that the first electronic device and the second electronic device are connected back, therefore, the first electronic device can scan at the fixed time node (the first time node) because the second electronic device sends the target broadcast message at the fixed time node (the first time node), and the broadcast message is sent at a random broadcast period relative to the second electronic device, and the first electronic device can scan the broadcast message sent by the second electronic device at the random time node, so that the first electronic device and the electronic device can be connected back quickly, thereby reducing the connection time of the first electronic device and the second electronic device and improving user experience.
With reference to the second aspect, in some implementations of the second aspect, the wake-up signal further includes a first broadcast channel, where the wake-up signal is used to instruct the first electronic device to scan the target broadcast packet based on the first time node and the first broadcast channel; and sending a target broadcast message at a first time node, comprising: and at the first time node, sending the target broadcast message through the first broadcast channel.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node and a first broadcast channel for sending the target broadcast message, the second electronic device sends the target broadcast message through the first broadcast channel at the first time node, then the first electronic device can scan the first broadcast channel at the first time node after receiving the wake-up signal so as to enable the first electronic device to be connected with the second electronic device in a back way, and as the second electronic device sends the target broadcast message through the fixed broadcast channel (the first time node) at the fixed time node (the second broadcast channel), the first electronic device can scan the fixed broadcast channel (the second broadcast channel) at the fixed time node (the first time node), and compared with the second electronic device, the first electronic device can send the broadcast message through the random broadcast channel at the random time node, and can enable the first electronic device to be quickly scanned to the broadcast message sent by the second electronic device, so that the first electronic device can be connected with the second electronic device in a back way, and the time length of the connection of the first electronic device and the second electronic device can be shortened.
With reference to the second aspect, in some implementations of the second aspect, the wake-up signal further includes a second time node, where the second time node is later than the first time node, and the wake-up signal is used to instruct the first electronic device to scan the target broadcast packet based on the first time node and the second time node; and after the first time node sends the target broadcast message, the method further comprises: and under the condition that the connection request sent by the first electronic equipment is not received, sending a target broadcast message at the second time node.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises the first time node and the second time node for sending the target broadcast message, the second electronic device sends the target broadcast message at the first time node, then the first electronic device can scan at the first time node after receiving the wake-up signal, the second electronic device sends the target broadcast message at the second time node under the condition that the second electronic device does not receive the connection request sent by the first electronic device, the first electronic device can scan at the second time node, and the first electronic device sends the connection request to the second electronic device under the condition that the second time node scans the target broadcast message, so that the first electronic device and the second electronic device are connected back, the interference of signal interference and other reasons on the back connection can be reduced, the reliability of the back connection of the first electronic device and the second electronic device is improved, and the user experience is improved.
With reference to the second aspect, in some implementations of the second aspect, the wake-up signal further includes a second time node and a second broadcast channel, where the wake-up signal is used to instruct the first electronic device to scan the target broadcast packet based on the first time node, the first broadcast channel, the second time node, and the second broadcast channel; and after the first time node sends the target broadcast message through the first broadcast channel, the method further comprises: and under the condition that the connection request sent by the first electronic equipment is not received, sending the target broadcast message through a second broadcast channel at a second time node.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node for sending the target broadcast message, a first broadcast channel, a second time node and a second broadcast channel, the second electronic device sends the target broadcast message through the first broadcast channel at the first time node, then the first electronic device can scan the first broadcast channel at the first time node after receiving the wake-up signal, the second electronic device sends the target broadcast message through the second broadcast channel at the second time node under the condition that the second electronic device does not receive the connection request sent by the first electronic device, the first electronic device can scan the second broadcast channel at the second time node, and under the condition that the first electronic device scans the target broadcast message, the connection request is sent to the second electronic device, so that the first electronic device and the second electronic device are connected back, the interference of the back connection caused by signal interference and other reasons can be reduced, the reliability of the back connection of the first electronic device and the second electronic device is improved, and the user experience is improved.
With reference to the second aspect, in some implementations of the second aspect, the second electronic device establishes a connection with a plurality of host devices, where the plurality of host devices includes the second host device, and the second host device is an electronic device of the plurality of host devices that establishes a connection with the second electronic device at a latest time, where the first electronic device is the second host device; and sending a target broadcast message at a first time node, comprising: and sending a target broadcast message to the first electronic equipment at the first time node, wherein the target broadcast message sent by the first time node comprises an identifier of the first electronic equipment.
In the embodiment of the application, in the case that the first electronic device is the electronic device which is connected with the second electronic device at the latest in the plurality of host devices (the first electronic device is the electronic device which is connected with the Bluetooth device last time), the target broadcast message sent by the second electronic device can include the identifier of the first electronic device (the target message can be called as a directional broadcast message), and the first electronic device can scan the directional broadcast message sent by the second electronic device based on the first time node, so that other host devices except the first electronic device in the plurality of host devices can be prevented from scanning the directional broadcast message, the second electronic device can be quickly and accurately connected back with the first electronic device, and the user experience is improved.
With reference to the second aspect, in some implementations of the second aspect, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including the second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device of the plurality of hosts other than the second host device and the first electronic device establishes a connection with the second electronic device, the wake-up signal further includes a third time node, the third time node being later than the first time node; and sending a target broadcast message at a first time node, comprising: the method comprises the steps that a target broadcast message is sent to second host equipment at a first time node, and the target broadcast message sent by the first time node comprises an identifier of the second host equipment; after the first time node sends the target broadcast message to the second host device, the method further includes: and under the condition that the connection request sent by the second host equipment is not received, sending a target broadcast message to the first electronic equipment at a third time node, wherein the target broadcast message sent by the third time node comprises an identifier of the first electronic equipment.
In the embodiment of the application, when the second electronic device reestablishes connection with one of the plurality of host devices, the second electronic device may reestablish connection with the second host device (the second electronic device is the electronic device which is connected with the second electronic device last time), specifically, the second electronic device sends the target broadcast message at the first time node, where the target broadcast message includes the identifier of the second host device, the second host device may scan the target broadcast message sent by the second electronic device based on the first time node, and the second host device may scan the target broadcast message originally sent by the second electronic device to the second host device in a targeted manner, but the second host device fails to scan the target broadcast message due to signal interference, the distance between the second host device and the second electronic device being too far, and the like, and at this time, the second electronic device fails to receive the connection request sent by the second host device, so that the second electronic device and the second host device fails to be connected back to work. Then, the second electronic device may reestablish connection with the first electronic device (the time node at which the first electronic device establishes connection with the second electronic device is earlier than the time node at which the second host device establishes connection with the second electronic device, and later than the time node at which the host devices except the second host device and the first electronic device establish connection with the second electronic device in the plurality of hosts), specifically, the second electronic device sends a target broadcast message at the third time node, where the target broadcast message includes an identifier of the first electronic device, the first electronic device may scan, based on the third time node, the target broadcast message that the second electronic device directs to the first electronic device, where the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned based on the third time node, so that the first electronic device and the second electronic device may be connected back, where the second electronic device fails to be connected with the electronic device last time, and the second electronic device may be connected back to the first electronic device, where the second electronic device is reliably connected back.
With reference to the second aspect, in certain implementations of the second aspect, the wake-up signal further includes a preamble, an identifier of the first electronic device, an identifier of the second electronic device, and a check code, where the preamble is used to synchronize clocks of the second electronic device and the first electronic device, and the check code is used to check the wake-up signal received by the first electronic device.
In a third aspect, an electronic device is provided, which is configured to perform the method provided in the first aspect or the second aspect. In particular, the electronic device may comprise a processing unit for performing any one of the possible implementations of the first or second aspect described above.
In a fourth aspect, there is provided an electronic device comprising: one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of the possible implementations of the first or second aspects above.
In a fifth aspect, there is provided a computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of the first or second aspect described above.
In a sixth aspect, a chip is provided, comprising a memory for storing instructions; further comprising a processor for calling and executing instructions from the memory to cause the chip-mounted electronic device to perform the method of the first or second aspect described above.
Drawings
Fig. 1 is an exemplary diagram of a procedure for providing a connection of a bluetooth device to an electronic device.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
Fig. 4 is a schematic structural diagram of a bluetooth device 200 according to an embodiment of the present application.
Fig. 5 is a schematic diagram of a bluetooth protocol stack according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 7 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 8 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 9 is a schematic diagram of a handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 10 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 11 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 12 is a timing chart of a mobile phone connected back to a bluetooth headset according to an embodiment of the present application.
Fig. 13 is a schematic flow chart of a mobile phone connected back to a bluetooth device according to an embodiment of the present application.
Fig. 14 is a schematic diagram of another handset connected back to a bluetooth device according to an embodiment of the present application.
Fig. 15 is a schematic flowchart of another connection between a bluetooth device and an electronic device according to an embodiment of the present application.
Fig. 16 is an exemplary diagram of a connection between an electronic device and a bluetooth device according to an embodiment of the present application.
Fig. 17 is a schematic flow chart of an electronic device capable of automatically lighting a screen according to an embodiment of the present application.
Fig. 18 is a schematic flow chart of a method for reconnecting a device according to an embodiment of the present application.
Fig. 19 is a schematic flow chart of another method for reconnecting equipment according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plural" or "plurality" means two or more than two.
The terms "first" and "second" are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
At present, the bluetooth technology is widely applied to various devices, such as audio devices, internet of things devices, intelligent home devices and the like, and brings convenience to life and work of people.
In the context of applying bluetooth technology, two devices, i.e., an electronic device and a bluetooth device, are generally included, where the electronic device may be any device with a bluetooth connection function, for example, a mobile phone, a computer, etc., and the bluetooth device may be any device with a bluetooth connection function, for example, a bluetooth headset, a bluetooth bracelet, etc. The electronic device may establish a connection with one or more bluetooth devices to exchange data. For low power requirements or manual operation, bluetooth devices may be disconnected from electronic devices for the following reasons: the user manually operates the Bluetooth device or the Bluetooth device automatically enters a power-saving dormant state, the distance between the Bluetooth device and the electronic device is too long, and the electronic device and the Bluetooth device are interfered by interference signals in the process of exchanging data. After the electronic device is disconnected from the bluetooth device, if the bluetooth device needs to be used continuously, the bluetooth device needs to reestablish connection with the electronic device.
It should be understood that when the bluetooth device first establishes a connection with the electronic device, the bluetooth device needs to perform bluetooth pairing with the electronic device, where bluetooth pairing is a process performed when two devices are first connected, and during pairing, two devices exchange some encryption keys to ensure security in a data transmission process, and only after pairing is successful, the two devices can perform data transmission normally. The process of reestablishing connection between the bluetooth device and the electronic device refers to the process of reestablishing connection between two devices that have been paired before to establish a data transmission channel. When the connection is re-established, the two devices no longer need to exchange encryption keys, as they have completed the exchange of encryption keys during the pairing process. In the following embodiments, reestablishing the connection between the bluetooth device and the electronic device may be referred to as connecting the bluetooth device back to the electronic device.
In a related scheme, the process of connecting the bluetooth device back to the electronic device may be: referring to fig. 1, fig. 1 is an exemplary diagram of a procedure for connecting a bluetooth device to an electronic device.
For example, when the bluetooth device needs to connect back to the electronic device, the bluetooth device periodically sends a broadcast message on a broadcast channel. It should be appreciated that the bluetooth operating band may be divided into 40 channels, channel 0 through channel 39, respectively, where 37, 38 and 39 are broadcast channels and the other are data channels. In some embodiments, the broadcast channel may be extended so that the bluetooth device may also send broadcast messages on other channels (channels other than 37, 38, and 39 of the 40 channels). The broadcast channels 37, 38 and 39 are exemplified herein.
In fig. 1, a bluetooth device may send broadcast messages in different broadcast channels in sequence in a broadcast period 1. It should be appreciated that when the bluetooth device sends broadcast messages, the order of the broadcast channels is random, e.g., during broadcast period 1, the bluetooth device sends broadcast messages in broadcast channels 37, 38, and 39 in turn, and during broadcast period 2, the bluetooth device sends broadcast messages in broadcast channels 39, 38, and 37 in turn. It should also be appreciated that the broadcast messages may or may not be broadcast in the same broadcast channel, e.g., broadcast messages may be broadcast in 37 broadcast channels for 2 milliseconds (ms), 38 broadcast channels for 3 ms, and 39 broadcast channels for 2 ms.
It will also be appreciated that the broadcast period is comprised of a fixed duration ranging from 20 ms to 10.24 seconds and a step size of 0.625 ms, and a random delay, a pseudo-random value ranging from 0 to 10 ms, automatically generated by the bluetooth device and added to the broadcast period. The main purpose of the broadcast period constructed based on the above manner is to reduce the probability of signal collision between bluetooth devices and improve the reliability of connection. Illustratively, broadcast period 1 may be a fixed duration 1 (1000 milliseconds) plus a random delay 1 (5 milliseconds) equal to 1005 milliseconds, and broadcast period 2 may be a fixed duration 2 (500 milliseconds) plus a random delay 2 (8 milliseconds) equal to 508 milliseconds.
In fig. 1, while the bluetooth device transmits a broadcast message, the electronic device may transmit a scan request for scanning different broadcast channels. It should be appreciated that the electronic device scans the different broadcast channels periodically, i.e., every other scanning period, and scans one of the plurality of broadcast channels. For example, the electronic device scans broadcast channel 38 during scan period 1, scans broadcast channel 39 during scan period 2, and scans broadcast channel 37 during broadcast period 3. It should also be appreciated that the order in which the broadcast channels are scanned is also random, with broadcast channel 37 being scanned first, followed by broadcast channels 38 and 39 being scanned, and with broadcast channel 38 being scanned first, followed by broadcast channels 37 and 39 being scanned. The scan periods are also random, e.g., scan period 1 and scan period 2 may be the same or different in duration. It is also understood that the scanning period is formed by a scanning window and a non-scanning window, the scanning period is used for defining how long the electronic device sends a scanning request, the scanning window is used for defining the duration of scanning of the electronic device, and the value of the scanning period ranges from 2.5 milliseconds to 10.24 seconds.
As can be seen from the above, the bluetooth device sends a broadcast message, and the electronic device sends a scan request, and only when the broadcast channel scanned by the electronic device is coincident with the broadcast channel of the bluetooth device, the electronic device can scan the broadcast message sent by the bluetooth device. For example, in fig. 1, the electronic device scans the broadcast channel 38 in the scan period 1, the scan window 1 in the scan period 1 may scan the broadcast message sent by the broadcast channel 38 in the broadcast period 2, and at this time, the broadcast channel scanned by the electronic device coincides with the broadcast channel of the bluetooth device, and the electronic device may scan the broadcast message sent by the bluetooth device. For example, the electronic device scans the broadcast channel 39 in the scan period 2, and the scan window 2 in the scan period 2 fails to scan the broadcast message sent by the broadcast channel 39, and at this time, the broadcast channel scanned by the electronic device is not overlapped with the broadcast channel of the bluetooth device, and the electronic device fails to scan the broadcast message sent by the bluetooth device.
After the electronic device scans the broadcast message sent by the Bluetooth device, a connection request can be sent to the Bluetooth device, and the Bluetooth device can be connected back to the electronic device after receiving the connection request.
As can be seen from the procedure of the connection between the bluetooth device and the electronic device shown in fig. 1: the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device and the like have stronger randomness, so that the broadcasting channel scanned by the electronic device may not coincide with the broadcasting channel of the bluetooth device due to the stronger randomness, so that the bluetooth device and the electronic device are connected back to consume longer time easily, and the user experience is affected.
In order to solve the above problems, the embodiment of the present application provides a method for reconnecting a bluetooth device to an electronic device, where the method may send a wake-up signal to the electronic device when the bluetooth device needs to be reconnected to the electronic device, where the wake-up signal includes a broadcast channel of a broadcast message sent by the bluetooth device and a time node of the broadcast message sent by the bluetooth device, and after the electronic device receives the wake-up signal, the electronic device may scan the broadcast channel of the broadcast message sent by the bluetooth device at the time node of the broadcast message sent by the bluetooth device. Because the electronic equipment can rapidly scan the broadcast message sent by the Bluetooth equipment, the connection time of the electronic equipment and the Bluetooth equipment in a back connection mode can be reduced, and the user experience is improved.
The device reconnection method provided by the embodiment of the application is applied to electronic devices. The electronic device may also be referred to as a terminal (terminal), a User Equipment (UE), a Mobile Station (MS), a Mobile Terminal (MT), etc. The electronic device may be a mobile phone, a smart television, a wearable device, a tablet (Pad), a computer with wireless transceiving functionality, a Virtual Reality (VR) electronic device, an augmented reality (augmented reality, AR) electronic device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self-driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (SMART GRID), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city (SMART CITY), a wireless terminal in smart home (smart home), and so on. The embodiment of the application is not limited to the specific technology and the specific equipment form adopted by the electronic equipment.
The bluetooth device according to the embodiment of the present application may be a device having an audio playing function, such as a bluetooth headset, a wearable headset, a headset with noise reduction, a bluetooth speaker, a vehicle-mounted device, a Virtual Reality (VR) device, an augmented reality (augmented reality, AR) device, or the like.
The bluetooth technology according to the embodiment of the present application may be bluetooth low energy (bluetooh low energy, BLE) bluetooth wireless technology or other bluetooth technologies, which is not limited in this embodiment of the present application.
In order to better understand the embodiments of the present application, the structure of the electronic device according to the embodiments of the present application is described below.
Fig. 2 is a schematic structural diagram of an electronic device 100 (for example, a mobile phone) according to an embodiment of the present application. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, an antenna 1, an antenna 2, a mobile communication module 140, a wireless communication module 150, a sensor module 160, a pressure sensor 160A, a touch sensor 160B, a display 170, a low power wake-up receiving module 180, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (Application processor, app), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
A memory may also be provided in the processor 110 for storing instructions and data.
The wireless communication module 150 may provide solutions for wireless communication including wireless local area network (wirelesslocalareanetworks, WLAN) (e.g., wireless fidelity (WIRELESSFIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (globalnavigationsatellitesystem, GNSS), frequency modulation (frequencymodulation, FM), near Field Communication (NFC), infrared (IR), etc., applied to the electronic device 100. The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 140, the wireless communication module 150, a modem processor, a baseband processor, and the like. In particular, in the embodiment of the present application, the electronic device 100 may be connected to the bluetooth device through the antenna 1, the antenna 2, the mobile communication module 140, the wireless communication module 150, and the like, so that the electronic device 100 and the bluetooth device implement a wireless communication function.
The display 170 is used to display images, videos, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100.
The internal memory 121 may be used to store computer-executable program code that includes instructions.
The pressure sensor 160A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 160A may be disposed on display 170. The pressure sensor 160A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like.
The touch sensor 160B is also referred to as a "touch panel". The touch sensor 160B may be disposed on the display 170, and the touch sensor 160B and the display 170 form a touch screen, which is also referred to as a "touch screen". The touch sensor 160B is used to detect a touch operation acting thereon or thereabout.
The low power consumption wake-up receiving module 180 is configured to continuously monitor a wake-up signal, where the wake-up signal includes a broadcast channel for sending a broadcast message and a time node for sending the broadcast message. After the wake-up signal is received by the low power wake-up monitor module 180, the wake-up signal may be uploaded to the processor 110, and the processor 110 may scan a broadcast channel of the bluetooth device at a time node based on the broadcast channel and a time node for the bluetooth device to send a broadcast message included in the wake-up signal, so as to quickly realize reconnection of the bluetooth device with the electronic device.
As to the hardware structure of the electronic device 100, it is to be understood that the components included in the hardware structure shown in fig. 2 do not constitute a specific limitation on the electronic device 100. The electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits. For example, the low power wake-up receiving module 180 may be integrated in a bluetooth module, which may be integrated in the processor 110. For another example, the bluetooth module may be integrated into the processor 110, and the low energy wake-up receiving module 180 is two separate components from the processor 110.
In addition, an operating system is run on the components. Such as the iOS operating system developed by apple corporation, the Android open source operating system developed by google corporation, the Windows operating system developed by microsoft corporation, etc. An operating application may be installed on the operating system.
The operating system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, an operating system of the electronic device 100 is illustrated.
Fig. 3 is a schematic diagram of a software structure of the electronic device 100 according to the embodiment of the present application. The software structure comprises a plurality of layers, each layer has clear roles and division of work, and the layers are communicated through software interfaces. In some embodiments, the software architecture is divided into an application layer, an application framework layer, a system library, and a kernel layer in order from top to bottom.
The application layer may include a series of application packages, such as cameras, gallery, calendar, map, navigation, bluetooth, settings, etc.
The application framework layer, abbreviated as framework layer, provides APIs and programming frameworks for applications of the application layer. The framework layer includes some predefined functions. When an application in the application layer is run, the related functions of the application can be implemented by calling the API. For example, as shown in FIG. 3, the framework layer may include an input system, an activity manager, a view system, bluetooth services, and the like.
Wherein the input system is used for managing the program of the input device. For example, the input system may determine input operations such as a mouse click operation, a keyboard input operation, and a touch swipe.
The activity manager is used for managing the life cycle of each application program and the navigation rollback function. And the main thread creation of the Android is responsible for maintaining the life cycle of each application program.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like.
The bluetooth service may provide a bluetooth application programming interface (bluetoothAPI) such that interaction between the bluetooth application and the bluetooth service, and between the bluetooth application and a hardware driver (e.g., a sensor driver), may be performed by invoking the bluetooth application programming interface.
Androidruntime include core libraries and virtual machines. Androidruntime is responsible for scheduling and management of the android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in virtual machines. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
A system library may include a plurality of functional modules. For example: the system library may include a plurality of functional modules. For example: an image drawing module, an image rendering module, an image synthesizing module, a function library, a Bluetooth protocol stack and the like.
The image drawing module is used for drawing two-dimensional or three-dimensional images. The image rendering module is used for rendering two-dimensional or three-dimensional images. The image synthesis module is used for synthesizing two-dimensional or three-dimensional images. The function library provides macros, type definitions, string operation functions, mathematical computation functions, input-output functions, and the like used in the C language. The bluetooth protocol stack may refer to the description in fig. 5, and will not be described here again.
The kernel layer may include a plurality of driver modules. For example: display drive, camera drive, audio drive and sensor drive, bluetooth drive, low energy wake-up receiving module drive, etc.
The hardware may be an audio module, a bluetooth module (the bluetooth module may also be referred to as a bluetooth chip, a bluetooth unit, etc.), a low energy wake-up receiving module, a sensor module, etc.
It will be appreciated that the layers and components contained in the layers in the software architecture shown in fig. 3 do not constitute a specific limitation on the electronic device. In other embodiments of the application, the electronic device may include more or fewer layers than shown, and more or fewer components may be included in each layer, e.g., the software architecture may also include a hardware abstraction layer, etc., as the application is not limited in this regard.
It may be understood that, in order to implement the method for connecting back devices in the embodiment of the present application, the electronic device includes corresponding hardware and/or software modules that perform each function. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art can implement the described functionality using different approaches for each particular application in conjunction with the embodiments.
Although the Android system is described as an example in the embodiment of the present application, the basic principle is equally applicable to electronic devices based on the iOS or Windows and other operating systems.
The execution main body of the method for connecting back equipment provided by the embodiment of the application can be the electronic equipment, or can be a functional module and/or a functional entity which can realize the method for connecting back equipment in the electronic equipment, and the scheme of the application can be realized in a hardware and/or software mode, and can be specifically determined according to actual use requirements, and the embodiment of the application is not limited.
The following describes the structure of a bluetooth device connected back to an electronic device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a bluetooth device 200 (for example, a bluetooth headset) according to an embodiment of the present application. As shown in fig. 4, the bluetooth device 200 may include: at least one processor 201, at least one memory 202, a wireless communication module 203, an audio module 204, a power module 205, an input/output interface 206, a sensor 207, a bluetooth low energy wake-up transmission module 208, and the like.
The processor 201 may include one or more interfaces for interfacing with other components of the bluetooth headset, among other things. The Bluetooth headset can be stored in a headset storage box.
The sensor 207 may include a distance sensor, a proximity sensor, a bone conduction sensor, a touch sensor, and the like. The Bluetooth headset may be used to determine whether the Bluetooth headset is worn by a user via a distance sensor, a proximity light sensor. The Bluetooth headset can acquire vibration signals of human body vocal parts to vibrate bone blocks through the bone conduction sensor, analyze out voice signals, realize voice functions, and accordingly receive voice instructions of users and the like. The Bluetooth headset can detect touch operation of a user through the touch sensor. The touch operation may include a single click, double click, multiple clicks, long press, heavy press, etc. operation by the user.
The wireless communication module 203 may be used to support data exchange between the bluetooth headset and other electronic devices or headset boxes through wireless communication technology. The wireless communication module 203 may further include an antenna, and the wireless communication module 203 receives electromagnetic waves via the antenna, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and sends the processed signals to the processor 201. The wireless communication module 203 may also receive a signal to be transmitted from the processor 201, frequency modulate and amplify the signal, and convert the signal into electromagnetic waves through an antenna to radiate the electromagnetic waves.
The audio module 204 may be used to manage audio data, and to implement the bluetooth headset to input and output audio data.
The power module 205 may be used to provide a system power for the bluetooth headset, power the modules of the bluetooth headset, support the bluetooth headset to receive charging inputs, and so on.
A plurality of input/output interfaces 206 may be used to provide a wired connection for charging or communication between the bluetooth headset and the headset case.
Memory 202 may be used to store program codes.
The processor 201 may be configured to execute program code stored in the memory 202 in lieu of the associated modules to implement the functionality of a bluetooth headset.
The bluetooth low energy wake-up sending module 208 is configured to send a wake-up signal to the electronic device 100 when the bluetooth device 200 needs to be connected back to the electronic device 100, where the wake-up signal includes a broadcast channel for sending a broadcast message and a time node for sending the broadcast message.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the bluetooth headset. It may have more or fewer components than shown in fig. 4, may combine two or more components, or may have a different configuration of components. For example, the external surface of the bluetooth headset may further include a key 209, an indicator light (which may indicate the status of the power, incoming/outgoing call, pairing mode, etc.), a display screen (which may prompt the user about information), a dust screen (which may be used with the earpiece), etc. The key 209 may be a physical key or a touch key (used with a touch sensor), and is used for triggering operations such as starting, shutting down, pausing, playing, recording, starting pairing, resetting, and the like. For another example, the bluetooth low energy wake-up transmission module 208 may be integrated in a bluetooth module, which may be integrated in the processor 201. For another example, the bluetooth module may be integrated in the processor 201, and the low energy wake-up transmission module 208 is two separate components from the processor 201.
In addition, a bluetooth protocol stack is run on the components shown in fig. 2 or fig. 4. Fig. 5 is a schematic diagram of a bluetooth protocol stack according to an embodiment of the present application, where the architecture includes an application layer, an application processor layer, and a bluetooth chip layer.
The application layer comprises a Bluetooth application program; the bluetooth application may be configured to receive user instructions, such as user touches, clicks, or long presses. The application layer encompasses all logic, user interfaces, and data processing of content related to the actual use case of an application implementation. The architecture of the application layer protocol is highly dependent on each specific use case (use case). It includes a wide variety of profiles. The configuration file defines vertical interactions from layer to layer and peer interactions for a particular layer between devices. Each specific use case is made up of one or more services.
The application processor layer includes a host (host) in which a BLE protocol used for communication with BLE is stored. It can be understood that host is a core part of the bluetooth protocol stack, and can be responsible for making roles of device work (for example, making a mobile phone to be a host device and making a bluetooth headset to be a slave device), designating secure connection, taking charge of multiplexing of protocols or channels, taking charge of segmentation and/or heavy picture groups of upper application data, and the like, so as to meet requirements of user data transmission on delay, and facilitate implementation of mechanisms such as subsequent retransmission, flow control, and the like.
The bluetooth chip layer comprises a controller (controller), which can also be understood as a bluetooth module, a bluetooth chip. The Bluetooth chip comprises a radio frequency module (RadioFrequency, RF) and a link layer (LINKLAYER). RF can be used to implement the analog and digital portions of the radio frequency correlation, accomplishing the most basic data transmission and reception. That is, RF may be used to handle tasks related to radio frequency signals (e.g., a handset scanning a broadcast packet or a handset sending a request for a bluetooth connection to a bluetooth headset). The link layer may decide on broadcast channels, data transmission channels, etc. (e.g., the link layer may decide on which of broadcast channels 37, 38, or 39 the bluetooth headset is transmitting broadcast messages) so that the electronic device reliably receives and/or transmits data over the RF-supported frequency band. The link layer may also determine the bluetooth state, such as a scanning state and initiating states, in which the electronic device may receive data (e.g., receive broadcast packets) via the broadcast channel. In initiating state, the electronic device only receives and processes the confirmation data of the confirmation connection sent by the slave device, and does not receive or process the broadcast packet.
The host and controller may communicate via a physical interface, i.e., a host controller interface (host controllerinterface, HCI). For example, the controller may send data to host through the HCI, and host may send commands and data to the controller through the HCI.
It will be appreciated that the controller may process radio frequency signals and host may communicate with the controller so that BLE scanning may be initiated actively by the controller; the command of the host to initiate BLE scanning to the controller may also instruct the controller to initiate BLE scanning.
It can be understood that, regarding the bluetooth protocol stack of the electronic device shown in fig. 5 belongs to a host+controller dual-chip standard architecture, the bluetooth protocol stack of the electronic device may also be other architectures. For example, the bluetooth protocol stack of the electronic device may also be a single-chip architecture, i.e. host and controller are integrated on one chip, and the communication between host and controller does not require a physical interface HCI, and can interact directly through a logical interface (e.g. an application programming interface). For another example, the bluetooth protocol stack of the electronic device may also be a custom dual-chip architecture, where host and controller communicate via a physical interface HCI, but the communication protocol used is defined by the manufacturer itself.
It can be understood that the method for connecting back the device provided by the embodiment of the present application is also applicable to other bluetooth protocol stacks (such as a single-chip architecture or a custom dual-chip architecture) besides the host+controller dual-chip standard architecture, which is not limited herein.
In the following, an example in which the electronic device is a mobile phone and the bluetooth device is a bluetooth headset is taken, and an exemplary description is made on a method for connecting back the device according to the embodiment of the present application with reference to the accompanying drawings.
The following embodiments are described with reference to the accompanying drawings in connection with an application scenario in which a mobile phone and a bluetooth headset are connected back.
Referring to fig. 6, fig. 6 is a schematic diagram of a handset connected back to a bluetooth headset according to an embodiment of the application. The bluetooth headset is connected with the mobile phone through the Bluetooth switch, and the charging box of the bluetooth headset is opened by the user, so that the bluetooth headset is connected with the mobile phone in a loop mode.
Referring to the interface 310 shown in (a) of fig. 6, the interface 310 includes an icon 311, a user can click on the icon 311, the mobile phone displays the interface 320 shown in (b) of fig. 6 in response to the user's operation on the icon 311, the interface 320 includes a control 321, the user can click on the control 321, the mobile phone displays the interface 330 shown in (c 1) of fig. 6 in response to the user's operation on the control 321, the interface 330 includes a button 331, the button 331 is in a closed state, the user can click on or slide the button 331, and the mobile phone can control the button 331 to switch from the closed state to the open state in response to the user's operation on or slide the button 331.
When the button 331 is in an open state, the user may place the mobile phone close to the bluetooth headset or when the mobile phone is close to the bluetooth headset (the bluetooth headset is in a scanned state, for example, when the cover of the charging box of the bluetooth headset is in an open state), the mobile phone may display the searched name of the bluetooth headset and the matched name of the bluetooth headset in the interface 330, for example, please refer to the interface 330 shown in (c 2) of fig. 6, the button 331 is in an open state in the interface 330, and the interface 330 may include a plurality of names of bluetooth headset, for example, a bluetooth headset name 332, a bluetooth headset name 333, a bluetooth headset name 334, a bluetooth headset name 335 and a bluetooth headset name 336, wherein the bluetooth headset name 332 and the bluetooth headset name 333 represent the matched bluetooth headset of the mobile phone, and the bluetooth headset name 334, the bluetooth headset name 335 and the bluetooth headset name 336 represent the searched but unpaired bluetooth headset of the mobile phone.
When the bluetooth button 331 of the mobile phone is in an on state and the bluetooth headset is in a scanned state, the mobile phone can execute a loop procedure with the paired bluetooth headset.
In some embodiments, the bluetooth device and the electronic device each include an NFC module that provides a solution for wireless communication of near field communication (NEAR FIELD communication), so the electronic device may be connected back to the paired bluetooth device in response to a user touching the electronic device to the bluetooth device when its bluetooth switch is in an on state and the bluetooth device is in a scanned state.
Referring to fig. 7, fig. 7 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the application. The bluetooth headset is connected with the mobile phone through the bluetooth switch, and the charging box of the bluetooth headset is opened again by the user, so that the bluetooth headset and the mobile phone are connected back.
Referring to the interface 410 shown in (a) of fig. 7, the user may perform a sliding operation on the right side of the top of the screen in the interface 410, and in response to the sliding operation by the user, the electronic device displays the interface 420 shown in (b 1) of fig. 7, where the interface 420 includes the icon 421, the icon 421 is in a closed state, the user may click on the icon 421, and in response to the operation by the user clicking on the icon 421, the electronic device controls the icon 421 to switch from the closed state to the open state. For example, please refer to the interface 420 shown in (b 2) of fig. 7, wherein the icon 421 in the interface 420 is in an open state.
When the icon 421 is in an open state and the bluetooth headset is in a scanned state, the user may approach the bluetooth headset or the distance between the mobile phone and the bluetooth headset is relatively short, and the mobile phone may execute a procedure of reconnecting the paired bluetooth headset.
It should be understood that, in addition to the user performing the sliding operation on the right side of the top of the screen in the interface 410 shown in (a) of fig. 7, opening the control center, the user may also perform the sliding operation on the right side of the top of the screen in other interfaces, such as the interface 320 shown in (b) of fig. 6, opening the control center, which is not limited in the embodiment of the present application.
It can be understood that in the application scenario shown in fig. 6 and fig. 7, assuming that the bluetooth button 331 in fig. 6 or the bluetooth icon 421 in fig. 7 is in an on state and the bluetooth headset is in a scanning state, when the user approaches the mobile phone to the bluetooth headset or the distance between the mobile phone and the bluetooth headset is relatively close, the mobile phone can directly connect back to the paired bluetooth headset.
Referring to fig. 8, fig. 8 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the application. The bluetooth headset is connected with the mobile phone through the smart space application program, and the bluetooth headset is connected with the mobile phone through the smart space application program.
Referring to the interface 510 shown in fig. 8 (a), after the mobile phone is first paired with the bluetooth headset, the bluetooth headset is added to the smart space application of the mobile phone, and the identifier 511 of the bluetooth headset is displayed in the main interface 510 of the smart space application, and the card includes the word 512 of "connected". After the bluetooth headset is disconnected from the mobile phone, the electronic device displays the interface 520 shown in (b) in fig. 8, where the interface 520 includes a "reconnect" typeface 521, the user may click on the "reconnect" typeface 521, and in response to the user clicking on the typeface 521, the mobile phone may execute a procedure of reconnecting to the paired bluetooth headset.
The process of connecting the mobile phone with the matched Bluetooth headset in the related art comprises the following steps: the bluetooth headset transmits broadcast messages in random broadcast channels with random broadcast periods (the random broadcast periods and the random broadcast messages can be referred to in the embodiment above), the mobile phone scans broadcast channels randomly in random scan periods (the random scan periods and the random scan broadcast channels can be referred to in the embodiment above), and the bluetooth headset can be connected back to the mobile phone only when the broadcast channels scanned by the mobile phone are randomly overlapped with the broadcast channels of the broadcast messages transmitted by the bluetooth headset.
In the application scenario shown in fig. 6 to 8, when the bluetooth headset needs to be connected back to the mobile phone, the bluetooth headset may send a wake-up signal to the mobile phone, where the wake-up signal includes a broadcast channel of the bluetooth headset for sending a broadcast message and a time node of the bluetooth headset for sending the broadcast message, and after the mobile phone receives the wake-up signal, the mobile phone may scan the broadcast channel of the bluetooth headset for sending the broadcast message at the time node of the broadcast message sent by the bluetooth headset, so that, because the mobile phone scans a fixed broadcast channel at a fixed time node, the mobile phone may scan the broadcast message sent by the bluetooth headset quickly compared with a related scheme of the mobile phone scanning a random broadcast channel at a random time node, so that the mobile phone is connected back to the bluetooth headset. Because the mobile phone can rapidly scan the broadcast message sent by the Bluetooth headset, the connection time of the mobile phone and the Bluetooth headset in a back connection mode can be reduced, and the user experience is improved.
It should be understood that the above electronic device may be referred to as a host device in a bluetooth application scenario, where a bluetooth device may be referred to as a slave device in a bluetooth application scenario, and in case that one or more host devices are provided, the method for reconnecting a device provided by the embodiment of the present application may be applied to connect back the host device and the slave device.
The following embodiment describes a method for connecting devices back in the case that a host device has one device.
Referring to fig. 9, fig. 9 is a schematic diagram of a handset connected back to a bluetooth headset according to an embodiment of the application. The method is characterized in that a mobile phone scans a broadcasting channel of a broadcasting message sent by a Bluetooth headset at a time node of the broadcasting message sent by the Bluetooth headset so as to realize a process of connecting the mobile phone with the Bluetooth headset.
In fig. 9, an electronic device (such as a mobile phone) may monitor a wake-up signal, and for explanation of the wake-up signal, reference may be made to the following embodiments, which are not repeated herein. When the mobile phone monitors the wake-up signal, the wake-up signal comprises a broadcast channel and a time node of the broadcast message sent by the Bluetooth device (such as a Bluetooth headset), and the mobile phone can scan the broadcast channel sent by the Bluetooth headset at the time node of the broadcast message sent by the Bluetooth headset, so that the broadcast message sent by the Bluetooth headset can be scanned rapidly. And then, the mobile phone can send a connection request to the Bluetooth headset on a broadcast channel of the broadcast message sent by the Bluetooth headset so as to realize the reconnection of the Bluetooth headset and the mobile phone. For example, the time node of sending the broadcast message by the bluetooth headset included in the wake-up signal in fig. 9 is 10 ms, the broadcast channel is 39 channels, after the mobile phone receives the wake-up signal, the broadcast channel 39 of the bluetooth headset can be scanned in 10 ms, and after the broadcast message is scanned, the mobile phone can send a connection request to the bluetooth headset through the broadcast channel 39, so as to realize the reconnection between the bluetooth headset and the mobile phone.
As can be seen from fig. 1, in the related art, when the bluetooth device is connected back to the electronic device, the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like have strong randomness. According to the embodiment of the application, the wake-up signal sent by the Bluetooth device comprises the broadcast channel and the time node of the broadcast message sent by the Bluetooth device, and the electronic device can scan the broadcast channel of the broadcast message sent by the Bluetooth device based on the time node of the broadcast message sent by the Bluetooth device, so that the electronic device scans the fixed broadcast channel at the fixed time node, and compared with the related scheme that the electronic device scans the random broadcast channel at the random time node, the electronic device can rapidly scan the broadcast message sent by the Bluetooth device, so that the electronic device is connected with the Bluetooth device in a back way, the connection time of the electronic device and the Bluetooth device in a back way can be reduced, and the user experience is improved.
Referring to fig. 10, fig. 10 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the application. In the foregoing manner shown in fig. 9, when the electronic device scans, it may not scan the broadcast message due to signal interference or other reasons, so that in order to avoid the situation that the broadcast message is not scanned, the mobile phone may scan the broadcast channel of the broadcast message sent by the bluetooth headset at the time node where the plurality of bluetooth headsets send the broadcast message, so as to implement the reconnection between the bluetooth headset and the mobile phone.
In fig. 10, the wake-up signal includes broadcast channels of the bluetooth headset for transmitting broadcast messages in different broadcast periods and time nodes for transmitting broadcast messages in different broadcast periods. It should be understood that the broadcast channels of the broadcast messages sent by the bluetooth headset in different broadcast periods may be the same or different. For example, as shown in fig. 10 (a), in the broadcast period 3, the broadcast channel on which the bluetooth device (bluetooth headset) transmits the broadcast message is 39, and in the broadcast period 4, the broadcast channel on which the bluetooth headset transmits the broadcast message is 39. For another example, in the broadcast period 3 shown in fig. 10 (b), the broadcast channel of the bluetooth headset transmitting the broadcast message is 39, and in the broadcast period 4, the broadcast channel of the bluetooth headset transmitting the broadcast message is 38. It will be appreciated that the time nodes for sending the broadcast message in different broadcast periods are different, for example, as shown in (a) and (b) in fig. 10, the time node for sending the broadcast message by the bluetooth headset is 10 ms in broadcast period 3, and the time node for sending the broadcast message by the bluetooth headset is 1005 ms in broadcast period 4.
In implementation, for example, as shown in fig. 10 (a), assuming that the bluetooth headset transmits the broadcast message through the broadcast channel 39 at a time node (such as 10 th millisecond) in the broadcast period 3, and transmits the broadcast message through the broadcast channel 39 at a time node (such as 1005 th millisecond) in the broadcast period 4, after the wake-up signal is monitored, the wake-up signal includes a broadcast channel in which the bluetooth headset transmits the broadcast message in a different broadcast period and a time node in which the bluetooth headset transmits the broadcast message in a different broadcast period, for example, the time node may be 10 th millisecond and 1005 th millisecond shown in (a) and (b) in fig. 10, and the broadcast channel may be the broadcast channel 39 shown in (a) in fig. 10, or the broadcast channel 39 and the broadcast channel 38 shown in (b) in fig. 10. The handset may then begin scanning for broadcast messages at 10 ms in the manner shown in fig. 9, and in the event that no broadcast messages are scanned due to signal interference or the like, the handset may begin scanning for broadcast channels 39 at 1005 ms until a broadcast message is scanned.
As another example, as shown in fig. 10 (b), assuming that the bluetooth headset transmits a broadcast message through the broadcast channel 39 at a time node (for example, 10 th ms) in the broadcast period 3 and transmits a broadcast message through the broadcast channel 38 at a time node (for example, 1005 th ms) in the broadcast period 4, after the mobile phone monitors the wake-up signal, the mobile phone may start scanning the broadcast message at10 th ms in the manner shown in fig. 9, and in case that the broadcast message is not scanned due to signal interference or the like, the mobile phone may start scanning the broadcast channel 38 at 1005 th ms until the broadcast message is scanned.
As can be seen from fig. 1, in the related art, the electronic device scans the random broadcast channel at the random time node, which results in that the bluetooth device and the electronic device are connected back to each other easily and consume a long time, thereby affecting the user experience. According to the embodiment of the application, the wake-up signal sent by the Bluetooth device comprises the broadcast channel and the time node of the broadcast message sent by the Bluetooth device, and the electronic device can scan the broadcast channel of the broadcast message sent by the Bluetooth device based on the time node of the broadcast message sent by the Bluetooth device, so that the electronic device scans the fixed broadcast channel at the fixed time node, and compared with the related scheme that the electronic device scans the random broadcast channel at the random time node, the electronic device can rapidly scan the broadcast message sent by the Bluetooth device, so that the electronic device is connected with the Bluetooth device in a back way, and the connection time of the electronic device and the Bluetooth device in a back way can be reduced.
In addition, when the mobile phone does not scan the broadcast message due to signal interference or the like, the mobile phone can scan the broadcast channel (such as broadcast channel 38 and broadcast channel 39 in fig. 10) of the broadcast message based on the time node (such as 10 ms and 1005 ms in fig. 10) of the broadcast message sent by the plurality of bluetooth devices, so that the influence of signal interference on the reconnection can be reduced, the reliability of the reconnection between the electronic device and the bluetooth device is improved, and the user experience is improved.
Referring to fig. 11, fig. 11 is a schematic diagram of another handset connected back to a bluetooth headset according to an embodiment of the application. The mobile phone scans a time node of the broadcast message sent by the Bluetooth headset to realize the process of connecting the mobile phone with the Bluetooth headset.
The wake-up signal in fig. 11 includes a time node when the bluetooth headset sends the broadcast message, for example, the time node when the bluetooth headset sends the broadcast message is 10 th millisecond, 1005 th millisecond, etc. After the mobile phone monitors the wake-up signal, any one of the broadcast channels 37, 38 and 39 can be scanned in the 10 th millisecond, for example, the broadcast channel 38 is scanned, and after the mobile phone scans the broadcast message, the mobile phone can send a connection request to the bluetooth headset through the broadcast channel 38 so as to realize the reconnection of the bluetooth headset and the mobile phone. In the case that the broadcast message is not scanned due to signal interference or the like, the mobile phone can start scanning any one of the broadcast channels 37, 38 and 39 in 1005 ms, for example, scan the broadcast channel 39, and after the mobile phone scans the broadcast message, the mobile phone can send a connection request to the bluetooth headset through the broadcast channel 39, so as to realize the reconnection of the bluetooth headset and the mobile phone.
As can be seen from fig. 1, in the related art, the electronic device scans the random broadcast channel at the random time node, which results in that the bluetooth device and the electronic device are connected back to each other easily and consume a long time, thereby affecting the user experience. In the embodiment of the application, the wake-up signal sent by the Bluetooth device comprises the broadcast message sending time node of the Bluetooth device, and the electronic device can scan based on the broadcast message sending time node of the Bluetooth device, so that the electronic device scans at the fixed time node, and compared with the related scheme that the electronic device scans at the random time node, the electronic device can rapidly scan the broadcast message sent by the Bluetooth device, so that the electronic device is connected with the Bluetooth device, and the connection time of the electronic device and the Bluetooth device can be reduced.
Fig. 12 is a timing chart of a mobile phone connected back to a bluetooth headset according to an embodiment of the present application. Including steps 901 through 910.
In step 901, a low power consumption wake-up receiving module in the mobile phone listens for a wake-up signal.
It should be appreciated that the low power wake-up receiving module has the ability to listen for surrounding wireless signals (e.g., wake-up signals). Because the low-power consumption receiving module consumes less power when monitoring the wake-up signal, the low-power consumption wake-up receiving module can be always started in the mobile phone, so that the low-power consumption receiving module can continuously monitor the wake-up signal of the surrounding environment.
It should also be appreciated that the low power wake-up receiving module may be a separate chip, or may be a part of a chip (e.g., the low power wake-up receiving module may be integrated in the bluetooth module B of the mobile phone shown in fig. 12), etc. The embodiment of the application is illustrated by using the low-power consumption wake-up receiving module and the Bluetooth module B as two independent components.
In step 902, in response to the loopback event, the bluetooth module a in the bluetooth headset determines a media access Control (MEDIA ACCESS Control, MAC) address of the bluetooth headset, a MAC address of the paired mobile phone, a broadcast channel of the bluetooth headset transmitting the broadcast message, and a time node of the bluetooth headset transmitting the broadcast message.
It should be appreciated that a connect-back event is used to instruct a bluetooth device (e.g., a bluetooth headset) to connect back to an electronic device (e.g., a cell phone). In the case where the bluetooth device is a bluetooth headset, the back connection event may be that the user clicks or slides the button 331 in the interface 330 shown in (c 1) of fig. 6, causing the button 331 of the bluetooth switch to be in an on state, or the user clicks the icon 421 in the interface 420 shown in (b 1) of fig. 7, causing the icon 421 of the bluetooth switch to be in an on state, and then the user opens the charging box of the bluetooth headset or the user brings the bluetooth headset close to the mobile phone, etc. The loop event may also be a user clicking on control 521 shown in fig. 8. In the case where the bluetooth device is another device, such as a wearable device, the reconnection event may also be a user restarting the wearable device, the wearable device automatically restarting after power down, etc. In the case where the bluetooth device and the electronic device both include NFC modules, the reconnection event may also be that the user touches the bluetooth device to the electronic device, etc. When the two-dimensional code capable of being scanned and connected is configured in the Bluetooth device, the reconnection event can be that a user scans the two-dimensional code in the Bluetooth device through the electronic device, and the type of the reconnection event is not limited in the embodiment of the application.
It should also be understood that the MAC address in the bluetooth headset and the MAC address in the handset are unique and are burned inside the hardware at the time of production by the electronic device or bluetooth device manufacturer. Each MAC address is used to uniquely identify a physical device. Each MAC address consists of 48 bits (6 bytes), where the first 24 bits represent the vendor code, allocated by the ethernet address management agency, ensuring global uniqueness, and the last 24 bits are allocated by the vendor itself, so the entire 48-bit MAC address is not duplicated, ensuring uniqueness of each network device.
In implementation, when the bluetooth headset and the mobile phone are paired, the MAC address of the paired bluetooth device is stored in the bluetooth module a in the bluetooth headset, so that the bluetooth module a can determine the MAC address of the mobile phone based on the stored MAC address of the paired bluetooth device.
After the Bluetooth headset responds to the reconnection event, the Bluetooth headset needs to send a broadcast message to realize the reconnection process, wherein the broadcast message comprises the MAC address of the Bluetooth headset, and the Bluetooth module A can determine the MAC address of the Bluetooth headset based on the broadcast message.
It will be further appreciated that the bluetooth module a in the bluetooth headset may decide to send the broadcast channel of the broadcast message, for example, the bluetooth module a may use the broadcast channel 39 to send the broadcast message in the process of making a decision to connect back. And the bluetooth module a can decide to send the time node of the broadcast message, for example, the bluetooth headset and the mobile phone can synchronize clocks, and the bluetooth module a can decide to send the broadcast message in the 10 th millisecond. The bluetooth module a may determine the broadcast channel and the time node based on the determined broadcast channel and the time node.
In some embodiments, the bluetooth module a in the bluetooth headset may determine the broadcast channel and the time node in different broadcast periods, such as 39 in broadcast period 3, 10 ms in time node, 39 in broadcast period 4, and 1005 ms in time node shown in fig. 10 (a).
In some embodiments, for example, when the handset connects back to the bluetooth headset using the connection method shown in fig. 11, step 902 may not need to determine the broadcast channel of the broadcast message sent by the bluetooth headset.
In step 903, the bluetooth module a sends the MAC address of the bluetooth headset, the MAC address of the paired handset, the broadcast channel of the broadcast message sent by the bluetooth headset, and the time node of the broadcast message sent by the bluetooth headset to the low-power wake-up sending module.
It should be appreciated that the low power wake-up transmission module may be a separate chip, may be a part of a chip (e.g., the low power wake-up transmission module may be integrated in the bluetooth module a of the bluetooth device shown in fig. 12), etc. The embodiment of the application is illustrated by using the low-power consumption wake-up receiving module and the Bluetooth module A as two independent components.
In some embodiments, for example, when the mobile phone connects back to the bluetooth headset by using the connection method shown in fig. 11, in step 903, the bluetooth module a does not need to send a broadcast channel of the broadcast message sent by the bluetooth headset to the low energy wake-up sending module.
In step 904, the bluetooth module a sends the broadcast message through the determined broadcast channel for sending the broadcast message at the determined time node for sending the broadcast message.
It should be understood that the bluetooth module a may send the broadcast message on the broadcast channel of the bluetooth headset sending the broadcast message and on the time node of the bluetooth headset sending the broadcast message determined in step 903. For example, bluetooth module a may send a broadcast message over broadcast channel 39 at 10 ms as shown in fig. 9. For another example, the bluetooth module a may transmit the broadcast message through the broadcast channel 39 at 10 th ms shown in (a) of fig. 10, and then transmit the broadcast message through the broadcast channel 39 at 1005 ms. For another example, bluetooth module a may send a broadcast message over broadcast channel 39 at 10 ms shown in fig. 10 (b), followed by a broadcast message over broadcast channel 38 at 1005 ms.
In some embodiments, the bluetooth module a may send the broadcast message in the broadcast channels 37, 38, and 39 sequentially at the time node at which the bluetooth headset sends the broadcast message determined in step 903, where the order of the broadcast channels is random. For example, bluetooth module a may send broadcast messages in broadcast channels 37, 38, and 39 in sequence at 10 ms as shown in fig. 11. For another example, bluetooth module a may send broadcast messages in broadcast channels 39, 38, and 37 in turn at 1005 th millisecond shown in fig. 11.
It should also be understood that the broadcast message includes the time node of the bluetooth headset sending the broadcast message determined in step 903, and so on. In some embodiments, the broadcast message further includes a broadcast channel of the bluetooth headset for sending the broadcast message, which is determined in step 904.
For example, the format of the broadcast message may be referred to in table 1:
the Preamble (Preamble) is used for synchronization timing, and may be 0×55 or 0×aa, and is determined by the first bit of the access address. The preamble is 0x 55 if the first bit of the access address is "0", and 0x AA if the first bit of the access address is "1". In the broadcast message, this byte is 0×55.
The access address (ACCESS ADDRESS) is used to avoid interference to the communicating bluetooth device and electronic device when the devices are operating at the same frequency at a time. It should be appreciated that in wireless communications, two devices need to tune to the same frequency channel to communicate, but sometimes there may be many devices in use, so that there is a high probability that the devices tune to the same frequency channel, and so ACCESS ADDRESS is designed to avoid interference caused by the devices operating at the same frequency at a time. For example, when a broadcaster sends a broadcast message, its ACCESS ADDRESS is 0x8E89BED8, then after the scanner scans the broadcast message, the scanner also uses ACCESS ADDRESS of this 0x8E89BED8 to communicate with the broadcaster, and if the scanner scans the broadcast message of another device, another scanner uses ACCESS ADDRESS to communicate with the broadcaster, so as to ensure that the double transmission of the communication is not disturbed.
Protocol data units (Protocol Data Unit, PDUs) refer to units of data that are communicated between peer levels. The PDU includes the MAC address of the bluetooth headset determined in step 903, and the like.
A check code (Cyclic Redundancy Check, CRC) is used to increase the accuracy of the data received by the receiver. For example, the method is used for improving the accuracy of the broadcast message received by the low-power consumption wake-up receiving module.
In step 905, the low power consumption wake-up transmitting module generates a wake-up signal based on the MAC address of the bluetooth headset, the MAC address of the paired mobile phone, the broadcast channel of the bluetooth headset transmitting the broadcast message, and the time node of the bluetooth headset transmitting the broadcast message after receiving the MAC address of the bluetooth headset, the MAC address of the paired mobile phone, the broadcast channel of the bluetooth headset transmitting the broadcast message, and the time node of the bluetooth headset transmitting the broadcast message.
It should be understood that, the meanings of the MAC address of the bluetooth headset, the MAC address of the paired mobile phone, the broadcast channel of the broadcast message sent by the bluetooth headset, and the time node of the broadcast message sent by the bluetooth headset are already set forth in the above embodiments, and are not repeated herein.
The wake-up signal also includes a preamble. The preamble is used to synchronize clocks or the like between a sender (such as a bluetooth low energy wakeup send module) and a receiver (such as a bluetooth low energy wakeup receive module). The preamble typically includes 5 bytes. In the implementation, when the low-power-consumption Bluetooth awakening transmitting module transmits an awakening signal to the low-power-consumption Bluetooth awakening receiving module, the awakening signal comprises a preamble, and when the low-power-consumption Bluetooth awakening receiving module receives the awakening signal, the low-power-consumption Bluetooth awakening transmitting module can adjust a byte clock according to protocol rules to prepare to receive data transmitted by the low-power-consumption Bluetooth awakening transmitting module.
It should also be appreciated that the wake-up signal also includes a check code. The check code is used for improving the accuracy of the data received by the low-power consumption wake-up receiving module. It should be understood that during the transmission process, a bit error may be generated (the original 0 is changed to 1, and the original 1 is changed to 0) due to a transmission medium fault or external interference, so that a receiving party (such as a low-power consumption wake-up receiving module) receives the erroneous data. In order to improve the accuracy of the received data as much as possible, it is necessary to detect errors in the data before receiving the data, and only when the detected result is correct, the data is received. There are various ways of error detection, and common examples are parity check, summation check, cyclic redundancy check (Cyclic Redundancy Check, CRC) check, etc. The embodiment of the application does not limit the error detection method. In the implementation, the low-power consumption wake-up transmitting module can calculate the check code according to a certain algorithm on the data, transmit the check code and the data to the low-power consumption wake-up receiving module together, and then the low-power consumption wake-up receiving module performs check to determine whether the data changes or not.
For example, the format of the wake-up signal generated by the low power wake-up transmission module may refer to table 2:
In some embodiments, for example, when the handset connects back to the bluetooth headset using the connection method shown in fig. 11, the wake-up signal determined in step 905 does not include the broadcast channel of the broadcast message sent by the bluetooth device.
In some embodiments, the low power wake-up sending module may further encode a MAC address of the bluetooth device, a MAC address of the electronic device, a broadcast channel on which the broadcast message is sent, and a time node on which the broadcast message is sent. The embodiment of the application does not limit the coding mode.
In step 906, the low power consumption wake-up transmitting module transmits a wake-up signal to the low power consumption wake-up receiving module.
In step 907, after the low power consumption wake-up receiving module monitors the wake-up signal, the MAC address of the bluetooth headset, the broadcast channel of the broadcast message sent by the bluetooth headset, and the time node of the broadcast message sent by the bluetooth headset are obtained based on the wake-up signal.
In an exemplary implementation, after the low-power wake-up receiving module monitors the wake-up signal, it is first determined whether the wake-up signal includes a preamble. And the low-power consumption wake-up receiving module receives data after the preamble in the wake-up signal under the condition that the wake-up signal comprises the preamble. And then, the low-power consumption wake-up receiving module checks the wake-up signal according to the received check code to determine whether the wake-up signal is changed in transmission. The low power consumption wake-up receiving module can be checked by parity check, summation check, CRC check and other modes, and the embodiment of the application is not limited to the above. Finally, after the low-power consumption wake-up receiving module passes the verification, the MAC address of the Bluetooth headset, the broadcast channel of the broadcast message sent by the Bluetooth headset and the time node of the broadcast message sent by the Bluetooth headset, which are included in the wake-up signal, can be obtained.
In some embodiments, for example, when the mobile phone performs a reconnection with the bluetooth headset by using the reconnection method shown in fig. 11, after the low power consumption wake-up receiving module passes the verification, the MAC address of the bluetooth headset included in the wake-up signal and the time node of the bluetooth headset for sending the broadcast message may be obtained.
In step 908, the low power consumption wake-up receiving module sends the MAC address of the bluetooth headset, the broadcast channel of the broadcast message sent by the bluetooth headset, and the time node of the broadcast message sent by the bluetooth headset to the bluetooth module B in the mobile phone.
In some embodiments, for example, when the mobile phone connects back to the bluetooth headset by using the connection method shown in fig. 11, the low power wake-up receiving module sends the MAC address of the bluetooth headset and the time node of the broadcast message sent by the bluetooth headset to the bluetooth module B in the mobile phone through step 908.
In step 909, the bluetooth module B sends a scan request to the bluetooth headset based on the time node of the bluetooth headset sending the broadcast message and the MAC address of the bluetooth headset, so as to scan the broadcast channel of the bluetooth headset sending the broadcast message.
In implementation, for example, referring to fig. 9, assuming that a broadcast channel of a broadcast message sent by a bluetooth headset included in a wake-up signal is a broadcast channel 39, and a time node of the bluetooth headset sending the broadcast message is 10 ms, a bluetooth module B in the mobile phone may scan the broadcast channel 39 of the bluetooth headset based on a MAC address of the bluetooth headset at 10 ms, or at a time node of a 10 ms accessory, such as 9 ms, etc. Based on the above mode, the bluetooth module B can rapidly scan the broadcast message sent by the bluetooth headset.
For another example, referring to fig. 10 (a), assuming that the wake-up signal includes a broadcast channel 39 in which the bluetooth headset transmits a broadcast message in broadcast period 3 and broadcast period 4, the bluetooth headset transmits the broadcast message in broadcast period 3 has a 10 th millisecond time node, and the bluetooth headset transmits the broadcast message in broadcast period 4 has a 1005 th millisecond time node, then the bluetooth module B in the mobile phone may scan the broadcast channel 39 of the bluetooth headset at the 10 th millisecond time based on the MAC address of the bluetooth headset. Under the condition that the Bluetooth module B does not scan the broadcast message based on the mode, the broadcast channel 39 of the Bluetooth headset can be scanned based on the MAC address of the Bluetooth headset in 1005 milliseconds until the broadcast message is scanned.
For another example, referring to fig. 11, assuming that the wake-up signal includes 10 th ms of a time node of the bluetooth headset transmitting the broadcast message in the broadcast period 3 and 1005 th ms of a time node of the bluetooth headset transmitting the broadcast message in the broadcast period 4, the bluetooth module B in the mobile phone may scan any one of the broadcast channels 37, 38 or 38 of the bluetooth headset at 10 th ms based on the MAC address of the bluetooth headset. In the case that the bluetooth module B does not scan the broadcast message based on the above manner, the bluetooth module B may rapidly scan the broadcast message sent by the bluetooth headset based on any one of the broadcast channels 37, 38 or 38 of the bluetooth headset in 1005 ms until the broadcast message is scanned.
In step 910, after the bluetooth module B scans the broadcast message, a connection request is sent to the bluetooth module a, so that the mobile phone and the bluetooth headset are connected back.
It should be appreciated that the connection request is used to instruct the bluetooth device and the electronic device to connect back.
In an implementation, after the bluetooth module B scans the broadcast message, the bluetooth module B sends a connection request (e.g., connect_req request) to the bluetooth headset, where the request carries parameters that can determine the subsequent "communication timing", such as at which point in time, which channel the two parties send and receive data, and so on. After sending out a connection request, the bluetooth module B in the mobile phone automatically changes into a connection state, and becomes a role of the host device. Similarly, the bluetooth headset automatically changes to a connected state after receiving the connect_req request, and becomes a role of the slave device. After that, the two parties switch to a certain channel to send and receive data until the connection is disconnected according to the convention given by the CONNECT_REQ parameter.
It should be further understood that the size of the sequence numbers from step 904 to step 908 does not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application. For example, step 904 may be performed after any of steps subsequent to step 903 and prior to step 909, as the application is not limited in this regard.
The above embodiment describes a method for connecting back devices with reference to fig. 9 to 12, and the host device is one. The following embodiments describe an implementation manner of the device reconnection method provided by the embodiments of the present application when there are multiple host devices. It should be noted that, in the embodiment of the present application, the host devices are all devices that are connected in pairs with the slave devices.
Referring to fig. 13, fig. 13 is a schematic flow chart of a mobile phone and a bluetooth device connected in parallel according to an embodiment of the present application. Steps 1310 through 1330 are included in fig. 13.
In step 1310, the plurality of electronic devices respectively calculate signal strengths (RECEIVED SIGNAL STRENGTH Indication, RSSI) of the wake-up signals received by the plurality of electronic devices.
It should be understood that the signal strength of the wake-up signal is a measure for measuring the strength of the wake-up signal, and generally, the closer the electronic device is to the bluetooth device, the larger the value of the signal strength of the wake-up signal, and the further the electronic device is from the bluetooth device, the smaller the value of the signal strength of the wake-up signal.
It should also be appreciated that each electronic device may calculate RSSI by the following equation:
where n is an environmental attenuation factor, d is a distance between the electronic device and the bluetooth device, and a is a transmitting power of the low-power bluetooth wakeup transmitting module in the electronic device.
In step 1320, each of the plurality of electronic devices determines a scanning timing sequence of scanning the bluetooth device by the respective electronic device according to the signal strength of the respective wake-up signal and the correspondence 1.
It should be understood that the correspondence 1 refers to a correspondence between a numerical range of signal intensities of a plurality of wake-up signals and a plurality of scan windows, where a numerical range of signal intensities of one wake-up signal corresponds to one scan window. For example, please refer to fig. 14, fig. 14 is a schematic diagram of another handset connected back to a bluetooth device according to an embodiment of the present application. In fig. 14, it is assumed that a plurality of host devices including an electronic device a, an electronic device B, and an electronic device C each provided with a plurality of scanning windows for defining a duration of scanning of the electronic device. For example, each electronic device sets a scan window a, a scan window B, and a scan window C. Wherein, the scanning window A, the scanning window B and the scanning window C are arranged according to a time sequence, the scanning time sequence of the scanning window A is earlier than the scanning time sequence of the scanning window B, and the scanning time sequence of the scanning window B is earlier than the scanning time sequence of the scanning window C. For example, the duration of the scanning window a of the electronic device a shown in fig. 14 is 10 th to 30 th milliseconds, the duration of the scanning window B is 40 th to 60 th milliseconds, and the duration of the scanning window C is 70 th millisecond and 90 th millisecond. Correspondence 1 can be referred to the following table 3:
Wherein the minimum value of the numerical range 1 is larger than the maximum value of the numerical range 2, and the minimum value of the numerical range 2 is larger than the maximum value of the numerical range 3.
In an implementation, the process of determining the scanning time sequence of the respective electronic device for scanning the bluetooth device may be: assuming that the signal strength of the wake-up signal calculated by the electronic device a is within the numerical range 1, it can be determined that the electronic device a scans the bluetooth device through the scanning window a after receiving the wake-up signal according to the numerical range and the table 3. The signal intensity of the wake-up signal calculated by the electronic device B is within the numerical range 2, and according to the numerical range and table 3, it can be determined that the electronic device B scans the bluetooth device through the scanning window B after receiving the wake-up signal. The signal intensity of the wake-up signal calculated by the electronic device C is within the numerical range 3, and according to the numerical range and table 3, it can be determined that the electronic device C scans the bluetooth device through the scanning window C after receiving the wake-up signal. Because the scanning time sequence of the scanning window A is earlier than the scanning time sequence of the scanning window B, the scanning time sequence of the scanning window B is earlier than the scanning time sequence of the scanning window C, and therefore, the determined scanning time sequence is that the electronic equipment A firstly scans through the scanning window A, then the electronic equipment B scans through the scanning window B, and finally the electronic equipment C scans through the scanning window C.
In step 1330, the respective electronic devices scan the broadcast channel of the broadcast message sent by the bluetooth device based on the respective scan timing sequence, the time node of the broadcast message sent by the bluetooth device and the MAC address of the bluetooth device included in the wake-up signal, so as to connect the electronic device back to the bluetooth device.
In fig. 14, for example, since the electronic device a scans through the scanning window a, the electronic device a may scan the broadcasting channel 39 of the bluetooth device to send the broadcast message through the scanning window a at 10 th ms, and in the case of scanning the broadcast message, the electronic device a may send a connection request to the bluetooth device through the broadcasting channel 39, so that the electronic device a is successfully connected back to the bluetooth device. After the electronic device a scans the broadcast message through the scanning window a, the electronic device B does not need to scan the broadcast channel 39 of the bluetooth device through the scanning window B, and the electronic device C does not need to scan the broadcast channel 39 of the bluetooth device through the scanning window C.
Under the condition that the electronic device A does not scan the broadcast message, the electronic device B scans a broadcast channel 39 of the Bluetooth device to send the broadcast message through the scanning window B, and under the condition that the broadcast message is scanned, the electronic device B can send a connection request to the Bluetooth device through the broadcast channel 39 so as to enable the electronic device B to be successfully connected back to the Bluetooth device. After the electronic device B scans the broadcast message through the scanning window B, the electronic device C does not need to scan the broadcast channel 39 of the bluetooth device through the scanning window C. Under the condition that the electronic device B does not scan the broadcast message, the electronic device C scans a broadcast channel 39 of the broadcast message sent by the Bluetooth device through the scanning window C, and under the condition that the broadcast message is scanned, the electronic device C can send a connection request to the Bluetooth device through the broadcast channel 39 so as to enable the electronic device C to be successfully connected with the Bluetooth device.
Under the condition that the broadcast message is not scanned by the electronic device a, the electronic device B and the electronic device C, the electronic devices re-execute the steps 1310 to 1330 until one of the electronic device a, the electronic device B and the electronic device C scans the broadcast message, and the electronic device and the bluetooth headset are successfully connected back.
In some embodiments, the distances between the plurality of electronic devices may be relatively close, so the scan timings of the plurality of electronic devices for scanning the bluetooth device determined by the plurality of electronic devices according to the signal strengths of the respective wake-up signals and the corresponding relation 1 are the same, and then the plurality of electronic devices may scan the bluetooth device using the same scan window, which electronic device reestablishes connection with the bluetooth device first, and the other electronic devices stop scanning. For example, in fig. 14, according to the signal intensity of the wake-up signal and the corresponding relation 1, the electronic device a and the electronic device B determine the scanning time sequence to scan through the scanning window a, so that the electronic device a and the electronic device B scan through the scanning window a at the same time, and if the electronic device a reestablishes connection with the bluetooth device first, the electronic device B stops scanning.
In the related scheme, in the process of connecting the bluetooth device and the plurality of electronic devices back, it is assumed that the distances between the plurality of electronic devices and the bluetooth device are different, for example, the plurality of electronic devices may be an electronic device a and an electronic device B (the electronic device a and the electronic device B are devices that are already paired with the bluetooth device), the distance between the electronic device a and the bluetooth device is relatively close to the distance between the electronic device B and the bluetooth device B, after the bluetooth device is disconnected from the electronic device a and the electronic device B, the user wants the bluetooth device to reestablish a connection with the electronic device a close to the bluetooth device, but in the related scheme, the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device and the like have relatively strong randomness, so that the bluetooth device may reestablish a connection with the electronic device B far from the electronic device, but not reestablish a connection with the electronic device a close to the electronic device B, for example, the bluetooth device B just scans the broadcasting channel 39, and the electronic device B close to the broadcasting channel 39 is not reestablished from the device a close to the electronic device a. In this way, the electronic device that reestablishes connection with the bluetooth device may not be the target device that the user wants to connect to (the target device may be an electronic device that is closer to the bluetooth device), reducing the user experience.
In the embodiment of the application, after receiving the wake-up signals, each electronic device calculates the signal intensity of the wake-up signal received by each electronic device, and then each electronic device determines the scanning time sequence of the respective electronic device for scanning the bluetooth device according to the signal intensity of the wake-up signal and the corresponding relation between the numerical range of the signal intensity of the wake-up signals and the scanning windows. Based on the correspondence, the greater the value of the signal strength, the more forward the scanning timing of the bluetooth device by the electronic device, and the signal strength is related to the distance between the electronic device and the bluetooth device, and the greater the distance, the greater the value of the signal strength, and the smaller the value of the signal strength, and thus the more forward the scanning timing of the bluetooth device by the electronic device, the more rearward the scanning timing of the bluetooth device by the electronic device. Therefore, when a user wants that the Bluetooth device is connected with an electronic device (target device) close to the Bluetooth device, the target device can scan the electronic device at first, and because the wake-up signal comprises a time node for sending a broadcast message by the Bluetooth device and/or a broadcast channel for sending a broadcast message by the Bluetooth device, the target device can scan the Bluetooth device at the time node for sending the broadcast message by the Bluetooth device, or the target device can scan the broadcast channel for sending the broadcast message by the Bluetooth device at the time node for sending the broadcast message by the Bluetooth device, so that the Bluetooth device can be accurately reestablished with the target device, and because the electronic device scans the Bluetooth device at the fixed time node and/or the broadcast channel, the broadcast message sent by the Bluetooth device can be scanned quickly, thereby reducing the connection time of the electronic device and the Bluetooth device, and improving the user experience.
The following embodiments describe another implementation manner of the device reconnection method provided by the embodiment of the present application when there are a plurality of host devices. It should be noted that, in the embodiment of the present application, the host devices are all devices that are connected in pairs with the slave devices.
Referring to fig. 15, fig. 15 is a schematic flowchart of another connection between a bluetooth device and an electronic device according to an embodiment of the present application. Including steps 1410 through 1430.
In step 1410, after the bluetooth device receives the wake-up signal, the plurality of bluetooth devices each send a scan request to the bluetooth device based on the wake-up signal.
Based on the above implementation, in some embodiments, the wake-up signal includes a time node and a broadcast channel for the bluetooth device to send the broadcast message, and then, after the bluetooth device receives the wake-up signal, the bluetooth devices are in a scanning mode, and the broadcast channel for the bluetooth device to send the broadcast message can be scanned at the time node for the bluetooth device to send the broadcast message.
In other embodiments, the wake-up signal includes a time node for the bluetooth device to send the broadcast message, and then, after the bluetooth device receives the wake-up signal, the bluetooth devices scan the bluetooth device at the time node for the bluetooth device to send the broadcast message.
In step 1420, the bluetooth device sends the directional broadcast message 1 through the broadcast channel in which the bluetooth device sends the broadcast message at the time node in which the bluetooth device sends the broadcast message.
It should be understood that the directional broadcast message refers to a broadcast message including the MAC address of the electronic device, and the non-directional broadcast message refers to a broadcast message not including the MAC address of the electronic device.
The difference between the directional broadcast message and the non-directional broadcast message is that please refer to table 1, the protocol data unit of the directional broadcast message includes the MAC address of the electronic device and the MAC address of the bluetooth device, and the protocol data unit of the non-directional broadcast message includes the MAC address of the bluetooth device only.
It should also be understood that, in the directional broadcast packet, the MAC address of the electronic device is typically the MAC address of the electronic device that has been connected to the bluetooth device last time, and for convenience of description, the electronic device that has been connected to the bluetooth device last time will be referred to as the electronic device 1, and the directional broadcast packet that includes the MAC address of the electronic device 1 will be referred to as the directional broadcast packet 1.
In some embodiments, the wake-up signal does not include a broadcast channel for the bluetooth device to send a broadcast message, so step 1420 may also send a directional broadcast message 1 for the bluetooth device at the time node when the bluetooth device sent the broadcast message.
In step 1430, the electronic device 1 scans the bluetooth device based on the time node at which the bluetooth device sends the broadcast message and/or the broadcast channel at which the bluetooth device sends the broadcast message, and sends a connection request to the bluetooth device when the electronic device 1 scans the directional broadcast message 1, so that the electronic device 1 and the bluetooth device are connected back.
It should be understood that, when the electronic device 1 scans the directional broadcast message 1, a connection request is sent to the bluetooth device, so that the implementation manner of connecting the electronic device 1 and the bluetooth device back may refer to the implementation manner of connecting the mobile phone and the bluetooth headset back by sending the connection request to the bluetooth module a after the bluetooth module B in the above embodiment scans the broadcast message, which is not described herein. For example, please refer to fig. 16, fig. 16 is an exemplary diagram of a connection between an electronic device and a bluetooth device according to an embodiment of the present application. As shown in fig. 16 (a), the wake-up signal includes a time node, for example, 10 th millisecond, when the bluetooth device transmits the directional broadcast message 1. And the bluetooth device transmits a broadcast channel, such as broadcast channel 39, for directed broadcast message 1. After the electronic device 1 and the electronic device 2 receive the wake-up signal, the electronic device 1 and the electronic device 2 are both in a scanning mode, so that the bluetooth device can scan the bluetooth device, but because the bluetooth device sends the directional broadcast message 1 through the broadcast channel 39, the electronic device 1 can scan the directional broadcast message 1 through the broadcast channel 39 in the 10 th millisecond, the electronic device 2 does not scan the directional broadcast message 1, and under the condition that the electronic device 1 scans the directional broadcast message 1, the electronic device 1 sends a connection request to the bluetooth device, so that the electronic device 1 and the bluetooth device are connected back.
In some embodiments, the electronic device 1 may not scan the directional broadcast message 1 due to a long distance between the electronic device 1 and the bluetooth device, signal interference when the electronic device 1 scans, and the like, at this time, the bluetooth device may not receive a connection request of the electronic device 1, and in a case that the bluetooth device does not receive the connection request of the electronic device 1, the bluetooth device may send the directional broadcast message 2, where the directional broadcast message 2 includes a MAC address of the electronic device 2, and the electronic device 2 scans the bluetooth device based on a time node when the bluetooth device sends the broadcast message and/or a broadcast channel when the bluetooth device sends the broadcast message, and in a case that the electronic device 2 scans the directional broadcast message 2, sends the connection request to the bluetooth device, so as to connect the electronic device 2 and the bluetooth device back.
It should be understood that the electronic device 2 refers to one electronic device other than the electronic device 1 among a plurality of electronic devices connected to the bluetooth device. For example, when the bluetooth headset is connected to a mobile phone, a computer and a tablet, and the device that is connected to the bluetooth device last time is the mobile phone, the mobile phone may be referred to as an electronic device 1, and the computer and the tablet may be referred to as an electronic device 2.
Illustratively, as shown in (b) of fig. 16, the wake-up signal includes a time node, such as 10 th millisecond or 90 th millisecond, when the bluetooth device transmits the directional broadcast message 1. And the bluetooth device transmits a broadcast channel, such as broadcast channel 39, for directed broadcast message 1. It should be noted that, broadcast channels corresponding to different time nodes included in the wake-up information may be the same or different, which is not limited in this embodiment, and the embodiment of the present application is illustrated by using the broadcast channels corresponding to different time nodes to be the same. After the electronic device 1 and the electronic device 2 receive the wake-up signal, the electronic device 1 and the electronic device 2 are both in a scanning mode, so that the bluetooth device can scan the bluetooth device, and the bluetooth device can firstly send the directional broadcast message 1 through the broadcast channel 39 in the 10 th millisecond, but the electronic device 1 can not scan the directional broadcast message 1 due to the long distance between the electronic device 1 and the bluetooth device, signal interference existing when the electronic device 1 scans, and the like, and the electronic device 2 can not scan the directional broadcast message 1 because the directional broadcast message 1 is a broadcast message sent to the electronic device 1. At this time, the bluetooth device may send the directional broadcast message 2 through the broadcast channel 39 at 90 ms, both the electronic device 1 and the electronic device 2 may scan the broadcast channel 39 at 90 ms, and since the directional broadcast message 2 is a broadcast message sent to the electronic device 2 in a directional manner, the electronic device 1 cannot scan the directional broadcast message 2 when the electronic device 1 scans at 90 ms, the electronic device 2 may scan the broadcast channel 39 of the bluetooth device at 90 ms, and in the case that the electronic device 2 scans the directional broadcast message 2, the electronic device 2 sends a connection request to the bluetooth device, so as to connect the electronic device 2 and the bluetooth device back.
In some embodiments, when the multiple electronic devices connected to the bluetooth device do not scan the directional broadcast message in the manner of sending the directional broadcast message by the bluetooth device, step 1420 and step 1430 are re-executed until one electronic device scans the directional broadcast message in the multiple electronic devices connected to the bluetooth device, and the multiple electronic devices are successfully connected back to the bluetooth device.
In one scenario, during the process that a user is using the bluetooth device, the bluetooth device is disconnected from the electronic device due to the fact that the distance between the bluetooth device and the electronic device is too long, and the electronic device and the bluetooth device are interfered by interference signals during the process of exchanging data. For example, in the process that the user is talking by using the bluetooth headset, the bluetooth headset is disconnected from the mobile phone. Other electronic devices connected to bluetooth devices, such as tablets, notebook computers, etc., are also present in this scenario. For convenience of description, the electronic device that has been connected to the bluetooth device last time is referred to as the electronic device 1, for example, a mobile phone. The other electronic devices connected to the bluetooth device are referred to as electronic devices 2, such as tablet, notebook, etc. The user wants to re-establish the connection between the bluetooth device and the electronic device 1, but in the related connection scheme, because the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like have strong randomness, the bluetooth device may re-establish the connection with the electronic device 2, but not establish the connection with the electronic device 1. For example, the bluetooth device sends a broadcast message via broadcast channel 39, electronic device 2 just scans broadcast channel 39, and electronic device 1 scans broadcast channel 38, in which case the bluetooth device reestablishes a connection with electronic device 2 without electronic device 1 reestablishing a connection. In this way, the electronic device with which the bluetooth device re-establishes a connection may not be the electronic device 1 to which the user wants to connect, reducing the user experience.
In the embodiment of the application, the Bluetooth device can send the directional broadcast message, wherein the directional broadcast message comprises the MAC address of the electronic device 1, and after the electronic device 1 scans the directional broadcast message, the Bluetooth device can be connected with the electronic device 1 in a back way. The wake-up signal comprises a time node for the Bluetooth device to send the broadcast message and/or a broadcast channel for the Bluetooth device to send the broadcast message, and the electronic device 1 can scan the Bluetooth device based on the time node for the Bluetooth device to send the broadcast message and/or the broadcast channel for the Bluetooth device to send the broadcast message.
The above embodiments describe the method for connecting back devices with fig. 13 to 16, where the number of host devices is plural. The following embodiments describe the implementation of an electronic device that may automatically light a screen after the electronic device is reconnected to a bluetooth device.
Referring to fig. 17, fig. 17 is a schematic flowchart of an electronic device capable of automatically lighting a screen according to an embodiment of the present application. Including step 1510 and step 1520.
In step 1510, the electronic device authenticates the connected bluetooth device.
In an implementation, the electronic device may authenticate the connected-back bluetooth device by:
In the first authentication mode, the electronic device acquires the key of the bluetooth device and the key stored in the electronic device, and authenticates the returned bluetooth device through the key of the bluetooth device and the key stored in the electronic device. In the second authentication mode, the electronic device acquires the private key of the Bluetooth device and the public key stored in the electronic device, and authenticates the returned Bluetooth device through the private key of the Bluetooth device and the public key stored in the electronic device. And in a third authentication mode, the electronic equipment acquires the public key of the Bluetooth equipment and the private key stored in the electronic equipment, and authenticates the returned Bluetooth equipment through the public key of the Bluetooth equipment and the private key stored in the electronic equipment. The embodiment of the application can authenticate the returned Bluetooth equipment by the authentication mode, or combining the authentication modes and other authentication modes, and the embodiment of the application is not limited to the authentication mode.
In step 1520, the electronic device lights up the screen of the electronic device if the authentication passes.
In an implementation, in a case that the authentication is passed, the upper layer system (such as an application layer, a framework layer, and the like shown in fig. 3) of the electronic device sends a screen lighting instruction to the screen of the electronic device so as to light the screen of the electronic device.
In some embodiments, after the screen of the electronic device is lightened, the electronic device may also automatically unlock, pop up a popup window back in the main interface of the electronic device, and so on.
In the embodiment of the application, after the electronic equipment authenticates the returned Bluetooth equipment and the authentication is passed, the electronic equipment can light the screen of the electronic equipment so as to facilitate the subsequent operation of a user (for example, when the user needs to unlock the electronic equipment, the user does not need to execute the operation of lighting the screen and can directly execute the unlocking operation in the lighted screen), thereby improving the user experience.
The implementation process of the device reconnection method according to the embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 18, fig. 18 is a schematic flowchart of a method for reconnecting a device according to an embodiment of the present application. The method may be performed by the electronic device 100 shown in fig. 2, or may be performed by a processor or a chip in the electronic device 100, and embodiments of the present application are not limited in any way. For convenience of description, the method will be described in detail by taking an electronic device as an example. The method includes steps 1610 to 1630.
In step 1610, the first electronic device receives a wake-up signal sent by the second electronic device in response to the connection-back event.
It should be understood that the first electronic device may be the electronic device 100 shown in fig. 2, the second electronic device may be the bluetooth device 200 shown in fig. 4, the first electronic device may be a mobile phone, a tablet, etc., the second electronic device may be a bluetooth headset, a bluetooth bracelet, etc., and the types of the first electronic device and the second electronic device are not limited in the embodiments of the present application.
In the embodiment of the present application, the first electronic device and the second electronic device establish the over-connection, and the over-connection may be that the first electronic device and the second electronic device establish the connection for the first time or establish the connection again, which is not limited in the embodiment of the present application. Reference may be made to the above embodiments for the meaning of first establishing a connection and re-establishing a connection, which will not be repeated here.
It should be further understood that the back connection event is used to instruct the first electronic device and the second electronic device to connect back, and the back connection event may be that the user clicks or slides the button 331 in the interface 330 shown in (c 1) in fig. 6, so that the button 331 of the bluetooth switch is in an on state, or the user clicks the icon 421 in the interface 420 shown in (b 1) in fig. 7, so that the icon 421 of the bluetooth switch is in an on state, and then the user opens the charging box of the bluetooth headset or the user brings the bluetooth headset close to the mobile phone, etc. The loop event may also be a user clicking on control 521 shown in fig. 8. In the case where the bluetooth device is another device, such as a wearable device, the reconnection event may also be a user restarting the wearable device, the wearable device automatically restarting after power down, etc. In the case where the bluetooth device and the electronic device both include NFC modules, the reconnection event may also be that the user touches the bluetooth device to the electronic device, etc. When the two-dimensional code capable of being scanned and connected is configured in the Bluetooth device, the reconnection event can be that a user scans the two-dimensional code in the Bluetooth device through the electronic device, and the type of the reconnection event is not limited in the embodiment of the application.
It may be appreciated that the wake-up signal includes a first time node at which the second electronic device transmits the targeted broadcast message. Illustratively, the first time node may refer to 10 th millisecond shown in (a) of fig. 10, and the second electronic device may transmit the target broadcast message at 10 th millisecond.
In an implementation, the first electronic device may continuously monitor the wake-up signal, and in the case that a callback event occurs, the second electronic device may send the wake-up signal, and the first electronic device may monitor the wake-up signal, so that the wake-up signal may be received.
In step 1620, the first electronic device scans the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal.
For example, referring to fig. 9, assuming that the first time node in the wake-up signal including the bluetooth device transmitting the target broadcast message is 10 ms, the first electronic device may scan the target message transmitted by the bluetooth device at the 10 th ms.
Step 1630, the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned, so that the first electronic device and the second electronic device are connected back.
For example, after the first electronic device scans the target broadcast message, the first electronic device sends a connection request (for example, connect_req request) to the second electronic device, where the request carries parameters that can determine the subsequent "communication timing", for example, at which point in time, which channel the two parties send and receive data, and so on. After a connection request is sent out, the first electronic device automatically changes to a connection state and becomes a role of a host device. Similarly, the second electronic device also automatically changes to the connected state after receiving the connect_req request, and becomes a role of the slave device. After that, the two parties switch to a certain channel to send and receive data until the connection is disconnected according to the convention given by the CONNECT_REQ parameter.
In the related art, the first electronic device scans the random broadcast channel at the random time node, which results in that the second electronic device is connected back to the first electronic device to consume a long time, which affects the user experience. In the embodiment of the application, the wake-up signal received by the first electronic device comprises the first time node of the broadcast message sent by the second electronic device, and the first electronic device can scan based on the first time node of the broadcast message sent by the second electronic device, so that the first electronic device scans at the fixed time node, and compared with the related scheme that the first electronic device scans at the random time node, the first electronic device can rapidly scan the broadcast message sent by the second electronic device, so that the first electronic device is connected with the second electronic device, the connection time of the first electronic device and the second electronic device can be reduced, and the user experience is improved.
In some embodiments, the wake-up signal further includes a first broadcast channel for the second electronic device to send a target broadcast message; and the first electronic device scans the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, including:
The first electronic device scans a target broadcast message sent by the second electronic device based on a first time node and a first broadcast channel in the wake-up signal.
It should be appreciated that the first broadcast channel may be one of broadcast channels 37, 38 and 39, for example, the first broadcast channel may be broadcast channel 39.
For example, referring to fig. 9, assuming that the first time node in the wake-up signal including the bluetooth device transmitting the target broadcast message is 10 ms, the first broadcast channel included in the wake-up signal is broadcast channel 39, the first electronic device may scan the target message transmitted by the bluetooth device by scanning broadcast channel 39 in the 10 th ms.
In the embodiment of the application, the wake-up signal received by the first electronic device comprises the first time node and the first broadcast channel of the broadcast message sent by the second electronic device, and the first electronic device can scan based on the first time node and the first broadcast channel of the broadcast message sent by the second electronic device, so that the first electronic device scans at the fixed time node and the fixed broadcast channel, and compared with the related scheme that the first electronic device scans the random broadcast channel at the random time node, the first electronic device can rapidly scan the broadcast message sent by the second electronic device, so that the first electronic device is connected with the second electronic device in a back way, the connection time of the first electronic device and the second electronic device in a back way can be reduced, and the user experience is improved.
In some embodiments, the wake-up signal further includes a second time node at which the second electronic device sends the target broadcast message, the second time node being later than the first time node; and, the method further comprises:
Under the condition that the first electronic equipment does not scan the target broadcast message, scanning the target broadcast message sent by the second electronic equipment based on a second time node in the wake-up signal; and under the condition that the target broadcast message is scanned based on the second time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
For example, referring to fig. 10 (a), the first time node may be 10 ms, the second time node may be 1005 ms, the wake-up signal includes 10 ms and 1005 ms, the second electronic device may send the target broadcast message at 10 ms, the second electronic device may scan the message at 10 ms, during the scanning, the second electronic device may not scan the message due to signal interference and an excessive distance between the two devices, and in the case that the second electronic device does not scan the message, the first electronic device does not receive the connection request sent by the second electronic device, the second electronic device may send the target broadcast message again at 1005 ms, the first electronic device may scan again at 1005 ms, and in the case of scanning the message, send the connection request to the second electronic device.
According to the embodiment of the application, under the condition that the first electronic equipment does not scan the target broadcast message, the target broadcast message sent by the second electronic equipment is scanned based on the second time node in the wake-up signal; under the condition that the target broadcast message is scanned based on the second time node, a connection request is sent to the second electronic equipment, so that the first electronic equipment and the second electronic equipment are connected back, interference of signal interference and other reasons on the connection back can be reduced, reliability of the connection back of the first electronic equipment and the second electronic equipment is improved, and user experience is improved.
In some embodiments, the wake-up signal further includes a second time node at which the second electronic device transmits the target broadcast message, and a second broadcast channel at which the second electronic device transmits the target broadcast message, the second time node being later than the first time node; and, the method further comprises:
Under the condition that the first electronic equipment does not scan the target broadcast message, scanning the target broadcast message sent by the second electronic equipment based on a second time node and a second broadcast channel in the wake-up signal; and sending a connection request to the second electronic equipment under the condition that the target broadcast message is scanned based on the second time node and the second broadcast channel, so that the first electronic equipment and the second electronic equipment are connected back.
For example, referring to fig. 10 (a), the first time node may be 10 ms, the first broadcast channel may be broadcast channel 39, the second time node may be 1005 ms, the second broadcast channel may be broadcast channel 39, and the first broadcast channel and the second broadcast channel may be the same or different, which is described herein as the same example. The wake-up signal includes 10 ms, 1005 ms and a broadcast channel 39, at 10 ms, the second electronic device may send the target broadcast message through the broadcast channel 39, the second electronic device may scan the broadcast channel 39 at 10 ms, during the scanning, the second electronic device may not scan the message due to signal interference and too far distance between the two devices, in the case that the second electronic device does not scan the message, the first electronic device does not receive the connection request sent by the second electronic device, the second electronic device may send the target broadcast message again at 1005 ms through the broadcast channel 39, the first electronic device may scan the broadcast channel 39 again at 1005 ms, and in the case that the message is scanned, send the connection request to the second electronic device.
According to the embodiment of the application, under the condition that the first electronic equipment does not scan the target broadcast message, the target broadcast message sent by the second electronic equipment can be scanned based on the second time node and the second broadcast channel in the wake-up signal; under the condition that the target broadcast message is scanned based on the second time node and the second broadcast channel, a connection request is sent to the second electronic equipment, so that the first electronic equipment and the second electronic equipment are connected back, interference of signal interference and other reasons on the connection back can be reduced, reliability of the connection back of the first electronic equipment and the second electronic equipment is improved, and user experience is improved.
In some embodiments, the first electronic device scans, based on a first time node in the wake-up signal, a target broadcast message sent by the second electronic device, including:
The first electronic device scans a target broadcast message sent by the second electronic device in a target scanning window based on a first time node in a wake-up signal, wherein the first time node is a starting time node of a scanning period, the scanning period comprises a plurality of scanning windows, the target scanning window is one of the scanning windows, and the scanning windows are used for indicating a scanning time sequence of the first electronic device to the second electronic device.
Illustratively, the target scan window may be one of the scan windows A, B and C shown in fig. 14, and the first time node may be the 10 th millisecond shown in fig. 14. The scanning window refers to a duration of time that the first electronic device scans the second electronic device, and the scanning period includes a total duration of a plurality of scanning windows. In fig. 14, the scanning timing of the scanning window a precedes the scanning timing of the scanning window B, and the scanning timing of the scanning window B precedes the scanning timing of the scanning window a.
In implementation, after receiving the wake-up signal, the first electronic device may first determine a target scan window of the first electronic device (for example, the determined target scan window is a scan window a shown in fig. 14), where a manner of determining the target scan window of the first electronic device may be to determine the target scan window according to signal strength of the wake-up signal, where the stronger the signal strength is, the earlier the determined scan timing of the target scan window is, the earlier the value of the signal strength is, and the determined scan timing of the target scan window is the same. The determination may also be made according to a time sequence in which the first electronic device and the second electronic device are connected, where the first electronic device is the electronic device that has been connected to the second electronic device last time, and has the earliest scanning timing of the target scanning window (such as the scanning window a shown in fig. 14), and the first electronic device is the electronic device that has been connected to the second electronic device last time, and has the later scanning timing of the target scanning window (such as the scanning window B or the scanning window C shown in fig. 14).
After determining the target window, the first electronic device may scan the target broadcast message sent by the second electronic device in a target scan window of the first electronic device after the first time node (e.g., scan in a scan window a shown in fig. 14).
In a related scheme, for example, referring to fig. 1, when the electronic device performs scanning, the electronic device continuously performs scanning within a scanning window of a scanning period, so that power consumption of the electronic device may be increased.
In some embodiments, the first electronic device, after receiving the wake-up signal in response to the loopback event, the method further comprises:
The first electronic device determines the signal strength of the wake-up signal based on the wake-up signal; and determining a target scanning window based on the signal intensity of the wake-up signal and the corresponding relation, wherein the corresponding relation is the corresponding relation between a plurality of numerical ranges of the signal intensity and a plurality of scanning windows, one numerical range corresponds to one scanning window, and the numerical range of the signal intensity corresponding to the scanning window with the previous scanning time sequence in the plurality of scanning windows is larger than the numerical range of the signal intensity corresponding to the scanning window with the subsequent scanning time sequence.
It should be appreciated that, for implementation of determining the signal strength of the wake-up signal, reference may be made to the above embodiments, and will not be repeated here. The correspondence may be referred to in table 3 mentioned in the above embodiment, in table 3, the minimum value of the numerical range 1 is larger than the maximum value of the numerical range 2, the minimum value of the numerical range 2 is larger than the maximum value of the numerical range 3, the scanning timing of the scanning window a is larger than the scanning timing of the scanning window B, and the scanning timing of the scanning window B is larger than the scanning timing of the scanning window C.
In an implementation, assuming that the signal strength of the wake-up signal determined by the first electronic device based on the wake-up signal is in the numerical range 1 in table 3, the target scan window determined by the first electronic device is the scan window a.
According to the embodiment of the application, the first electronic device can accurately determine the target scanning window according to the signal intensity of the wake-up signal and the corresponding relation between the numerical range comprising a plurality of signal intensities and a plurality of scanning windows.
In some embodiments, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a first host device, the first host device being an electronic device corresponding to a smallest distance among a plurality of distances between the plurality of host devices and the second electronic device, wherein the first electronic device is the first host device, and the target scanning window is a scanning window with an earliest scanning timing among the plurality of scanning windows; or alternatively
The first electronic device is one of the plurality of host devices other than the first host device, and the target scanning window is one of the plurality of scanning windows other than the scanning window whose scanning timing is earliest.
It should be appreciated that the explanation with respect to the host device may refer to the above embodiments. In an application scenario using bluetooth technology, if a second electronic device is connected to a plurality of host devices, because the signal strength of the wake-up signal is related to the distance between the electronic device and the bluetooth device, the closer the distance between the electronic device and the bluetooth device is, the larger the value of the signal strength of the wake-up signal is, and the farther the distance between the electronic device and the bluetooth device is, the smaller the value of the signal strength of the wake-up signal is, so when the first electronic device is an electronic device corresponding to the smallest distance between the plurality of host devices and the second electronic device, the value of the signal strength of the wake-up signal received by the first electronic device is the largest, and according to the signal strength of the wake-up signal of the first electronic device and the correspondence in table 3, the determined target scan window is the earliest scan window (for example, the determined target scan window is the scan window a shown in fig. 14), then the first electronic device may scan the second electronic device based on the first time node (10 ms shown in fig. 14) and the target scan window a, so that the first electronic device nearest to the second electronic device is connected to the second electronic device.
In some cases, the first electronic device is one device (the first electronic device is not the electronic device closest to the second electronic device) other than the first host device among the plurality of host devices, then the first electronic device determines that the target scanning window is not the scanning window with the earliest scanning time sequence among the plurality of scanning windows (for example, the determined target scanning window is the scanning window B or C shown in fig. 14) according to the signal strength of the wake-up signal of the first electronic device and the correspondence relation in the table 3, then the first host device (closest to the second electronic device) scans the second electronic device based on the first time node and the scanning window a, and because of signal interference and the like, and in the case that the first host device does not scan the broadcast message, the first electronic device scans the second electronic device based on the first time node and the target scanning window (for example, the scanning window B or C shown in fig. 14) so as to connect the first electronic device and the second electronic device back.
In the related scheme, in the process of connecting back the bluetooth device and the plurality of electronic devices, it is assumed that the distances between the plurality of electronic devices and the bluetooth device are different, for example, the plurality of electronic devices may be an electronic device a and an electronic device B, the distance between the electronic device a and the bluetooth device is relatively close to the distance between the electronic device B and the bluetooth device, after the bluetooth device is disconnected from the electronic device a and the electronic device B, the user wants the bluetooth device to reestablish connection with the electronic device a close to the bluetooth device, however, in the related scheme, because of the relatively strong randomness of the broadcasting period of the bluetooth device, the broadcasting channel of the bluetooth device sent by the broadcasting message, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like, the bluetooth device may reestablish connection with the electronic device B far from the distance, but not reestablish connection with the electronic device a near from the distance, for example, the bluetooth device sends the broadcasting message through the broadcasting channel 39, the electronic device B far from the broadcasting channel is scanned by the electronic device a just near electronic device a scans the broadcasting channel 38, and in this case, the bluetooth device B is reestablished with the electronic device a near distance. In this way, the electronic device that reestablishes connection with the bluetooth device may not be the target device that the user wants to connect to (the target device may be an electronic device that is closer to the bluetooth device), reducing the user experience.
In the embodiment of the application, when the first electronic device is the electronic device corresponding to the minimum distance in the distances between the plurality of host devices and the second electronic device, the target scanning window is the scanning window with the earliest scanning time sequence in the plurality of scanning windows, and the first electronic device can scan the second electronic device based on the first time node and the target scanning window, so that the second electronic device can be accurately and quickly newly established to be connected with the first electronic device closest to the second electronic device in the plurality of host devices, and the user experience is improved.
In addition, when the first electronic device is not the electronic device corresponding to the smallest distance among the distances between the plurality of host devices and the second electronic device, the target scanning window is one scanning window except the scanning window with the earliest scanning time sequence among the plurality of scanning windows, and when the electronic device closest to the second electronic device among the plurality of host devices is not successfully connected with the second electronic device due to signal interference and other reasons, the first electronic device can be connected with the second electronic device based on the first time node and the target scanning window, so that the reliability of the second electronic device reconnection is ensured.
In some embodiments, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including the second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein the first electronic device is the second host device, and the targeted broadcast message includes an identifier of the first electronic device.
It should be appreciated that the second host device being the electronic device of the plurality of host devices that has established a connection with the second electronic device at the latest may be understood as the second host device being the electronic device that has been connected with the second electronic device by the last pairing. The identifier of the electronic device may be a MAC address of the electronic device.
In implementation, in the case where the application scenario using bluetooth technology includes multiple host devices, the second electronic device may send a directional broadcast packet at the first time node (for example, the directional broadcast packet may be a target broadcast packet including the MAC address of the first electronic device), the multiple host devices may scan the second electronic device based on the first time node (for example, the electronic device 1 and the electronic device 2 shown in (a) of fig. 16 may each scan at 10 ms), and since the packet sent by the second electronic device is sent to the first electronic device in a directional manner (for example, sent to the electronic device 1 shown in (a) of fig. 16), only the first electronic device may scan the directional broadcast packet in the multiple host devices, and the other host devices may not scan the directional broadcast packet, and after the first electronic device scans the directional broadcast packet, send a connection request to the second electronic device to connect the first electronic device and the second electronic device back.
In the related scheme, in the process that a user uses the Bluetooth device, the Bluetooth device is disconnected from the electronic device due to the fact that the Bluetooth device is too far away from the electronic device, interference signals interfere with the electronic device in the process of exchanging data with the Bluetooth device, and the like. For example, in the process that the user is talking by using the bluetooth headset, the bluetooth headset is disconnected from the mobile phone. Other electronic devices connected to bluetooth devices, such as tablets, notebook computers, etc., are also present in this scenario. For convenience of description, the electronic device that has been connected to the bluetooth device last time is referred to as the electronic device 1, for example, a mobile phone. The other electronic devices connected to the bluetooth device are referred to as electronic devices 2, such as tablet, notebook, etc. The user wants to re-establish the connection between the bluetooth device and the electronic device 1, but in the related connection scheme, because the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like have strong randomness, the bluetooth device may re-establish the connection with the electronic device 2, but not establish the connection with the electronic device 1. For example, the bluetooth device sends a broadcast message via broadcast channel 39, electronic device 2 just scans broadcast channel 39, and electronic device 1 scans broadcast channel 38, in which case the bluetooth device reestablishes a connection with electronic device 2 without electronic device 1 reestablishing a connection. In this way, the electronic device with which the bluetooth device re-establishes a connection may not be the electronic device 1 to which the user wants to connect, reducing the user experience.
In the embodiment of the application, in the case that the first electronic device is the electronic device which is connected with the second electronic device at the latest in the plurality of host devices (the first electronic device is the electronic device which is connected with the Bluetooth device last time), the target broadcast message sent by the second electronic device can include the identifier of the first electronic device (the target message can be called as a directional broadcast message), and the first electronic device can scan the directional broadcast message sent by the second electronic device based on the first time node, so that other host devices except the first electronic device in the plurality of host devices can be prevented from scanning the directional broadcast message, the second electronic device can be quickly and accurately connected back with the first electronic device, and the user experience is improved.
In some embodiments, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including the second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest, wherein a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device of the plurality of hosts other than the second host device and the first electronic device establishes a connection with the second electronic device, the wake-up signal further includes a third time node, the third time node being later than the first time node, the second electronic device including an identifier of the second host device in a target broadcast message sent by the first time node, the target broadcast message sent by the second electronic device including an identifier of the first electronic device in the third time node; and after the first electronic device scans the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, the method further includes:
Under the condition that the first electronic equipment does not scan the target broadcast message based on the first time node, the first electronic equipment scans the target broadcast message sent by the second electronic equipment based on a third time node in the wake-up signal; and under the condition that the target broadcast message is scanned based on the third time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
For example, assuming that the plurality of host devices includes an electronic device a, an electronic device B, and an electronic device C, the electronic device a is disconnected after being paired with a second electronic device, then the electronic device B is disconnected after being paired with the second electronic device, and then the electronic device C is disconnected after being paired with the second electronic device, then the second host device may refer to the electronic device C, and the first electronic device may refer to the electronic device B.
The third time node may refer to 90 milliseconds shown in (b) of fig. 16, and the first time node may refer to 10 milliseconds shown in (b) of fig. 16, the third time node being later than the first time node.
In an implementation, referring to (B) in fig. 16, for example, the first electronic device may be an electronic device B, the second host device may refer to an electronic device a, the wake-up signal includes a first time node of 10 ms and a third time node of 90 ms, the second electronic device may send a directional broadcast message 1 in a 10 th ms, the directional broadcast message 1 includes a MAC address of the electronic device a, the electronic device a and the electronic device B may scan the second electronic device in the 10 th ms, but since the second electronic device is configured to send the broadcast message to the electronic device a in a directional manner, the electronic device a may scan the directional broadcast 1 in the 10 th ms, and the electronic device B (the first electronic device) may not scan the directional broadcast 1 in the 10 th ms. After the electronic device a scans the directional broadcast 1, the electronic device a may send a connection request to the second electronic device to implement a connection with the second electronic device, but in the process of connecting the electronic device a to the second electronic device in a back way, the connection between the electronic device a and the second electronic device may not be successful due to signal interference, a distance between the two devices, and the like, at this time, the second electronic device may not receive the connection request sent by the electronic device a, in the case that the second electronic device does not receive the connection request sent by the electronic device a, the second electronic device sends a directional broadcast message 2 in the 90 th millisecond, the directional broadcast message 2 includes the MAC address of the electronic device B (the first electronic device), and the electronic device a and the electronic device B may scan the second electronic device in the 90 th millisecond, but because the second electronic device is configured to send the broadcast message, the electronic device a may not scan the directional broadcast 2 when the 90 th millisecond scans, and the electronic device B (the first electronic device) may scan the directional broadcast 2 when the second electronic device does not receive the connection request, and the electronic device B may scan the directional broadcast 2 when the second electronic device B is connected to the second electronic device.
In the embodiment of the application, when the second electronic device reestablishes connection with one of the plurality of host devices, the second electronic device may reestablish connection with the second host device (the second electronic device is the electronic device which is connected with the second electronic device last time), specifically, the second electronic device sends the target broadcast message at the first time node, where the target broadcast message includes the identifier of the second host device, the second host device may scan the target broadcast message sent by the second electronic device based on the first time node, and the second host device may scan the target broadcast message originally sent by the second electronic device to the second host device in a targeted manner, but the second host device fails to scan the target broadcast message due to signal interference, the distance between the second host device and the second electronic device being too far, and the like, and at this time, the second electronic device fails to receive the connection request sent by the second host device, so that the second electronic device and the second host device fails to be connected back to work. Then, the second electronic device may reestablish connection with the first electronic device (the time node at which the first electronic device establishes connection with the second electronic device is earlier than the time node at which the second host device establishes connection with the second electronic device, and later than the time node at which the host devices except the second host device and the first electronic device establish connection with the second electronic device in the plurality of hosts), specifically, the second electronic device sends a target broadcast message at the third time node, where the target broadcast message includes an identifier of the first electronic device, the first electronic device may scan, based on the third time node, the target broadcast message that the second electronic device directs to the first electronic device, where the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned based on the third time node, so that the first electronic device and the second electronic device may be connected back, where the second electronic device fails to be connected with the electronic device last time, and the second electronic device may be connected back to the first electronic device, where the second electronic device is reliably connected back.
The implementation process of the method for connecting back another device according to the embodiment of the present application is described below with reference to the accompanying drawings.
Referring to fig. 19, fig. 19 is a schematic flowchart of a method for reconnecting a device according to an embodiment of the present application. The method may be performed by the bluetooth device 200 shown in fig. 4, or may be performed by a processor or a chip in the bluetooth device 200, and embodiments of the present application are not limited in any way. For convenience of description, the method will be described in detail taking a bluetooth device (second electronic device) as an example. The method includes steps 1710 through 1720.
In step 1710, the second electronic device sends a wake-up signal to the first electronic device in response to the reconnection event, where the wake-up signal includes a first time node, and the wake-up signal is used to instruct the first electronic device to scan a target broadcast packet based on the first time node, and the target broadcast packet is used to instruct the reconnection of the first electronic device and the second electronic device.
The second electronic device, the first electronic device, the connection event, the wake-up signal, and the first event node may refer to the above embodiments, and will not be described herein.
In an implementation, the second electronic device includes a bluetooth module and a low power wake-up transmitting module, such as the bluetooth module a and the low power wake-up transmitting module shown in fig. 12. The second electronic device responds to the reconnection event, the Bluetooth module A can determine a first time node for the second electronic device to send the broadcast message, generates a wake-up signal based on the first time node, sends the wake-up signal to the low-power consumption wake-up sending module, and sends the wake-up signal to the first electronic device. For technical details of this implementation, reference may be made to the embodiment shown in fig. 12, which is not described here again.
In step 1720, the second electronic device sends the target broadcast message at the first time node.
In an implementation, and by way of example, referring to fig. 9, a bluetooth device (second electronic device) may send a targeted broadcast message at 10 th millisecond.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node for sending the target broadcast message, the second electronic device sends the target broadcast message at the first time node, and then the first electronic device can scan the second electronic device at the first time node after receiving the wake-up signal, so that the first electronic device and the second electronic device are connected back, therefore, the first electronic device can scan at the fixed time node (the first time node) because the second electronic device sends the target broadcast message at the fixed time node (the first time node), and the broadcast message is sent at a random broadcast period relative to the second electronic device, and the first electronic device can scan the broadcast message sent by the second electronic device at the random time node, so that the first electronic device and the electronic device can be connected back quickly, thereby reducing the connection time of the first electronic device and the second electronic device and improving user experience.
In some embodiments, the wake-up signal further includes a first broadcast channel, where the wake-up signal is used to instruct the first electronic device to scan the target broadcast message based on the first time node and the first broadcast channel; and sending a target broadcast message at a first time node, comprising:
And the second electronic equipment sends the target broadcast message through the first broadcast channel at the first time node.
In an implementation, referring to fig. 9, the wake-up signal may include a first time node of 10 ms, a first broadcast channel is broadcast channel 39, and the bluetooth device (second electronic device) may send the target broadcast message through broadcast channel 39 at 10 ms.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node and a first broadcast channel for sending the target broadcast message, the second electronic device sends the target broadcast message through the first broadcast channel at the first time node, then the first electronic device can scan the first broadcast channel at the first time node after receiving the wake-up signal so as to enable the first electronic device to be connected with the second electronic device in a back way, and as the second electronic device sends the target broadcast message through the fixed broadcast channel (the first time node) at the fixed time node (the second broadcast channel), the first electronic device can scan the fixed broadcast channel (the second broadcast channel) at the fixed time node (the first time node), and compared with the second electronic device, the first electronic device can send the broadcast message through the random broadcast channel at the random time node, and can enable the first electronic device to be quickly scanned to the broadcast message sent by the second electronic device, so that the first electronic device can be connected with the second electronic device in a back way, and the time length of the connection of the first electronic device and the second electronic device can be shortened.
In some embodiments, the wake-up signal further includes a second time node, where the second time node is later than the first time node, and the wake-up signal is used to instruct the first electronic device to scan the target broadcast message based on the first time node and the second time node; and after the first time node sends the target broadcast message, the method further comprises:
and the second electronic equipment sends the target broadcast message at the second time node under the condition that the second electronic equipment does not receive the connection request sent by the first electronic equipment.
For example, referring to fig. 10 (a), the first time node included in the wake-up signal is 10 th millisecond and the second time node is 1005 th millisecond. In an implementation, the second electronic device may send the target broadcast message in the 10 th millisecond, and the first electronic device may scan in the 10 th millisecond, where the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned, so that the first electronic device and the second electronic device are connected back. However, due to signal interference, when the first electronic device scans in 10ms, the first electronic device cannot scan the target broadcast message, at this time, the second electronic device cannot receive the connection request sent by the first electronic device, the second electronic device may send the target broadcast message again in 1005 ms, the first electronic device may scan in 1005 ms, and when the first electronic device scans the target broadcast message, the first electronic device sends the connection request to the second electronic device.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises the first time node and the second time node for sending the target broadcast message, the second electronic device sends the target broadcast message at the first time node, then the first electronic device can scan at the first time node after receiving the wake-up signal, the second electronic device sends the target broadcast message at the second time node under the condition that the second electronic device does not receive the connection request sent by the first electronic device, the first electronic device can scan at the second time node, and the first electronic device sends the connection request to the second electronic device under the condition that the second time node scans the target broadcast message, so that the first electronic device and the second electronic device are connected back, the interference of signal interference and other reasons on the back connection can be reduced, the reliability of the back connection of the first electronic device and the second electronic device is improved, and the user experience is improved.
In some embodiments, the wake-up signal further includes a second time node and a second broadcast channel, where the wake-up signal is configured to instruct the first electronic device to scan for the target broadcast message based on the first time node, the first broadcast channel, the second time node, and the second broadcast channel; and after the second electronic device sends the target broadcast message through the first broadcast channel at the first time node, the method further includes:
And the second electronic equipment sends the target broadcast message through a second broadcast channel at a second time node under the condition that the second electronic equipment does not receive the connection request sent by the first electronic equipment.
For example, referring to fig. 10 (a), the wake-up signal includes a first time node of 10 ms, a first broadcast channel of 39, a second time node of 1005 ms, and a second broadcast channel of 39. In implementation, the second electronic device may send the target broadcast packet through the broadcast channel 39 in 10 ms, and the first electronic device may scan the broadcast channel 39 in 10 ms, and in the case that the target broadcast packet is scanned, the first electronic device sends a connection request to the second electronic device through the broadcast channel 39, so that the first electronic device and the second electronic device are connected back. However, due to signal interference, when the first electronic device scans the broadcast channel 39 in the 10 th millisecond, the first electronic device cannot scan the target broadcast message, at this time, the second electronic device cannot receive the connection request sent by the first electronic device, and the second electronic device may send the target broadcast message again through the broadcast channel 39 in the 1005 th millisecond, and the first electronic device may scan the broadcast channel 39 in the 1005 th millisecond, and if the first electronic device scans the target broadcast message, the first electronic device sends the connection request to the second electronic device.
In the embodiment of the application, the second electronic device can send the wake-up signal to the first electronic device, the wake-up signal comprises a first time node for sending the target broadcast message, a first broadcast channel, a second time node and a second broadcast channel, the second electronic device sends the target broadcast message through the first broadcast channel at the first time node, then the first electronic device can scan the first broadcast channel at the first time node after receiving the wake-up signal, the second electronic device sends the target broadcast message through the second broadcast channel at the second time node under the condition that the second electronic device does not receive the connection request sent by the first electronic device, the first electronic device can scan the second broadcast channel at the second time node, and under the condition that the first electronic device scans the target broadcast message, the connection request is sent to the second electronic device, so that the first electronic device and the second electronic device are connected back, the interference of the back connection caused by signal interference and other reasons can be reduced, the reliability of the back connection of the first electronic device and the second electronic device is improved, and the user experience is improved.
In some embodiments, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including the second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein the first electronic device is the second host device; and the second electronic device sending a target broadcast message at the first time node, including:
the second electronic device sends a target broadcast message to the first electronic device at a first time node, and the target broadcast message sent by the first time node comprises an identifier of the first electronic device.
In implementation, in the case where the application scenario using bluetooth technology includes multiple host devices, the second electronic device may send a directional broadcast packet at the first time node (for example, the directional broadcast packet may be a target broadcast packet including the MAC address of the first electronic device), the multiple host devices may scan the second electronic device based on the first time node (for example, the electronic device 1 and the electronic device 2 shown in (a) of fig. 16 may each scan at 10 ms), and since the packet sent by the second electronic device is sent to the first electronic device in a directional manner (for example, sent to the electronic device 1 shown in (a) of fig. 16), only the first electronic device may scan the directional broadcast packet in the multiple host devices, and the other host devices may not scan the directional broadcast packet, and after the first electronic device scans the directional broadcast packet, send a connection request to the second electronic device to connect the first electronic device and the second electronic device back.
In the related scheme, in the process that a user uses the Bluetooth device, the Bluetooth device is disconnected from the electronic device due to the fact that the Bluetooth device is too far away from the electronic device, interference signals interfere with the electronic device in the process of exchanging data with the Bluetooth device, and the like. For example, in the process that the user is talking by using the bluetooth headset, the bluetooth headset is disconnected from the mobile phone. Other electronic devices connected to bluetooth devices, such as tablets, notebook computers, etc., are also present in this scenario. For convenience of description, the electronic device that has been connected to the bluetooth device last time is referred to as the electronic device 1, for example, a mobile phone. The other electronic devices connected to the bluetooth device are referred to as electronic devices 2, such as tablet, notebook, etc. The user wants to re-establish the connection between the bluetooth device and the electronic device 1, but in the related connection scheme, because the broadcasting period of the bluetooth device, the broadcasting channel of the broadcast message sent by the bluetooth device, the scanning period of the electronic device, the broadcasting channel scanned by the electronic device, and the like have strong randomness, the bluetooth device may re-establish the connection with the electronic device 2, but not establish the connection with the electronic device 1. For example, the bluetooth device sends a broadcast message via broadcast channel 39, electronic device 2 just scans broadcast channel 39, and electronic device 1 scans broadcast channel 38, in which case the bluetooth device reestablishes a connection with electronic device 2 without electronic device 1 reestablishing a connection. In this way, the electronic device with which the bluetooth device re-establishes a connection may not be the electronic device 1 to which the user wants to connect, reducing the user experience.
In the embodiment of the application, in the case that the first electronic device is the electronic device which is connected with the second electronic device at the latest in the plurality of host devices (the first electronic device is the electronic device which is connected with the Bluetooth device last time), the target broadcast message sent by the second electronic device can include the identifier of the first electronic device (the target message can be called as a directional broadcast message), and the first electronic device can scan the directional broadcast message sent by the second electronic device based on the first time node, so that other host devices except the first electronic device in the plurality of host devices can be prevented from scanning the directional broadcast message, the second electronic device can be quickly and accurately connected back with the first electronic device, and the user experience is improved.
In some embodiments, the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including the second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device of the plurality of hosts other than the second host device and the first electronic device establishes a connection with the second electronic device, the wake-up signal further including a third time node, the third time node being later than the first time node; and the second electronic device sending a target broadcast message at the first time node, including:
the second electronic equipment sends a target broadcast message to the second host equipment at the first time node, and the target broadcast message sent by the first time node comprises an identifier of the second host equipment;
After the second electronic device sends the target broadcast message to the second host device at the first time node, the method further includes:
And the second electronic equipment sends a target broadcast message to the first electronic equipment at a third time node under the condition that the second electronic equipment does not receive the connection request sent by the second host equipment, wherein the target broadcast message sent at the third time node comprises an identifier of the first electronic equipment.
In an implementation, referring to (B) in fig. 16, for example, the first electronic device may be an electronic device B, the second host device may refer to an electronic device a, the wake-up signal includes a first time node of 10 ms and a third time node of 90 ms, the second electronic device may send a directional broadcast message 1 in a 10 th ms, the directional broadcast message 1 includes a MAC address of the electronic device a, the electronic device a and the electronic device B may scan the second electronic device in the 10 th ms, but since the second electronic device is configured to send the broadcast message to the electronic device a in a directional manner, the electronic device a may scan the directional broadcast 1 in the 10 th ms, and the electronic device B (the first electronic device) may not scan the directional broadcast 1 in the 10 th ms. After the electronic device a scans the directional broadcast 1, the electronic device a may send a connection request to the second electronic device to implement a connection with the second electronic device, but in the process of connecting the electronic device a to the second electronic device in a back way, the connection between the electronic device a and the second electronic device may not be successful due to signal interference, a distance between the two devices, and the like, at this time, the second electronic device may not receive the connection request sent by the electronic device a, in the case that the second electronic device does not receive the connection request sent by the electronic device a, the second electronic device sends a directional broadcast message 2 in the 90 th millisecond, the directional broadcast message 2 includes the MAC address of the electronic device B (the first electronic device), and the electronic device a and the electronic device B may scan the second electronic device in the 90 th millisecond, but because the second electronic device is configured to send the broadcast message, the electronic device a may not scan the directional broadcast 2 when the 90 th millisecond scans, and the electronic device B (the first electronic device) may scan the directional broadcast 2 when the second electronic device does not receive the connection request, and the electronic device B may scan the directional broadcast 2 when the second electronic device B is connected to the second electronic device.
In the embodiment of the application, when the second electronic device reestablishes connection with one of the plurality of host devices, the second electronic device may reestablish connection with the second host device (the second electronic device is the electronic device which is connected with the second electronic device last time), specifically, the second electronic device sends the target broadcast message at the first time node, where the target broadcast message includes the identifier of the second host device, the second host device may scan the target broadcast message sent by the second electronic device based on the first time node, and the second host device may scan the target broadcast message originally sent by the second electronic device to the second host device in a targeted manner, but the second host device fails to scan the target broadcast message due to signal interference, the distance between the second host device and the second electronic device being too far, and the like, and at this time, the second electronic device fails to receive the connection request sent by the second host device, so that the second electronic device and the second host device fails to be connected back to work. Then, the second electronic device may reestablish connection with the first electronic device (the time node at which the first electronic device establishes connection with the second electronic device is earlier than the time node at which the second host device establishes connection with the second electronic device, and later than the time node at which the host devices except the second host device and the first electronic device establish connection with the second electronic device in the plurality of hosts), specifically, the second electronic device sends a target broadcast message at the third time node, where the target broadcast message includes an identifier of the first electronic device, the first electronic device may scan, based on the third time node, the target broadcast message that the second electronic device directs to the first electronic device, where the first electronic device sends a connection request to the second electronic device when the target broadcast message is scanned based on the third time node, so that the first electronic device and the second electronic device may be connected back, where the second electronic device fails to be connected with the electronic device last time, and the second electronic device may be connected back to the first electronic device, where the second electronic device is reliably connected back.
In some embodiments, the wake-up signal further comprises a preamble for synchronizing clocks of the second electronic device and the first electronic device, an identifier of the second electronic device, and a check code for checking the wake-up signal received by the first electronic device.
For example, the wake-up signal may refer to the data in table 2 in the above embodiments, which is not described herein.
It should be noted that, the sequence number of each step in the above embodiment does not mean the execution sequence, and the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
An embodiment of the present application provides a computer program product, which when executed on an electronic device, causes the electronic device to execute the technical solution in the foregoing embodiment. The implementation principle and technical effects are similar to those of the related embodiments of the method, and are not repeated here.
An embodiment of the present application provides a readable storage medium, where the readable storage medium contains instructions, and when the instructions are executed in an electronic device, the instructions cause the electronic device to execute the technical solution of the foregoing embodiment. The implementation principle and technical effect are similar, and are not repeated here.
The embodiment of the application provides a chip for executing instructions, and when the chip runs, the technical scheme in the embodiment is executed. The implementation principle and technical effect are similar, and are not repeated here.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid-state disk (solid-state drive STATE DISK, SSD)), or the like.
It should be appreciated that reference throughout this specification to "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, various embodiments are not necessarily referring to the same embodiments throughout the specification. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that: the first, second, etc. numbers referred to in the present application are merely for convenience of description and are not intended to limit the scope of the embodiments of the present application, but also to indicate the sequence.
Elements referred to in the singular are intended to be used in the present disclosure as "one or more" rather than "one and only one" unless specifically stated otherwise. In the present application, "at least one" is intended to mean "one or more" and "a plurality" is intended to mean "two or more" unless specifically indicated.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: there are three cases where a alone exists, where a may be singular or plural, and where B may be singular or plural, both a and B exist alone.
The term "at least one of … …" herein, meaning all or any combination of the listed items, e.g., "at least one of A, B and C," may mean: there are six cases where A alone, B alone, C alone, A and B together, B and C together, A, B and C together, where A may be singular or plural, B may be singular or plural, and C may be singular or plural.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The same or similar parts may be referred to each other in the various embodiments of the application. In the embodiments of the present application, and the respective implementation/implementation methods in the embodiments, if there is no specific description and logic conflict, terms and/or descriptions between different embodiments, and between the respective implementation/implementation methods in the embodiments, may be consistent and may refer to each other, and technical features in the different embodiments, and the respective implementation/implementation methods in the embodiments, may be combined to form a new embodiment, implementation, or implementation method according to their inherent logic relationship. The embodiments of the present application described above do not limit the scope of the present application.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application should be defined by the claims, and the above description is only a preferred embodiment of the technical solution of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (19)

1. The method for connecting back the equipment is applied to the first electronic equipment, and the first electronic equipment and the second electronic equipment are connected, and is characterized by comprising the following steps:
Receiving a wake-up signal sent by the second electronic device in response to a reconnection event, wherein the reconnection event is used for indicating the first electronic device and the second electronic device to carry out reconnection, and the wake-up signal comprises a first time node for the second electronic device to send a target broadcast message;
Scanning the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal;
and under the condition that the target broadcast message is scanned, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
2. The method of claim 1, wherein the wake-up signal further comprises a first broadcast channel on which the second electronic device transmits the target broadcast message; and scanning the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, including:
And scanning the target broadcast message sent by the second electronic equipment based on the first time node and the first broadcast channel in the wake-up signal.
3. The method of claim 1, wherein the wake-up signal further comprises a second time node at which the second electronic device transmits the target broadcast message, the second time node being later than the first time node; and, the method further comprises:
Under the condition that the target broadcast message is not scanned, scanning the target broadcast message sent by the second electronic equipment based on the second time node in the wake-up signal;
and under the condition that the target broadcast message is scanned based on the second time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
4. The method of claim 1, wherein the wake-up signal further comprises a second time node at which the second electronic device transmits the target broadcast message, and a second broadcast channel at which the second electronic device transmits the target broadcast message, the second time node being later than the first time node; and, the method further comprises:
under the condition that the target broadcast message is not scanned, scanning the target broadcast message sent by the second electronic equipment based on the second time node and the second broadcast channel in the wake-up signal;
And sending a connection request to the second electronic equipment under the condition that the target broadcast message is scanned based on the second time node and the second broadcast channel, so that the first electronic equipment and the second electronic equipment are connected back.
5. The method according to any one of claims 1 to 4, wherein the scanning the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal comprises:
based on the first time node in the wake-up signal, scanning the target broadcast message sent by the second electronic device in a target scanning window, wherein the first time node is a starting time node of a scanning period, the scanning period comprises a plurality of scanning windows, the target scanning window is one of the plurality of scanning windows, and the plurality of scanning windows are used for indicating scanning time sequences of the first electronic device to the second electronic device.
6. The method of claim 5, wherein after receiving a wake-up signal in response to a loopback event, the method further comprises:
determining a signal strength of the wake-up signal based on the wake-up signal;
And determining the target scanning window based on the signal intensity of the wake-up signal and the corresponding relation, wherein the corresponding relation is the corresponding relation between a plurality of numerical ranges of the signal intensity and a plurality of scanning windows, one numerical range corresponds to one scanning window, and the numerical range of the signal intensity corresponding to the scanning window with the previous scanning time sequence in the plurality of scanning windows is larger than the numerical range of the signal intensity corresponding to the scanning window with the subsequent scanning time sequence.
7. The method of claim 6, wherein the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a first host device, the first host device being an electronic device corresponding to a smallest distance among a plurality of distances between the plurality of host devices and the second electronic device, wherein the first electronic device is the first host device, and the target scan window is a scan window with an earliest scan timing among the plurality of scan windows; or alternatively
The first electronic device is one device of the plurality of host devices except the first host device, and the target scanning window is one scanning window of the plurality of scanning windows except the scanning window with the earliest scanning time sequence.
8. The method of any of claims 1-4, wherein the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a second host device that is an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein the first electronic device is the second host device, and wherein the target broadcast message includes an identifier of the first electronic device.
9. The method of any of claims 1-4, wherein the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a second host device, the second host device being an electronic device of the plurality of host devices that has established a connection with the second electronic device at a latest time, wherein a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device of the plurality of hosts other than the second host device and the first electronic device establishes a connection with the second electronic device, the wake-up signal further including a third time node later than the first time node, the target broadcast text transmitted by the second electronic device at the first time node including an identifier of the second host device, the target broadcast text transmitted by the second electronic device at the third time node including the first electronic device identifier; and after the scanning the target broadcast message sent by the second electronic device based on the first time node in the wake-up signal, the method further includes:
Under the condition that the target broadcast message is not scanned based on the first time node, scanning the target broadcast message sent by the second electronic device based on the third time node in the wake-up signal;
And under the condition that the target broadcast message is scanned based on the third time node, sending a connection request to the second electronic equipment so as to enable the first electronic equipment and the second electronic equipment to be connected back.
10. The method for reconnecting the equipment is applied to a second electronic equipment, and the second electronic equipment establishes a connection with the first electronic equipment, and is characterized by comprising the following steps:
Responding to a reconnection event, sending a wake-up signal to the first electronic equipment, wherein the wake-up signal comprises a first time node, and the wake-up signal is used for indicating the first electronic equipment to scan a target broadcast message based on the first time node, and the target broadcast message is used for indicating reconnection of the first electronic equipment and the second electronic equipment;
And sending the target broadcast message at the first time node.
11. The method of claim 10, wherein the wake-up signal further comprises a first broadcast channel, and wherein the wake-up signal is used to instruct the first electronic device to scan for a target broadcast message based on the first time node and the first broadcast channel; and sending the target broadcast message at the first time node, including:
And at the first time node, sending the target broadcast message through the first broadcast channel.
12. The method of claim 10, wherein the wake-up signal further comprises a second time node, the second time node being later than the first time node, the wake-up signal being used to instruct the first electronic device to scan for the target broadcast message based on the first time node and the second time node; and after the first time node sends the target broadcast message, the method further comprises:
and under the condition that the connection request sent by the first electronic equipment is not received, the target broadcast message is sent at the second time node.
13. The method of claim 11, wherein the wake-up signal further comprises a second time node and a second broadcast channel, and wherein the wake-up signal is used to instruct the first electronic device to scan for a target broadcast message based on the first time node, the first broadcast channel, the second time node, and the second broadcast channel; and after the first time node transmits the target broadcast message over the first broadcast channel, the method further comprises:
And under the condition that the connection request sent by the first electronic equipment is not received, sending the target broadcast message through the second broadcast channel at the second time node.
14. The method of any of claims 10 to 13, wherein the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a second host device that is an electronic device of the plurality of host devices that established a connection with the second electronic device at a latest, wherein the first electronic device is the second host device; and sending the target broadcast message at the first time node, including:
And sending the target broadcast message to the first electronic equipment at the first time node, wherein the target broadcast message sent by the first time node comprises an identifier of the first electronic equipment.
15. The method of any of claims 10 to 13, wherein the second electronic device establishes a connection with a plurality of host devices, the plurality of host devices including a second host device that is the electronic device of the plurality of host devices that established a connection with the second electronic device at the latest, wherein a time node at which the first electronic device establishes a connection with the second electronic device is earlier than a time node at which the second host device establishes a connection with the second electronic device, and later than a time node at which a host device of the plurality of hosts other than the second host device and the first electronic device establishes a connection with the second electronic device, the wake-up signal further includes a third time node that is later than the first time node; and sending the target broadcast message at the first time node, including:
The target broadcast message is sent to the second host device at the first time node, and the target broadcast message sent by the first time node comprises an identifier of the second host device;
After the first time node sends the target broadcast message to the second host device, the method further comprises:
And under the condition that the connection request sent by the second host device is not received, sending the target broadcast message to the first electronic device at the third time node, wherein the target broadcast message sent at the third time node comprises an identifier of the first electronic device.
16. The method according to any of claims 10 to 13, wherein the wake-up signal further comprises a preamble, an identifier of the first electronic device, an identifier of the second electronic device, and a check code, the preamble being used to synchronize clocks of the second electronic device and the first electronic device, the check code being used to check the wake-up signal received by the first electronic device.
17. An electronic device, comprising:
one or more processors;
one or more memories;
The one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-9, or any of claims 10-16.
18. A computer readable storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 9, or claims 10 to 16.
19. A chip, the chip comprising:
a memory for storing instructions;
A processor for invoking and executing the instructions from the memory to cause an electronic device on which the chip is mounted to perform the method of any of claims 1 to 9, or claims 10 to 16.
CN202410358551.9A 2024-03-27 2024-03-27 Device reconnection method, electronic device, storage medium and chip Pending CN117956546A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410358551.9A CN117956546A (en) 2024-03-27 2024-03-27 Device reconnection method, electronic device, storage medium and chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410358551.9A CN117956546A (en) 2024-03-27 2024-03-27 Device reconnection method, electronic device, storage medium and chip

Publications (1)

Publication Number Publication Date
CN117956546A true CN117956546A (en) 2024-04-30

Family

ID=90794963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410358551.9A Pending CN117956546A (en) 2024-03-27 2024-03-27 Device reconnection method, electronic device, storage medium and chip

Country Status (1)

Country Link
CN (1) CN117956546A (en)

Similar Documents

Publication Publication Date Title
CN110622123B (en) Display method and device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
KR102480856B1 (en) Method and apparatus for communicating streaming data in a bluetooth based communication system
WO2018000134A1 (en) Bluetooth connection method and terminal
US11979251B2 (en) Home device control method and device
KR102473470B1 (en) Side link link failure checking method and terminal
EP4024917B1 (en) Bluetooth connection method and electronic device
US11419182B2 (en) Electronic device supporting link sharing and method therefor
EP4132098A1 (en) Implementation method for wi-fi peer-to-peer service and related device
EP3709685B1 (en) Method for establishing wireless communication link and electronic device supporting same
US20210153259A1 (en) Random access method and related device
WO2017080378A1 (en) Method implementing licensed-assisted access, network equipment, and terminal equipment
CN111405681B (en) Wi-Fi Aware link establishment method, wi-Fi Aware link establishment system, electronic equipment and storage medium
WO2021114952A1 (en) Data processing method, terminal device, bluetooth device, and storage medium
US9763126B2 (en) Electronic device and method for processing packet in internet protocol-based network
KR20180128302A (en) Electronic device and method for transmitting a bluetooth based data thereof
EP4247031A1 (en) Access method and system and electronic device
US11844051B2 (en) Resource pool configuration method, resource pool using method, configuration device, and terminal
EP4002737A1 (en) Electronic device for transmitting data packets in bluetooth network environment and method therefor
AU2014315883A1 (en) Method of controlling short-range wireless communication and apparatus supporting the same
WO2024082906A1 (en) Information acquisition method and apparatus, bluetooth device, terminal device, and storage medium
US11736327B2 (en) Uplink transmission method and terminal
US11330468B2 (en) Low power techniques for bluetooth low energy in scanning state
CN110087223B (en) Communication connection method, communication device, and storage medium
WO2022218196A1 (en) Transmission power control method and related device

Legal Events

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