WO2024066715A1 - Bluetooth connection method and device, storage medium and bluetooth device - Google Patents
Bluetooth connection method and device, storage medium and bluetooth device Download PDFInfo
- Publication number
- WO2024066715A1 WO2024066715A1 PCT/CN2023/110074 CN2023110074W WO2024066715A1 WO 2024066715 A1 WO2024066715 A1 WO 2024066715A1 CN 2023110074 W CN2023110074 W CN 2023110074W WO 2024066715 A1 WO2024066715 A1 WO 2024066715A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- connection
- bluetooth
- bluetooth device
- connection mode
- mode
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 53
- 230000004044 response Effects 0.000 claims abstract description 10
- 230000003993 interaction Effects 0.000 claims description 15
- 230000015654 memory Effects 0.000 claims description 12
- 230000001960 triggered effect Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 6
- 238000004378 air conditioning Methods 0.000 description 14
- 238000004590 computer program Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 2
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000002618 waking effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/14—Direct-mode setup
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present disclosure belongs to the field of Bluetooth technology, and in particular, relates to a Bluetooth connection method, device, storage medium and Bluetooth equipment.
- the Bluetooth remote control device controls the air-conditioning device
- this implementation method limits the Bluetooth remote control device to the connection method of the air-conditioning device to be connected.
- a Bluetooth remote control device that has not been specially designed cannot be flexibly connected to it, and may even be unable to connect to it, so that the Bluetooth remote control device cannot control the air-conditioning device to be connected with such an unknown connection mode. Based on this, how to improve the flexibility of the connection between the Bluetooth device and the device to be connected is a technical problem that needs to be solved urgently.
- the embodiments of the present disclosure provide a Bluetooth connection method, apparatus, storage medium and Bluetooth device, which can improve the flexibility of connecting a Bluetooth device with a device to be connected to a certain extent.
- a Bluetooth connection method comprising: in response to a Bluetooth device being awakened, starting at least one connection mode configured in the Bluetooth device so that the Bluetooth device is connected to a device to be connected, the Bluetooth device being configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- a Bluetooth connection device comprising a starting unit, which is used to start at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, so that the Bluetooth device is connected to a device to be connected, the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to connect to the device to be connected.
- the passive connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- a computer-readable storage medium in which at least one program code is stored.
- the at least one program code is loaded and executed by a processor to implement the operations performed by the Bluetooth connection method as described above.
- a Bluetooth device comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the Bluetooth connection method as described above.
- FIG1 shows a flow chart of a Bluetooth connection method according to some embodiments of the present disclosure
- FIG. 2 shows a detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG. 1 ;
- FIG3 shows another detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG1 ;
- FIG4 shows a block diagram of a Bluetooth connection device according to some embodiments of the present disclosure.
- FIG. 5 shows a schematic diagram of the structure of a computer system of a Bluetooth device according to some embodiments of the present disclosure.
- the Bluetooth device can be configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- the device to be connected can be a smart device equipped with a Bluetooth module, such as an air conditioner, refrigerator, television, lamp, stereo, etc., which is not limited in the present disclosure.
- the Bluetooth connection method may include step 110: in response to a Bluetooth device being awakened, starting at least one connection mode configured in the Bluetooth device so that the Bluetooth device is connected to a device to be connected, wherein the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- the Bluetooth device may be awakened using a gyroscope detection principle.
- a gyroscope may be used to detect the direction and orientation information of the Bluetooth device. Determine whether the Bluetooth device is picked up, and if the Bluetooth device is picked up, the Bluetooth device is awakened.
- the Bluetooth device can also be awakened by operating a button on the Bluetooth device. The specific implementation method of waking up the Bluetooth device is not limited in this disclosure.
- the starting of at least one connection mode configured in the Bluetooth device may be performed according to the following steps 111 to 112.
- step 111 any one connection mode configured in the Bluetooth device is started, so that the Bluetooth device is connected to the device to be connected in any one of the connection modes.
- step 112 if the Bluetooth device is not connected to the device to be connected in any of the connection modes, other connection modes configured in the Bluetooth device except for the any of the connection modes are started, so that the Bluetooth device is connected to the device to be connected in the other connection modes.
- the device to be connected includes a first device and a second device, and the starting of at least one connection mode configured in the Bluetooth device may also be performed according to the following step 113.
- step 113 the active connection mode and the passive connection mode configured in the Bluetooth device are synchronously started, so that the Bluetooth device is connected to the first device in the active connection mode and is connected to the second device in the passive connection mode.
- the Bluetooth device is configured with an active connection mode and a passive connection mode.
- the active connection mode configured in the Bluetooth device can be started first. If the active connection mode fails to connect successfully, the passive connection mode configured in the Bluetooth device is started; or the passive connection mode configured in the Bluetooth device can be started first. If the passive connection mode fails to connect successfully, the active connection mode configured in the Bluetooth device is started; or the active connection mode and the passive connection mode configured in the Bluetooth device are started simultaneously.
- connection mode the Bluetooth device starts can be determined according to the way the Bluetooth device is awakened, or according to the last connection record with the device to be connected.
- a wake-up button that matches the connection mode can be set in the control panel of the Bluetooth device, and when the Bluetooth device detects that the wake-up button is touched, the mode that matches the wake-up button is started.
- the user can synchronously start the active connection mode and the passive connection mode of the Bluetooth device by touching the wake-up button that matches the synchronous start.
- the last connection record between the Bluetooth device and the device to be connected is obtained. If the last time the device was connected to the device to be connected was through an active connection mode, the active connection mode of the Bluetooth device is started; if the last time the device was connected to the device to be connected was through a passive connection mode, the passive connection mode of the Bluetooth device is started; if the last time the device was connected to the device to be connected was through a passive connection mode, the passive connection mode of the Bluetooth device is started; When the connecting device is connected, the active connection mode and the passive connection mode of the Bluetooth device are synchronously started.
- the implementation method of starting which connection mode is configured in the Bluetooth device is not limited in this disclosure.
- connection modes of the Bluetooth device can be increased to a certain extent, thereby improving the adaptability to devices to be connected with different connection modes.
- the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode. If the first connection signal is scanned, the device to be connected is connected based on the first connection signal. If multiple first connection signals are scanned, at least one first connection signal with the strongest signal strength is determined as the target connection signal, and the device to be connected is connected based on the target connection signal.
- the first connection signal may be Bluetooth data information broadcast by the device to be connected, that is, the connection request data broadcast by the device to be connected is Bluetooth data information.
- the signal strength of the first connection signal may be determined by the dB value in the Bluetooth data information.
- the active connection mode of the Bluetooth device can only connect to the device to be connected when the connection request of the device to be connected is scanned. If the Bluetooth device scans only one first connection signal in all information channels, the device to be connected corresponding to the first connection signal is connected; if the Bluetooth device is in a scene with multiple devices to be connected, the Bluetooth device will scan the first connection signals of multiple devices to be connected when scanning the Bluetooth data information of all information channels, that is, the Bluetooth device will scan multiple first connection signals.
- the Bluetooth device if it scans multiple first connection signals in active connection mode, it determines at least one first connection signal with the strongest signal strength as the target connection signal; and connects to the device to be connected based on the target connection signal.
- the Bluetooth device scans multiple first connection signals
- all the scanned first connection signals can be sorted in order of signal strength from strong to weak. Based on the sorting result, the first connection signal with the strongest signal strength is determined as the target connection signal, and the Bluetooth device connects to the devices to be connected corresponding to the target connection signals respectively.
- the Bluetooth device if it scans multiple first connection signals in the active connection mode, it will connect to at least one device to be connected.
- At least one first connection signal can be determined based on scanning of Bluetooth data information of all information channels, and a connection can be made to the device to be connected based on the determined first connection signal.
- multiple devices to be connected can be connected at the same time in some scenarios, and the Bluetooth device can control multiple devices to be connected at the same time, thereby improving the convenience of users using the Bluetooth device to control multiple devices to be connected.
- the Bluetooth device in the active connection mode, connecting with the device to be connected based on the first connection signal may further include: sending a first connection request to the device to be connected based on the first connection signal; and After the authentication is passed, a secure connection channel is established with the device to be connected to complete the connection with the device to be connected.
- the Bluetooth device scans the first connection signal, it cannot immediately interact with the device to be connected corresponding to the first connection signal. It needs to perform security authentication and establish a secure connection channel before it can interact with the device to be connected.
- the Bluetooth remote control device if the Bluetooth remote control device scans an air-conditioning device configured in a passive connection mode in an active connection mode, the Bluetooth remote control device needs to send a first connection request to the air-conditioning device. Only after the air-conditioning device performs security authentication on the first connection request and establishes a secure connection channel can the Bluetooth remote control device implement control operations on the air-conditioning device.
- the Bluetooth device establishes a secure connection channel with the device to be connected in the active connection mode, which can improve the security and stability of data interaction between the Bluetooth device and the device to be connected to a certain extent.
- the Bluetooth device broadcasts a second connection signal to the device to be connected in the passive connection mode; and if the device to be connected scans the second connection signal, connects to the device to be connected based on the second connection signal.
- the Bluetooth device in the passive connection mode, the Bluetooth device will actively broadcast the Bluetooth data information of the Bluetooth device according to the format protocol, that is, broadcast the second connection signal to the device to be connected, and the second connection signal can only be received by one device to be connected.
- a preset broadcast time can be configured in advance in the Bluetooth device.
- the preset broadcast time can be 10s, 20s, 30s, etc., which is not limited in this disclosure.
- connecting with the device to be connected based on the second connection signal may include: receiving a second connection request sent by the device to be connected based on the second connection signal; and establishing a secure connection channel with the device to be connected after authenticating the second connection request to complete the connection with the device to be connected.
- the Bluetooth remote control device if the Bluetooth remote control device is in a passive connection mode, by broadcasting a second connection signal, after the air-conditioning device configured in an active connection mode scans the second connection signal, the air-conditioning device sends a second connection request to the Bluetooth remote control device. Only after the air-conditioning device and the Bluetooth remote control device perform security authentication and establish a secure connection channel can the Bluetooth remote control device implement control operations on the air-conditioning device.
- the Bluetooth device establishes a secure connection channel with the device to be connected in the passive connection mode, which can improve the security and stability of data interaction between the Bluetooth device and the device to be connected to a certain extent.
- the Bluetooth device after the Bluetooth device is connected to the device to be connected, the Bluetooth device interacts with the device to be connected. If the Bluetooth device does not interact with the device to be connected within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
- the first preset duration is a duration customized by the Bluetooth device system, which may be 10s, 30s, 60s, etc., and is not limited in the present disclosure.
- the Bluetooth device may be triggered to switch to the sleep mode after a certain period of time.
- the Bluetooth device can be triggered to switch to sleep mode 3 seconds after the Bluetooth device detects that the user exits the picking-up operation (i.e., puts down the Bluetooth device); an exit button can also be configured on the control panel of the Bluetooth device, and when the user touches the exit button, the Bluetooth device is controlled to switch to sleep mode; the triggering method for the Bluetooth device to switch to sleep mode can also be designed according to different situations, which is not limited in the present disclosure.
- controlling the Bluetooth device to switch to sleep mode can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device.
- the Bluetooth connection method may further include: after the Bluetooth device sends first control data to the device to be connected, receiving feedback data corresponding to the first control data sent by the device to be connected, wherein the first control data is control data sent by the Bluetooth device to the device to be connected for the first time; and after the Bluetooth device sends second control data to the device to be connected, shielding feedback data corresponding to the second control data sent by the device to be connected, wherein the second control data is control data sent by the Bluetooth device to the device to be connected not for the first time.
- the device to be connected will return device status data after receiving the control data sent by the Bluetooth device.
- the Bluetooth device will cache the device status data returned by the device to be connected in the local memory, and will also cache the control data sent by the Bluetooth device to the device to be connected each time in the local memory.
- the Bluetooth device only records the feedback data corresponding to the first control data sent by the device to be connected.
- the feedback data corresponding to the second control data sent by the device to be connected may be shielded, and the second control data is control data that is not sent for the first time by the Bluetooth device to the device to be connected.
- the data self-correction mode may be configured in advance in the Bluetooth device, that is, the first control data sent by the Bluetooth device includes feedback data corresponding to the first control data that only the device to be connected needs to send, and there is no need to send feedback data corresponding to the second control data.
- the implementation of the Bluetooth device only recording the feedback data corresponding to the first control data sent by the device to be connected may also be designed according to different situations. The method is not limited in this disclosure.
- the Bluetooth device can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device by only recording feedback data corresponding to the first control data sent by the Bluetooth device to the device to be connected for the first time.
- the Bluetooth connection method may further include: if the Bluetooth device is not connected to the device to be connected in both the active connection mode and the passive connection mode within a second preset time period, triggering the Bluetooth device to switch to a sleep mode.
- the second preset duration is a duration customized by the Bluetooth device system, which may be 10s, 30s, 60s, etc., and is not limited in the present disclosure.
- the Bluetooth device can be triggered to end the working mode of connecting to the device to be connected and switch the Bluetooth device to sleep mode; an end button can also be configured on the control panel of the Bluetooth device, and when the user's touch operation on the end button is detected, the Bluetooth device is triggered to end the working mode of connecting to the device to be connected and switch the Bluetooth device to sleep mode; the triggering method for the Bluetooth device to end the working mode of connecting to the device to be connected can also be designed according to different situations, which is not limited in the present disclosure.
- the Bluetooth device in response to the Bluetooth device being awakened, the Bluetooth device starts an active connection mode. If the Bluetooth device does not scan the first connection signal in the active connection mode, the active connection mode of the Bluetooth device is switched to a passive connection mode. When the Bluetooth device is in the passive connection mode, if the second connection signal is not scanned by the device to be connected, the Bluetooth device switches the passive connection mode to the active connection mode, and continues to repeat the above steps for the purpose of connecting to the device to be connected until the Bluetooth device is connected to the device to be connected.
- the Bluetooth device If the Bluetooth device is not connected to the device to be connected in both the active connection mode and the passive connection mode for more than a second preset time, the Bluetooth device is triggered to switch to the sleep mode, that is, the Bluetooth device is controlled to end the working mode of connecting to the device to be connected.
- the Bluetooth remote control device if a user wakes up the Bluetooth remote control device in a closed room where there is no device to be connected, and within a second preset time period, the Bluetooth remote control device cannot connect to the device to be connected in both the active connection mode and the passive connection mode, the Bluetooth remote control device will be triggered to switch to the sleep mode.
- the Bluetooth device if the Bluetooth device fails to connect to the device to be connected within a preset time period, the Bluetooth device is controlled to switch to sleep mode, which can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device.
- a detailed flow chart of starting at least one connection mode configured in the Bluetooth device in Fig. 1 is shown, and the figure is explained by taking the active connection mode of the Bluetooth device when the Bluetooth device is awakened as an example.
- the process of connecting the Bluetooth device to the device to be connected may include steps 200 to 207.
- step 200 the active connection mode of the Bluetooth device is started, that is, in response to the Bluetooth device being awakened, the active connection mode configured in the Bluetooth device is started.
- a first connection signal is scanned, that is, the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode.
- step 202 it is determined whether the first connection signal is scanned. If the first connection signal broadcast by the device to be connected is scanned, step 203 is executed. If the first connection signal broadcast by the device to be connected is not scanned, step 204 is executed.
- step 203 a connection is made to the device to be connected based on the first connection signal.
- the method may further include: the Bluetooth device establishing a secure information channel with the device to be connected, and after the Bluetooth device establishes the secure information channel with the device to be connected, performing data interaction with the device to be connected; if the Bluetooth device does not perform data interaction with the device to be connected within a first preset time period, triggering the Bluetooth device to switch to sleep mode.
- step 204 the passive connection mode of the Bluetooth device is started, that is, the active connection mode of the Bluetooth device is switched to the passive connection mode.
- a second connection signal is broadcasted, that is, the Bluetooth device broadcasts the second connection signal to the device to be connected.
- step 205 if the second connection signal broadcast by the Bluetooth device is not scanned by the device to be connected, the Bluetooth device returns to step 201 .
- step 206 the second connection signal is scanned by the device to be connected, that is, the second connection signal broadcast by the Bluetooth device is scanned by the device to be connected.
- the method may further include: the Bluetooth device establishing a secure information channel with the device to be connected, and after the Bluetooth device establishes the secure information channel with the device to be connected, performing data interaction with the device to be connected; if the Bluetooth device does not perform data interaction with the device to be connected within a first preset time period, triggering the Bluetooth device to switch to sleep mode.
- FIG. 3 another detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG. 1 is shown, including steps 300 to 305 .
- step 300 the active connection mode and the passive connection mode of the Bluetooth device are synchronously started, that is, in response to the Bluetooth device being awakened, the active connection mode and the passive connection mode of the Bluetooth device are synchronously started.
- a first connection signal is scanned, that is, the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode.
- step 302 a connection is made with a first device based on the first connection signal.
- step 302 it may also include: the Bluetooth device establishes a secure information channel with the first device, and after the Bluetooth device establishes the secure information channel with the first device, interacts with the first device for data; if the Bluetooth device does not interact with the first device for data within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
- a second connection signal is broadcasted, that is, while the Bluetooth device is scanning for the first connection signal, the Bluetooth device also broadcasts the second connection signal.
- step 304 the second connection signal is scanned by the second device, that is, the second connection signal broadcast by the Bluetooth device is scanned by the second device.
- step 305 a connection is made with a second device based on the second connection signal.
- step 305 it may also include: the Bluetooth device establishes a secure information channel with the second device, and after the Bluetooth device establishes the secure information channel with the second device, performs data interaction with the second device; if the Bluetooth device does not perform data interaction with the second device within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
- each device to be connected receives the same control data sent by the Bluetooth device.
- the connection mode of the device to be connected with the unknown connection mode can be adaptively connected, thereby improving the flexibility of connecting the Bluetooth device with the device to be connected and improving the user experience of the Bluetooth device.
- FIG. 4 shows a block diagram of a Bluetooth connection device according to some embodiments of the present disclosure.
- the Bluetooth connection device 400 may include: a starting unit 401, which is used to start at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, so that the Bluetooth device is connected to the device to be connected, and the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- a starting unit 401 which is used to start at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, so that the Bluetooth device is connected to the device to be connected
- the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- the startup unit 401 is further configured to start any one of the connection modes configured in the Bluetooth device, so that the Bluetooth device is connected to the device to be connected in any one of the connection modes; and if the Bluetooth device is in any one of the connection modes If the Bluetooth device is not connected to the device to be connected, other connection modes configured in the Bluetooth device except the any one connection mode are started, so that the Bluetooth device is connected to the device to be connected in the other connection mode.
- the device to be connected includes a first device and a second device
- the starting unit 401 is also used to synchronously start the active connection mode and the passive connection mode configured in the Bluetooth device, so that the Bluetooth device is connected to the first device in the active connection mode, and is connected to the second device in the passive connection mode.
- the starting unit 401 is further configured to scan a first connection signal broadcast by a device to be connected in the active connection mode; and if the first connection signal is scanned, connect to the device to be connected based on the first connection signal.
- the starting unit 401 is further used to determine at least one first connection signal with the strongest signal strength as a target connection signal if multiple first connection signals are scanned; and connect to the device to be connected based on the target connection signal.
- the starting unit 401 is also used to send a first connection request to the device to be connected based on the first connection signal; and after the device to be connected authenticates the first connection request, establish a secure connection channel with the device to be connected to complete the connection with the device to be connected.
- the starting unit 401 is further configured to broadcast a second connection signal to the device to be connected in the passive connection mode; and if the device to be connected scans the second connection signal, connect to the device to be connected based on the second connection signal.
- the starting unit 401 is also used to receive a second connection request sent by the device to be connected based on the second connection signal; and after the second connection request is authenticated, establish a secure connection channel with the device to be connected to complete the connection with the device to be connected.
- the starting unit 401 is also used to interact data with the device to be connected after the Bluetooth device is connected to the device to be connected; and if the Bluetooth device does not interact data with the device to be connected within a first preset time period, trigger the Bluetooth device to switch to sleep mode.
- the starting unit 401 is also used to receive feedback data corresponding to the first control data sent by the device to be connected after the Bluetooth device sends the first control data to the device to be connected, the first control data being the control data sent by the Bluetooth device to the device to be connected for the first time; and to shield feedback data corresponding to the second control data sent by the device to be connected after the Bluetooth device sends the second control data to the device to be connected, the second control data being the control data sent by the Bluetooth device to the device to be connected not for the first time.
- the starting unit 401 is further configured to: if the Bluetooth device is not connected to the waiting mode in both the active connection mode and the passive connection mode within a second preset time period, Connecting a device triggers the Bluetooth device to switch to sleep mode.
- FIG. 5 shows a schematic diagram of the structure of a computer system of a Bluetooth device according to some embodiments of the present disclosure.
- the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method described in the above embodiment.
- ROM read-only memory
- RAM random access memory
- various programs and data required for system operation are also stored.
- the CPU 501, the ROM 502 and the RAM 503 are connected to each other through the bus 504.
- the input/output (I/O) interface 505 is also connected to the bus 504.
- the following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc.
- the communication section 509 performs communication processing via a network such as the Internet.
- a drive 510 is also connected to the I/O interface 505 as needed.
- a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
- an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart.
- the computer program can be downloaded and installed from a network through a communication part 509, and/or installed from a removable medium 511.
- CPU central processing unit
- various functions defined in the system of the present disclosure are executed.
- the computer-readable medium shown in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
- the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above.
- Computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
- a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program It can be used by or in combination with an instruction execution system, device or device.
- a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code.
- This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
- the computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate or transmit a program for use by or in combination with an instruction execution system, device or device.
- the program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
- each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function.
- the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
- each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
- the units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor.
- the names of these units do not constitute limitations on the units themselves in some cases.
- the present disclosure further provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium.
- a processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the Bluetooth connection method described in the above embodiment.
- the present disclosure further provides a computer-readable medium, which may be included in the Bluetooth device described in the above embodiment; or may exist independently without being assembled into the Bluetooth device.
- the above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a Bluetooth device, the Bluetooth device implements the Bluetooth connection method described in the above embodiment.
- the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
- a non-volatile storage medium which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.
- a computing device which can be a personal computer, a server, a touch terminal, or a network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Disclosed are a Bluetooth connection method and device, a storage medium, and a Bluetooth device. The method comprises: in response to the Bluetooth device being awakened, starting at least one connection mode configured in the Bluetooth device, such that the Bluetooth device is connected to a device to be connected. The Bluetooth device is configured with an active connection mode and a passive connection mode. The active connection mode is used by the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used by the Bluetooth device to passively connect to the device to be connected.
Description
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2022年9月30日提交、申请号为202211208378.1的中国专利申请的优先权,其全部内容通过引用合并于此。This application claims priority to Chinese patent application No. 202211208378.1, filed on September 30, 2022, the entire contents of which are incorporated herein by reference.
本公开属于蓝牙技术领域,具体而言,涉及一种蓝牙连接方法、装置、存储介质及蓝牙设备。The present disclosure belongs to the field of Bluetooth technology, and in particular, relates to a Bluetooth connection method, device, storage medium and Bluetooth equipment.
在蓝牙设备对待连接设备控制的应用场景中,比如,在蓝牙设备为蓝牙遥控设备,待连接设备为空调设备时,在蓝牙遥控设备对空调设备控制的场景中,一般需要特地设计蓝牙遥控设备的连接模式以适应已知连接模式的待连接的空调设备。然而,这种实施方式让蓝牙遥控设备受限于待连接的空调设备的连接方式。对于未知连接模式的待连接的空调设备而言,没有经过特地设计的蓝牙遥控设备则无法灵活地与其连接,甚至有可能无法与其连接,从而蓝牙遥控设备不能对这种未知连接模式的待连接的空调设备进行控制。基于此,如何提高蓝牙设备与待连接设备连接的灵活性是亟待解决的技术问题。In the application scenario of the Bluetooth device controlling the device to be connected, for example, when the Bluetooth device is a Bluetooth remote control device and the device to be connected is an air-conditioning device, in the scenario where the Bluetooth remote control device controls the air-conditioning device, it is generally necessary to specially design the connection mode of the Bluetooth remote control device to adapt to the air-conditioning device to be connected with a known connection mode. However, this implementation method limits the Bluetooth remote control device to the connection method of the air-conditioning device to be connected. For the air-conditioning device to be connected with an unknown connection mode, a Bluetooth remote control device that has not been specially designed cannot be flexibly connected to it, and may even be unable to connect to it, so that the Bluetooth remote control device cannot control the air-conditioning device to be connected with such an unknown connection mode. Based on this, how to improve the flexibility of the connection between the Bluetooth device and the device to be connected is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本公开的实施例提供了一种蓝牙连接方法、装置、存储介质及蓝牙设备,进而在一定程度上能够提高蓝牙设备与待连接设备连接的灵活性。The embodiments of the present disclosure provide a Bluetooth connection method, apparatus, storage medium and Bluetooth device, which can improve the flexibility of connecting a Bluetooth device with a device to be connected to a certain extent.
本公开的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本公开的实践而习得。Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
依据本公开的第一方面,提供了一种蓝牙连接方法,所述方法包括:响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与所述待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与所述待连接设备连接。According to a first aspect of the present disclosure, a Bluetooth connection method is provided, the method comprising: in response to a Bluetooth device being awakened, starting at least one connection mode configured in the Bluetooth device so that the Bluetooth device is connected to a device to be connected, the Bluetooth device being configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
依据本公开的第二方面,提供了一种蓝牙连接装置,所述装置包括启动单元,被用于响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设
备主动与所述待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与所述待连接设备连接。According to a second aspect of the present disclosure, a Bluetooth connection device is provided, the device comprising a starting unit, which is used to start at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, so that the Bluetooth device is connected to a device to be connected, the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to connect to the device to be connected. The passive connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
依据本公开的第三方面,提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行以实现如上所述的蓝牙连接方法所执行的操作。According to a third aspect of the present disclosure, a computer-readable storage medium is provided, in which at least one program code is stored. The at least one program code is loaded and executed by a processor to implement the operations performed by the Bluetooth connection method as described above.
依据本公开的第四方面,提供了一种蓝牙设备,包括一个或多个处理器和一个或多个存储器,所述一个或多个存储器中存储有至少一条程序代码,所述至少一条程序代码由所述一个或多个处理器加载并执行以实现如上所述的蓝牙连接方法所执行的操作。According to a fourth aspect of the present disclosure, a Bluetooth device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the Bluetooth connection method as described above.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。显而易见地,下面描述中的附图仅仅是本公开的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。在附图中:The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
图1示出了依据本公开一些实施例的蓝牙连接方法的流程图;FIG1 shows a flow chart of a Bluetooth connection method according to some embodiments of the present disclosure;
图2示出了图1中启动配置于所述蓝牙设备中的至少一种连接模式的一种细节流程图;FIG. 2 shows a detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG. 1 ;
图3示出了图1中启动配置于所述蓝牙设备中的至少一种连接模式的另一种细节流程图;FIG3 shows another detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG1 ;
图4示出了依据本公开一些实施例的蓝牙连接装置的框图;以及FIG4 shows a block diagram of a Bluetooth connection device according to some embodiments of the present disclosure; and
图5示出了依据本公开一些实施例的蓝牙设备的计算机系统的结构示意图。FIG. 5 shows a schematic diagram of the structure of a computer system of a Bluetooth device according to some embodiments of the present disclosure.
现在将参考附图更全面地描述示例实施方式。然而,示例实施方式能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施方式使得本公开将更加全面和完整,并将示例实施方式的构思全面地传达给本领域的技术人员。Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多细节从而给出对本公开的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本公开的技术方案而没有特定细节中的一个或更多,或者可以采用其它的方法、组元、装置、步骤等。在其它情况下,不详细示出或描述公知方法、装置、实现或者操作
以避免模糊本公开的各方面。In addition, the described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many details are provided to give a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, well-known methods, devices, implementations or operations are not shown or described in detail. This is to avoid obscuring aspects of the disclosure.
附图中所示的方框图仅仅是功能实体,不一定必须与物理上独立的实体相对应。即,可以采用软件形式来实现这些功能实体,或在一个或多个硬件模块或集成电路中实现这些功能实体,或在不同网络和/或处理器装置和/或微控制器装置中实现这些功能实体。The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
附图中所示的流程图仅是示例性说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解,而有的操作/步骤可以合并或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations/steps, nor must they be executed in the order described. For example, some operations/steps can be decomposed, and some operations/steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
需要说明的是:在本文中提及的“多个”是指两个或两个以上。“和/或”描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。It should be noted that the "multiple" mentioned in this article refers to two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character "/" generally indicates that the associated objects before and after are in an "or" relationship.
需要注意的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的对象在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在图示或描述的那些以外的顺序实施。It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those shown or described.
为使本公开的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开的一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
下面将结合附图,对本公开的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the following embodiments and features in the embodiments may be combined with each other.
在本公开中,所述蓝牙设备中可以配置主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与待连接设备连接,所述待连接设备可以是配置有蓝牙模块的智能设备,比如空调、冰箱、电视、灯具、音响等,在本公开中不做限定。In the present disclosure, the Bluetooth device can be configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected. The device to be connected can be a smart device equipped with a Bluetooth module, such as an air conditioner, refrigerator, television, lamp, stereo, etc., which is not limited in the present disclosure.
参见图1,示出了依据本公开一些实施例的蓝牙连接方法的流程图。该蓝牙连接方法可以包括步骤110:响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与所述待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与所述待连接设备连接。Referring to Fig. 1, a flow chart of a Bluetooth connection method according to some embodiments of the present disclosure is shown. The Bluetooth connection method may include step 110: in response to a Bluetooth device being awakened, starting at least one connection mode configured in the Bluetooth device so that the Bluetooth device is connected to a device to be connected, wherein the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
在一些实施方式中,可以利用陀螺仪检测原理实现对所述蓝牙设备的唤醒。示例性的,可以利用陀螺仪检测所述蓝牙设备的方向以及方位信息,以
确定所述蓝牙设备是否被拿起,如果所述蓝牙设备被拿起则所述蓝牙设备被唤醒。在另一些实施方式中,也可以利用在所述蓝牙设备上进行按钮操作以唤醒所述蓝牙设备。对唤醒所述蓝牙设备的具体实施方式,在本公开中不做限定。In some implementations, the Bluetooth device may be awakened using a gyroscope detection principle. For example, a gyroscope may be used to detect the direction and orientation information of the Bluetooth device. Determine whether the Bluetooth device is picked up, and if the Bluetooth device is picked up, the Bluetooth device is awakened. In other implementations, the Bluetooth device can also be awakened by operating a button on the Bluetooth device. The specific implementation method of waking up the Bluetooth device is not limited in this disclosure.
在一些实施方式中,所述启动配置于所述蓝牙设备中的至少一种连接模式,可以按照如下步骤111至步骤112执行。In some implementations, the starting of at least one connection mode configured in the Bluetooth device may be performed according to the following steps 111 to 112.
在步骤111,启动配置于所述蓝牙设备中的任意一种连接模式,以使得所述蓝牙设备在所述任意一种连接模式下与所述待连接设备连接。In step 111, any one connection mode configured in the Bluetooth device is started, so that the Bluetooth device is connected to the device to be connected in any one of the connection modes.
在步骤112,如果所述蓝牙设备在所述任意一种连接模式下未连接到所述待连接设备,则启动配置于所述蓝牙设备中的除所述任意一种连接模式之外的其它连接模式,以使得所述蓝牙设备在所述其它连接模式下与所述待连接设备连接。In step 112, if the Bluetooth device is not connected to the device to be connected in any of the connection modes, other connection modes configured in the Bluetooth device except for the any of the connection modes are started, so that the Bluetooth device is connected to the device to be connected in the other connection modes.
在另一些实施方式中,所述待连接设备包括第一设备和第二设备,所述启动配置于所述蓝牙设备中的至少一种连接模式,还可以按照如下步骤113执行。In some other implementations, the device to be connected includes a first device and a second device, and the starting of at least one connection mode configured in the Bluetooth device may also be performed according to the following step 113.
在步骤113,同步启动配置于所述蓝牙设备中的所述主动连接模式和所述被动连接模式,以使得所述蓝牙设备在所述主动连接模式下与所述第一设备连接,以及在所述被动连接模式下与所述第二设备连接。In step 113, the active connection mode and the passive connection mode configured in the Bluetooth device are synchronously started, so that the Bluetooth device is connected to the first device in the active connection mode and is connected to the second device in the passive connection mode.
可以理解的是,所述蓝牙设备中配置有主动连接模式和被动连接模式,当检测到所述蓝牙设备被唤醒,则可以首先启动配置于所述蓝牙设备中的主动连接模式,如果主动连接模式未连接成功,则启动配置于所述蓝牙设备中的被动连接模式;或者可以首先启动配置于所述蓝牙设备中的被动连接模式,如果被动连接模式未连接成功,则启动配置于所述蓝牙设备中的主动连接模式;或者同步启动配置于所述蓝牙设备中的主动连接模式和被动连接模式。It can be understood that the Bluetooth device is configured with an active connection mode and a passive connection mode. When it is detected that the Bluetooth device is awakened, the active connection mode configured in the Bluetooth device can be started first. If the active connection mode fails to connect successfully, the passive connection mode configured in the Bluetooth device is started; or the passive connection mode configured in the Bluetooth device can be started first. If the passive connection mode fails to connect successfully, the active connection mode configured in the Bluetooth device is started; or the active connection mode and the passive connection mode configured in the Bluetooth device are started simultaneously.
需要说明的是,检测到所述蓝牙设备被唤醒后,所述蓝牙设备启动何种连接模式,可以根据所述蓝牙设备被唤醒的方式确定,也可以根据上一次与待连接设备的连接记录确定。It should be noted that after detecting that the Bluetooth device is awakened, which connection mode the Bluetooth device starts can be determined according to the way the Bluetooth device is awakened, or according to the last connection record with the device to be connected.
在一些实施方式中,可以在所述蓝牙设备的控制面板中设置与连接模式相匹配的唤醒按键,当所述蓝牙设备检测到唤醒按键被触控时,启动与唤醒按键相匹配的模式。在存在多台待连接设备的场景中,用户可以通过触控与同步启动相匹配的唤醒按键,同步启动所述蓝牙设备的主动连接模式和被动连接模式。In some implementations, a wake-up button that matches the connection mode can be set in the control panel of the Bluetooth device, and when the Bluetooth device detects that the wake-up button is touched, the mode that matches the wake-up button is started. In a scenario where there are multiple devices to be connected, the user can synchronously start the active connection mode and the passive connection mode of the Bluetooth device by touching the wake-up button that matches the synchronous start.
在另一些实施方式中,也可以在检测到所述蓝牙设备被拿起后,获取所述蓝牙设备中上一次与待连接设备的连接记录,如果上一次是通过主动连接模式与待连接设备进行连接,则启动所述蓝牙设备的主动连接模式;如果上一次是通过被动连接模式与待连接设备进行连接,则启动所述蓝牙设备的被动连接模式;如果上一次是通过同步启动主动连接模式和被动连接模式与待
连接设备进行连接,则同步启动所述蓝牙设备的主动连接模式和被动连接模式。对启动配置于所述蓝牙设备中何种连接模式的实施方式,在本公开中不做限定。In some other implementations, after detecting that the Bluetooth device is picked up, the last connection record between the Bluetooth device and the device to be connected is obtained. If the last time the device was connected to the device to be connected was through an active connection mode, the active connection mode of the Bluetooth device is started; if the last time the device was connected to the device to be connected was through a passive connection mode, the passive connection mode of the Bluetooth device is started; if the last time the device was connected to the device to be connected was through a passive connection mode, the passive connection mode of the Bluetooth device is started; When the connecting device is connected, the active connection mode and the passive connection mode of the Bluetooth device are synchronously started. The implementation method of starting which connection mode is configured in the Bluetooth device is not limited in this disclosure.
在本公开中,通过响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,在一定程度上能增加所述蓝牙设备的连接方式,进而能提高对不同连接方式的待连接设备的适应性。In the present disclosure, by starting at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, the connection modes of the Bluetooth device can be increased to a certain extent, thereby improving the adaptability to devices to be connected with different connection modes.
在一些实施方式中,所述蓝牙设备在所述主动连接模式下,扫描待连接设备广播的第一连接信号,如果扫描到所述第一连接信号,则基于所述第一连接信号与待连接设备连接;如果扫描到多个所述第一连接信号,则确定信号强度最强的至少一个第一连接信号,作为目标连接信号,基于所述目标连接信号与待连接设备连接。In some embodiments, the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode. If the first connection signal is scanned, the device to be connected is connected based on the first connection signal. If multiple first connection signals are scanned, at least one first connection signal with the strongest signal strength is determined as the target connection signal, and the device to be connected is connected based on the target connection signal.
需要说明的是,所述第一连接信号可以是所述待连接设备广播的蓝牙数据信息,即待连接设备广播的连接请求数据为蓝牙数据信息,此时可以通过蓝牙数据信息中的dB值来判断所述第一连接信号的信号强度。It should be noted that the first connection signal may be Bluetooth data information broadcast by the device to be connected, that is, the connection request data broadcast by the device to be connected is Bluetooth data information. At this time, the signal strength of the first connection signal may be determined by the dB value in the Bluetooth data information.
可以理解的是,所述蓝牙设备的主动连接模式只有在扫描到待连接设备的连接请求时才能实现与待连接设备连接。如果所述蓝牙设备在所有信息通道中只扫描到一个第一连接信号,则与所述第一连接信号相对应的待连接设备相连接;如果所述蓝牙设备处在多个待连接设备的场景中,则所述蓝牙设备在扫描所有信息通道的蓝牙数据信息时,则会扫描到多个待连接设备的第一连接信号,即所述蓝牙设备会扫描到多个第一连接信号。It is understandable that the active connection mode of the Bluetooth device can only connect to the device to be connected when the connection request of the device to be connected is scanned. If the Bluetooth device scans only one first connection signal in all information channels, the device to be connected corresponding to the first connection signal is connected; if the Bluetooth device is in a scene with multiple devices to be connected, the Bluetooth device will scan the first connection signals of multiple devices to be connected when scanning the Bluetooth data information of all information channels, that is, the Bluetooth device will scan multiple first connection signals.
在一些实施方式中,如果所述蓝牙设备在主动连接模式下,扫描到多个所述第一连接信号,则确定信号强度最强的至少一个所述第一连接信号,作为目标连接信号;以及基于所述目标连接信号与待连接设备连接。In some implementations, if the Bluetooth device scans multiple first connection signals in active connection mode, it determines at least one first connection signal with the strongest signal strength as the target connection signal; and connects to the device to be connected based on the target connection signal.
需要说明的是,在所述蓝牙设备扫描到多个第一连接信号时,可以对扫描到的所有的第一连接信号按照信号强度从强到弱的顺序进行排序,基于排序结果,将其中信号强度最强的第一连接信号确定为目标连接信号,所述蓝牙设备分别与目标连接信号相对应的待连接设备进行连接。It should be noted that when the Bluetooth device scans multiple first connection signals, all the scanned first connection signals can be sorted in order of signal strength from strong to weak. Based on the sorting result, the first connection signal with the strongest signal strength is determined as the target connection signal, and the Bluetooth device connects to the devices to be connected corresponding to the target connection signals respectively.
可以理解的是,在一些实施方式中,如果所述蓝牙设备在主动连接模式下,扫描到多个所述第一连接信号,则会与至少一个待连接设备进行连接。It is understandable that, in some implementations, if the Bluetooth device scans multiple first connection signals in the active connection mode, it will connect to at least one device to be connected.
在本公开实施例中,可以基于对所有信息通道的蓝牙数据信息的扫描,确定至少一个第一连接信号,并基于确定到的第一连接信号与待连接设备进行连接。如此可以在一些场景中同时连接多台待连接设备,进而能实现所述蓝牙设备同时对多台待连接设备的控制,提高用户利用所述蓝牙设备对多台待连接设备进行控制的便捷性。In the disclosed embodiment, at least one first connection signal can be determined based on scanning of Bluetooth data information of all information channels, and a connection can be made to the device to be connected based on the determined first connection signal. In this way, multiple devices to be connected can be connected at the same time in some scenarios, and the Bluetooth device can control multiple devices to be connected at the same time, thereby improving the convenience of users using the Bluetooth device to control multiple devices to be connected.
在一些实施方式中,所述蓝牙设备在所述主动连接模式下,所述基于所述第一连接信号与所述待连接设备连接,还可以包括:基于所述第一连接信号,向待连接设备发送第一连接请求;以及在待连接设备对所述第一连接请
求认证通过之后,建立与待连接设备的安全连接通道,以完成与待连接设备之间的连接。In some implementations, the Bluetooth device in the active connection mode, connecting with the device to be connected based on the first connection signal may further include: sending a first connection request to the device to be connected based on the first connection signal; and After the authentication is passed, a secure connection channel is established with the device to be connected to complete the connection with the device to be connected.
可以理解的是,在所述蓝牙设备扫描到所述第一连接信号之后并不能立即与所述第一连接信号相对应的待连接设备进行数据交互,需要进行安全认证之后,建立了安全连接通道才能与所述待连接设备进行数据交互。It is understandable that after the Bluetooth device scans the first connection signal, it cannot immediately interact with the device to be connected corresponding to the first connection signal. It needs to perform security authentication and establish a secure connection channel before it can interact with the device to be connected.
在一些实施方式中,如果蓝牙遥控设备在主动连接模式下,扫描到配置为被动连接模式的空调设备,则所述蓝牙遥控设备需要向所述空调设备发送第一连接请求,在所述空调设备对所述第一连接请求进行安全认证并建立安全连接通道之后,才能实现所述蓝牙遥控设备对所述空调设备的控制操作。In some embodiments, if the Bluetooth remote control device scans an air-conditioning device configured in a passive connection mode in an active connection mode, the Bluetooth remote control device needs to send a first connection request to the air-conditioning device. Only after the air-conditioning device performs security authentication on the first connection request and establishes a secure connection channel can the Bluetooth remote control device implement control operations on the air-conditioning device.
在本公开实施例中,所述蓝牙设备在主动连接模式下与所述待连接设备之间建立安全连接通道,在一定程度上能提高所述蓝牙设备与所述待连接设备之间进行数据交互的安全性和稳定性。In the disclosed embodiment, the Bluetooth device establishes a secure connection channel with the device to be connected in the active connection mode, which can improve the security and stability of data interaction between the Bluetooth device and the device to be connected to a certain extent.
在一些实施方式中,所述蓝牙设备在所述被动连接模式下,向待连接设备广播第二连接信号;以及如果被待连接设备扫描到所述第二连接信号,则基于所述第二连接信号与待连接设备连接。In some implementations, the Bluetooth device broadcasts a second connection signal to the device to be connected in the passive connection mode; and if the device to be connected scans the second connection signal, connects to the device to be connected based on the second connection signal.
需要说明的是,所述蓝牙设备在被动连接模式下,会主动按照格式协议广播所述蓝牙设备的蓝牙数据信息,即向待连接设备广播第二连接信号,且所述第二连接信号只能被一个待连接设备接收。It should be noted that, in the passive connection mode, the Bluetooth device will actively broadcast the Bluetooth data information of the Bluetooth device according to the format protocol, that is, broadcast the second connection signal to the device to be connected, and the second connection signal can only be received by one device to be connected.
还需要说明的是,在一些实施方式中,所述蓝牙设备在被动连接模式下,向待连接设备广播第二连接信号的过程中,可以在所述蓝牙设备中提前配置预设广播时间。预设广播时间可以是10s、20s、30s等,在本公开中不做限定。It should also be noted that in some embodiments, when the Bluetooth device is in passive connection mode and broadcasts the second connection signal to the device to be connected, a preset broadcast time can be configured in advance in the Bluetooth device. The preset broadcast time can be 10s, 20s, 30s, etc., which is not limited in this disclosure.
在一些实施方式中,所述基于所述第二连接信号与所述待连接设备连接,可以包括:基于所述第二连接信号,接收所述待连接设备发送的第二连接请求;以及在对所述第二连接请求认证通过之后,建立与所述待连接设备的安全连接通道,以完成与所述待连接设备之间的连接。In some embodiments, connecting with the device to be connected based on the second connection signal may include: receiving a second connection request sent by the device to be connected based on the second connection signal; and establishing a secure connection channel with the device to be connected after authenticating the second connection request to complete the connection with the device to be connected.
可以理解的是,在所述待连接设备扫描到所述蓝牙设备广播的第二连接信号之后,并不能立即实现所述蓝牙设备与所述待连接设备之间的数据交互,需要进行安全认证之后,建立了安全连接通道才能与所述待连接设备进行数据交互。It is understandable that after the device to be connected scans the second connection signal broadcast by the Bluetooth device, data interaction between the Bluetooth device and the device to be connected cannot be achieved immediately. It is necessary to perform security authentication and establish a secure connection channel before data interaction with the device to be connected can be performed.
在一些实施方式中,如果蓝牙遥控设备在被动连接模式下,通过广播第二连接信号,在配置为主动连接模式的空调设备扫描到所述第二连接信号之后,所述空调设备向所述蓝牙遥控设备发送第二连接请求,在所述空调设备与所述蓝牙遥控设备进行安全认证并建立了安全连接通道之后,才能实现所述蓝牙遥控设备对所述空调设备的控制操作。In some embodiments, if the Bluetooth remote control device is in a passive connection mode, by broadcasting a second connection signal, after the air-conditioning device configured in an active connection mode scans the second connection signal, the air-conditioning device sends a second connection request to the Bluetooth remote control device. Only after the air-conditioning device and the Bluetooth remote control device perform security authentication and establish a secure connection channel can the Bluetooth remote control device implement control operations on the air-conditioning device.
在本公开实施例中,所述蓝牙设备在被动连接模式下与所述待连接设备之间建立安全连接通道,在一定程度上能提高所述蓝牙设备与所述待连接设备之间进行数据交互的安全性和稳定性。
In the disclosed embodiment, the Bluetooth device establishes a secure connection channel with the device to be connected in the passive connection mode, which can improve the security and stability of data interaction between the Bluetooth device and the device to be connected to a certain extent.
在一些实施方式中,在所述蓝牙设备与待连接设备连接之后,所述蓝牙设备与所述待连接设备进行数据交互,如果在第一预设时长内,所述蓝牙设备未与所述待连接设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。In some implementations, after the Bluetooth device is connected to the device to be connected, the Bluetooth device interacts with the device to be connected. If the Bluetooth device does not interact with the device to be connected within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
需要说明的是,第一预设时长为蓝牙设备系统自定义设置的时长,可以是10s、30s、60s等,在本公开中不做限定。It should be noted that the first preset duration is a duration customized by the Bluetooth device system, which may be 10s, 30s, 60s, etc., and is not limited in the present disclosure.
在另一些实施方式中,也可以利用检测到用户退出唤醒操作后,在一定时长后触发所述蓝牙设备切换至休眠模式。In other implementations, after detecting that the user exits the wake-up operation, the Bluetooth device may be triggered to switch to the sleep mode after a certain period of time.
以拿起所述蓝牙设备作为对所述蓝牙设备的唤醒操作为例,可以在所述蓝牙设备检测到用户退出拿起操作(即,将所述蓝牙设备放下)3s之后,触发所述蓝牙设备切换至休眠模式;也可以在所述蓝牙设备的控制面板配置退出按键,当检测到用户对所述退出按键的触控操作时,控制所述蓝牙设备切换至休眠模式;也可以根据不同情况设计所述蓝牙设备切换至休眠模式的触发方式,在本公开中不做限定。Taking picking up the Bluetooth device as an example of a wake-up operation for the Bluetooth device, the Bluetooth device can be triggered to switch to sleep mode 3 seconds after the Bluetooth device detects that the user exits the picking-up operation (i.e., puts down the Bluetooth device); an exit button can also be configured on the control panel of the Bluetooth device, and when the user touches the exit button, the Bluetooth device is controlled to switch to sleep mode; the triggering method for the Bluetooth device to switch to sleep mode can also be designed according to different situations, which is not limited in the present disclosure.
可以理解的是,在本公开实施例中,在所述蓝牙设备没有与待连接设备进行数据交互的一定时长后,控制所述蓝牙设备切换至休眠模式,能降低蓝牙设备的功耗,进而延长蓝牙设备的使用寿命。It can be understood that in the embodiment of the present disclosure, after the Bluetooth device has not interacted with the device to be connected for a certain period of time, controlling the Bluetooth device to switch to sleep mode can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device.
在一些实施方式中,在所述蓝牙设备与所述待连接设备进行数据交互的过程中,所述蓝牙连接方法还可以包括:在所述蓝牙设备向所述待连接设备发送第一控制数据之后,接收由所述待连接设备发送的与所述第一控制数据对应的反馈数据,所述第一控制数据为所述蓝牙设备首次向所述待连接设备发送的控制数据;以及在所述蓝牙设备向所述待连接设备发送第二控制数据之后,屏蔽由所述待连接设备发送的与所述第二控制数据对应的反馈数据,所述第二控制数据为所述蓝牙设备非首次向所述待连接设备发送的控制数据。In some embodiments, during data interaction between the Bluetooth device and the device to be connected, the Bluetooth connection method may further include: after the Bluetooth device sends first control data to the device to be connected, receiving feedback data corresponding to the first control data sent by the device to be connected, wherein the first control data is control data sent by the Bluetooth device to the device to be connected for the first time; and after the Bluetooth device sends second control data to the device to be connected, shielding feedback data corresponding to the second control data sent by the device to be connected, wherein the second control data is control data sent by the Bluetooth device to the device to be connected not for the first time.
需要说明的是,在所述蓝牙设备与待连接设备进行数据交互的过程中,所述待连接设备在接受到所述蓝牙设备发送的控制数据后会回传设备状态数据。所述蓝牙设备会将所述待连接设备回传的设备状态数据缓存在本地存储器中,同时也会将所述蓝牙设备每次向待连接设备发送的控制数据缓存在本地存储器中。It should be noted that, during the data interaction between the Bluetooth device and the device to be connected, the device to be connected will return device status data after receiving the control data sent by the Bluetooth device. The Bluetooth device will cache the device status data returned by the device to be connected in the local memory, and will also cache the control data sent by the Bluetooth device to the device to be connected each time in the local memory.
在所述蓝牙设备与所述待连接设备进行数据交互的过程中,所述蓝牙设备只记录由所述待连接设备发送的与第一控制数据对应的反馈数据。在一些实施方式中,可以是屏蔽由所述待连接设备发送的与所述第二控制数据对应的反馈数据,所述第二控制数据为所述蓝牙设备非首次向所述待连接设备发送的控制数据。在另一些实施方式中,也可以是在所述蓝牙设备中提前配置数据自纠正模式,即所述蓝牙设备发送的第一控制数据中包括只需所述待连接设备发送与所述第一控制数据对应的反馈数据,无需发送与第二控制数据对应的反馈数据。在又一些实施方式中,也可以根据不同情况设计所述蓝牙设备只记录由所述待连接设备发送的与第一控制数据对应的反馈数据的实施
方式,在本公开中不做限定。During the data interaction between the Bluetooth device and the device to be connected, the Bluetooth device only records the feedback data corresponding to the first control data sent by the device to be connected. In some embodiments, the feedback data corresponding to the second control data sent by the device to be connected may be shielded, and the second control data is control data that is not sent for the first time by the Bluetooth device to the device to be connected. In other embodiments, the data self-correction mode may be configured in advance in the Bluetooth device, that is, the first control data sent by the Bluetooth device includes feedback data corresponding to the first control data that only the device to be connected needs to send, and there is no need to send feedback data corresponding to the second control data. In some other embodiments, the implementation of the Bluetooth device only recording the feedback data corresponding to the first control data sent by the device to be connected may also be designed according to different situations. The method is not limited in this disclosure.
在本公开实施例中,所述蓝牙设备在与所述待连接设备进行数据交互的过程中,所述蓝牙设备通过只记录与所述蓝牙设备首次向所述待连接设备发送的第一控制数据对应的反馈数据,能降低蓝牙设备的功耗,进而延长蓝牙设备的使用寿命。In the embodiment of the present disclosure, during the process of data interaction between the Bluetooth device and the device to be connected, the Bluetooth device can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device by only recording feedback data corresponding to the first control data sent by the Bluetooth device to the device to be connected for the first time.
在一些实施方式中,所述蓝牙连接方法还可以包括:如果在第二预设时长内,所述蓝牙设备在所述主动连接模式和被动连接模式下均未连接到待连接设备,则触发所述蓝牙设备切换至休眠模式。In some implementations, the Bluetooth connection method may further include: if the Bluetooth device is not connected to the device to be connected in both the active connection mode and the passive connection mode within a second preset time period, triggering the Bluetooth device to switch to a sleep mode.
需要说明的是,第二预设时长为蓝牙设备系统自定义设置的时长,可以是10s、30s,60s等,在本公开中不做限定。It should be noted that the second preset duration is a duration customized by the Bluetooth device system, which may be 10s, 30s, 60s, etc., and is not limited in the present disclosure.
在另一些实施方式中,也可以利用检测到用户退出唤醒操作后,在一时长后触发所述蓝牙设备切换至休眠模式。In other implementations, it is also possible to detect that the user exits the wake-up operation and trigger the Bluetooth device to switch to the sleep mode after a period of time.
以拿起所述蓝牙设备作为对所述蓝牙设备的唤醒操作为例,可以在所述蓝牙设备检测到用户退出拿起操作(即,将所述蓝牙设备)放下3s之后,触发所述蓝牙设备结束执行连接待连接设备的工作模式,将所述蓝牙设备切换至休眠模式;也可以在所述蓝牙设备的控制面板配置结束按键,当检测到用户对所述结束按键的触控操作时,触发所述蓝牙设备结束执行连接待连接设备的工作模式,将所述蓝牙设备切换至休眠模式;也可以根据不同情况设计所述蓝牙设备结束执行连接待连接设备的工作模式的触发方式,在本公开中不做限定。Taking picking up the Bluetooth device as an example of a wake-up operation for the Bluetooth device, after the Bluetooth device detects that the user exits the picking-up operation (i.e., puts down the Bluetooth device) for 3 seconds, the Bluetooth device can be triggered to end the working mode of connecting to the device to be connected and switch the Bluetooth device to sleep mode; an end button can also be configured on the control panel of the Bluetooth device, and when the user's touch operation on the end button is detected, the Bluetooth device is triggered to end the working mode of connecting to the device to be connected and switch the Bluetooth device to sleep mode; the triggering method for the Bluetooth device to end the working mode of connecting to the device to be connected can also be designed according to different situations, which is not limited in the present disclosure.
在本公开实施例中,响应于所述蓝牙设备被唤醒,所述蓝牙设备启动主动连接模式。如果所述蓝牙设备在主动连接模式下没有扫描到第一连接信号,则会将所述蓝牙设备的主动连接模式切换至被动连接模式。当所述蓝牙设备在所述被动连接模式下,如果没有被待连接设备扫描到所述第二连接信号,则所述蓝牙设备又会将所述被动连接模式切换为主动连接模式,继续重复上述以实现连接待连接设备为目的的步骤,直到所述蓝牙设备连接所述待连接设备。In an embodiment of the present disclosure, in response to the Bluetooth device being awakened, the Bluetooth device starts an active connection mode. If the Bluetooth device does not scan the first connection signal in the active connection mode, the active connection mode of the Bluetooth device is switched to a passive connection mode. When the Bluetooth device is in the passive connection mode, if the second connection signal is not scanned by the device to be connected, the Bluetooth device switches the passive connection mode to the active connection mode, and continues to repeat the above steps for the purpose of connecting to the device to be connected until the Bluetooth device is connected to the device to be connected.
如果在超过第二预设时长所述述蓝牙设备在所述主动连接模式和被动连接模式下均未连接到待连接设备,则触发所述蓝牙设备切换至休眠模式,即控制所述蓝牙设备结束执行连接待连接设备的工作模式。If the Bluetooth device is not connected to the device to be connected in both the active connection mode and the passive connection mode for more than a second preset time, the Bluetooth device is triggered to switch to the sleep mode, that is, the Bluetooth device is controlled to end the working mode of connecting to the device to be connected.
在一些实施方式中,假如用户将蓝牙遥控设备在没有待连接设备的封闭房间唤醒,并且在第二预设时长内,所述蓝牙遥控设备在主动连接模式和被动连接模式下均不能连接到待连接设备,则会触发所述蓝牙遥控设备切换至休眠模式。In some embodiments, if a user wakes up the Bluetooth remote control device in a closed room where there is no device to be connected, and within a second preset time period, the Bluetooth remote control device cannot connect to the device to be connected in both the active connection mode and the passive connection mode, the Bluetooth remote control device will be triggered to switch to the sleep mode.
可以理解的是,在本公开实施例中,所述蓝牙设备在预设时长内没有连接上待连接设备,则控制所述蓝牙设备切换至休眠模式,能降低蓝牙设备的功耗,进而延长蓝牙设备的使用寿命。
It is understandable that in the embodiment of the present disclosure, if the Bluetooth device fails to connect to the device to be connected within a preset time period, the Bluetooth device is controlled to switch to sleep mode, which can reduce the power consumption of the Bluetooth device and thereby extend the service life of the Bluetooth device.
为了使本领域技术人员更好的理解本公开的技术方案,下面将结合图2和图3对本公开的技术方案中的一些实施例进行整体流程说明。In order to enable those skilled in the art to better understand the technical solution of the present disclosure, the overall process of some embodiments of the technical solution of the present disclosure will be described below in conjunction with Figures 2 and 3.
参见图2,示出了图1中启动配置于所述蓝牙设备中的至少一种连接模式的一种细节流程图,该图是以所述蓝牙设备被唤醒时,启动所述蓝牙设备的主动连接模式为例来进行说明。蓝牙设备与待连接设备连接的过程可以包括步骤200至步骤207。Referring to Fig. 2, a detailed flow chart of starting at least one connection mode configured in the Bluetooth device in Fig. 1 is shown, and the figure is explained by taking the active connection mode of the Bluetooth device when the Bluetooth device is awakened as an example. The process of connecting the Bluetooth device to the device to be connected may include steps 200 to 207.
在步骤200,启动蓝牙设备的主动连接模式,即响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的主动连接模式。In step 200, the active connection mode of the Bluetooth device is started, that is, in response to the Bluetooth device being awakened, the active connection mode configured in the Bluetooth device is started.
在步骤201,扫描第一连接信号,即所述蓝牙设备在所述主动连接模式下,扫描待连接设备广播的第一连接信号。In step 201, a first connection signal is scanned, that is, the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode.
在步骤202中,判断是否扫描到第一连接信号,如果扫描到待连接设备广播的第一连接信号,则执行步骤203,如果没有扫描到所述待连接设备广播的第一连接信号,则执行步骤204。In step 202, it is determined whether the first connection signal is scanned. If the first connection signal broadcast by the device to be connected is scanned, step 203 is executed. If the first connection signal broadcast by the device to be connected is not scanned, step 204 is executed.
在步骤203,基于所述第一连接信号与所述待连接设备连接。In step 203, a connection is made to the device to be connected based on the first connection signal.
在步骤203之后,还可以包括:所述蓝牙设备与所述待连接设备建立安全信息通道,在所述蓝牙设备与待连接设备建立安全信息通道之后,与所述待连接设备进行数据交互,如果在第一预设时长内,所述蓝牙设备未与所述待连接设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。After step 203, the method may further include: the Bluetooth device establishing a secure information channel with the device to be connected, and after the Bluetooth device establishes the secure information channel with the device to be connected, performing data interaction with the device to be connected; if the Bluetooth device does not perform data interaction with the device to be connected within a first preset time period, triggering the Bluetooth device to switch to sleep mode.
在步骤204,启动蓝牙设备被动连接模式,即将所述蓝牙设备的主动连接模式切换为被动连接模式。In step 204, the passive connection mode of the Bluetooth device is started, that is, the active connection mode of the Bluetooth device is switched to the passive connection mode.
在步骤205,广播第二连接信号,即所述蓝牙设备向待连接设备广播第二连接信号。In step 205, a second connection signal is broadcasted, that is, the Bluetooth device broadcasts the second connection signal to the device to be connected.
在步骤205之后,如果所述蓝牙设备广播的第二连接信号未被待连接设备扫描到,则所述蓝牙设备将返回至步骤201。After step 205 , if the second connection signal broadcast by the Bluetooth device is not scanned by the device to be connected, the Bluetooth device returns to step 201 .
在步骤206,被待连接设备扫描到所述第二连接信号,即所述蓝牙设备所广播的第二连接信号被待连接设备扫描到。In step 206, the second connection signal is scanned by the device to be connected, that is, the second connection signal broadcast by the Bluetooth device is scanned by the device to be connected.
在步骤207,基于所述第二连接信号与所述待连接设备连接。In step 207, a connection is made to the device to be connected based on the second connection signal.
在步骤207之后,还可以包括:所述蓝牙设备与所述待连接设备建立安全信息通道,在所述蓝牙设备与待连接设备建立安全信息通道之后,与所述待连接设备进行数据交互,如果在第一预设时长内,所述蓝牙设备未与所述待连接设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。After step 207, the method may further include: the Bluetooth device establishing a secure information channel with the device to be connected, and after the Bluetooth device establishes the secure information channel with the device to be connected, performing data interaction with the device to be connected; if the Bluetooth device does not perform data interaction with the device to be connected within a first preset time period, triggering the Bluetooth device to switch to sleep mode.
参见图3,示出了图1中启动配置于所述蓝牙设备中的至少一种连接模式的另一种细节流程图,包括步骤300至步骤305。3 , another detailed flow chart of starting at least one connection mode configured in the Bluetooth device in FIG. 1 is shown, including steps 300 to 305 .
在步骤300,同步启动蓝牙设备的主动连接模式和被动连接模式,即响应于蓝牙设备被唤醒,同步启动蓝牙设备的主动连接模式和被动连接模式。In step 300, the active connection mode and the passive connection mode of the Bluetooth device are synchronously started, that is, in response to the Bluetooth device being awakened, the active connection mode and the passive connection mode of the Bluetooth device are synchronously started.
在步骤301,扫描第一连接信号,即所述蓝牙设备在所述主动连接模式下,扫描待连接设备广播的第一连接信号。
In step 301, a first connection signal is scanned, that is, the Bluetooth device scans the first connection signal broadcast by the device to be connected in the active connection mode.
在步骤302,基于所述第一连接信号与第一设备连接。In step 302, a connection is made with a first device based on the first connection signal.
在步骤302之后,还可以包括:所述蓝牙设备与第一设备建立安全信息通道,在所述蓝牙设备与第一设备建立安全信息通道之后,与第一设备进行数据交互,如果在第一预设时长内,所述蓝牙设备未与第一设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。After step 302, it may also include: the Bluetooth device establishes a secure information channel with the first device, and after the Bluetooth device establishes the secure information channel with the first device, interacts with the first device for data; if the Bluetooth device does not interact with the first device for data within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
在步骤303,广播第二连接信号,即在所述蓝牙设备扫描第一连接信号的同时,所述蓝牙设备也广播第二连接信号。In step 303, a second connection signal is broadcasted, that is, while the Bluetooth device is scanning for the first connection signal, the Bluetooth device also broadcasts the second connection signal.
在步骤304,被第二设备扫描到所述第二连接信号,即所述蓝牙设备所广播的第二连接信号第二设备扫描到。In step 304, the second connection signal is scanned by the second device, that is, the second connection signal broadcast by the Bluetooth device is scanned by the second device.
在步骤305,基于所述第二连接信号与第二设备连接。In step 305, a connection is made with a second device based on the second connection signal.
在步骤305之后,还可以包括:所述蓝牙设备与第二设备建立安全信息通道,在所述蓝牙设备与第二设备建立安全信息通道之后,与第二设备进行数据交互,如果在第一预设时长内,所述蓝牙设备未与第二设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。After step 305, it may also include: the Bluetooth device establishes a secure information channel with the second device, and after the Bluetooth device establishes the secure information channel with the second device, performs data interaction with the second device; if the Bluetooth device does not perform data interaction with the second device within a first preset time period, the Bluetooth device is triggered to switch to sleep mode.
需要说明的是,在同步启动所述蓝牙设备的主动连接模式和被动连接模式的场景中,在所述主动连接模式和被动连接模式都分别与待连接设备连接后,用户利用所述蓝牙设备对所述待连接设备进行控制时,各个待连接设备接收相同的所述蓝牙设备发送的控制数据。It should be noted that in the scenario where the active connection mode and the passive connection mode of the Bluetooth device are started synchronously, after the active connection mode and the passive connection mode are respectively connected to the device to be connected, when the user uses the Bluetooth device to control the device to be connected, each device to be connected receives the same control data sent by the Bluetooth device.
在本公开的一些实施方式所提供的技术方案中,通过在所述蓝牙设备中配置主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与待连接设备连接,在与未知连接模式的待连接设备进行连接时,可自适应未知连接模式的待连接设备的连接模式,进而能提高蓝牙设备与待连接设备连接的灵活性,提高用户对蓝牙设备的使用体验。In the technical solutions provided in some embodiments of the present disclosure, by configuring an active connection mode and a passive connection mode in the Bluetooth device, wherein the active connection mode is used for the Bluetooth device to actively connect to a device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to a device to be connected, when connecting to a device to be connected with an unknown connection mode, the connection mode of the device to be connected with the unknown connection mode can be adaptively connected, thereby improving the flexibility of connecting the Bluetooth device with the device to be connected and improving the user experience of the Bluetooth device.
以下介绍本公开的装置实施例,可以用于执行本公开上述实施例中的蓝牙连接方法。对于本公开装置实施例中未披露的细节,请参照本公开上述的蓝牙连接方法的实施例。The following describes an apparatus embodiment of the present disclosure, which can be used to execute the Bluetooth connection method in the above-mentioned embodiment of the present disclosure. For details not disclosed in the apparatus embodiment of the present disclosure, please refer to the above-mentioned embodiment of the Bluetooth connection method of the present disclosure.
图4示出了依据本公开一些实施例的蓝牙连接装置的框图。FIG. 4 shows a block diagram of a Bluetooth connection device according to some embodiments of the present disclosure.
参照图4所示,蓝牙连接装置400可以包括:启动单元401,被用于响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与所述待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与所述待连接设备连接。As shown in Figure 4, the Bluetooth connection device 400 may include: a starting unit 401, which is used to start at least one connection mode configured in the Bluetooth device in response to the Bluetooth device being awakened, so that the Bluetooth device is connected to the device to be connected, and the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
在一些实施方式中,所述启动单元401还用于启动配置于所述蓝牙设备中的任意一种连接模式,以使得所述蓝牙设备在所述任意一种连接模式下与所述待连接设备连接;以及如果所述蓝牙设备在所述任意一种连接模式下
未连接到待连接设备,则启动配置于所述蓝牙设备中的除所述任意一种连接模式之外的其它连接模式,以使得所述蓝牙设备在所述其它连接模式下与所述待连接设备连接。In some embodiments, the startup unit 401 is further configured to start any one of the connection modes configured in the Bluetooth device, so that the Bluetooth device is connected to the device to be connected in any one of the connection modes; and if the Bluetooth device is in any one of the connection modes If the Bluetooth device is not connected to the device to be connected, other connection modes configured in the Bluetooth device except the any one connection mode are started, so that the Bluetooth device is connected to the device to be connected in the other connection mode.
在一些实施方式中,所述待连接设备包括第一设备和第二设备,所述启动单元401还用于同步启动配置于所述蓝牙设备中的所述主动连接模式和所述被动连接模式,以使得所述蓝牙设备在所述主动连接模式下与所述第一设备连接,以及在所述被动连接模式下与所述第二设备连接。In some embodiments, the device to be connected includes a first device and a second device, and the starting unit 401 is also used to synchronously start the active connection mode and the passive connection mode configured in the Bluetooth device, so that the Bluetooth device is connected to the first device in the active connection mode, and is connected to the second device in the passive connection mode.
在一些实施方式中,所述启动单元401还用于在所述主动连接模式下,扫描待连接设备广播的第一连接信号;以及如果扫描到所述第一连接信号,则基于所述第一连接信号与所述待连接设备连接。In some implementations, the starting unit 401 is further configured to scan a first connection signal broadcast by a device to be connected in the active connection mode; and if the first connection signal is scanned, connect to the device to be connected based on the first connection signal.
在一些实施例中,所述启动单元401还用于如果扫描到多个所述第一连接信号,则确定信号强度最强的至少一个所述第一连接信号,作为目标连接信号;以及基于所述目标连接信号与所述待连接设备连接。In some embodiments, the starting unit 401 is further used to determine at least one first connection signal with the strongest signal strength as a target connection signal if multiple first connection signals are scanned; and connect to the device to be connected based on the target connection signal.
在一些实施方式中,所述启动单元401还用于基于所述第一连接信号,向所述待连接设备发送第一连接请求;以及在所述待连接设备对所述第一连接请求认证通过之后,建立与所述待连接设备的安全连接通道,以完成与所述待连接设备之间的连接。In some embodiments, the starting unit 401 is also used to send a first connection request to the device to be connected based on the first connection signal; and after the device to be connected authenticates the first connection request, establish a secure connection channel with the device to be connected to complete the connection with the device to be connected.
在一些实施方式中,所述启动单元401还用于在所述被动连接模式下,向待连接设备广播第二连接信号;以及如果被待连接设备扫描到所述第二连接信号,则基于所述第二连接信号与所述待连接设备连接。In some embodiments, the starting unit 401 is further configured to broadcast a second connection signal to the device to be connected in the passive connection mode; and if the device to be connected scans the second connection signal, connect to the device to be connected based on the second connection signal.
在一些实施方式中,所述启动单元401还用于基于所述第二连接信号,接收待连接设备发送的第二连接请求;以及在对所述第二连接请求认证通过之后,建立与所述待连接设备的安全连接通道,以完成与所述待连接设备之间的连接。In some embodiments, the starting unit 401 is also used to receive a second connection request sent by the device to be connected based on the second connection signal; and after the second connection request is authenticated, establish a secure connection channel with the device to be connected to complete the connection with the device to be connected.
在一些实施方式中,所述启动单元401还用于在所述蓝牙设备与所述待连接设备连接之后,与所述待连接设备进行数据交互;以及如果在第一预设时长内,所述蓝牙设备未与所述待连接设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。In some embodiments, the starting unit 401 is also used to interact data with the device to be connected after the Bluetooth device is connected to the device to be connected; and if the Bluetooth device does not interact data with the device to be connected within a first preset time period, trigger the Bluetooth device to switch to sleep mode.
在一些实施方式中,所述启动单元401还用于在所述蓝牙设备向所述待连接设备发送第一控制数据之后,接收由所述待连接设备发送的与所述第一控制数据对应的反馈数据,所述第一控制数据为所述蓝牙设备首次向所述待连接设备发送的控制数据;以及在所述蓝牙设备向所述待连接设备发送第二控制数据之后,屏蔽由所述待连接设备发送的与所述第二控制数据对应的反馈数据,所述第二控制数据为所述蓝牙设备非首次向所述待连接设备发送的控制数据。In some embodiments, the starting unit 401 is also used to receive feedback data corresponding to the first control data sent by the device to be connected after the Bluetooth device sends the first control data to the device to be connected, the first control data being the control data sent by the Bluetooth device to the device to be connected for the first time; and to shield feedback data corresponding to the second control data sent by the device to be connected after the Bluetooth device sends the second control data to the device to be connected, the second control data being the control data sent by the Bluetooth device to the device to be connected not for the first time.
在一些实施方式中,所述启动单元401还用于如果在第二预设时长内,所述蓝牙设备在所述主动连接模式和所述被动连接模式下均未连接到所述待
连接设备,则触发所述蓝牙设备切换至休眠模式。In some implementations, the starting unit 401 is further configured to: if the Bluetooth device is not connected to the waiting mode in both the active connection mode and the passive connection mode within a second preset time period, Connecting a device triggers the Bluetooth device to switch to sleep mode.
图5示出了依据本公开一些实施例的蓝牙设备的计算机系统的结构示意图。FIG. 5 shows a schematic diagram of the structure of a computer system of a Bluetooth device according to some embodiments of the present disclosure.
需要说明的是,图5示出的蓝牙设备的计算机系统500仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。It should be noted that the computer system 500 of the Bluetooth device shown in FIG. 5 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
如图5所示,计算机系统500包括中央处理单元(Central Processing Unit,CPU)501,其可以根据存储在只读存储器(Read-Only Memory,ROM)502中的程序或者从储存部分508加载到随机访问存储器(Random Access Memory,RAM)503中的程序而执行各种适当的动作和处理,例如执行上述实施例中所述的方法。在RAM503中,还存储有系统操作所需的各种程序和数据。CPU501、ROM 502以及RAM 503通过总线504彼此相连。输入/输出(Input/Output,I/O)接口505也连接至总线504。As shown in FIG5 , the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503, such as executing the method described in the above embodiment. In the RAM 503, various programs and data required for system operation are also stored. The CPU 501, the ROM 502 and the RAM 503 are connected to each other through the bus 504. The input/output (I/O) interface 505 is also connected to the bus 504.
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(Cathode Ray Tube,CRT)、液晶显示器(Liquid Crystal Display,LCD)等以及扬声器等的输出部分507;包括硬盘等的储存部分508;以及包括诸如LAN(Local Area Network,局域网)卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入储存部分508。The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed so that a computer program read therefrom is installed into the storage section 508 as needed.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。在该计算机程序被中央处理单元(CPU)501执行时,执行本公开的系统中限定的各种功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part 509, and/or installed from a removable medium 511. When the computer program is executed by a central processing unit (CPU) 501, various functions defined in the system of the present disclosure are executed.
需要说明的是,本公开实施例所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、闪存、光纤、便携式紧凑磁盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序
可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、有线等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program It can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate or transmit a program for use by or in combination with an instruction execution system, device or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在一些实施方式中,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present disclosure. In some embodiments, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现,所描述的单元也可以设置在处理器中。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定。The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, and the units described may also be arranged in a processor. The names of these units do not constitute limitations on the units themselves in some cases.
在一些实施方式中,本公开还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述实施例中所述的蓝牙连接方法。In some embodiments, the present disclosure further provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the Bluetooth connection method described in the above embodiment.
在一些实施方式中,本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的蓝牙设备中所包含的;也可以是单独存在,而未装配入该蓝牙设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该蓝牙设备执行时,使得该蓝牙设备实现上述实施例中所述的蓝牙连接方法。In some embodiments, the present disclosure further provides a computer-readable medium, which may be included in the Bluetooth device described in the above embodiment; or may exist independently without being assembled into the Bluetooth device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a Bluetooth device, the Bluetooth device implements the Bluetooth connection method described in the above embodiment.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本公开的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以划分为由多个模块或者单元来具体化。
It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be divided into multiple modules or units to be embodied.
通过以上的实施方式的描述,本领域的技术人员易于理解,这里描述的示例实施方式可以通过软件实现,也可以通过软件结合必要的硬件的方式来实现。因此,根据本公开实施方式的技术方案可以以软件产品的形式体现出来,该软件产品可以存储在一个非易失性存储介质(可以是CD-ROM,U盘,移动硬盘等)中或网络上,包括若干指令以使得一台计算设备(可以是个人计算机、服务器、触控终端、或者网络设备等)执行根据本公开实施方式的方法。Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
本领域技术人员在考虑说明书及实践这里公开的实施方式后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the embodiments disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。
It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (13)
- 一种蓝牙连接方法,包括:A Bluetooth connection method, comprising:响应于蓝牙设备被唤醒,启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与所述待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与所述待连接设备连接。In response to the Bluetooth device being awakened, at least one connection mode configured in the Bluetooth device is started to connect the Bluetooth device to a device to be connected. The Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- 根据权利要求1所述的方法,其中,所述启动配置于所述蓝牙设备中的至少一种连接模式,包括:The method according to claim 1, wherein the starting at least one connection mode configured in the Bluetooth device comprises:启动配置于所述蓝牙设备中的任意一种连接模式,以使得所述蓝牙设备在所述任意一种连接模式下与所述待连接设备连接;以及Starting any one of the connection modes configured in the Bluetooth device, so that the Bluetooth device is connected to the device to be connected in any one of the connection modes; and如果所述蓝牙设备在所述任意一种连接模式下未连接到所述待连接设备,则启动配置于所述蓝牙设备中的除所述任意一种连接模式之外的其它连接模式,以使得所述蓝牙设备在所述其它连接模式下与所述待连接设备连接。If the Bluetooth device is not connected to the device to be connected in any of the connection modes, other connection modes configured in the Bluetooth device except for the any of the connection modes are started, so that the Bluetooth device is connected to the device to be connected in the other connection modes.
- 根据权利要求1所述的方法,其中,所述待连接设备包括第一设备和第二设备,所述启动配置于所述蓝牙设备中的至少一种连接模式,包括:The method according to claim 1, wherein the device to be connected includes a first device and a second device, and the starting at least one connection mode configured in the Bluetooth device includes:同步启动配置于所述蓝牙设备中的所述主动连接模式和所述被动连接模式,以使得所述蓝牙设备在所述主动连接模式下与所述第一设备连接,以及在所述被动连接模式下与所述第二设备连接。The active connection mode and the passive connection mode configured in the Bluetooth device are synchronously started, so that the Bluetooth device is connected to the first device in the active connection mode and is connected to the second device in the passive connection mode.
- 根据权利要求1至3任一项所述的方法,还包括:The method according to any one of claims 1 to 3, further comprising:在所述主动连接模式下,扫描所述待连接设备广播的第一连接信号;以及In the active connection mode, scanning a first connection signal broadcast by the device to be connected; and如果扫描到所述第一连接信号,则基于所述第一连接信号与所述待连接设备连接。If the first connection signal is scanned, the device to be connected is connected based on the first connection signal.
- 根据权利要求4所述的方法,还包括:The method according to claim 4, further comprising:如果扫描到多个所述第一连接信号,则确定信号强度最强的至少一个所述第一连接信号,作为目标连接信号;以及If multiple first connection signals are scanned, determining at least one first connection signal with the strongest signal strength as a target connection signal; and基于所述目标连接信号与所述待连接设备连接。Connecting to the device to be connected based on the target connection signal.
- 根据权利要求4所述的方法,其中,所述基于所述第一连接信号与所述待连接设备连接,包括: The method according to claim 4, wherein the connecting with the to-be-connected device based on the first connection signal comprises:基于所述第一连接信号,向所述待连接设备发送第一连接请求;以及Based on the first connection signal, sending a first connection request to the device to be connected; and在所述待连接设备对所述第一连接请求认证通过之后,建立与所述待连接设备的安全连接通道,以完成与所述待连接设备之间的连接。After the device to be connected successfully authenticates the first connection request, a secure connection channel with the device to be connected is established to complete the connection with the device to be connected.
- 根据权利要求1至3任一项所述的方法,还包括:The method according to any one of claims 1 to 3, further comprising:在所述被动连接模式下,向所述待连接设备广播第二连接信号;以及In the passive connection mode, broadcasting a second connection signal to the device to be connected; and如果被所述待连接设备扫描到所述第二连接信号,则基于所述第二连接信号与所述待连接设备连接。If the second connection signal is scanned by the device to be connected, the device to be connected is connected based on the second connection signal.
- 根据权利要求7所述的方法,其中,所述基于所述第二连接信号与所述待连接设备连接,包括:The method according to claim 7, wherein the connecting with the device to be connected based on the second connection signal comprises:基于所述第二连接信号,接收所述待连接设备发送的第二连接请求;以及Based on the second connection signal, receiving a second connection request sent by the device to be connected; and在对所述第二连接请求认证通过之后,建立与所述待连接设备的安全连接通道,以完成与所述待连接设备之间的连接。After the second connection request is authenticated, a secure connection channel is established with the device to be connected to complete the connection with the device to be connected.
- 根据权利要求1至3任一项所述的方法,还包括:The method according to any one of claims 1 to 3, further comprising:在所述蓝牙设备与所述待连接设备连接之后,与所述待连接设备进行数据交互;以及After the Bluetooth device is connected to the device to be connected, performing data exchange with the device to be connected; and如果在第一预设时长内,所述蓝牙设备未与所述待连接设备进行数据交互,则触发所述蓝牙设备切换至休眠模式。If the Bluetooth device does not perform data interaction with the device to be connected within a first preset time period, the Bluetooth device is triggered to switch to a sleep mode.
- 根据权利要求9所述的方法,其中,在与所述待连接设备进行数据交互的过程中,所述方法还包括:The method according to claim 9, wherein, in the process of interacting with the device to be connected, the method further comprises:在所述蓝牙设备向所述待连接设备发送第一控制数据之后,接收由所述待连接设备发送的与所述第一控制数据对应的反馈数据,所述第一控制数据为所述蓝牙设备首次向所述待连接设备发送的控制数据;以及After the Bluetooth device sends first control data to the device to be connected, receiving feedback data corresponding to the first control data sent by the device to be connected, wherein the first control data is control data sent by the Bluetooth device to the device to be connected for the first time; and在所述蓝牙设备向所述待连接设备发送第二控制数据之后,屏蔽由所述待连接设备发送的与所述第二控制数据对应的反馈数据,所述第二控制数据为所述蓝牙设备非首次向所述待连接设备发送的控制数据。After the Bluetooth device sends second control data to the device to be connected, feedback data corresponding to the second control data sent by the device to be connected is shielded, where the second control data is control data sent by the Bluetooth device to the device to be connected not for the first time.
- 根据权利要求1至3任一项所述的方法,还包括:The method according to any one of claims 1 to 3, further comprising:如果在第二预设时长内,所述蓝牙设备在所述主动连接模式和所述被动连接模式下均未连接到所述待连接设备,则触发所述蓝牙设备切换至休眠模式。If the Bluetooth device is not connected to the device to be connected in both the active connection mode and the passive connection mode within a second preset time period, the Bluetooth device is triggered to switch to the sleep mode.
- 一种蓝牙连接装置,包括:启动单元,被用于响应于蓝牙设备被唤醒, 启动配置于所述蓝牙设备中的至少一种连接模式,以使得所述蓝牙设备与待连接设备连接,所述蓝牙设备中配置有主动连接模式和被动连接模式,其中,所述主动连接模式用于所述蓝牙设备主动与待连接设备连接,所述被动连接模式用于所述蓝牙设备被动与待连接设备连接。A Bluetooth connection device, comprising: a start unit, used to respond to a Bluetooth device being awakened, Start at least one connection mode configured in the Bluetooth device so that the Bluetooth device is connected to the device to be connected, the Bluetooth device is configured with an active connection mode and a passive connection mode, wherein the active connection mode is used for the Bluetooth device to actively connect to the device to be connected, and the passive connection mode is used for the Bluetooth device to passively connect to the device to be connected.
- 一种蓝牙设备,包括有存储器,以及一个以上程序,其中一个以上程序存储于存储器中,且经配置以由一个以上处理器执行所述一个以上程序,所述一个以上程序包含用于进行如权利要求1至11中任一所述的方法的指令。 A Bluetooth device comprises a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors, and the one or more programs include instructions for performing the method as claimed in any one of claims 1 to 11.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211208378.1 | 2022-09-30 | ||
CN202211208378.1A CN117858051A (en) | 2022-09-30 | 2022-09-30 | Bluetooth connection method and device, storage medium and Bluetooth equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024066715A1 true WO2024066715A1 (en) | 2024-04-04 |
Family
ID=90475967
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/110074 WO2024066715A1 (en) | 2022-09-30 | 2023-07-31 | Bluetooth connection method and device, storage medium and bluetooth device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN117858051A (en) |
WO (1) | WO2024066715A1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109348431A (en) * | 2018-11-14 | 2019-02-15 | Oppo广东移动通信有限公司 | Bluetooth scan method, device, equipment and storage medium |
CN109769240A (en) * | 2019-03-12 | 2019-05-17 | 百度在线网络技术(北京)有限公司 | Bluetooth connecting method, device and system |
CN111629366A (en) * | 2020-04-27 | 2020-09-04 | Oppo(重庆)智能科技有限公司 | Interaction method and device between Bluetooth devices, storage medium and electronic device |
CN112969167A (en) * | 2021-02-02 | 2021-06-15 | 珠海格力电器股份有限公司 | Equipment network distribution method, device and system, electronic equipment and storage medium |
US20220038877A1 (en) * | 2019-08-22 | 2022-02-03 | Boe Technology Group Co., Ltd. | Electronic Device, Control Terminal, Non-Transitory Computer-Readable Storage Medium and Device Connection Method |
CN114299640A (en) * | 2021-11-25 | 2022-04-08 | 合众新能源汽车有限公司 | Bluetooth intelligent key learning method and device |
CN115002780A (en) * | 2022-06-20 | 2022-09-02 | 深圳十米网络科技有限公司 | Method and device for connecting somatosensory device and terminal and computer-readable storage medium |
-
2022
- 2022-09-30 CN CN202211208378.1A patent/CN117858051A/en active Pending
-
2023
- 2023-07-31 WO PCT/CN2023/110074 patent/WO2024066715A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109348431A (en) * | 2018-11-14 | 2019-02-15 | Oppo广东移动通信有限公司 | Bluetooth scan method, device, equipment and storage medium |
CN109769240A (en) * | 2019-03-12 | 2019-05-17 | 百度在线网络技术(北京)有限公司 | Bluetooth connecting method, device and system |
US20220038877A1 (en) * | 2019-08-22 | 2022-02-03 | Boe Technology Group Co., Ltd. | Electronic Device, Control Terminal, Non-Transitory Computer-Readable Storage Medium and Device Connection Method |
CN111629366A (en) * | 2020-04-27 | 2020-09-04 | Oppo(重庆)智能科技有限公司 | Interaction method and device between Bluetooth devices, storage medium and electronic device |
CN112969167A (en) * | 2021-02-02 | 2021-06-15 | 珠海格力电器股份有限公司 | Equipment network distribution method, device and system, electronic equipment and storage medium |
CN114299640A (en) * | 2021-11-25 | 2022-04-08 | 合众新能源汽车有限公司 | Bluetooth intelligent key learning method and device |
CN115002780A (en) * | 2022-06-20 | 2022-09-02 | 深圳十米网络科技有限公司 | Method and device for connecting somatosensory device and terminal and computer-readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117858051A (en) | 2024-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190260854A1 (en) | Method for controlling cooperation of multiple intelligent devices and apparatus thereof | |
CN107483721B (en) | Control method, device, storage medium and mobile terminal based on blank screen gesture | |
CN110352606A (en) | A kind of method, mobile terminal, electronic equipment and graphic user interface connecting network | |
WO2017185711A1 (en) | Method, apparatus and system for controlling smart device, and storage medium | |
WO2021135299A1 (en) | Binding method and system for device network configuration, and mobile terminal and storage medium | |
CN106874077B (en) | Process running method and device | |
CN105049923A (en) | Method and apparatus for waking up electronic device | |
WO2015183403A1 (en) | Companion application for activity cooperation | |
CN112751699A (en) | OTA upgrade and upgrade management method, device, network and storage medium | |
CN103229124B (en) | For making the processor of portable computing rapidly enter and quickly exiting the method and system of resting state | |
CN110235087A (en) | A kind of method and terminal for realizing voice control | |
CN105491135B (en) | Establish the method and device of data connection | |
CN104679413A (en) | Control method and control device for playing music | |
CN106502808B (en) | A kind of method, apparatus and terminal of copied files | |
CN110012527B (en) | Awakening method and electronic equipment | |
WO2020228013A1 (en) | Account association method, device, system, server, and storage medium | |
CN108647047A (en) | A kind of awakening method and system based on mobile terminal | |
CN113194450A (en) | Bluetooth device management method and device | |
WO2024066715A1 (en) | Bluetooth connection method and device, storage medium and bluetooth device | |
CN111399874A (en) | System upgrading method and device, storage medium and intelligent wearable device | |
WO2024207889A1 (en) | Sim card information loading method and apparatus, storage medium, and electronic device | |
WO2019085915A1 (en) | Bluetooth connection method, terminal and bluetooth device | |
WO2024160055A1 (en) | Device decryption control method and apparatus, electronic device and storage medium | |
CN111444539B (en) | Authority processing method and device, storage medium and terminal | |
CN114217759A (en) | Screen projection method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23869961 Country of ref document: EP Kind code of ref document: A1 |