CN108495291A - A kind of Bluetooth connecting method and device - Google Patents

A kind of Bluetooth connecting method and device Download PDF

Info

Publication number
CN108495291A
CN108495291A CN201810201245.9A CN201810201245A CN108495291A CN 108495291 A CN108495291 A CN 108495291A CN 201810201245 A CN201810201245 A CN 201810201245A CN 108495291 A CN108495291 A CN 108495291A
Authority
CN
China
Prior art keywords
bluetooth
connection
master
slave devices
judging
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
CN201810201245.9A
Other languages
Chinese (zh)
Inventor
郭军
徐翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Huada Zhibao Electronic System Co Ltd
Original Assignee
Beijing Huada Zhibao Electronic System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Huada Zhibao Electronic System Co Ltd filed Critical Beijing Huada Zhibao Electronic System Co Ltd
Priority to CN201810201245.9A priority Critical patent/CN108495291A/en
Publication of CN108495291A publication Critical patent/CN108495291A/en
Pending legal-status Critical Current

Links

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
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/02Protecting privacy or anonymity, e.g. protecting personally identifiable information [PII]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Databases & Information Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the present application discloses a kind of Bluetooth connecting method and device, the connection request that Bluetooth slave devices are sent in response to bluetooth master, bluetooth connection is established with bluetooth master, and judge whether to receive the confirmation link information for meeting preset condition of bluetooth master transmission within a preset period of time, if it is not, then disconnecting bluetooth connection.This method can be after Bluetooth slave devices and bluetooth master establish bluetooth connection, judge whether to receive the confirmation link information for meeting preset condition within a preset period of time, if be not received by, or the confirmation link information received does not meet preset condition, illustrate that the bluetooth master is not that the Bluetooth slave devices need the target main equipment connected, bluetooth connection can be disconnected at this time, so that the Bluetooth slave devices continue to send out broadcast, and then it is attached with needing to establish the target main equipment connecting therewith, reduce interference of the non-targeted main equipment to bluetooth connection, improve the success rate with bluetooth master bluetooth connection.

Description

A kind of Bluetooth connecting method and device
Technical field
This application involves the communications field more particularly to a kind of Bluetooth connecting methods and device.
Background technology
Bluetooth (Bluetooth) be a kind of wireless technology standard, it can be achieved that fixed equipment, mobile device and personal area network it Between short-range data exchange, equipment bluetooth-capable is referred to as bluetooth equipment.Development with Bluetooth technology and electricity Sub- equipment is popularized, and more and more bluetooth equipments occurs, and the communication between bluetooth equipment enriches people’s lives, such as blue Tooth bracelet, bluetooth headset, Baffle Box of Bluetooth, blue-tooth intelligence cipher key etc. can be used as Bluetooth slave devices, by with bluetooth work( Can the bluetooth masters intelligent link such as mobile phone realize multiple functions, such as can carry out phone in mobile phone, short message, mail, The synchronization of photo, alternatively, carrying out data interaction with mobile phone completes encryption high in the clouds, data extraction etc..
When existing Bluetooth slave devices establish connection with bluetooth master, it will usually be sent out broadcast, be wrapped in the broadcast Unique mark containing the Bluetooth slave devices, bluetooth master is by the Bluetooth slave devices broadcasted near searching for, to search To Bluetooth slave devices initiate the connection request, establish the bluetooth connection between Bluetooth slave devices.But in practical applications, blue Tooth may be searched by other bluetooth masters from equipment and establish connection, and the Bluetooth slave devices will be no longer sent out extensively at this time It broadcasts, needs unique mark of the target main equipment search less than the Bluetooth slave devices for establishing bluetooth connection with Bluetooth slave devices, no Bluetooth connection can be established with it, cause the anti-interference of bluetooth connection poor, Bluetooth slave devices establish bluetooth company with target main equipment The success rate connect is relatively low, influences the use of bluetooth equipment.
Invention content
In order to solve the problems, such as that the anti-interference of the Bluetooth connecting method of the prior art is poor, success rate is relatively low, the application is real It applies example and provides a kind of Bluetooth connecting method and device.
Bluetooth connecting method provided by the embodiments of the present application, is suitable for Bluetooth slave devices, and this method includes:
In response to the connection request that bluetooth master is sent, bluetooth connection is established with the bluetooth master;
Judge that whether getting the confirmation for meeting preset condition that the bluetooth master is sent within a preset period of time connects Information is connect, if it is not, disconnecting the bluetooth connection.
Optionally, the confirmation link information includes encryption information, and whether the judgement gets within a preset period of time The confirmation link information for meeting preset condition that the bluetooth master is sent, including:
Judge within a preset period of time, if get the encryption information that the bluetooth master is sent;
If so, the encryption information is decrypted, judge whether successful decryption.
Optionally, the encryption information includes encrypted connection type mark, the judgement within a preset period of time whether The confirmation link information for meeting preset condition that the bluetooth master is sent is got, further includes:
If judging successful decryption, judge that the mark of the connection type after decryption identifies whether to match with default connection type.
Optionally, the confirmation link information includes connection type mark, and whether the judgement obtains within a preset period of time The confirmation link information for meeting preset condition that the bluetooth master is sent is got, including:
Judge within a preset period of time, if get the connection type mark that the bluetooth master is sent;
If so, judging that the connection type mark identifies whether to match with default connection type.
Optionally, the connection type mark includes long connection identifier or short connection identifier, and the long connection identifier is used for Bluetooth length is established with the bluetooth master to connect, the short connection identifier is used to establish the short company of bluetooth with the bluetooth master It connects.
The embodiment of the present application also provides a kind of Bluetooth connection devices, are suitable for Bluetooth slave devices, and described device includes:
Unit is established in bluetooth connection, the connection request for being sent in response to bluetooth master, with the bluetooth master Establish bluetooth connection;
Judging unit, for judge whether to get within a preset period of time the bluetooth master sends meet it is default The confirmation link information of condition;
Bluetooth connection switching units disconnect the bluetooth connection if the judging result for judging unit is no.
Optionally, the confirmation link information includes encryption information, and the judging unit includes:
First judgment sub-unit, for judging within a preset period of time, if get what the bluetooth master was sent The encryption information;
Second judgment sub-unit, if the judging result for the first judgment sub-unit is yes, to the encryption information into Row decryption, judges whether successful decryption.
Optionally, the encryption information includes encrypted connection type mark, and the judging unit further includes:
If third judgment sub-unit judges that the connection type mark after decryption connects with default for judging successful decryption Connect whether type identification matches.
Optionally, the confirmation link information includes connection type mark, and the judging unit includes:
4th judgment sub-unit, for judging within a preset period of time, if get what the bluetooth master was sent The connection type mark;
5th judgment sub-unit judges the connection type if the judging result for the 4th judgment sub-unit is yes Mark identifies whether to match with default connection type.
Optionally, the connection type mark includes long connection identifier or short connection identifier, and the long connection identifier is used for Bluetooth length is established with the bluetooth master to connect, the short connection identifier is used to establish the short company of bluetooth with the bluetooth master It connects.
In Bluetooth connecting method and device provided by the embodiments of the present application, Bluetooth slave devices are sent in response to bluetooth master Connection request, establish bluetooth connection with bluetooth master, and judge whether receive bluetooth master within a preset period of time The confirmation link information for meeting preset condition sent, if it is not, then disconnecting bluetooth connection.This method can Bluetooth slave devices with After bluetooth master establishes bluetooth connection, judge whether to receive the confirmation for meeting preset condition connection letter within a preset period of time Breath, if received, illustrates the needs for having data transmission between the bluetooth master and the Bluetooth slave devices, can keep blue at this time Tooth connects, if it were not received by confirmation link information, or the confirmation link information received would not meet preset condition, explanation The bluetooth master is not that the Bluetooth slave devices need the target main equipment connected, bluetooth connection can be disconnected at this time, so as to this Bluetooth slave devices continue to send out broadcast, and then are attached with needing to establish the target main equipment connecting therewith, reduce non-targeted Interference of the main equipment to bluetooth connection improves the success rate with target main equipment bluetooth connection.
Description of the drawings
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments described in application, for those of ordinary skill in the art, without creative efforts, It can also be obtained according to these attached drawings other attached drawings.
Fig. 1 is a kind of flow chart of Bluetooth connecting method provided by the embodiments of the present application;
Fig. 2 is a kind of structure diagram of Bluetooth connection device provided by the embodiments of the present application.
Specific implementation mode
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only this Apply for a part of the embodiment, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art exist The every other embodiment obtained under the premise of creative work is not made, shall fall in the protection scope of this application.
Currently, when Bluetooth slave devices are attached with bluetooth master, it will usually be sent out broadcast, include in the broadcast The unique mark of the Bluetooth slave devices, bluetooth master is by the Bluetooth slave devices broadcasted near searching for, to searching Bluetooth slave devices initiate the connection request, establish the bluetooth connection between Bluetooth slave devices.Applicant have discovered that bluetooth from Equipment may be searched for by other bluetooth masters and obtain and establish connection, such as the bluetooth master for connecting the Bluetooth slave devices For equipment, the Bluetooth slave devices may be connected automatically, or artificial mistake of clicking occur to make other bluetooth masters and be somebody's turn to do Bluetooth slave devices establish connection, and the Bluetooth slave devices for having built up bluetooth connection stop sending broadcast outward, at this time, it may be necessary to therewith The broadcast message of the Bluetooth slave devices can not be searched by establishing another bluetooth master of bluetooth connection, thus can not be with the bluetooth It establishes and connects from equipment, cause the anti-interference of bluetooth connection poor, the bluetooth connection between target main equipment is low success rate of Problem.
Poor in order to solve anti-interference in above-mentioned bluetooth connection, low success rate of problem, the embodiment of the present application provides one Kind Bluetooth connecting method, will receive the bluetooth equipment of Bluetooth connection request, such as bluetooth bracelet, bluetooth headset, bluetooth intelligence Energy cipher key etc. is used as Bluetooth slave devices, will send the bluetooth equipment of Bluetooth connection request as bluetooth master, indigo plant Tooth after establishing bluetooth connection with bluetooth master, judges bluetooth master transmission whether is got in preset time period from equipment Meet the confirmation link information of preset condition, if it is not, then disconnect bluetooth connection, Bluetooth slave devices can continue to broadcast bluetooth from setting Standby unique mark, to need the bluetooth master for establishing connection with the Bluetooth slave devices that can get the unique mark, New connection is established with the Bluetooth slave devices, improves the anti-interference of bluetooth connection, is improved and target main equipment bluetooth connection Success rate.
It is a kind of flow chart of Bluetooth connecting method provided by the present application as shown in Figure 1, this method is suitable for bluetooth from setting It is standby, include the following steps:
S101 establishes bluetooth connection in response to the connection request that bluetooth master is sent with the bluetooth master.
In the embodiment of the present application, bluetooth master is actively to initiate the connection the bluetooth equipment of request, such as can be hand The terminal devices such as machine, notebook, tablet computer or other equipment that can initiate Bluetooth connection request.Correspondingly, bluetooth The connection request that bluetooth master is sent can be received from equipment, and according to the connection request received, is built with bluetooth master Vertical bluetooth connection, such as can be bluetooth bracelet, bluetooth headset, blue-tooth intelligence cipher key etc..
Before bluetooth master sends connection request to Bluetooth slave devices, unique mark of Bluetooth slave devices can be first obtained Know, which can be the implementor name of the Bluetooth slave devices, can also be device numbering, can also be according to the bluetooth from setting It is the location of standby to be defined, it can also be that other can distinguish the mark of different Bluetooth slave devices.Bluetooth master obtains The mode of the unique mark of Bluetooth slave devices can be sent out broadcast by Bluetooth slave devices and be realized, can in the information of broadcast With the unique mark including the Bluetooth slave devices, the bluetooth master within broadcasting area can pass through the bluetooth near scanning Its unique mark is obtained from equipment.
It, can be according to the unique mark to the bluetooth from setting after bluetooth master gets the unique mark of Bluetooth slave devices Preparation send connection request.If what is got is the unique mark of multiple Bluetooth slave devices, can be sent to specified Bluetooth slave devices Connection request may include the information such as the unique mark of the bluetooth master in the connection request.
For the interaction between bluetooth master and Bluetooth slave devices, specifically, can be equipped on bluetooth master The APP (Application, using) and API (Application Programming being used cooperatively with Bluetooth slave devices Interface, application programming interface).API can be called to send work(to Bluetooth slave devices by the APP on bluetooth master It can instruct, realize the operation to Bluetooth slave devices.Such as bluetooth shield can have corresponding as Bluetooth slave devices on mobile phone APP is instructed by APP to bluetooth shield sending function, such as can be sent and be connected to bluetooth shield by the function command of cell phone application Request.
After Bluetooth slave devices get the connection request of bluetooth master transmission, in response to the connection request got, root According to unique mark bluetooth connection is established with corresponding bluetooth master.Wherein, the unique mark of the bluetooth master can be set Standby name, can also be the mark that device numbering etc. can distinguish different bluetooth masters.
For example, bluetooth shield is " USBKey123 " as Bluetooth slave devices, unique mark, and the bluetooth shield is wide outward The unique mark is broadcast, the mobile phone as bluetooth master passes through the acquisition of information of broadcast unique mark within its broadcasting area Know, connection request, the connection request are sent to the bluetooth shield of the mark with " USBKey123 " according to the unique mark got In may include mobile phone unique mark " 359268256498512 ", then the bluetooth shield is according to the connection request received, with tool There is the mobile phone of the mark of " 359268256498512 " to establish bluetooth connection.
S102 judges that the confirmation for meeting preset condition for whether getting bluetooth master transmission within a preset period of time connects Information is connect, if it is not, executing S103.
After bluetooth master and Bluetooth slave devices establish bluetooth connection, you can carry out the data communication of two equipment rooms. In the embodiment of the present application, whether Bluetooth slave devices can get the symbol of bluetooth master transmission within a preset period of time by judgement The confirmation link information for closing preset condition judges to have connected to judge whether the bluetooth master having connected is target main equipment Whether the bluetooth master connect is the equipment for needing to establish bluetooth connection with Bluetooth slave devices.Wherein, confirm that link information can be with It is connection type mark, encryption information etc..
Using connection type mark as when confirming link information, Bluetooth slave devices are establishing bluetooth connection with bluetooth master Afterwards, judge within a preset period of time, if get the connection type mark of bluetooth master transmission.
Wherein, connection type mark can indicate different bluetooth connection types, including long connection identifier and short connection identifier, Wherein long connection identifier is used to establish bluetooth length with Bluetooth slave devices and connect, and short connection identifier is used to establish with Bluetooth slave devices blue The short connection of tooth.Long connection refers to the bluetooth connection of duration, can continuously transmit multiple data packets in connection at one, establishes length After connection, user's manual operation is needed to turn off;Short connection is to connect temporarily, and a business number is only completed in connection at one According to transmission, after data are sent completely, the information terminated according to business data processing or the instruction information disconnected, disconnect This connection, it is more safe and power saving compared with long connection.Connection type mark can be by number, letter and meet one or more groups At, such as long connection identifier can be " 1 ", short connection identifier can be " 2 ".
If the connection type mark of bluetooth master transmission has not been obtained in Bluetooth slave devices within a preset period of time, then it is assumed that The confirmation link information for meeting preset condition has not been obtained in Bluetooth slave devices, and the bluetooth master of bluetooth connection is established with Bluetooth slave devices Equipment is not target main equipment, executes S103.
If Bluetooth slave devices get the connection type mark of bluetooth master transmission within a preset period of time, further Judge that the connection type got mark identifies whether to match with default connection type, wherein default connection type mark can be One or more combinations of letter, number or character etc..Specifically, default connection identifier can be long connection identifier or short company Mark is connect, if connection type mark is identical as default connection type mark, then it is assumed that the two matches.
If judging result is matching, then it is assumed that Bluetooth slave devices get the confirmation link information for meeting preset condition, hair The bluetooth master that connection type identifies is sent to can be used as target main equipment.When judging result is matching, can keep established Bluetooth connection, to carry out the data transmission of bluetooth master and Bluetooth slave devices.When judging result is matching, if getting Connection type identify corresponding connection type and currently-established connection type not at the same time it can also according to the connection type Bluetooth connection type between mark update bluetooth master and Bluetooth slave devices.Such as Bluetooth slave devices are worked as with bluetooth master Preceding connection type is the short connection of bluetooth, and what is got is identified as " 1 " with the matched connection type of default connection type mark, As the connection type mark of long connection is established in instruction, can the original short connection of bluetooth be updated to bluetooth length connection.
If judging result is to mismatch, then it is assumed that the confirmation connection letter for meeting preset condition has not been obtained in Bluetooth slave devices Breath, the bluetooth master that bluetooth connection is established with Bluetooth slave devices is not target main equipment, executes S103.
When using encryption information as confirmation link information, after bluetooth master and Bluetooth slave devices establish bluetooth connection, Bluetooth slave devices judge within a preset period of time, if receive the encryption information of bluetooth master transmission.
If judging result is no, then it is assumed that the confirmation link information for meeting preset condition has not been obtained in Bluetooth slave devices, with The bluetooth master that Bluetooth slave devices establish bluetooth connection is not target main equipment, executes S103.
If the determination result is YES, then the encryption information received is decrypted, if Bluetooth slave devices can be to the encryption Information successful decryption illustrates that bluetooth master and Bluetooth slave devices have same Encryption Algorithm, it is believed that Bluetooth slave devices obtain The encryption information got is to meet the confirmation link information of preset condition, correspondingly, the bluetooth master for sending encryption information can As target main equipment, established bluetooth connection can be kept.
Bluetooth slave devices can also verify the information after decryption after encryption information is decrypted, if verification Pass through, then it is assumed that the encryption information is to meet the confirmation link information of preset condition.With encryption information for encrypted connection type For mark, after encrypted connection type mark is decrypted, it can be determined that the connection type after decryption is identified and preset Connection type identifies whether to match.
If judging result is matching, then it is assumed that Bluetooth slave devices get the confirmation link information for meeting preset condition, hair The bluetooth master that connection type identifies is sent to can be used as target main equipment.Established bluetooth connection can be kept, or according to the company Connect the bluetooth connection type between type identification update bluetooth master and Bluetooth slave devices.
If judging result is to mismatch, then it is assumed that the confirmation connection letter for meeting preset condition has not been obtained in Bluetooth slave devices Breath, the bluetooth master that bluetooth connection is established with Bluetooth slave devices is not target main equipment, executes S103.
Bluetooth master is sent to Bluetooth slave devices confirms connection identifier, can detected and indigo plant by bluetooth master When tooth establishes bluetooth connection from equipment, the confirmation connection identifier pre-saved is sent to Bluetooth slave devices.
In addition, bluetooth master is sent to Bluetooth slave devices confirms connection identifier, it can also be by bluetooth master It can show the input interface for confirming link information, so that user inputs, alternatively, in the APP on bluetooth master, Ke Yixian Show function command for selection by the user, there is the confirmation link information wherein preserved in function command and bluetooth master mapping to close System, user trigger the function command, you can the confirmation connection identifier pre-saved is sent to corresponding Bluetooth slave devices.
S103 disconnects bluetooth connection.
Judge with Bluetooth slave devices establish the bluetooth master of bluetooth connection be non-targeted main equipment when, disconnect bluetooth company It connecing, Bluetooth slave devices broadcast its unique mark, so that target main equipment can get the unique mark of the Bluetooth slave devices, into And Bluetooth connection request is sent to the Bluetooth slave devices, to establish the bluetooth connection between target main equipment and Bluetooth slave devices.
In Bluetooth connecting method provided by the embodiments of the present application, connection that Bluetooth slave devices are sent in response to bluetooth master Request establishes bluetooth connection with bluetooth master, and judges whether receive bluetooth master transmission within a preset period of time The confirmation link information for meeting preset condition, if it is not, then disconnecting bluetooth connection.This method can be in Bluetooth slave devices and bluetooth master After equipment establishes bluetooth connection, judge whether to receive the confirmation link information for meeting preset condition within a preset period of time, such as Fruit receives, and illustrates the needs for having data transmission between the bluetooth master and the Bluetooth slave devices, bluetooth can be kept to connect at this time It connects, if it were not received by confirmation link information, or the confirmation link information received would not meet preset condition, illustrates the indigo plant Tooth main equipment is not that the Bluetooth slave devices need the target main equipment connected, bluetooth connection can be disconnected at this time, so as to the bluetooth Continue to send out broadcast from equipment, and then be attached with needing to establish the target main equipment connecting therewith, reduces non-targeted master and set The standby interference to bluetooth connection improves the success rate with target main equipment bluetooth connection.
Based on a kind of Bluetooth connecting method that above example provides, the embodiment of the present application also provides a kind of bluetooth connections Its operation principle is described in detail below in conjunction with the accompanying drawings in device.
Referring to Fig. 2, which is a kind of structure diagram of Bluetooth connection device provided by the embodiments of the present application, the device packet It includes:
Unit 110 is established in bluetooth connection, the connection request for responding bluetooth master transmission, with the bluetooth master Establish bluetooth connection;
Judging unit 120, for judging whether get meeting for the bluetooth master transmission within a preset period of time The confirmation link information of preset condition;
Bluetooth connection switching units 130 disconnect the bluetooth connection if the judging result for judging unit 120 is no.
Optionally, the confirmation link information includes encryption information, and the judging unit 120 includes:
First judgment sub-unit, for judging within a preset period of time, if get what the bluetooth master was sent The encryption information;
Second judgment sub-unit, if the judging result for the first judgment sub-unit is yes, to the encryption information into Row decryption, judges whether successful decryption.
Optionally, the encryption information includes encrypted connection type mark, and the judging unit 120 further includes:
If third judgment sub-unit judges that the connection type mark after decryption connects with default for judging successful decryption Connect whether type identification matches.
Optionally, the confirmation link information includes connection type mark, and the judging unit 120 includes:
4th judgment sub-unit, for judging within a preset period of time, if get what the bluetooth master was sent The connection type mark;
5th judgment sub-unit judges the connection type if the judging result for the 4th judgment sub-unit is yes Mark identifies whether to match with default connection type.
In Bluetooth connection device provided by the embodiments of the present application, connection that Bluetooth slave devices are sent in response to bluetooth master Request establishes bluetooth connection with bluetooth master, and judges whether receive bluetooth master transmission within a preset period of time The confirmation link information for meeting preset condition, if it is not, then disconnecting bluetooth connection.This method can be in Bluetooth slave devices and bluetooth master After equipment establishes bluetooth connection, judge whether to receive the confirmation link information for meeting preset condition within a preset period of time, such as Fruit receives, and illustrates the needs for having data transmission between the bluetooth master and the Bluetooth slave devices, bluetooth can be kept to connect at this time It connects, if it were not received by confirmation link information, or the confirmation link information received would not meet preset condition, illustrates the indigo plant Tooth main equipment is not that the Bluetooth slave devices need the target main equipment connected, bluetooth connection can be disconnected at this time, so as to the bluetooth Continue to send out broadcast from equipment, and then be attached with needing to establish the target main equipment connecting therewith, reduces non-targeted master and set The standby interference to bluetooth connection improves the success rate with target main equipment bluetooth connection.
When introducing the element of various embodiments of the application, article "a", "an", "this" and " described " are intended to There are one expressions or multiple element.Word "include", "comprise" and " having " are all inclusive and mean in addition to listing Except element, there can also be other elements.
It should be noted that one of ordinary skill in the art will appreciate that realizing the whole in above method embodiment or portion Split flow is relevant hardware can be instructed to complete by computer program, and the program can be stored in a computer In read/write memory medium, the program is when being executed, it may include such as the flow of above-mentioned each method embodiment.Wherein, the storage Medium can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, RAM) etc..
Each embodiment in this specification is described in a progressive manner, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.The apparatus embodiments described above are merely exemplary, wherein described be used as separating component explanation Unit and module may or may not be physically separated.Furthermore it is also possible to select according to the actual needs it In some or all of unit and module achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying In the case of creative work, you can to understand and implement.
The above is only the specific implementation mode of the application, it is noted that for the ordinary skill people of the art For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered It is considered as the protection domain of the application.

Claims (10)

1. a kind of Bluetooth connecting method, which is characterized in that it is suitable for Bluetooth slave devices, the method includes:
In response to the connection request that bluetooth master is sent, bluetooth connection is established with the bluetooth master;
Judge whether get the confirmation connection letter for meeting preset condition that the bluetooth master is sent within a preset period of time Breath, if it is not, disconnecting the bluetooth connection.
2. described to sentence according to the method described in claim 1, it is characterized in that, the confirmation link information includes encryption information The disconnected confirmation link information for meeting preset condition for whether getting the bluetooth master within a preset period of time and sending, packet It includes:
Judge within a preset period of time, if get the encryption information that the bluetooth master is sent;
If so, the encryption information is decrypted, judge whether successful decryption.
3. according to the method described in claim 2, it is characterized in that, the encryption information includes encrypted connection type mark, Whether the judgement gets the confirmation connection letter for meeting preset condition that the bluetooth master is sent within a preset period of time It ceases, further includes:
If judging successful decryption, judge that the mark of the connection type after decryption identifies whether to match with default connection type.
4. according to the method described in claim 1, it is characterized in that, the confirmation link information include connection type mark, institute It states and judges whether get the confirmation link information for meeting preset condition that the bluetooth master is sent within a preset period of time, Including:
Judge within a preset period of time, if get the connection type mark that the bluetooth master is sent;
If so, judging that the connection type mark identifies whether to match with default connection type.
5. method according to claim 3 or 4, which is characterized in that connection type mark include long connection identifier or Short connection identifier, the long connection identifier are used to establish bluetooth length with the Bluetooth slave devices and connect, and the short connection identifier is used In establishing the short connection of bluetooth with the Bluetooth slave devices.
6. a kind of Bluetooth connection device, which is characterized in that be suitable for Bluetooth slave devices, described device includes:
Unit is established in bluetooth connection, and the connection request for being sent in response to bluetooth master is established with the bluetooth master Bluetooth connection;
Judging unit, whether for judging to get within a preset period of time, the bluetooth master sends meets preset condition Confirmation link information;
Bluetooth connection switching units disconnect the bluetooth connection if the judging result for judging unit is no.
7. device according to claim 6, which is characterized in that the confirmation link information includes encryption information, described to sentence Disconnected unit includes:
First judgment sub-unit, for judging within a preset period of time, if get the described of the bluetooth master transmission Encryption information;
Second judgment sub-unit solves the encryption information if the judging result for the first judgment sub-unit is yes It is close, judge whether successful decryption.
8. device according to claim 7, which is characterized in that the encryption information includes encrypted connection type mark, The judging unit further includes:
If third judgment sub-unit judges the connection type mark after decryption and default connection class for judging successful decryption Type identifies whether to match.
9. device according to claim 6, which is characterized in that the confirmation link information includes connection type mark, institute Stating judging unit includes:
4th judgment sub-unit, for judging within a preset period of time, if get the described of the bluetooth master transmission Connection type identifies;
5th judgment sub-unit judges the connection type mark if the judging result for the 4th judgment sub-unit is yes It identifies whether to match with default connection type.
10. device according to claim 8 or claim 9, which is characterized in that connection type mark include long connection identifier or Short connection identifier, the long connection identifier are used to establish bluetooth length with the bluetooth master and connect, and the short connection identifier is used In establishing the short connection of bluetooth with the bluetooth master.
CN201810201245.9A 2018-03-12 2018-03-12 A kind of Bluetooth connecting method and device Pending CN108495291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810201245.9A CN108495291A (en) 2018-03-12 2018-03-12 A kind of Bluetooth connecting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810201245.9A CN108495291A (en) 2018-03-12 2018-03-12 A kind of Bluetooth connecting method and device

Publications (1)

Publication Number Publication Date
CN108495291A true CN108495291A (en) 2018-09-04

Family

ID=63338896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810201245.9A Pending CN108495291A (en) 2018-03-12 2018-03-12 A kind of Bluetooth connecting method and device

Country Status (1)

Country Link
CN (1) CN108495291A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246851A (en) * 2018-10-30 2019-01-18 歌尔科技有限公司 A kind of processing method of bluetooth connection, equipment and storage medium
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium
CN113691964A (en) * 2020-05-19 2021-11-23 成都鼎桥通信技术有限公司 Connection method and device of Bluetooth equipment and storage medium
CN113825105A (en) * 2021-09-26 2021-12-21 深圳市芯中芯科技有限公司 Bluetooth broadcast-based one-to-many networking sound box control system and method
CN115713239A (en) * 2022-12-07 2023-02-24 中国南方电网有限责任公司超高压输电公司广州局 Operation and maintenance risk prediction method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338402A (en) * 2015-11-04 2016-02-17 北京数码视讯科技股份有限公司 Bluetooth connection method and apparatus
CN105516975A (en) * 2015-11-26 2016-04-20 上海科勒电子科技有限公司 Wireless connection method, master device, slave device and system
CN106714132A (en) * 2017-01-24 2017-05-24 深圳创维-Rgb电子有限公司 Intelligent display terminal, intelligent device, and intelligent interaction method and system
CN107071709A (en) * 2017-04-06 2017-08-18 飞天诚信科技股份有限公司 A kind of matching method and device with bluetooth equipment
US20170280277A1 (en) * 2015-12-02 2017-09-28 Huizhou Tcl Mobile Communication Co., Ltd. Bluetooth interconnection method and system for wearable device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105338402A (en) * 2015-11-04 2016-02-17 北京数码视讯科技股份有限公司 Bluetooth connection method and apparatus
CN105516975A (en) * 2015-11-26 2016-04-20 上海科勒电子科技有限公司 Wireless connection method, master device, slave device and system
US20170280277A1 (en) * 2015-12-02 2017-09-28 Huizhou Tcl Mobile Communication Co., Ltd. Bluetooth interconnection method and system for wearable device and mobile terminal
CN106714132A (en) * 2017-01-24 2017-05-24 深圳创维-Rgb电子有限公司 Intelligent display terminal, intelligent device, and intelligent interaction method and system
CN107071709A (en) * 2017-04-06 2017-08-18 飞天诚信科技股份有限公司 A kind of matching method and device with bluetooth equipment

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246851A (en) * 2018-10-30 2019-01-18 歌尔科技有限公司 A kind of processing method of bluetooth connection, equipment and storage medium
WO2020087734A1 (en) * 2018-10-30 2020-05-07 歌尔股份有限公司 Bluetooth connection processing method and device and storage medium
CN113691964A (en) * 2020-05-19 2021-11-23 成都鼎桥通信技术有限公司 Connection method and device of Bluetooth equipment and storage medium
CN113691964B (en) * 2020-05-19 2023-09-05 成都鼎桥通信技术有限公司 Bluetooth device connection method, device and storage medium
CN113473434A (en) * 2021-08-17 2021-10-01 杭州涂鸦信息技术有限公司 Bluetooth connection method, device, computer equipment and computer readable storage medium
CN113825105A (en) * 2021-09-26 2021-12-21 深圳市芯中芯科技有限公司 Bluetooth broadcast-based one-to-many networking sound box control system and method
CN113825105B (en) * 2021-09-26 2023-03-07 深圳市芯中芯科技有限公司 Bluetooth broadcast-based one-to-many networking sound box control system and method
CN115713239A (en) * 2022-12-07 2023-02-24 中国南方电网有限责任公司超高压输电公司广州局 Operation and maintenance risk prediction method and device, computer equipment and storage medium
CN115713239B (en) * 2022-12-07 2024-04-02 中国南方电网有限责任公司超高压输电公司广州局 Operation and maintenance risk prediction method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108495291A (en) A kind of Bluetooth connecting method and device
CN108199905A (en) MESH network and its MESH equipment and with network method
CN108366362A (en) MESH network and its MESH equipment safeties match network method
CN111132135B (en) Wireless network distribution method and system for intelligent home terminal
CN106878926A (en) A kind of data transmission method based on low-power consumption bluetooth, from main equipment and system
CN107800795A (en) The processing method and processing device of block information
CN109413627A (en) A kind of smart home device matches network method and distribution network systems
CN108632814A (en) A kind of terminal device network collocating method and system
CN104955022A (en) Method and system for sharing virtual SIM (subscriber identity module)
CN102843686A (en) Wireless network system and portable electronic device
CN104254070A (en) WiFi access method, intelligent terminal and router equipment
CN103957580B (en) A kind of WIFI quickly networkings matching method and module for Intelligent hardware
CN108419226A (en) A kind of method and bluetooth equipment connected between bluetooth equipment
CN109618318A (en) A kind of matching method and TWS earphone of TWS earphone
CN104780580B (en) A kind of Wi-Fi mobile networking methods of energy consumption balance
CN103702312B (en) Wireless information transfer method and apparatus
CN103987038A (en) Radio communication method and system
CN103491648A (en) Communication method and system based on WIFI
CN105553964A (en) Method and apparatus for controlling Bluetooth device
CN104640122A (en) Wireless networking method of router and trunk equipment
CN104469665A (en) Data processing method and user terminals
CN107645597A (en) The synchronous method and terminal of application program
CN105246129B (en) The network-building method and device of a kind of intelligent terminal
CN106131837A (en) Method, terminal and the communication system that a kind of wireless network connects
CN211577683U (en) Intelligent household equipment and intelligent household system

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180904

RJ01 Rejection of invention patent application after publication