CN108738008B - Bluetooth pairing method and system - Google Patents
Bluetooth pairing method and system Download PDFInfo
- Publication number
- CN108738008B CN108738008B CN201810751831.0A CN201810751831A CN108738008B CN 108738008 B CN108738008 B CN 108738008B CN 201810751831 A CN201810751831 A CN 201810751831A CN 108738008 B CN108738008 B CN 108738008B
- Authority
- CN
- China
- Prior art keywords
- bluetooth
- data packet
- host
- peripheral
- low
- 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.)
- Active
Links
Images
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/11—Allocation or use of connection identifiers
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a Bluetooth pairing method, which comprises the following steps: the Bluetooth peripheral sends a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, wherein the first data packet comprises verification information; the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth host receives a second data packet and splices the first data packet and the second data packet into a target check data packet; the Bluetooth host checks the target check data packet; and if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target verification data packet so as to initiate a connection request to a connection interface of classic Bluetooth of the Bluetooth peripheral. The invention also provides a Bluetooth pairing system.
Description
[ technical field ] A method for producing a semiconductor device
The invention relates to the technical field of Bluetooth communication, in particular to a Bluetooth pairing method and a Bluetooth pairing system.
[ background of the invention ]
With the development of wireless technology and the popularization of intelligent terminal devices, people have become accustomed to connecting different intelligent terminal devices in a wireless manner, wherein a bluetooth technology is widely applied to intelligent terminal devices as a current mature short-distance wireless technology, for example, connection between a bluetooth headset or a bluetooth sound box and an intelligent mobile phone is performed through bluetooth.
Before the intelligent terminal device adopts the bluetooth communication mode to communicate, need carry out the bluetooth and pair the operation, at present, the bluetooth is paired the mode and is: and pressing a power key of the intelligent terminal device for 5-7 s for a long time, and enabling the intelligent terminal device to enter a discoverable mode. In order to optimize the experience, part of intelligent terminal devices can automatically enter the discoverable mode during initial use, but then, the intelligent terminal devices also need to manually enter the discoverable mode, and the operation is complicated.
[ summary of the invention ]
Therefore, it is necessary to provide a bluetooth pairing method and system to simplify operations for the problem of complicated operations.
In order to achieve the above object, the present invention provides a bluetooth pairing method, which is characterized by comprising the following steps:
the Bluetooth peripheral sends a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, wherein the first data packet comprises verification information;
the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting;
the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information;
the Bluetooth host receives a second data packet and splices the first data packet and the second data packet into a target check data packet;
the Bluetooth host checks the target check data packet;
and if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target verification data packet so as to initiate a connection request to a connection interface of classic Bluetooth of the Bluetooth peripheral.
The invention also provides a Bluetooth pairing method, which comprises the following steps: the Bluetooth peripheral sends a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, wherein the first data packet comprises verification information; the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth peripheral responds to a connection request sent by the Bluetooth host through a connection interface of classical Bluetooth.
The invention also provides a Bluetooth pairing method, which comprises the following steps: the method comprises the steps that a Bluetooth host receives a first data packet sent by a Bluetooth peripheral, wherein the first data packet comprises verification information; the Bluetooth host sends request information to the Bluetooth peripheral through low-power Bluetooth broadcasting; the Bluetooth host receives a second data packet sent by the Bluetooth peripheral through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth host splices the first data packet and the second data packet into a target verification data packet and verifies the target verification data packet; and if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target verification data packet, and initiates a connection request to a connection interface of classic Bluetooth of the Bluetooth peripheral corresponding to the target verification data packet.
The present invention also provides a bluetooth pairing system, comprising: a Bluetooth peripheral and a Bluetooth host; the Bluetooth peripheral comprises a first low-power module; the Bluetooth host comprises a second low-power module, a splicing module, a checking module and a calling module; the first low-power module is used for sending a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, and the first data packet comprises verification information; the second low-power module is used for receiving the first data packet and sending request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the first low-power-consumption module is also used for receiving request information sent by the Bluetooth host and sending a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the splicing module is used for receiving the second data packet and splicing the first data packet and the second data packet into a target check data packet; the checking module is used for checking the target checking data packet; if the check information corresponding to the target check data packet is correct, the calling module is used for calling the connection interface of the classic Bluetooth of the Bluetooth host according to the target check data packet so as to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral.
According to the Bluetooth pairing method and system, after the Bluetooth peripheral is started, a first data packet is sent to a Bluetooth host through low-power-consumption Bluetooth broadcasting, and the first data packet comprises verification information; the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth host receives the second data packet and splices the first data packet and the second data packet into a target check data packet; the target check data packet comprises check information in the first data packet, when the Bluetooth host judges that the Bluetooth is externally set as a qualified Bluetooth peripheral according to the check information, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral, so that connection between the Bluetooth host and the Bluetooth peripheral is established. According to the Bluetooth pairing method and the Bluetooth pairing system, the Bluetooth peripheral does not need to be pressed for a long time and whether the Bluetooth peripheral enters the discoverable mode or not is judged, and only the Bluetooth peripheral is started, the Bluetooth peripheral can send the information marking the Bluetooth peripheral to the Bluetooth host through low-power-consumption Bluetooth broadcasting, so that the Bluetooth host detects the Bluetooth peripheral, the operation is simplified, the Bluetooth host and the Bluetooth peripheral realize searching and pairing through the low-power-consumption Bluetooth broadcasting, and the power consumption is reduced.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a flowchart of a bluetooth pairing method according to an embodiment of the present invention.
Fig. 2 is a diagram of a handshaking protocol between a mobile phone and a bluetooth headset according to an embodiment of the present invention.
Fig. 3 is a sub-flowchart of the bluetooth pairing method shown in fig. 1.
Fig. 4 is a flowchart of a bluetooth pairing method according to another embodiment of the present invention.
Fig. 5 is a functional block diagram of a bluetooth pairing system according to an embodiment of the present invention.
[ detailed description ] embodiments
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Fig. 1 is a flowchart of a bluetooth pairing method of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. FIG. 2 is an interaction process diagram of the Bluetooth pairing method shown in FIG. 1
As shown in fig. 1 and 2, the method includes the following steps:
step S1, the Bluetooth peripheral sends a first data packet to the Bluetooth host through the low power consumption Bluetooth broadcast, and the first data packet includes the check information.
The bluetooth technology is a radio technology supporting short-distance communication of devices, and can perform wireless information interaction among various wireless terminal devices including smart phones, Personal Digital Assistants (PDAs), notebook computers, tablet computers, wireless earphones, wireless sound boxes and the like.
The wireless communication protocol between the Bluetooth host and the Bluetooth peripheral includes Bluetooth Low Energy (BLE) and classic Bluetooth enhanced data (BR/EDR). When the data volume transmitted between the Bluetooth host and the Bluetooth peripheral is large, data, such as voice information, is transmitted between the Bluetooth host and the Bluetooth peripheral through classical Bluetooth broadcasting.
The Bluetooth host can be a smart phone, a palm computer, a notebook computer, a tablet computer and the like, and the Bluetooth peripheral can be equipment with a Bluetooth function, such as a Bluetooth earphone, a Bluetooth sound box, smart glasses, a smart watch and the like. In the embodiment shown in fig. 2, the bluetooth host is exemplified by a handset having a bluetooth module, and the bluetooth peripheral is exemplified by a bluetooth headset.
Before this step, it can be understood that the bluetooth peripheral is first powered on, where powering on refers to turning on the power supply of the bluetooth peripheral, and usually the power supply is turned on by pressing the power on key of the bluetooth peripheral. The first data packet comprises address information of the low-power-consumption Bluetooth of the Bluetooth peripheral, name information of the low-power-consumption Bluetooth and verification information, wherein the verification information can be used for verifying whether the Bluetooth peripheral is the Bluetooth peripheral meeting preset conditions, and only when the Bluetooth peripheral meets the preset conditions, the Bluetooth host calls the connection interface of the classic Bluetooth to send a connection request to the Bluetooth peripheral. In this step, it may be set that the bluetooth peripheral sends the first data packet to the bluetooth host through a low-power bluetooth broadcast within a preset time (for example, the preset time is 1 minute) after the bluetooth peripheral is powered on; when the preset time is exceeded and no Bluetooth host computer receives the broadcasted first data packet, the Bluetooth peripheral can be automatically powered off or in a dormant state, and when the Bluetooth peripheral is powered on again or is awakened by pressing a key such as a switch and volume on the Bluetooth peripheral once, the Bluetooth peripheral sends the first data packet to the Bluetooth host computer again through the low-power Bluetooth broadcast.
In step S2, the bluetooth host receives the first packet and sends a request message to the bluetooth peripheral device via bluetooth low energy broadcasting.
The Bluetooth host comprises a touch display screen, and the touch display screen can be used for sensing touch operation of a user and outputting characters, pictures or videos.
In this step, when the bluetooth host receives the first data packet of the bluetooth peripheral, the touch display screen of the bluetooth host displays the name of the bluetooth peripheral. In this embodiment, the name of the bluetooth peripheral is the same as the name of the bluetooth low energy of the bluetooth peripheral, that is, the name of the bluetooth low energy of the bluetooth peripheral is displayed by the bluetooth host. It should be noted that, when the bluetooth host receives the first data packet sent by the bluetooth peripheral, the name of the bluetooth peripheral corresponding to the first data packet is displayed on the touch display screen, and the bluetooth host can receive a plurality of first data packets, so as to display a plurality of names of the bluetooth peripheral.
The Bluetooth host receives user input information and sends request information to the Bluetooth peripheral equipment according to the input information.
In this embodiment, the user input information refers to a click operation of clicking and selecting a target bluetooth peripheral name among a plurality of bluetooth peripheral names displayed on a touch display screen of the bluetooth host, and after the user completes the click operation, the bluetooth host responds to the click operation of the user and sends request information to a target bluetooth peripheral corresponding to the target bluetooth peripheral name through low power consumption bluetooth broadcasting. The request information is used for requesting the target Bluetooth peripheral to send a second data packet to the Bluetooth host. It will be appreciated that, as shown in fig. 2, the bluetooth host may start the bluetooth function and start to automatically search for the bluetooth peripheral before the bluetooth host receives the user's input information.
And step S3, the Bluetooth peripheral receives the request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through the low-power Bluetooth broadcast according to the request information.
The Bluetooth peripheral equipment is target Bluetooth peripheral equipment which receives the request information, and the second data packet comprises address information of classic Bluetooth and name information of classic Bluetooth. The name of the classic bluetooth of the bluetooth peripheral device corresponds to the name of the low-power-consumption bluetooth of the bluetooth peripheral device one by one, but is not displayed on the touch display screen of the bluetooth host.
In other embodiments, the name of the bluetooth peripheral is the same as the name of the classic bluetooth of the bluetooth peripheral, i.e. the bluetooth host displays the name of the classic bluetooth of the bluetooth peripheral. The name of the low-power-consumption Bluetooth of the Bluetooth peripheral corresponds to the name of the classic Bluetooth of the Bluetooth peripheral one by one, but is not displayed on the touch display screen of the Bluetooth host.
Step S4, the bluetooth host receives the second data packet and splices the first data packet and the second data packet into a target verification data packet.
Specifically, the bluetooth host splices the field occupied by the first data packet and the field occupied by the second data packet into a completed field. For example, the field occupied by the first packet is "00001", the field occupied by the second packet is "00010", and the field occupied by the second packet is "0000100010" after concatenation.
It should be noted that the spliced first data packet and the second data packet are data packets sent by the same bluetooth peripheral, and the combination of the first data packet and the second data packet is used for marking the target bluetooth peripheral.
And step S5, the Bluetooth host checks the target check data packet.
Specifically, the bluetooth host checks the checking information of the first data packet in the spliced target checking data packet. During product development, some bytes in a field occupied by a first data packet sent by the bluetooth peripheral device may be agreed to be a check flag bit and an agreed preset flag bit in advance, for example, the field occupied by the first data packet is "00001", and if the first byte and the second byte of the field occupied by the first data packet are agreed to be the check flag bit and the preset flag bit is "00", the check information is correct. For example, the field occupied by the first data packet is "01001", and if the first byte and the second byte of the field occupied by the first data packet are defined as the flag bits for checking and the preset flag bit is "00", the check information is incorrect.
And step S6, if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls the connection interface of the classic Bluetooth of the Bluetooth host according to the target verification data packet so as to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral.
In this step, when the verification information is verified correctly, the bluetooth host calls the connection interface of the classic bluetooth to initiate a connection request to the connection interface of the classic bluetooth of the bluetooth peripheral according to the target verification data packet.
In the embodiment, the searching and pairing processes of the Bluetooth peripheral and the Bluetooth host are all data transmission through low-power-consumption Bluetooth, and classic Bluetooth information is sent in two data packets, so that on one hand, the data load can be reduced, and the safety performance is also improved; on the other hand, the Bluetooth external device starts to broadcast the first data packet through low power consumption after being started, and compared with the prior art, the Bluetooth external device is simpler to operate.
After the step S6, the method further includes a step S7, when the bluetooth peripheral and the bluetooth host are successfully paired and transmit data to each other through classic bluetooth, the bluetooth peripheral stops transmitting the first packet data to the bluetooth host through low power bluetooth broadcast.
After the Bluetooth peripheral equipment is successfully paired with the Bluetooth host, in order to reduce power consumption, the Bluetooth peripheral equipment stops sending the first packet of data to the Bluetooth host through low-power-consumption Bluetooth broadcasting.
Please refer to fig. 3, which is a sub-flowchart of step S4. The bluetooth host receives the second data packet and splices first data packet and second data packet into the target check-up data packet, specifically includes:
in step S41, the second packet is received.
Step S42, the concatenation order of the first data packet and the second data packet is set.
The splicing sequence of the first data packet and the second data packet comprises that the field occupied by the second data packet is spliced behind the field occupied by the first data packet and the field occupied by the second data packet is spliced in front of the field occupied by the first data packet.
And step S43, splicing the first data packet and the second data packet into a target verification data packet according to the splicing sequence.
In the bluetooth pairing method in this embodiment, after the bluetooth peripheral device is powered on, a first data packet is sent to the bluetooth host through a low-power bluetooth broadcast, and the first data packet includes check information; the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth host receives the second data packet and splices the first data packet and the second data packet into a target check data packet; the target check data packet comprises check information in the first data packet, when the Bluetooth host judges that the Bluetooth is externally set as a qualified Bluetooth peripheral according to the check information, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral, so that connection between the Bluetooth host and the Bluetooth peripheral is established. Need not to press the key of opening of bluetooth peripheral hardware for a long time and distinguish whether the bluetooth peripheral hardware gets into "can be found the mode", only need to start the bluetooth peripheral hardware, the bluetooth peripheral hardware alright through low-power consumption bluetooth broadcasting transmission mark the information of bluetooth peripheral hardware to the bluetooth host computer, make the bluetooth host computer detect the bluetooth peripheral hardware, the operation has been simplified, realizes searching through low-power consumption bluetooth broadcasting between bluetooth host computer and the bluetooth peripheral hardware and pairs, has reduced the consumption.
Referring to fig. 4, in one embodiment, a bluetooth pairing method is provided, including:
step S10, the Bluetooth peripheral sends a first data packet to the Bluetooth host through the low power consumption Bluetooth broadcast, and the first data packet includes the check information.
The first data packet comprises address information of the low-power-consumption Bluetooth of the Bluetooth peripheral, name information of the low-power-consumption Bluetooth and verification information, wherein the verification information can be used for verifying whether the Bluetooth peripheral is the Bluetooth peripheral meeting preset conditions, and only when the Bluetooth peripheral meets the preset conditions, the Bluetooth host calls the connection interface of the classic Bluetooth to send a connection request to the Bluetooth peripheral.
And step S20, the Bluetooth peripheral receives the request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through the low-power Bluetooth broadcast according to the request information.
Wherein, the bluetooth host is the bluetooth host who sends the solicited message.
Step S30, the bluetooth peripheral responds to the connection request sent by the bluetooth host through the classic bluetooth connection interface.
The connection request sent by the Bluetooth host through the connection interface of the classic Bluetooth is responded through the connection interface of the classic Bluetooth of the Bluetooth peripheral.
It should be noted that the definition of the bluetooth peripheral in this embodiment is the same as that of the bluetooth peripheral in the foregoing embodiment, and details are not described herein.
In this embodiment, the bluetooth peripheral apparatus sends the first data packet including the check-up information to the bluetooth host computer through bluetooth low energy broadcasting, so that the bluetooth host computer carries out the check-up to the bluetooth peripheral apparatus according to the check-up information, and send the second data packet to the bluetooth host computer through bluetooth low energy broadcasting according to the request information that the bluetooth host computer received sent, after sending the second data packet to the bluetooth host computer that corresponds, the bluetooth peripheral apparatus responds the connection request that the bluetooth host computer sent through the connection interface of classic bluetooth through the connection interface of corresponding classic bluetooth, thereby establish the connection between bluetooth peripheral apparatus and the bluetooth host computer that corresponds. According to the Bluetooth pairing method, the Bluetooth peripheral does not need to be pressed for a long time and whether the Bluetooth peripheral enters the discoverable mode or not is judged, the Bluetooth peripheral can be started only, the Bluetooth peripheral can send the information marking the Bluetooth peripheral to the Bluetooth host through low-power-consumption Bluetooth broadcasting, the Bluetooth host detects the Bluetooth peripheral, the operation is simplified, the Bluetooth host and the Bluetooth peripheral are searched and paired through the low-power-consumption Bluetooth broadcasting, and the power consumption is reduced.
In one embodiment, a bluetooth pairing method is provided, comprising:
step S100, the Bluetooth host receives a first data packet sent by the Bluetooth peripheral, wherein the first data packet comprises verification information.
Each Bluetooth peripheral sends a corresponding first data packet, and the Bluetooth host can receive the first data packets sent by the plurality of Bluetooth peripherals.
And step S200, the Bluetooth host sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting.
The Bluetooth host comprises a touch display screen, and after the Bluetooth host receives the first data packet, the Bluetooth host can display the Bluetooth peripheral names corresponding to the received first data packet on the touch display screen and can display a plurality of Bluetooth peripheral names at the same time.
When the plurality of Bluetooth peripheral names are displayed, the Bluetooth host responds to relevant operations acting on the touch display screen, such as clicking operations, acquires a target Bluetooth peripheral name from the plurality of Bluetooth peripheral names, and sends request information to a target Bluetooth peripheral corresponding to the target Bluetooth peripheral name.
And step S300, the Bluetooth host receives a second data packet sent by the Bluetooth peripheral equipment through the low-power-consumption Bluetooth broadcast according to the request information.
Specifically, the bluetooth host receives a second data packet sent by the target bluetooth peripheral device through low-power-consumption bluetooth broadcast according to the request information, wherein the second data packet comprises address information of classic bluetooth and name information of classic bluetooth.
And step S400, the Bluetooth host splices the first data packet and the second data packet into a target verification data packet and verifies the target verification data packet.
The first data packet and the second data packet are both data packets sent by the target Bluetooth peripheral. The bluetooth host splices the first data packet and the second data packet into a target verification data packet, and the specific splicing method can refer to fig. 3, and the bluetooth host verifies the target verification data packet through the verification information in the target data packet.
Step S500, if the check information corresponding to the target check data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target check data packet, and initiates a connection request to a connection interface of classic Bluetooth of the Bluetooth peripheral corresponding to the target check data packet.
In this embodiment, the bluetooth host receives a first data packet including check information sent by the bluetooth peripheral, sends request information to the target bluetooth peripheral through bluetooth low energy broadcasting, and after receiving a second data packet returned by the target bluetooth peripheral according to the request information, splices the first data packet and the second data packet corresponding to the target bluetooth peripheral into a target check data packet and checks the target check data packet, and after the check is successful, the bluetooth host initiates a connection request to a connection interface of classic bluetooth of the bluetooth peripheral corresponding to the target check data packet by calling the connection interface of classic bluetooth. The Bluetooth host discovers the Bluetooth peripheral according to the first data packet sent by the Bluetooth peripheral, so that long-time pressing and other operations of the Bluetooth peripheral are not needed, the operation is simplified, and the power consumption is reduced.
The bluetooth pairing system 100 provided by the embodiment of the present invention will be described in detail with reference to fig. 5. It should be noted that the bluetooth pairing system 100 shown in fig. 5 is used for executing the method according to the embodiment of the present invention shown in fig. 1, and for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the specific technology are not disclosed, please refer to the embodiment of the present invention shown in fig. 1.
Referring to fig. 5, fig. 5 is a functional block diagram of a bluetooth pairing system 100 according to an embodiment of the present invention, where the bluetooth pairing system 100 includes a bluetooth peripheral 10 and a bluetooth host 20; the bluetooth peripheral 10 includes a first low power module 11; the bluetooth host 20 comprises a second low-power module 21, a splicing module 22, a checking module 23 and a calling module 24; the first low power module 11 is configured to send a first data packet to the bluetooth host 20 through bluetooth low energy broadcasting, where the first data packet includes verification information; the second low power module 21 is configured to receive the first data packet and send request information to the bluetooth peripheral 10 through a low power bluetooth broadcast; the first low power consumption module 11 is further configured to receive request information sent by the bluetooth host 20 and send a second data packet to the bluetooth host 20 through low power consumption bluetooth broadcast according to the request information; the splicing module 22 is configured to receive the second data packet and splice the first data packet and the second data packet into a target inspection data packet; the checking module 23 is used for checking the target checking data packet; if the check information corresponding to the target check data packet is correct, the calling module 24 is configured to call the connection interface of the classic bluetooth of the bluetooth host according to the target check data packet, so as to initiate a connection request to the connection interface of the classic bluetooth of the bluetooth peripheral.
The splicing module 22 comprises a receiving module 221, a sequence setting module 222 and a sequence splicing module 223; the receiving module 221 is configured to receive the second data packet; the sequence setting module 222 is configured to set a splicing sequence of the first data packet and the second data packet; the sequence splicing module 223 is configured to splice the first data packet and the second data packet into a target verification data packet according to the splicing sequence.
The first low power module 11 is further configured to stop sending the first packet data to the bluetooth host 20 through the low power bluetooth broadcast when the bluetooth peripheral 10 and the bluetooth host 20 are successfully paired and transmit data to each other through the classic bluetooth.
The first data packet comprises address information of the Bluetooth low energy of the Bluetooth peripheral equipment, name information of the Bluetooth low energy and check information. The second packet includes address information of classic bluetooth and name information of classic bluetooth.
According to the Bluetooth pairing system, after the Bluetooth peripheral is started, a first data packet is sent to a Bluetooth host through low-power Bluetooth broadcasting, and the first data packet comprises verification information; the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the Bluetooth peripheral receives request information sent by the Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the Bluetooth host receives the second data packet and splices the first data packet and the second data packet into a target check data packet; the target check data packet comprises check information in the first data packet, when the Bluetooth host judges that the Bluetooth is externally set as a qualified Bluetooth peripheral according to the check information, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral, so that connection between the Bluetooth host and the Bluetooth peripheral is established. According to the Bluetooth pairing system, the Bluetooth peripheral does not need to be pressed for a long time and whether the Bluetooth peripheral enters the discoverable mode or not is judged, the Bluetooth peripheral can send the information marking the Bluetooth peripheral to the Bluetooth host through low-power-consumption Bluetooth broadcasting only by starting the Bluetooth peripheral, so that the Bluetooth host detects the Bluetooth peripheral, the operation is simplified, the Bluetooth host and the Bluetooth peripheral realize searching and pairing through the low-power-consumption Bluetooth broadcasting, and the power consumption is reduced.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (6)
1. A Bluetooth pairing method is characterized by comprising the following steps:
the Bluetooth peripheral sends a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, wherein the first data packet comprises address information of the low-power Bluetooth of the Bluetooth peripheral, name information and verification information of the low-power Bluetooth;
the Bluetooth host receives the first data packet and sends request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting;
the Bluetooth peripheral receives request information sent by a Bluetooth host and sends a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information, wherein the second data packet comprises address information of classic Bluetooth and name information of classic Bluetooth;
the Bluetooth host receives a second data packet and splices the first data packet and the second data packet into a target check data packet;
the Bluetooth host checks the target check data packet;
if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target verification data packet so as to initiate a connection request to a connection interface of classic Bluetooth of a Bluetooth peripheral;
and when the Bluetooth peripheral equipment and the Bluetooth host are successfully paired and data are transmitted mutually through classical Bluetooth, the Bluetooth peripheral equipment stops sending the first data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting.
2. The bluetooth pairing method of claim 1, wherein the bluetooth host receiving a second data packet and concatenating the first data packet and the second data packet into a destination check data packet, comprises:
receiving the second data packet;
setting a splicing sequence of the first data packet and the second data packet;
and splicing the first data packet and the second data packet into a target check data packet according to the splicing sequence.
3. A Bluetooth pairing method is characterized by comprising the following steps:
the method comprises the steps that a Bluetooth host receives a first data packet sent by a Bluetooth peripheral, wherein the first data packet comprises verification information;
the Bluetooth host sends request information to the Bluetooth peripheral through low-power Bluetooth broadcasting;
the Bluetooth host receives a second data packet sent by the Bluetooth peripheral through low-power-consumption Bluetooth broadcasting according to the request information;
the Bluetooth host splices the first data packet and the second data packet into a target verification data packet and verifies the target verification data packet;
and if the verification information corresponding to the target verification data packet is correct, the Bluetooth host calls a connection interface of classic Bluetooth of the Bluetooth host according to the target verification data packet, and initiates a connection request to a connection interface of classic Bluetooth of the Bluetooth peripheral corresponding to the target verification data packet.
4. A bluetooth pairing system, comprising: a Bluetooth peripheral and a Bluetooth host; the Bluetooth peripheral comprises a first low-power module; the Bluetooth host comprises a second low-power module, a splicing module, a checking module and a calling module; the first low-power module is used for sending a first data packet to the Bluetooth host through low-power Bluetooth broadcasting, and the first data packet comprises verification information; the second low-power module is used for receiving the first data packet and sending request information to the Bluetooth peripheral equipment through low-power Bluetooth broadcasting; the first low-power-consumption module is also used for receiving request information sent by the Bluetooth host and sending a second data packet to the Bluetooth host through low-power-consumption Bluetooth broadcasting according to the request information; the splicing module is used for receiving the second data packet and splicing the first data packet and the second data packet into a target check data packet; the checking module is used for checking the target checking data packet; if the check information corresponding to the target check data packet is correct, the calling module is used for calling the connection interface of the classic Bluetooth of the Bluetooth host according to the target check data packet so as to initiate a connection request to the connection interface of the classic Bluetooth of the Bluetooth peripheral.
5. The bluetooth pairing system of claim 4, wherein the splicing module comprises a receiving module, a sequential setting module, and a sequential splicing module; the receiving module is used for receiving a second data packet; the sequence setting module is used for setting the splicing sequence of the first data packet and the second data packet; and the sequence splicing module is used for splicing the first data packet and the second data packet into a target check data packet according to the splicing sequence.
6. The bluetooth pairing system of claim 4, wherein the first low power module is further configured to stop sending the first packet data to the bluetooth host via the low power bluetooth broadcast when the bluetooth peripheral device and the bluetooth host pair successfully and communicate data with each other via classical bluetooth.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810751831.0A CN108738008B (en) | 2018-07-10 | 2018-07-10 | Bluetooth pairing method and system |
PCT/CN2018/103236 WO2020010676A1 (en) | 2018-07-10 | 2018-08-30 | Bluetooth pairing method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810751831.0A CN108738008B (en) | 2018-07-10 | 2018-07-10 | Bluetooth pairing method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108738008A CN108738008A (en) | 2018-11-02 |
CN108738008B true CN108738008B (en) | 2021-04-06 |
Family
ID=63926583
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810751831.0A Active CN108738008B (en) | 2018-07-10 | 2018-07-10 | Bluetooth pairing method and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108738008B (en) |
WO (1) | WO2020010676A1 (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109688570B (en) * | 2018-12-20 | 2022-10-25 | 惠州Tcl移动通信有限公司 | Bluetooth connection method, system and storage medium |
CN109600694B (en) * | 2019-01-16 | 2020-08-11 | 歌尔科技有限公司 | Wireless earphone pairing method and device, terminal and charging box |
CN110149568A (en) * | 2019-05-30 | 2019-08-20 | 歌尔科技有限公司 | A kind of bluetooth headset and communication means, system, electronic equipment, computer media |
CN110224459A (en) * | 2019-06-06 | 2019-09-10 | 深圳市思远半导体有限公司 | Charging bluetooth earphone communication means, relevant device and system |
CN110753330B (en) * | 2019-10-14 | 2023-08-15 | 合肥星空物联信息科技有限公司 | Bluetooth pairing method and Bluetooth headset |
CN110636403A (en) * | 2019-10-25 | 2019-12-31 | 深圳市科奈信科技有限公司 | Wireless earphone pairing method, system and storage medium |
CN110944312B (en) * | 2019-11-14 | 2023-08-25 | 合肥星空物联信息科技有限公司 | Method for carrying out dual-mode Bluetooth pairing by utilizing audio data and Bluetooth device |
CN112738786B (en) * | 2020-12-31 | 2022-11-04 | 展讯通信(上海)有限公司 | Bluetooth communication method, first electronic device and second electronic device |
CN115065931A (en) * | 2022-07-27 | 2022-09-16 | Oppo广东移动通信有限公司 | Method and device for searching Bluetooth device |
CN115550895B (en) * | 2022-09-30 | 2024-10-22 | 浙江大华技术股份有限公司 | Bluetooth connection method, device, system, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016182404A1 (en) * | 2015-05-14 | 2016-11-17 | 엘지전자(주) | Method and device for connecting alternative communication means using bluetooth low energy technology |
CN106658678A (en) * | 2016-10-28 | 2017-05-10 | 青岛海信移动通信技术股份有限公司 | Bluetooth connection method of wearable device, and device |
CN106686526A (en) * | 2016-12-16 | 2017-05-17 | 美的智慧家居科技有限公司 | Method and device for acquiring routing information of electric appliance |
CN107277754A (en) * | 2017-07-12 | 2017-10-20 | 深圳市冠旭电子股份有限公司 | The method and Bluetooth peripheral of a kind of bluetooth connection |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8737917B2 (en) * | 2009-07-24 | 2014-05-27 | Broadcom Corporation | Method and system for a dual-mode bluetooth low energy device |
CN106131810B (en) * | 2016-06-20 | 2020-06-02 | 飞天诚信科技股份有限公司 | Method and device for connecting Bluetooth dual-mode equipment |
CN106375939B (en) * | 2016-08-29 | 2020-01-21 | 山东康威通信技术股份有限公司 | Dual-mode Bluetooth-based data transmission system and method in underground tunnel |
-
2018
- 2018-07-10 CN CN201810751831.0A patent/CN108738008B/en active Active
- 2018-08-30 WO PCT/CN2018/103236 patent/WO2020010676A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016182404A1 (en) * | 2015-05-14 | 2016-11-17 | 엘지전자(주) | Method and device for connecting alternative communication means using bluetooth low energy technology |
CN106658678A (en) * | 2016-10-28 | 2017-05-10 | 青岛海信移动通信技术股份有限公司 | Bluetooth connection method of wearable device, and device |
CN106686526A (en) * | 2016-12-16 | 2017-05-17 | 美的智慧家居科技有限公司 | Method and device for acquiring routing information of electric appliance |
CN107277754A (en) * | 2017-07-12 | 2017-10-20 | 深圳市冠旭电子股份有限公司 | The method and Bluetooth peripheral of a kind of bluetooth connection |
Also Published As
Publication number | Publication date |
---|---|
CN108738008A (en) | 2018-11-02 |
WO2020010676A1 (en) | 2020-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108738008B (en) | Bluetooth pairing method and system | |
CN112911556B (en) | Method for establishing classical Bluetooth connection between dual mode Bluetooth devices and dual mode Bluetooth device | |
EP3091719B1 (en) | Method for short-range wireless communication and electronic device using the same | |
US11419182B2 (en) | Electronic device supporting link sharing and method therefor | |
CN107197346B (en) | Television terminal, Bluetooth device reconnection method and computer readable storage medium | |
CN101690125B (en) | Communication of information between a host device and an accessory via an intermediate device | |
US11709708B2 (en) | Function resource configuration method and device | |
EP3547715A1 (en) | Method and apparatus for reducing continuous-wakeup delay of bluetooth loudspeaker, and bluetooth loudspeaker | |
CN109495871B (en) | Bluetooth connection control method, electronic device and computer readable storage medium | |
CN111654450B (en) | Data transmission method and device and storage medium | |
CN110753334A (en) | Bluetooth communication method, device and equipment with Bluetooth communication function | |
CN113329381B (en) | Method for establishing Bluetooth connection and electronic equipment | |
CN108605373B (en) | Method and electronic device for providing network sharing service | |
JP5849857B2 (en) | Near field communication device | |
WO2019011324A1 (en) | Method for determining access method of mobile terminal, storage medium, and mobile terminal | |
US20220124192A1 (en) | Communication System Selection | |
US20060160569A1 (en) | Cellular phone and portable storage device using the same | |
WO2023169434A1 (en) | Communication method and apparatus | |
CN110944313A (en) | Bluetooth connection method, device, storage medium and terminal | |
US11394495B2 (en) | Hybrid automatic repeat request (HARQ) feedback method and device and data receiving apparatus | |
CN114531741A (en) | Method, device, equipment and storage medium for connecting external equipment and terminal | |
CN106792434B (en) | Hotspot establishing method and terminal equipment | |
JP4455613B2 (en) | Communication terminal | |
CN109195226B (en) | Data transmission method and device, electronic equipment and computer readable storage medium | |
CN113825123A (en) | Communication method, communication device, electronic equipment and computer 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |