CN113518336A - Bluetooth connection prompting method, device, terminal and storage medium - Google Patents

Bluetooth connection prompting method, device, terminal and storage medium Download PDF

Info

Publication number
CN113518336A
CN113518336A CN202110807401.8A CN202110807401A CN113518336A CN 113518336 A CN113518336 A CN 113518336A CN 202110807401 A CN202110807401 A CN 202110807401A CN 113518336 A CN113518336 A CN 113518336A
Authority
CN
China
Prior art keywords
bluetooth
message
pairing
value
identification bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110807401.8A
Other languages
Chinese (zh)
Inventor
吕生义
杨强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110807401.8A priority Critical patent/CN113518336A/en
Publication of CN113518336A publication Critical patent/CN113518336A/en
Priority to PCT/CN2022/097786 priority patent/WO2023284454A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast

Abstract

The embodiment of the application discloses a prompting method and device for Bluetooth connection, a terminal and a storage medium, and belongs to the technical field of Bluetooth. The first device obtains a first bluetooth message of the second device, and the first bluetooth message includes a pairing identification bit, and the pairing identification bit is used for indicating whether the second device has a pairing relationship with other devices. Thus, the first device can perform different operations based on the pairing relationship of the second device. And when the pairing identification bit is a first value, displaying a connection prompt window corresponding to the second equipment according to the first Bluetooth message, thereby instantly prompting whether to establish Bluetooth connection with the second equipment. When the pairing identification bit is the second value, the first Bluetooth message is not responded, so that the situation that the second equipment displays a connection prompt window in the first equipment when the second equipment has a pairing relation with other equipment is avoided, the situation that the first equipment is disturbed by the equipment which does not need to be connected is reduced, and the anti-interference capability of the first equipment is improved.

Description

Bluetooth connection prompting method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of Bluetooth, in particular to a method, a device, a terminal and a storage medium for prompting Bluetooth connection.
Background
The bluetooth technology, as a short-distance wireless communication technology, is excellent in performance in indexes such as communication distance, transmission delay, and data volume. Therefore, bluetooth technology is often chosen as the means of short-range wireless communication between two devices.
In the related art, a user generally uses a mobile phone as a main device in daily life. In order to facilitate the use of the Bluetooth headset and the mobile phone, under the condition that the Bluetooth headset is matched with the mobile phone, the Bluetooth headset is automatically connected with the mobile phone in a Bluetooth mode after being started. If a large number of mobile phones of other users exist around the Bluetooth headset when the Bluetooth headset is started, the mobile phones of the other users can display a connection reminding popup window, so that the normal use of the mobile phones of the other users is interfered.
Disclosure of Invention
The embodiment of the application provides a method, a device, a terminal and a storage medium for prompting Bluetooth connection. The technical scheme is as follows:
according to an aspect of the present application, there is provided a method for prompting a bluetooth connection, for use in a first device, the method including:
scanning a Bluetooth broadcast channel;
under the condition that a first Bluetooth message of second equipment is scanned, determining a pairing identification bit in the first Bluetooth message, wherein the pairing identification bit is used for indicating whether the second equipment has a pairing relation with other equipment;
under the condition that the pairing identification bit is a first value, displaying a connection prompting window corresponding to the second equipment according to the first Bluetooth message, wherein the connection prompting window is used for prompting whether Bluetooth connection is carried out with the second equipment or not;
and under the condition that the pairing identification bit is a second value, the first Bluetooth message is not responded.
According to another aspect of the present application, there is provided a method for sending a bluetooth packet, where the method is used in a second device, and the method includes:
entering a Bluetooth broadcasting state under the condition that a triggering condition is met;
generating a first Bluetooth message, wherein the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used for indicating whether the second device has a pairing relationship with other devices;
and broadcasting the first Bluetooth message in a Bluetooth broadcast channel in the Bluetooth broadcast state.
According to another aspect of the present application, there is provided a bluetooth connection prompting apparatus for use in a first device, the apparatus including:
the scanning module is used for scanning a Bluetooth broadcast channel;
the device comprises a determining module, a comparing module and a judging module, wherein the determining module is used for determining a pairing identification bit in a first Bluetooth message under the condition that the first Bluetooth message of a second device is scanned, and the pairing identification bit is used for indicating whether the second device has a pairing relation with other devices;
a prompt window display module, configured to display a connection prompt window corresponding to the second device according to the first bluetooth message when the pairing identification bit is the first value, where the connection prompt window is used to prompt whether to perform bluetooth connection with the second device;
and the operation module is used for not responding to the first Bluetooth message under the condition that the pairing identification bit is a second value.
According to another aspect of the present application, there is provided an apparatus for sending a bluetooth packet, where the apparatus is used in a second device, and the apparatus includes:
the state conversion module is used for entering a Bluetooth broadcasting state under the condition that a triggering condition is met;
the message generation module is used for generating a first Bluetooth message, wherein the first Bluetooth message carries a pairing flag bit which is used for indicating whether the second equipment has a pairing relation with other equipment;
and the message broadcasting module is used for broadcasting the first Bluetooth message in a Bluetooth broadcasting channel in the Bluetooth broadcasting state.
According to another aspect of the present application, there is provided an apparatus comprising a processor and a memory, the memory having stored therein at least one instruction, the instruction being loaded and executed by the processor to implement the bluetooth connection prompting method as provided in the various aspects of the present application.
According to another aspect of the present application, there is provided an apparatus comprising a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method for transmitting bluetooth packets according to the various aspects of the present application.
According to another aspect of the present application, there is provided a computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the bluetooth connection prompting method as provided in the various aspects of the present application.
According to another aspect of the present application, there is provided a computer-readable storage medium having at least one instruction stored therein, the instruction being loaded and executed by a processor to implement the method for transmitting bluetooth packets according to the various aspects of the present application.
According to one aspect of the present application, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the prompting method of bluetooth connection provided in the above-mentioned various alternative implementations.
According to one aspect of the present application, a computer program product is provided that includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and executes the computer instruction, so that the computer device executes the method for sending the bluetooth message provided in the above-mentioned various optional implementations.
The beneficial effects brought by the technical scheme provided by the embodiment of the application can include:
the first device obtains a first Bluetooth message of the second device by scanning a Bluetooth broadcast channel, and the first Bluetooth message comprises a pairing identification bit which is used for indicating whether the second device has a pairing relationship with other devices. Thus, the first device can perform different operations based on the pairing relationship of the second device. And when the pairing identification bit is a first value, displaying a connection prompt window corresponding to the second equipment according to the first Bluetooth message, thereby instantly prompting whether to establish Bluetooth connection with the second equipment. When the pairing identification bit is the second value, the first Bluetooth message is not responded, so that the situation that the second equipment displays a connection prompt window in the first equipment when the second equipment has a pairing relation with other equipment is avoided, the situation that the first equipment is disturbed by the equipment which does not need to be connected is reduced, and the anti-interference capability of the first equipment is improved.
Drawings
In order to more clearly describe the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a block diagram of a first device provided in an exemplary embodiment of the present application;
FIG. 2 is a block diagram of a second device provided in an exemplary embodiment of the present application;
fig. 3 is an architecture diagram of a bluetooth connection apparatus system according to an embodiment of the present application;
fig. 4 is a flowchart of a method for prompting a bluetooth connection according to an exemplary embodiment of the present application;
fig. 5 is a flowchart of a method for sending a bluetooth message according to an exemplary embodiment of the present application;
FIG. 6 is a flowchart of a method for prompting a Bluetooth connection according to another exemplary embodiment of the present application;
fig. 7 is a flowchart of a method for prompting a bluetooth connection according to another exemplary embodiment of the present application;
fig. 8 is a block diagram illustrating a bluetooth connection prompting device according to an exemplary embodiment of the present application;
fig. 9 is a block diagram of a bluetooth message transmitting apparatus according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
As used herein, the term "if" is optionally interpreted as "when.. times", "at … …", "in response to a determination", or "in response to a detection", depending on the context. Similarly, the phrase "if determined … …" or "if (a stated condition or event) is detected" or "in response to (a stated condition or event) being detected", depending on the context.
It is noted that the use of personally identifiable information should follow privacy policies and practices that are recognized as meeting or exceeding industry or government requirements for maintaining user privacy. In particular, personally identifiable information should explicitly specify to the user the nature of authorized use during administration and processing to minimize the risk of inadvertent or unauthorized access or use.
In order to make the solution shown in the embodiments of the present application easy to understand, several terms appearing in the embodiments of the present application will be described below.
And (3) Bluetooth message: the message is generated based on the Bluetooth protocol. Bluetooth messages can be classified into a plurality of types depending on the purpose. In this application, the bluetooth message is used to provide connection information for connecting two devices. For example, a bluetooth message sent by the first device may be used for the device that receives the bluetooth message to establish a bluetooth connection with the first device.
In one possible approach, the bluetooth message may be broadcast to the bluetooth channel by the first device in a broadcast manner. Other devices can acquire the bluetooth message from the bluetooth channel in a scanning mode.
Optionally, the bluetooth packet may be periodically broadcast by the first device, where the period may be an advertisement interval (advertisement interval). For example, if the broadcast interval is 0.2 seconds, the first device will broadcast the bluetooth message every 0.2 seconds.
In this application, the bluetooth packets include a first bluetooth packet, a second bluetooth packet, a third bluetooth packet, and the like. It should be noted that, the nth bluetooth message in this application is only a bluetooth message that is different. The meaning of the nth bluetooth message is the same as that of the concept bluetooth message, and is not described herein again. Wherein n is a positive integer.
Pairing identification bit: is a data bit set in the bluetooth message. In one possible implementation, the pairing identification bits may be multiplexed with data bits in the bluetooth message. In another possible implementation, the pairing identification bits may be newly added data bits in the bluetooth message.
For example, we will use m data bits in the original bluetooth message as an example. In one mode, when the pairing identification bits multiplex data bits in the bluetooth packet, the number of the data bits in the bluetooth packet may be unchanged, and is m data bits, where m is a positive integer. In another mode, under the condition that the pairing identification bits do not multiplex data bits in the bluetooth message, the number of the data bits of the bluetooth message needs to be increased by one more pairing identification bit, and the number of the data bits of the bluetooth message after the pairing identification bit is increased by m +1 bits.
In one possible approach, the value of the pairing identification bit is binary. That is, the value of the pairing identification bit may be 0 or 1. In a possible implementation manner of the present application, a value of the pairing identification bit may be a first value or a second value. In one possible assignment, the first value is 0 and the second value is 1. In another possible assignment, the first value is 1 and the second value is 0.
Referring to fig. 1, fig. 1 is a block diagram of a first device according to an exemplary embodiment of the present application, and as shown in fig. 1, the first device includes a processor 120 and a memory 140, where the memory 140 stores at least one instruction, and the instruction is loaded and executed by the processor 120 to implement a bluetooth connection prompting method according to various method embodiments of the present application.
In the present application, the first device 100 is a bluetooth-enabled electronic device. Scanning a Bluetooth broadcast channel; under the condition that a first Bluetooth message of second equipment is scanned, determining a pairing identification bit in the first Bluetooth message, wherein the pairing identification bit is used for indicating whether the second equipment has a pairing relation with other equipment; under the condition that the pairing identification bit is a first value, displaying a connection prompting window corresponding to the second equipment according to the first Bluetooth message, wherein the connection prompting window is used for prompting whether Bluetooth connection is carried out with the second equipment or not; and under the condition that the pairing identification bit is the second value, the first Bluetooth message is not responded.
Processor 120 may include one or more processing cores. The processor 120 interfaces with various components throughout the first device 100 using various interfaces and lines to perform various functions of the first device 100 and process data by executing or executing instructions, programs, sets of code or instruction sets stored in the memory 140 and invoking data stored in the memory 140. Optionally, the processor 120 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 120 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 120, but may be implemented by a single chip.
The Memory 140 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 140 includes a non-transitory computer-readable medium. The memory 140 may be used to store instructions, programs, code sets, or instruction sets. The memory 140 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data and the like referred to in the following respective method embodiments.
Alternatively, the first device may be a smartphone, tablet, personal computer, laptop, television, smart glasses, smart watch, or other device having a control function. In some scenarios, the first device may be referred to as a master device.
Referring to fig. 2, fig. 2 is a block diagram of a second device according to an exemplary embodiment of the present application, and as shown in fig. 2, the second device includes a processor 220 and a memory 240, where the memory 240 stores at least one instruction, and the instruction is loaded and executed by the processor 220 to implement a bluetooth connection prompting method according to various method embodiments of the present application.
In the present application, the second device 200 is a bluetooth-enabled electronic device. The second device 200 enters a bluetooth broadcast state (advertisement/advertisement) when the trigger condition is satisfied; generating a first Bluetooth message, wherein the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used for indicating whether the second device has a pairing relationship with other devices; and broadcasting the first Bluetooth message in a Bluetooth broadcast channel in the Bluetooth broadcast state.
Processor 220 may include one or more processing cores. The processor 220 connects various parts throughout the second device 200 using various interfaces and lines, and performs various functions of the second device 200 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 240 and calling data stored in the memory 240. Optionally, the processor 220 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 220 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 220, but may be implemented by a single chip.
The Memory 240 may include a Random Access Memory (RAM) or a Read-Only Memory (ROM). Optionally, the memory 240 includes a non-transitory computer-readable medium. The memory 240 may be used to store instructions, programs, code sets, or instruction sets. The memory 240 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data and the like referred to in the following respective method embodiments.
Optionally, the second device may be a device with a designated auxiliary function, such as a bluetooth headset, a bluetooth bracelet, a bluetooth watch, a bluetooth collar, a bluetooth ring, or bluetooth glasses. In some scenarios, the first device may be referred to as a master device.
The bluetooth headset may be a True Wireless Stereo (TWS) headset, among others. The TWS headset may connect with the first device based on bluetooth technology. When the second device is a TWS headset, the TWS headset may be either a single-ear headset or a pair of headsets including a left headset and a right headset. The TWS headset may be housed in a charging bay. When the TWS headset as a bluetooth headset is placed in a mating charging chamber and the charging chamber is in a closed state, the bluetooth headset is in a standby state (standby). When the charging bin is converted into the uncovering state from the covering state, the Bluetooth headset enters a broadcasting state.
It should be noted that, when the second device is a bluetooth bracelet, a bluetooth watch, a bluetooth collar, a bluetooth ring or a bluetooth glasses device, the second device may also be switched from the standby state to the broadcast state.
Referring to fig. 3, fig. 3 is an architecture diagram of a bluetooth connection apparatus system according to an embodiment of the present application. In the bluetooth connection system, a first device 310 and a second device 320 are included. In one application scenario, the second device 320 does not have a bluetooth connection with any device while the second device 320 is in a standby state. At this time, the first device 310 exists within the bluetooth signal coverage of the second device 320. When the second device 320 is switched from the standby state to the broadcast state, the bluetooth connection prompting method applied to the first device 310 and the bluetooth message sending method applied to the second device 320 are respectively executed.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for prompting a bluetooth connection according to an exemplary embodiment of the present application. The prompting method of bluetooth connection can be applied to the first device shown above. In fig. 4, the prompting method of bluetooth connection includes:
at step 410, a bluetooth broadcast channel is scanned.
In an embodiment of the application, the first device is capable of scanning a bluetooth broadcast channel. Note that the bluetooth broadcast channel is a channel specified according to the specification in the bluetooth protocol. That is, when the bluetooth device scans the bluetooth broadcast signal, it will scan in the designated bluetooth broadcast channel according to the bluetooth protocol.
In step 420, in the case that the first bluetooth packet of the second device is scanned, the first device determines a pairing identification bit in the first bluetooth packet, where the pairing identification bit is used to indicate whether the second device has a pairing relationship with other devices.
In this application, the first device may periodically scan for bluetooth broadcast channels. When the first bluetooth message is scanned, the first device may determine, through the identifier of the broadcasting device carried in the first bluetooth message, a broadcasting device that broadcasts the first bluetooth message. When the first bluetooth message is a message broadcasted by the second device, the first device reads the pairing identification bit in the first bluetooth message.
In one possible approach, the pairing identification bits in the first bluetooth message are stored in the first bluetooth message in the clear.
In another possible manner, the pairing identification bits in the first bluetooth message are stored in the first bluetooth message in a form of ciphertext, and when the first device conforms to the special decoding rule, the pairing identification bits in the first bluetooth message can be decrypted. For example, devices made by the same manufacturer are all subjected to the same one of the special decoding rules.
It should be noted that the pairing identification bit is used to indicate whether the second device has already been paired with another device. That is, the pairing identification bits can indicate that the second device has already been paired with other devices, and the pairing identification bits can also indicate that the second device has not been paired with other devices.
It should be noted that, after the step 420 is completed, the first device may perform either the step 430 or the step 440, which is not limited in this embodiment of the application.
And 430, under the condition that the pairing identification bit is the first value, the first device displays a connection prompt window corresponding to the second device according to the first bluetooth message, wherein the connection prompt window is used for prompting whether to perform bluetooth connection with the second device.
In this embodiment of the application, the first device directly displays the connection prompt window corresponding to the second device according to the first bluetooth message when the pairing identification bit is the first value. It should be noted that, when the pairing identification bit is the first value, it is indicated that no other device and the second device have a pairing relationship. Therefore, the second device is a brand-new device with a high probability, and the connection prompt window corresponding to the second device can be directly displayed, so that when a user needs to connect the first device and the second device, the user can quickly see the connection prompt window in the display screen of the first device, and then follow-up operation is carried out to establish Bluetooth connection between the first device and the second device.
Step 440, not responding to the first bluetooth message when the pairing identification bit is the second value.
In this embodiment of the application, the first device does not respond to the first bluetooth packet when the pairing identification bit is the second value. Wherein, the first value and the second value are different values, and the two values have different meanings. In this example, when the pairing identification bit is the second value, it indicates that the second device has a pairing relationship with other devices.
In summary, in the method for prompting bluetooth connection provided in this embodiment, the first device obtains the first bluetooth packet of the second device by scanning the bluetooth broadcast channel, and the first bluetooth packet includes the pairing identification bit, and the pairing identification bit is used to indicate whether the second device has a pairing relationship with other devices. Thus, the first device can perform different operations based on the pairing relationship of the second device. And when the pairing identification bit is a first value, displaying a connection prompt window corresponding to the second equipment according to the first Bluetooth message, thereby instantly prompting whether to establish Bluetooth connection with the second equipment. When the pairing identification bit is the second value, the first Bluetooth message is not responded, so that the situation that the second equipment displays a connection prompt window in the first equipment when the second equipment has a pairing relation with other equipment is avoided, the situation that the first equipment is disturbed by the equipment which does not need to be connected is reduced, and the anti-interference capability of the first equipment is improved.
Referring to fig. 5, fig. 5 is a flowchart of a method for sending a bluetooth message according to an exemplary embodiment of the present application. The method for sending the bluetooth message may be applied to the second device shown above. In fig. 5, the method for sending the bluetooth packet includes:
and step 510, entering a bluetooth broadcast state under the condition that the triggering condition is met.
In this application, the second device may be a device that needs to provide an auxiliary function after being connected to the first device, such as a bluetooth headset or a bluetooth bracelet. The second device entering the bluetooth broadcast state from the standby state requires certain operations performed by the user. For example, in case the trigger condition is met, the second device will enter the bluetooth broadcast state.
The triggering condition may be that an entity key on the second device receives a press in a specified manner, or that the second device acquires specified voice, receives a specified touch instruction on the touch screen, or acquires a specified gesture through the camera, and the specific manner of the triggering condition is not limited in the present application.
Step 520, generating a first bluetooth packet, where the first bluetooth packet carries a pairing flag bit, and the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices.
In this application, the second device will generate a first bluetooth message. The broadcast message is used for informing other devices that Bluetooth connection can be carried out, and the other devices can conveniently establish Bluetooth connection with the second device according to the message.
It should be noted that the first bluetooth packet carries a pairing identifier, and the pairing identifier bit indicates whether the second device has a pairing relationship with other devices. Compared with the related art, the second device can broadcast the historical pairing relationship of the second device to the second device in the scheme provided by the application.
Step 530, in the bluetooth broadcast state, broadcasting the first bluetooth packet in the bluetooth broadcast channel.
In this application, after the second device generates the first bluetooth packet, the first bluetooth packet may be broadcast in a bluetooth broadcast channel in a bluetooth broadcast state. Optionally, after broadcasting the first bluetooth packet, the second device may also retransmit another bluetooth packet having the same content as the first bluetooth packet as needed, or the second device broadcasts another bluetooth packet, which is not limited in this embodiment of the application.
In summary, according to the method for sending the bluetooth packet provided by the present application, the second device can enter a bluetooth broadcast state when the triggering condition is satisfied, and the second device can generate the first bluetooth packet with the pairing flag bit, where the pairing flag bit is used to indicate whether the second device has a pairing relationship with other devices. Therefore, the second device in the application can broadcast the pairing relationship between the second device and other devices through the Bluetooth message, so that the device receiving the message can select whether to immediately pop up the connection prompt window or not based on the pairing flag bit, thereby reducing the interference to other devices in the scene of low probability connection and quickly popping up the connection question window in the scene of high probability connection.
Based on the solutions disclosed in the embodiments shown in fig. 4 and fig. 5 in the present application, the present application can also complete the prompting process of bluetooth connection under the cooperation of the first device and the second device, please refer to the following embodiments.
Referring to fig. 6, fig. 6 is a flowchart illustrating a method for prompting bluetooth connection according to another exemplary embodiment of the present application. The prompting method of the Bluetooth connection can be completed by the cooperation of the first device and the second device. In fig. 6, the method for prompting bluetooth connection includes:
step 601, in case that the second device is a bluetooth headset, the second device receives a wake-up instruction sent by a charging bin matched with the second device, and enters a bluetooth broadcast state.
Wherein, bluetooth headset places in supporting storehouse of charging and the storehouse of charging is in when closing the lid state, and bluetooth headset is in standby state.
In this application, in case the second device is a bluetooth headset, the bluetooth headset may be a device equipped with a charging chamber. When the Bluetooth headset is in the charging bin and the charging bin is in a cover closing state, the Bluetooth headset is in a power-off state, an off-line state or a standby state. When the charging bin is switched from a cover closing state to a cover opening state, the charging bin sends a wake-up instruction to the Bluetooth headset.
It should be noted that the wake-up instruction may be sent to the bluetooth headset by the charging bin in a wired manner, or may be sent to the bluetooth headset by the charging bin in a wireless manner. The wired mode can adopt a signal path, and the signal path comprises a metal feed point of the charging chamber and a metal feed point on the Bluetooth headset in contact with the metal feed point of the charging chamber. The wireless mode can be that the battery cabin sends the awakening instruction to the Bluetooth headset through the wireless communication module.
Step 602, the second device generates a first bluetooth message.
In the embodiment of the present application, the execution process of step 602 is the same as the execution process of step 520, and is not described herein again.
Step 603, in the bluetooth broadcast state, the second device periodically broadcasts the bluetooth packet of the second device in the bluetooth broadcast channel based on the broadcast interval.
In this application, the first bluetooth packet belongs to a bluetooth packet of the second device. If the second device broadcasts the first bluetooth message, the second bluetooth message and the third bluetooth message in the bluetooth broadcast channel in sequence, the broadcast intervals between every two bluetooth messages are the same, so that the bluetooth message of the second device can be sent periodically.
In the present application, the second device can periodically broadcast the bluetooth packet at a specified broadcast interval. And the first Bluetooth message broadcasted by the second equipment is the first Bluetooth message.
In step 611, the first device scans for bluetooth broadcast channels.
In the embodiment of the present application, the execution process of step 611 is the same as the execution process of step 410, and is not described herein again.
Step 612, in the case that the first bluetooth packet of the second device is scanned, the first device determines the pairing identification bit in the first bluetooth packet.
In the embodiment of the present application, step 612 may be replaced by step (a1) and step (a 2).
Step (a1), obtaining a device type of the first device.
The first Bluetooth message comprises at least two pairing identification bits, and different pairing identification bits correspond to different equipment types.
In the embodiment of the present application, the device types may include multiple types, such as a mobile phone type, a wearable device type, a vehicle-mounted terminal type, and a home appliance type. It should be noted that the above device types are only schematic illustrations, and the present application does not limit other possible implementations of the device types.
And (a2) determining an identification bit corresponding to the device type of the first device from among the at least two pairing identification bits as the pairing identification bit.
In this application, q pairing identification bits may be preset in the first bluetooth message. For example, if q is 4, the first bluetooth message is preset with 4-bit pairing identification bits, which are the first pairing identification bit, the second pairing identification bit, the third pairing identification bit, and the fourth pairing identification bit, respectively. Please refer to table one. Table one shows the value and meaning of each pairing identity bit.
Watch 1
Figure BDA0003167114230000131
According to the data shown in the table one, the first pairing identification bit is used for indicating whether the second equipment is in matching relationship with other mobile phones; the second pairing identification bit is used for indicating whether a matching relationship exists between the second device and other wearable devices; the third pairing identification bit is used for indicating whether the second equipment has a matching relationship with other vehicle-mounted terminals; the fourth pairing identification bit is used for indicating whether the second equipment has a matching relationship with other household appliances.
After the first device performs the completion step 612, it may choose to perform step 613 or step 614.
Step 613, the first device displays a connection prompt window corresponding to the second device according to the first bluetooth message under the condition that the pairing identification bit is the first value.
In this application, when the pairing identification bit is the first value, it is described that there is no matching relationship with other devices in the second device. Therefore, the first device can directly display the connection prompt window corresponding to the second device according to the first bluetooth message, so that a user can make bluetooth connection as soon as possible or the second device needs to make bluetooth connection and decide whether to make bluetooth connection between the first device and the second device.
Optionally, the first value is used to indicate that the second device has no pairing relationship with other devices.
Optionally, the first device may display a connection prompt window corresponding to the second device when the received signal strength of the first bluetooth packet is greater than the threshold.
In the embodiment of the present application, the execution process of step 613 is the same as the execution process of step 430, and details are not described here.
And 614, under the condition that the pairing identification bit is the second value, the first device does not respond to the first Bluetooth message.
Optionally, the second value is used to indicate that the second device has a pairing relationship with other devices.
In the embodiment of the present application, the execution process of step 614 is the same as the execution process of step 440, and is not described herein again.
After the first device performs the completion step 614, the first device may further perform step 621, or the first device may further perform step 631.
Step 621, the first device starts a first timer according to the receiving time of the first bluetooth packet when the pairing identification bit is the second value.
In this application, the first device can set the receiving time of the first bluetooth packet as the starting time of the first timer when the pairing identification bit is the second value.
Step 622, the first device scans the bluetooth broadcast channel again to obtain a second bluetooth packet of the second device.
In this application, after the first timer is set, the first device can scan the bluetooth broadcast channel again, and use the scanned bluetooth packet of the second device as the second bluetooth packet.
Step 623, the first device does not respond to the second bluetooth message when the pairing identification bit of the second bluetooth message is the second value and the receiving time of the second bluetooth message is earlier than the timeout time of the first timer.
In this application, the first device reads the pairing identification bit of the second bluetooth packet. And when the pairing identification bit of the second Bluetooth message is a second value and the receiving time of the second Bluetooth message is earlier than the overtime time of the first timer, controlling the first equipment to continue not responding to the second Bluetooth message, so that the first equipment cannot be disturbed by the second Bluetooth message.
It should be noted that the timeout duration of the first timer may be a manually set value. For example, the value is 1.5 seconds, 2 seconds, 2.5 seconds, or 3 seconds, which is not limited in the embodiment of the present application.
In another possible implementation manner, the timeout duration of the first timer may be set accordingly according to different device types of the second device. For example, the timeout duration of the first timer corresponding to the mobile phone type is 2 seconds, the timeout duration of the first timer corresponding to the wearable device type is 3 seconds, the timeout duration of the first timer corresponding to the vehicle-mounted terminal type is 5 seconds, and the timeout duration of the first timer corresponding to the household appliance type is 3 seconds.
Step 631, the first device starts a first timer according to the receiving time of the first bluetooth packet when the pairing identification bit is the second value.
In the present application, the execution manner of step 631 may refer to the execution manner of step 621, which is not described herein again.
Step 632, the first device scans the bluetooth broadcast channel again to obtain a second bluetooth packet of the second device.
In this application, the execution manner of step 632 may refer to the execution manner of step 622, which is not described herein again.
And step 633, under the condition that the pairing identification bit of the second bluetooth message is the second value and the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, the first device displays a connection prompt window corresponding to the second device according to the second bluetooth message.
In this application, when the pairing identification bit of the second bluetooth packet is the second value, the first device checks the receiving time of the second bluetooth packet and the timeout time of the first timer. And in response to that the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, indicating that the limited duration set by the first timer has ended, and the first device may display a connection prompt window corresponding to the second device according to the second bluetooth message.
In one particular implementation scenario. The first device is a first cell phone for jack use and the second device is a TWS headset for brownian use that is placed in a mating charging cradle. The brown's handset is a device that has a pairing relationship with a TWS headset. If jack and brown are in a coffee shop, the two people use their own mobile phones to view information. And if the charging bin in which the TWS earphone of the user is placed is uncovered by the Brown, the TWS earphone broadcasts a first Bluetooth message in a Bluetooth broadcast channel, wherein the pairing identification bit in the first Bluetooth message is a second value. At this time, the first mobile phone, which is the jack of the first device, will obtain the first bluetooth message through scanning, because the pairing identification bit in the first bluetooth message is the second value. Thus, jack's first handset will not respond to the first bluetooth message. The jack mobile phone can simultaneously use the time of receiving the first bluetooth message as the starting time of the first timer, and set the first timer according to 2 seconds. If the TWS headset successfully establishes a bluetooth connection with the second handset of the brown within the 2 second duration, the first handset of jack will not display the connection prompt window. If the TWS headset does not successfully establish bluetooth connection with other devices within the duration of 2 seconds, the first cell phone of jack displays a connection prompt window corresponding to the second device when scanning the bluetooth message broadcast by the TWS headset again.
In summary, in this embodiment, when the first device scans the first bluetooth packet broadcast by the second device, the first device executes a corresponding operation according to a value of the pairing identification bit in the bluetooth packet. And when the value of the pairing identification bit is a first value, displaying a connection prompt window corresponding to the second equipment according to the first Bluetooth message. And when the value of the pairing identification bit is the second value, the first Bluetooth message is not responded, and the disturbance of the second equipment to the first equipment when the second equipment is connected with the first equipment at a small probability is reduced.
The method for prompting bluetooth connection provided in this embodiment can also enable the first device to start the first timer according to the receiving time of the first bluetooth message when the value of the pairing identification bit in the received first bluetooth message is the second value, scan the bluetooth broadcast channel again to obtain the second bluetooth message of the second device, and do not respond to the second bluetooth message when the receiving time of the second bluetooth message is earlier than the timeout time of the first timer, so that the first device can pass through the timeout duration of the first timer, and avoid the first device from popping up the connection prompt window by mistake due to interference of the second bluetooth message.
The method for prompting bluetooth connection provided in this embodiment can also enable the first device to start the first timer according to the receiving time of the first bluetooth message when the value of the pairing identification bit in the received first bluetooth message is the second value, scan the bluetooth broadcast channel again to obtain the second bluetooth message of the second device, and display the connection prompting window according to the second bluetooth message when the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, so that the first device and the second device can be enabled to normally perform bluetooth connection without being disturbed.
Referring to fig. 7, fig. 7 is a flowchart illustrating a method for prompting bluetooth connection according to another exemplary embodiment of the present application. The prompting method of the Bluetooth connection can be completed by the cooperation of the first device and the second device. In fig. 7, the method for prompting bluetooth connection includes:
step 711, in case that the second device is a bluetooth headset, the second device receives the wake-up command sent by the charging bin matched with the second device, and enters a bluetooth broadcast state.
Wherein, bluetooth headset places in supporting storehouse of charging and the storehouse of charging is in when closing the lid state, and bluetooth headset is in standby state.
In step 712, the second device generates a first bluetooth message.
In the embodiment of the present application, the execution process of step 712 is the same as the execution process of step 520, and is not described herein again.
In step 713, in the bluetooth broadcast state, the second device periodically broadcasts the first bluetooth packet in the bluetooth broadcast channel based on the broadcast interval.
In the embodiment of the present application, the execution process of step 713 is the same as the execution process of step 530, and is not described herein again.
In step 714, the first device scans for bluetooth broadcast channels.
In this example, the first device is able to scan a bluetooth broadcast channel for the purpose of obtaining bluetooth messages.
Step 715, in the case that the first bluetooth packet of the second device is scanned, the first device determines the pairing identification bit in the first bluetooth packet.
Optionally, the first bluetooth packet includes at least two pairing identification bits, and different pairing identification bits correspond to different device types. The first device can obtain a device type of the first device, and the first device can determine an identification bit corresponding to the device type of the first device from among the at least two pairing identification bits as a pairing identification bit.
In step 716, the first device displays a connection prompt window corresponding to the second device according to the first bluetooth message when the pairing identification bit is the first value.
Step 717, the first device does not respond to the first bluetooth packet when the pairing identification bit is the second value.
In step 721, when the first bluetooth message is broadcasted, the second device starts the second timer, and the pairing identification bit in the first bluetooth message is the second value.
In the embodiment of the present application, a second timer is provided in the second device. The second timer is set when the second device sends the first bluetooth packet with the pairing identification bit being the second value.
Step 722, in response to the second timer not being overtime, generating a second bluetooth message, wherein the pairing identification bit of the second bluetooth message is a second value; and broadcasting the second Bluetooth message in a Bluetooth broadcast channel.
Step 723, the first device scans the bluetooth broadcast channel again to obtain a second bluetooth packet of the second device.
In step 724, the first device displays a connection prompt window corresponding to the second device according to the second bluetooth message when the pairing identification bit of the second bluetooth message is the first value.
Optionally, the connection prompting window is used for prompting whether to perform bluetooth connection with the second device. In this example, the first value is used to indicate that the second device has a pairing relationship with other devices and the second timer is over time, and the second timer is started when the second device broadcasts the first bluetooth packet.
Optionally, the first device may display a connection prompt window corresponding to the second device when the pairing identification bit of the second bluetooth packet is the first value and the received signal strength of the second bluetooth packet is greater than the threshold.
Step 731, when the first bluetooth packet is broadcasted, starting a second timer.
Step 732, in response to the timeout of the second timer, generating a third bluetooth message, where the pairing identification bit of the third bluetooth message is the first value; broadcasting the third bluetooth message in a bluetooth broadcast channel.
In step 733, the first device scans the bluetooth broadcast channel again to obtain a third bluetooth packet of the second device.
In step 734, the first device does not respond to the third bluetooth packet when the pairing identification bit of the third bluetooth packet is the second value.
Optionally, the second value indicates that the second device has a pairing relationship with other devices and the second timer has not expired, and the second timer is started when the second device broadcasts the first bluetooth packet.
In summary, the second device can set the second timer according to the condition of the pairing identification bit in the first bluetooth message sent by the second device, so that the first device does not need to set the timer, and can determine the next operation only according to the pairing identification bit in the scanned bluetooth message. Responding to that the pairing identification bit acquired by the first equipment is a second value, and not responding to the Bluetooth message where the pairing identification bit is located by the first equipment; responding to that the pairing identification bit acquired by the first equipment is a first value, and displaying a connection prompt window according to the Bluetooth message where the pairing identification bit is located, so that the first equipment can avoid mistakenly popping up the connection prompt window due to the interference of the first equipment and the second Bluetooth message through the overtime length of the first timer.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 8, fig. 8 is a block diagram illustrating a bluetooth connection prompting apparatus according to an exemplary embodiment of the present application. The bluetooth connection prompting device can be implemented by software, hardware or a combination of the two to form all or part of the terminal. The device includes:
a scanning module 810 for scanning a bluetooth broadcast channel;
a determining module 820, configured to determine, in a case that a first bluetooth packet of a second device is scanned, a pairing identification bit in the first bluetooth packet, where the pairing identification bit is used to indicate whether the second device has a pairing relationship with another device;
a prompt window display module 830, configured to display, according to the first bluetooth message, a connection prompt window corresponding to the second device when the pairing identification bit is the first value, where the connection prompt window is used to prompt whether to perform bluetooth connection with the second device;
an operation module 840, configured to not respond to the first bluetooth packet when the pairing identification bit is the second value.
In an optional embodiment, the first value referred to by the apparatus is used to indicate that the second device has no pairing relationship with other devices; the second value is used for indicating that the second device has a pairing relationship with other devices.
In an optional embodiment, the apparatus further includes a first execution module, configured to start a first timer according to a receiving time of the first bluetooth packet when the pairing identification bit is the second value; scanning the Bluetooth broadcast channel again to obtain a second Bluetooth message of the second device; and under the condition that the pairing identification bit of the second Bluetooth message is the second value and the receiving time of the second Bluetooth message is earlier than the overtime time of the first timer, not responding to the second Bluetooth message.
In an optional embodiment, the apparatus further includes a second execution module, configured to start a first timer according to a receiving time of the first bluetooth packet when the pairing identification bit is the second value; scanning the Bluetooth broadcast channel again to obtain a second Bluetooth message of the second device; and displaying a connection prompt window corresponding to the second device according to the second Bluetooth message under the condition that the pairing identification bit of the second Bluetooth message is the second value and the receiving time of the second Bluetooth message is not earlier than the overtime time of the first timer.
In an optional embodiment, the apparatus further includes a third executing module, configured to scan the bluetooth broadcast channel again to obtain a second bluetooth packet of the second device; under the condition that the pairing identification bit of the second Bluetooth message is the first value, displaying a connection prompting window corresponding to the second equipment according to the second Bluetooth message, wherein the connection prompting window is used for prompting whether Bluetooth connection is carried out with the second equipment or not; the first value is used for indicating that the second device has a pairing relationship with other devices and a second timer is overtime, the second timer is started when the second device broadcasts the first bluetooth message, and the pairing identification bit in the first bluetooth message is a second value.
In an optional embodiment, the apparatus further includes a fourth executing module, configured to scan the bluetooth broadcast channel again to obtain a third bluetooth packet of the second device; under the condition that the pairing identification bit of the third Bluetooth message is the second value, the third Bluetooth message is not responded; the second value taking indicates that the second device has a pairing relationship with other devices and a second timer is not overtime, the second timer is started when the second device broadcasts the first bluetooth message, and the pairing identification bit in the first bluetooth message is a second value.
In an optional embodiment, the prompt window displaying module 830 is configured to display a connection prompt window corresponding to the second device when the received signal strength of the first bluetooth packet is greater than a threshold.
In an optional embodiment, the first bluetooth packet in the apparatus includes at least two pairing identification bits, where different pairing identification bits correspond to different device types, and the determining module 820 is configured to obtain a device type of a first device; and determining an identification bit corresponding to the device type of the first device in at least two pairing identification bits as the pairing identification bit.
In summary, in this embodiment, when the first device scans the first bluetooth packet broadcast by the second device, the first device executes a corresponding operation according to a value of the pairing identification bit in the bluetooth packet. And when the value of the pairing identification bit is a first value, displaying a connection prompt window corresponding to the second equipment according to the first Bluetooth message. And when the value of the pairing identification bit is the second value, the first Bluetooth message is not responded, and the disturbance of the second equipment to the first equipment when the second equipment is connected with the first equipment at a small probability is reduced.
The bluetooth connection prompting device provided in this embodiment can also enable the first device to start the first timer according to the receiving time of the first bluetooth message when the value of the pairing identification bit in the received first bluetooth message is the second value, scan the bluetooth broadcast channel again to obtain the second bluetooth message of the second device, and do not respond to the second bluetooth message when the receiving time of the second bluetooth message is earlier than the timeout time of the first timer, so that the first device can pass through the timeout duration of the first timer, and avoid the first device from being mistakenly popped up to connect the prompting window due to interference of the second bluetooth message.
The bluetooth connection prompting device provided in this embodiment can also enable the first device to start the first timer according to the receiving time of the first bluetooth message when the value of the pairing identification bit in the received first bluetooth message is the second value, scan the bluetooth broadcast channel again to obtain the second bluetooth message of the second device, and display the connection prompting window according to the second bluetooth message when the receiving time of the second bluetooth message is not earlier than the timeout time of the first timer, so that the first device and the second device can be normally connected in a bluetooth manner without being disturbed.
Referring to fig. 9, fig. 9 is a block diagram of a bluetooth message transmitting apparatus according to an exemplary embodiment of the present application. The sending device of the bluetooth message can be realized by software, hardware or a combination of the two to form all or part of the terminal. The device includes:
a state transition module 910, configured to enter a bluetooth broadcast state when a trigger condition is met;
a message generating module 920, configured to generate a first bluetooth message, where the first bluetooth message carries a pairing flag bit, and the pairing flag bit is used to indicate whether a second device has a pairing relationship with another device;
a message broadcasting module 930, configured to broadcast the first bluetooth message in a bluetooth broadcast channel in the bluetooth broadcast state.
In an optional embodiment, the apparatus further includes a fifth executing module, configured to start a second timer when the first bluetooth packet is broadcast; responding to the second timer not being overtime, generating a second Bluetooth message, wherein the pairing identification bit of the second Bluetooth message is a second value; and broadcasting the second Bluetooth message in the Bluetooth broadcast channel, wherein the pairing identification bit in the first Bluetooth message is a second value.
In an optional embodiment, the apparatus further includes a sixth executing module, configured to start a second timer when the first bluetooth packet is broadcast; responding to the overtime of the second timer, generating a third Bluetooth message, wherein the pairing identification bit of the third Bluetooth message is a first value; and broadcasting the third Bluetooth message in the Bluetooth broadcast channel, wherein the pairing identification bit in the first Bluetooth message is a second value.
In an optional embodiment, the second device to which the apparatus relates is at least one of a bluetooth headset, a bluetooth bracelet, a bluetooth watch, a bluetooth collar, a bluetooth ring, or bluetooth glasses.
In an optional embodiment, the second device related to the apparatus is a bluetooth headset, the bluetooth headset is in a standby state when the bluetooth headset is placed in a matching charging bin and the charging bin is in a cover closing state, the state transition module 910 is configured to receive a wakeup instruction sent by the charging bin, and enter the bluetooth broadcast state, where the wakeup instruction is an instruction generated when the charging bin is changed from the cover closing state to the cover opening state.
In summary, the second device can set the second timer according to the condition of the pairing identification bit in the first bluetooth message sent by the second device, so that the first device does not need to set the timer, and can determine the next operation only according to the pairing identification bit in the scanned bluetooth message. Responding to that the pairing identification bit acquired by the first equipment is a second value, and not responding to the Bluetooth message where the pairing identification bit is located by the first equipment; responding to that the pairing identification bit acquired by the first equipment is a first value, and displaying a connection prompt window according to the Bluetooth message where the pairing identification bit is located, so that the first equipment can avoid mistakenly popping up the connection prompt window due to the interference of the first equipment and the second Bluetooth message through the overtime length of the first timer.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored, and the at least one instruction is loaded and executed by the processor to implement the bluetooth connection prompting method according to the above embodiments.
The embodiment of the present application further provides a computer-readable medium, where at least one instruction is stored in the computer-readable medium, and the at least one instruction is loaded and executed by the processor to implement the method for sending a bluetooth packet according to the above embodiments.
It should be noted that: in the method for prompting bluetooth connection provided in the above embodiment, only the division of the above functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the bluetooth connection prompting device and the bluetooth connection prompting method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the implementation of the present application and is not intended to limit the present application, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (19)

1. A prompting method of Bluetooth connection is used in a first device, and the method comprises the following steps:
scanning a Bluetooth broadcast channel;
under the condition that a first Bluetooth message of second equipment is scanned, determining a pairing identification bit in the first Bluetooth message, wherein the pairing identification bit is used for indicating whether the second equipment has a pairing relation with other equipment;
under the condition that the pairing identification bit is a first value, displaying a connection prompting window corresponding to the second equipment according to the first Bluetooth message, wherein the connection prompting window is used for prompting whether Bluetooth connection is carried out with the second equipment or not;
and under the condition that the pairing identification bit is a second value, the first Bluetooth message is not responded.
2. The method of claim 1,
the first value is used for indicating that the second device does not have a pairing relationship with other devices;
the second value is used for indicating that the second device has a pairing relationship with other devices.
3. The method of claim 2, further comprising:
starting a first timer according to the receiving moment of the first Bluetooth message under the condition that the pairing identification bit is a second value;
scanning the Bluetooth broadcast channel again to obtain a second Bluetooth message of the second device;
and under the condition that the pairing identification bit of the second Bluetooth message is the second value and the receiving time of the second Bluetooth message is earlier than the overtime time of the first timer, not responding to the second Bluetooth message.
4. The method of claim 2, further comprising:
starting a first timer according to the receiving moment of the first Bluetooth message under the condition that the pairing identification bit is a second value;
scanning the Bluetooth broadcast channel again to obtain a second Bluetooth message of the second device;
and displaying a connection prompt window corresponding to the second device according to the second Bluetooth message under the condition that the pairing identification bit of the second Bluetooth message is the second value and the receiving time of the second Bluetooth message is not earlier than the overtime time of the first timer.
5. The method of claim 1, wherein the pairing identity bit in the first bluetooth message is a second value, the method further comprising:
scanning the Bluetooth broadcast channel again to obtain a second Bluetooth message of the second device;
under the condition that the pairing identification bit of the second Bluetooth message is the first value, displaying a connection prompting window corresponding to the second equipment according to the second Bluetooth message, wherein the connection prompting window is used for prompting whether Bluetooth connection is carried out with the second equipment or not;
the first value is used for indicating that the second device has a pairing relationship with other devices and a second timer is overtime, and the second timer is started when the second device broadcasts the first bluetooth message.
6. The method of claim 1, wherein the pairing identity bit in the first bluetooth message is a second value, the method further comprising:
scanning the Bluetooth broadcast channel again to obtain a third Bluetooth message of the second device;
under the condition that the pairing identification bit of the third Bluetooth message is the second value, the third Bluetooth message is not responded;
and the second value taking indicates that the second device has a pairing relationship with other devices and a second timer is not overtime, wherein the second timer is started when the second device broadcasts the first Bluetooth message.
7. The method according to any one of claims 1 to 6, wherein the displaying a connection prompt window corresponding to the second device according to the first Bluetooth message includes:
and displaying a connection prompt window corresponding to the second equipment under the condition that the received signal strength of the first Bluetooth message is greater than a threshold.
8. The method according to any one of claims 1 to 6, wherein the first Bluetooth message includes at least two pairing identification bits, different pairing identification bits correspond to different device types, and the determining the pairing identification bits in the first Bluetooth message includes:
acquiring the equipment type of first equipment;
and determining an identification bit corresponding to the device type of the first device in at least two pairing identification bits as the pairing identification bit.
9. A method for sending a Bluetooth message, which is used in a second device, includes:
entering a Bluetooth broadcasting state under the condition that a triggering condition is met;
generating a first Bluetooth message, wherein the first Bluetooth message carries a pairing flag bit, and the pairing flag bit is used for indicating whether the second device has a pairing relationship with other devices;
and broadcasting the first Bluetooth message in a Bluetooth broadcast channel in the Bluetooth broadcast state.
10. The method of claim 9, wherein the pairing identification bit in the first bluetooth message is a second value, the method further comprising:
starting a second timer when the first Bluetooth message is broadcasted;
responding to the second timer not being overtime, generating a second Bluetooth message, wherein the pairing identification bit of the second Bluetooth message is a second value; and broadcasting the second Bluetooth message in the Bluetooth broadcast channel.
11. The method of claim 9, wherein the pairing identification bit in the first bluetooth message is a second value, the method further comprising:
starting a second timer when the first Bluetooth message is broadcasted;
responding to the overtime of the second timer, generating a third Bluetooth message, wherein the pairing identification bit of the third Bluetooth message is a first value; and broadcasting the third Bluetooth message in the Bluetooth broadcast channel.
12. The method of claim 9, wherein the second device is at least one of a bluetooth headset, a bluetooth bracelet, a bluetooth watch, a bluetooth collar, a bluetooth ring, or bluetooth glasses.
13. The method of claim 12, wherein the second device is a bluetooth headset, the bluetooth headset is in a standby state when the bluetooth headset is placed in a charging chamber of a mating device and the charging chamber is in a closed state, and the entering the bluetooth broadcasting state when the triggering condition is met comprises:
and receiving a wake-up instruction sent by the charging bin, and entering the Bluetooth broadcasting state, wherein the wake-up instruction is generated when the charging bin is changed from the cover closing state to the cover opening state.
14. A bluetooth connection prompting device, the device comprising:
the scanning module is used for scanning a Bluetooth broadcast channel;
the device comprises a determining module, a comparing module and a judging module, wherein the determining module is used for determining a pairing identification bit in a first Bluetooth message under the condition that the first Bluetooth message of a second device is scanned, and the pairing identification bit is used for indicating whether the second device has a pairing relation with other devices;
a prompt window display module, configured to display a connection prompt window corresponding to the second device according to the first bluetooth message when the pairing identification bit is the first value, where the connection prompt window is used to prompt whether to perform bluetooth connection with the second device;
and the operation module is used for not responding to the first Bluetooth message under the condition that the pairing identification bit is a second value.
15. An apparatus for transmitting bluetooth packets, the apparatus comprising:
the state conversion module is used for entering a Bluetooth broadcasting state under the condition that a triggering condition is met;
the message generating module is used for generating a first Bluetooth message, wherein the first Bluetooth message carries a pairing flag bit which is used for indicating whether the second equipment has a pairing relation with other equipment;
and the message broadcasting module is used for broadcasting the first Bluetooth message in a Bluetooth broadcasting channel in the Bluetooth broadcasting state.
16. A first device comprising a processor, a memory coupled to the processor, and program instructions stored on the memory, the processor, when executing the program instructions, implementing a bluetooth connection prompting method as claimed in any one of claims 1 to 8.
17. A second device, comprising a processor, a memory coupled to the processor, and program instructions stored on the memory, wherein the processor, when executing the program instructions, implements the method of transmitting bluetooth messages according to any one of claims 9 to 13.
18. A computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the method of prompting a bluetooth connection according to any one of claims 1 to 8.
19. A computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the method of transmitting bluetooth messages according to any one of claims 9 to 13.
CN202110807401.8A 2021-07-16 2021-07-16 Bluetooth connection prompting method, device, terminal and storage medium Pending CN113518336A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110807401.8A CN113518336A (en) 2021-07-16 2021-07-16 Bluetooth connection prompting method, device, terminal and storage medium
PCT/CN2022/097786 WO2023284454A1 (en) 2021-07-16 2022-06-09 Bluetooth connection prompting method and apparatus, device, storage medium, and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110807401.8A CN113518336A (en) 2021-07-16 2021-07-16 Bluetooth connection prompting method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN113518336A true CN113518336A (en) 2021-10-19

Family

ID=78067724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110807401.8A Pending CN113518336A (en) 2021-07-16 2021-07-16 Bluetooth connection prompting method, device, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN113518336A (en)
WO (1) WO2023284454A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113973290A (en) * 2021-10-27 2022-01-25 深圳市芯中芯科技有限公司 Method for quickly connecting Bluetooth headset
CN114500730A (en) * 2022-02-28 2022-05-13 歌尔股份有限公司 Popup window function control method, device and computer readable storage medium
WO2023284454A1 (en) * 2021-07-16 2023-01-19 Oppo广东移动通信有限公司 Bluetooth connection prompting method and apparatus, device, storage medium, and program product
CN117060949A (en) * 2022-05-07 2023-11-14 Oppo广东移动通信有限公司 Signal sending method and device, combination identification method and device and electronic equipment
CN113973290B (en) * 2021-10-27 2024-04-19 深圳市芯中芯科技有限公司 Method for quickly connecting Bluetooth headset

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019218548A1 (en) * 2018-05-17 2019-11-21 歌尔科技有限公司 Connection request processing method and apparatus, bluetooth headset, wearable device, and storage medium
CN112073955A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and Bluetooth device scanning method
CN112333332A (en) * 2020-10-27 2021-02-05 维沃移动通信有限公司 Prompt message display method and device and electronic equipment
CN112911556A (en) * 2016-06-27 2021-06-04 华为技术有限公司 Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9066327B2 (en) * 2013-06-21 2015-06-23 Bose Corporation Low energy wireless proximity pairing
CN111818499B (en) * 2020-07-27 2023-09-22 深圳市千分一智能技术有限公司 Quick pairing method, device, equipment and computer readable storage medium
CN112669585B (en) * 2020-12-15 2022-08-16 广州极飞科技股份有限公司 Method for device pairing, processor, mobile terminal and server
CN113518336A (en) * 2021-07-16 2021-10-19 Oppo广东移动通信有限公司 Bluetooth connection prompting method, device, terminal and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112911556A (en) * 2016-06-27 2021-06-04 华为技术有限公司 Method for establishing classic Bluetooth connection between dual-mode Bluetooth devices and dual-mode Bluetooth device
WO2019218548A1 (en) * 2018-05-17 2019-11-21 歌尔科技有限公司 Connection request processing method and apparatus, bluetooth headset, wearable device, and storage medium
CN112073955A (en) * 2019-06-10 2020-12-11 海信视像科技股份有限公司 Display device and Bluetooth device scanning method
CN112333332A (en) * 2020-10-27 2021-02-05 维沃移动通信有限公司 Prompt message display method and device and electronic equipment
CN113115294A (en) * 2021-04-22 2021-07-13 荣耀终端有限公司 Stylus pen connection method and Bluetooth system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023284454A1 (en) * 2021-07-16 2023-01-19 Oppo广东移动通信有限公司 Bluetooth connection prompting method and apparatus, device, storage medium, and program product
CN113973290A (en) * 2021-10-27 2022-01-25 深圳市芯中芯科技有限公司 Method for quickly connecting Bluetooth headset
CN113973290B (en) * 2021-10-27 2024-04-19 深圳市芯中芯科技有限公司 Method for quickly connecting Bluetooth headset
CN114500730A (en) * 2022-02-28 2022-05-13 歌尔股份有限公司 Popup window function control method, device and computer readable storage medium
CN114500730B (en) * 2022-02-28 2023-08-29 歌尔股份有限公司 Popup function control method, popup function control device and computer readable storage medium
CN117060949A (en) * 2022-05-07 2023-11-14 Oppo广东移动通信有限公司 Signal sending method and device, combination identification method and device and electronic equipment

Also Published As

Publication number Publication date
WO2023284454A1 (en) 2023-01-19

Similar Documents

Publication Publication Date Title
WO2023284454A1 (en) Bluetooth connection prompting method and apparatus, device, storage medium, and program product
CN109417758B (en) Bluetooth connection method and terminal
CN112449328B (en) Bluetooth searching method, system and related device
EP2787790B1 (en) Method, mobile terminal and system for establishing bluetooth connection
EP3621375A1 (en) Method, user equipment unit, and base station for controlling random access to network
CN113572731B (en) Voice communication method, personal computer, terminal and computer readable storage medium
CN107852762B (en) Method for managing Bluetooth connection, Bluetooth master device and device
US7532903B2 (en) Method for performing TRS communication in a mobile communication terminal
CN111132224B (en) sidelink connection control method, terminal and network side equipment
CN109151212B (en) Equipment control method and device and electronic equipment
CN104853406A (en) Service set identifier SSID providing method, acquiring method and device
CN111629366B (en) Interaction method and device between Bluetooth devices, storage medium and electronic device
CN110933653A (en) Message transmission method, device, terminal and storage medium
EP3179705B1 (en) Message processing method, system and related device
US20160157206A1 (en) Information notification method and instant notification device
CN109257732B (en) Equipment control method and device and electronic equipment
CN110636485A (en) Bluetooth automatic connection method and method for initiating Bluetooth connection
CN111615090B (en) Interaction method and device between Bluetooth devices, storage medium and electronic device
EP3836433A1 (en) Monitoring method and apparatus, device, and storage medium
CN114615660A (en) Access method, system and electronic equipment
CN111277345A (en) Resource allocation method, uplink transmission method, terminal equipment and network equipment
CN103413091B (en) The method for supervising of malicious act and device
CN113783994A (en) Prompt information display method and device, electronic equipment and storage medium
CN113784001A (en) Audio data playing method and device, electronic equipment and storage medium
CN111757306B (en) External playing method and system based on earphone charging box and readable storage medium

Legal Events

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