CN105792109A - Bluetooth equipment connection processing method and system based on Linux system - Google Patents
Bluetooth equipment connection processing method and system based on Linux system Download PDFInfo
- Publication number
- CN105792109A CN105792109A CN201610178964.4A CN201610178964A CN105792109A CN 105792109 A CN105792109 A CN 105792109A CN 201610178964 A CN201610178964 A CN 201610178964A CN 105792109 A CN105792109 A CN 105792109A
- Authority
- CN
- China
- Prior art keywords
- equipment
- bluetooth
- described current
- communication equipment
- communication
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/08—Access security
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a Bluetooth equipment connection processing method and system based on the Linux system. The method comprises the steps that S10) attribute information of a present Bluetooth communication equipment to be connected is obtained; S20) the obtained attribute information of the present Bluetooth communication equipment to be connected is parsed; S30) the parsed attribute information of the present Bluetooth communication equipment to be connected is compared with pre-stored attribute information of Bluetooth equipment; and S40) when the attribute information of the present Bluetooth communication equipment to be connected is consistent with the pre-stored attribute information of the Bluetooth equipment, communication connection is established for the present Bluetooth communication equipment to be connected.
Description
Technical field
The present invention relates to the electronic equipment communications field, espespecially a kind of bluetooth equipment connection processing method based on Linux system and system.
Background technology
In order to meet the demand in market, intelligent router needs to realize the function of conveniently accessible various bluetooth equipment, the many blue tooth medical health equipment occurred in the market, occurs in that many encryptions, does not encrypt low-power consumption, classical blue tooth medical health equipment;Occur in that at present and judge to carry out, from being dynamically connected, the access of big plurality of Bluetooth equipments being had sizable limitation based on device name.To dissimilar bluetooth equipment, being respectively processed based on multiple processes, resource consumption repeats, and code is not easy to safeguard.
Owing to market having all kinds of bluetooth equipment, there is key authentication and without key authentication mode.Prior art is respectively processed based on multiple processes, and resource consumption is relatively big, and reliability is not high.Carry out judging, from being dynamically connected, the access of big plurality of Bluetooth equipments is had sizable limitation based on device name, be not easy to safeguard.
Based on the problem above present invention provide a kind of optimization based on Linux system realize automatically access bluetooth equipment scheme.
Summary of the invention
Present solution provides a kind of bluetooth equipment connection processing method based on Linux system and system, namely based on the judgement of bluetooth equipment type, it is provided that a kind of general automatically access mode.General scanning, connecting platform is provided to dissimilar equipment.
The present invention provides techniques below scheme:
A kind of bluetooth equipment connection processing method based on Linux system, including:
Step S10 obtains the attribute information of current Bluetooth communication equipment to be connected;
Step S20 resolves the attribute information of the Bluetooth communication equipment current to be connected obtained;
Step S30 compares according to the attribute information of Bluetooth communication equipment current to be connected resolved and the bluetooth equipment attribute information of pre-stored;
Step S40, when Bluetooth communication equipment attribute information to be connected is consistent with the bluetooth equipment attribute information comparison of described pre-stored, sets up communication connection with described current bluetooth equipment to be connected.
It is further preferred that described step S40 also includes:
When step S41 sets up communication connection with described current Bluetooth communication equipment to be connected, including the device type extracted in described current Bluetooth communication equipment attribute information to be connected;
Step S42 judges that described current Bluetooth communication equipment to be connected is the Second Type of the first kind of pre-stored or pre-stored, sets up communication connection according to the device type of described pre-stored with described current bluetooth equipment to be connected.
It is further preferred that
Step S421, when judging that described current Bluetooth communication equipment to be connected is the first kind, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4211 is when the key agreement of key and the pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select first to preset communication port, preset communication port by described first and set up communication connection with described current bluetooth equipment to be connected.
It is further preferred that
Step S422, when judging that described current Bluetooth communication equipment to be connected is Second Type, further determines whether as ciphering type;
Step S4221, when being judged as ciphering type, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4222 is when verifying the key agreement of key and pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select second to preset communication port, preset communication port by described second and set up communication connection with described current bluetooth equipment to be connected.
It is further preferred that
Step S4223, when for non-encrypted type, obtains the address of described current Bluetooth communication equipment to be connected, selects the 3rd to preset communication port, presets communication port by the described 3rd and sets up communication connection with described current bluetooth equipment to be connected.
It is further preferred that also include:
Step 50 when the bluetooth equipment attribute information comparison of described step S40 Bluetooth communication equipment to be connected attribute information Yu described pre-stored is inconsistent, extraction equipment type from the attribute information of described current Bluetooth communication equipment to be connected;
Step S60 is extraction equipment address information from the attribute information of described current Bluetooth communication equipment to be connected.
It is further preferred that also include:
Step S70 obtains the key of described current Bluetooth communication equipment to be connected, and preserves to the bluetooth equipment attribute information of described pre-stored;
Step S80 obtains and presets communication port and described current Bluetooth communication equipment to be connected and set up communication connection, and described communication port includes first presetting communication port, second presets communication port, the 3rd presets one of them of communication port three.
A kind of based on Linux system bluetooth equipment connection process system, including:
Data obtaining module, for obtaining the attribute information of current Bluetooth communication equipment to be connected;
Information analysis module, for resolving the attribute information of the described current Bluetooth communication equipment to be connected of acquisition;
Information preserves module, for preserving the bluetooth equipment attribute information of pre-stored;
Control module, preserve module electrically connect with described data obtaining module, described information analysis module, described information respectively, described control module is compared for the facility information prestored with described memory module after being resolved by the attribute information of the Bluetooth communication equipment current to be connected of described information scanning module acquisition, when described facility information comparison is consistent, and control to set up communication connection.
It is further preferred that
When described facility information comparison is consistent, when setting up communication connection with current Bluetooth communication equipment to be connected, described control module is further used for judging the device type of described current Bluetooth communication equipment to be connected, and control to preserve, from described information, the address extracting described current Bluetooth communication equipment to be connected module, verify that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key that described information preserves module stores, when the result is consistent, control further to preserve from described information module obtains preset communication port and set up communication connection with described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
It is further preferred that
The facility information that the attribute information of Bluetooth communication equipment current to be connected that described control module is additionally operable to be obtained by described data obtaining module prestores with described memory module after resolving is compared, when described facility information comparison is inconsistent, described control module controls to extract described current Bluetooth communication equipment type to be connected from described parsing module, extract described current Bluetooth communication equipment address information to be connected, the key of acquisition equipment is also saved to described information storage module, and control the communication port obtaining the storage of described information storage module and the foundation communication connection of described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
By a kind of bluetooth equipment connection processing method based on Linux system provided by the invention and system, it is possible to bring following at least one beneficial effect:
1, bluetooth equipment information is obtained according to after resolving, by obtain device type, already present address be directly entered the process of connection equipment, so can avoid the process than relatively time-consuming discovering device, re-establish connection, and in bluetooth equipment, it is rapidly completed judge process (without artificial interference), thus having shortened the time connected, it is achieved that the quick connection between bluetooth equipment;
2, based on the judgement of bluetooth equipment type, provide the bluetooth equipment based on Linux system realization based on a kind of optimization and automatically access scheme, different types of bluetooth equipment is used general platform, it is easily maintained, in order to facilitate user, being again coupled to only to open equipment just, current this automatic connected mode is reliable and can bring better Consumer's Experience.
3. the present invention realizes already by code, and is verified in physical device, and effect is highly desirable;Expection with design is consistent;
4. in the prior art, only the present invention is to realize bluetooth equipment connection process connection based on Linux system.
Accompanying drawing explanation
Below by the way of clearly understandable, accompanying drawings preferred implementation, it is further described based on Linux system bluetooth equipment connection processing method and the above-mentioned characteristic of system, technical characteristic, advantage and implementation thereof a kind of.
Fig. 1 is that the present invention is a kind of based on Linux system bluetooth equipment connection processing method one flow chart;
Fig. 2 is that the present invention is a kind of based on Linux system bluetooth equipment connection processing method another kind flow chart;
Fig. 3 is a kind of another kind of flow chart based on Linux system bluetooth equipment connection processing method of the present invention;
Fig. 4 is that the present invention is a kind of based on Linux system bluetooth equipment connection processing method another kind flow chart;
Fig. 5 is that the present invention is a kind of processes system one structural representation based on Linux system bluetooth equipment connection.
Detailed description of the invention
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below comparison accompanying drawing is illustrated the specific embodiment of the present invention.It should be evident that the accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings, and obtain other embodiment.
For making simplified form, only schematically show part related to the present invention in each figure, they do not represent its practical structures as product.It addition, so that simplified form readily appreciates, some figure has the parts of identical structure or function, only symbolically depict one of them, or only mark one of them.In this article, " one " not only represents " only this ", it is also possible to represent the situation of " more than one ".
In a kind of bluetooth equipment connection processing method based on Linux system of the present invention, shown in reference Fig. 1, including:
Step S10 obtains the attribute information of current Bluetooth communication equipment to be connected;
Step S20 resolves the attribute information of the Bluetooth communication equipment current to be connected obtained;
Step S30 compares according to the attribute information of Bluetooth communication equipment current to be connected resolved and the bluetooth equipment attribute information of pre-stored;
Step S40, when Bluetooth communication equipment attribute information to be connected is consistent with the bluetooth equipment attribute information comparison of described pre-stored, sets up communication connection with described current bluetooth equipment to be connected.
nullConcrete,In the present embodiment,The attribute information of current Bluetooth communication equipment to be connected includes: new field device_type (device type) in device file,Connect_state (connection status),Bd_addr (device address),Whether is_first_connect (has retained key information),Is_first_discover (whether equipment is opened),When the bluetooth module in router gets bluetooth equipment to be connected,First its device attribute information obtained,Attribute information is further resolved,Carry out taxonomic revision according to attribute information and form the form of list,Contrast with the list information formerly stored,Judge whether this bluetooth equipment carried out communication connection with this router,If had, information contrast is consistent,Now bluetooth equipment carries out being connected alternately of data with router.
It is further preferred that described step S40 also includes:
When step S41 sets up communication connection with described current Bluetooth communication equipment to be connected, including the device type extracted in described current Bluetooth communication equipment attribute information to be connected;
Step S42 judges that described current Bluetooth communication equipment to be connected is the Second Type of the first kind of pre-stored or pre-stored, sets up communication connection according to the device type of described pre-stored with described current bluetooth equipment to be connected.
Concrete, the basis of the above embodiments adds step S41 and step S42, is specifically described the method setting up communication connection;The first kind refers to classical bluetooth-type in the present embodiment, and Second Type refers to low-power consumption bluetooth-type;According to the device attribute information obtained, what obtain bluetooth equipment to be connected is type, and different according to type set up corresponding communication connection.
Preferably, with reference to shown in Fig. 2;
Step S421, when judging that described current Bluetooth communication equipment to be connected is the first kind, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4211 is when the key agreement of key and the pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select first to preset communication port, preset communication port by described first and set up communication connection with described current bluetooth equipment to be connected.
Concrete, the basis of above-described embodiment is continued increase step S421 and step S4211;The key connected is verified by the type according to bluetooth equipment to be connected;If this equipment is classical bluetooth-type, this equipment being carried out key authentication process, if certification success, interface channel is set up in the address obtaining this bluetooth equipment;Certainly this to be professional designed carrying out bottom software, realized by calling between function module.Classifying type obtains and sets up professional easy to connect when data analysis, or accident analysis clearing more.
Preferably, with reference to shown in Fig. 3;
Step S422, when judging that described current Bluetooth communication equipment to be connected is Second Type, further determines whether as ciphering type;
Step S4221, when being judged as ciphering type, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4222 is when verifying the key agreement of key and pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select second to preset communication port, preset communication port by described second and set up communication connection with described current bluetooth equipment to be connected.
Concrete, it is judged as classic in the above-described embodiments, the present embodiment is judged as low-power consumption bluetooth, low-power consumption is further divided into ciphering type and non-encrypted type, if this equipment is low-power consumption Bluetooth encryption type, this equipment is carried out key authentication process, if certification success, interface channel is set up in the address obtaining this bluetooth equipment.
Preferably, with reference to shown in Fig. 3;
Step S4223, when for non-encrypted type, obtains the address of described current Bluetooth communication equipment to be connected, selects the 3rd to preset communication port, presets communication port by the described 3rd and sets up communication connection with described current bluetooth equipment to be connected.
Concrete, if this equipment is low-power consumption bluetooth not encryption type, obtains Bluetooth address and directly set up interface channel.Interface channel is that professional and technical personnel realizes when the bottom software of construction system, and different functions set up by different interface channels, facilitates calling between program and the parsing of data interaction.
Preferably, with reference to shown in Fig. 4;
Step 50 when the bluetooth equipment attribute information comparison of described step S40 Bluetooth communication equipment to be connected attribute information Yu described pre-stored is inconsistent, extraction equipment type from the attribute information of described current Bluetooth communication equipment to be connected;
Step S60 is extraction equipment address information from the attribute information of described current Bluetooth communication equipment to be connected.
Concrete, when after the to be connected blue equipment found resolves with in the facility information table of storage, information is inconsistent is, then judge that this blue equipment to be connected belongs to new equipment, do not set up with router or server and be connected, do not carry out the mutual of data, so needing to re-start binding, record etc., information table after analytically extracts the address of newfound bluetooth equipment, sets up new annexation according to address information.
Preferably, with reference to shown in Fig. 4;Also include:
Step S70 obtains the key of described current Bluetooth communication equipment to be connected, and preserves to the bluetooth equipment attribute information of described pre-stored;
Step S80 obtains and presets communication port and described current Bluetooth communication equipment to be connected and set up communication connection, and described communication port includes first presetting communication port, second presets communication port, the 3rd presets one of them of communication port three.
Concrete, on the basis of a upper embodiment, according to the address information extracting new bluetooth equipment, communicate the setting of key, and be saved in data message table, further communication port is set for it according to the attribute information of new bluetooth equipment.
The present invention also provides for a kind of based on Linux system bluetooth equipment connection processing method, with reference to shown in Fig. 3 and Fig. 4;Including:
Step S10 obtains the attribute information of current Bluetooth communication equipment to be connected;
Step S20 resolves the attribute information of the Bluetooth communication equipment current to be connected obtained;
Step S30 compares according to the attribute information of Bluetooth communication equipment current to be connected resolved and the bluetooth equipment attribute information of pre-stored;
Step S40, when Bluetooth communication equipment attribute information to be connected is consistent with the bluetooth equipment attribute information comparison of described pre-stored, sets up communication connection with described current bluetooth equipment to be connected;
When step S41 sets up communication connection with described current Bluetooth communication equipment to be connected, including the device type extracted in described current Bluetooth communication equipment attribute information to be connected;
Step S42 judges that described current Bluetooth communication equipment to be connected is the Second Type of the first kind of pre-stored or pre-stored, sets up communication connection according to the device type of described pre-stored with described current bluetooth equipment to be connected;
Step S421, when judging that described current Bluetooth communication equipment to be connected is the first kind, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4211 is when the key agreement of key and the pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select first to preset communication port, preset communication port by described first and set up communication connection with described current bluetooth equipment to be connected;
Step S422, when judging that described current Bluetooth communication equipment to be connected is Second Type, further determines whether as ciphering type;
Step S4221, when being judged as ciphering type, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4222 is when verifying the key agreement of key and pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select second to preset communication port, preset communication port by described second and set up communication connection with described current bluetooth equipment to be connected;
Step S4223, when for non-encrypted type, obtains the address of described current Bluetooth communication equipment to be connected, selects the 3rd to preset communication port, presets communication port by the described 3rd and sets up communication connection with described current bluetooth equipment to be connected;
Step 50 when the bluetooth equipment attribute information comparison of described step S40 Bluetooth communication equipment to be connected attribute information Yu described pre-stored is inconsistent, extraction equipment type from the attribute information of described current Bluetooth communication equipment to be connected;
Step S60 is extraction equipment address information from the attribute information of described current Bluetooth communication equipment to be connected;
Step S70 obtains the key of described current Bluetooth communication equipment to be connected, and preserves to the bluetooth equipment attribute information of described pre-stored;
Step S80 obtains and presets communication port and described current Bluetooth communication equipment to be connected and set up communication connection, and described communication port includes first presetting communication port, second presets communication port, the 3rd presets one of them of communication port three.
Concrete, the present embodiment is the complete embodiment of the present invention;Obtain facility information, bluetooth connection process reads device file table information, obtains the types value of this equipment, be low-power consumption bluetooth-type or classical bluetooth-type for differentiation.Obtain field is_first_discover value and differentiate whether bluetooth equipment is in opening, obtain whether field is_first_connect value discriminating device has retained key information;Whether judgment device can be dynamically connected certainly.Device attribute according to obtaining judges, if equipment is not-connected status, has connected and retained key information and this equipment is in opening before, then carries out the automatic connection procedure of follow-up bluetooth.Judge bluetooth equipment type, select from the mode being dynamically connected according to the device type value preserved;1 represents classical bluetooth-type, and 2 represent low-power consumption bluetooth-type equipment;If this equipment is classical bluetooth-type, this equipment being carried out key authentication process, if certification success, interface channel is set up in the address obtaining this bluetooth equipment.If this equipment is low-power consumption Bluetooth encryption type, this equipment being carried out key authentication process, if certification success, interface channel is set up in the address obtaining this bluetooth equipment.If this equipment is low-power consumption bluetooth not encryption type, obtains Bluetooth address and directly set up interface channel.Obtain device attribute: new field device_type (device type) in a. device file, connect_state (connection status), bd_addr (device address), whether is_first_connect (has retained key information), is_first_discover (whether equipment is opened), is used for preserving scanning new equipment information.B. find new equipment, preserve facility information.Scan procedure receives bottom event message, resolves message event, in file table, inquire about the equipment of correspondence according to the device address resolved, and device attribute value is saved in file table corresponding field.C. obtain facility information, bluetooth connection process reads device file table information, obtains the types value of this equipment, be low-power consumption bluetooth-type or classical bluetooth-type for differentiation.Obtain field is_first_discover value and differentiate whether bluetooth equipment is in opening, obtain whether field is_first_connect value discriminating device has retained key information.
A kind of based on Linux system bluetooth equipment connection process system, with reference to shown in Fig. 5;Including:
Data obtaining module 1, for obtaining the attribute information of current Bluetooth communication equipment to be connected;
Information analysis module 2, for resolving the attribute information of the described current Bluetooth communication equipment to be connected of acquisition;
Information preserves module 3, for preserving the bluetooth equipment attribute information of pre-stored;
Control module 4, preserve module 3 electrically connect with described data obtaining module 1, described information analysis module 2, described information respectively, the facility information that described control module prestores with described memory module 3 after resolving for the attribute information of Bluetooth communication equipment current to be connected obtained by described data obtaining module is compared, when described facility information comparison is consistent, and control to set up communication connection.
Concrete, specifically including that data obtaining module 1, information analysis module 2 in the present embodiment, information preserves module 3, controls module 44 modules such as grade;The present invention is the demand in order to meet market, and intelligent router needs to realize the function of conveniently accessible various bluetooth equipment, occurs in that many encryptions in the market, does not encrypt low-power consumption, classical blue tooth medical health equipment.Bluetooth low energy consumption (BLE) technology is the robustness wireless technology of low cost, short distance, interoperable, is operated in the 2.4GHzISM radio frequency band exempting from license.It is characterized in: the transmission/reception power consumption of maximized stand-by time, quickly connection and low peak.Bluetooth low energy consumption type includes Intelligent bracelet, Intelligent worn device etc.;Classic bluetooth equipment includes all kinds of bluetooth health medical treatment equipment.In a large-scale network-type is same, for convenience of management, it is necessary to set up the automatic connection scheme of a kind of general optimum, bluetooth module is placed in the router.
Preferably,
When described facility information comparison is consistent, when setting up communication connection with current Bluetooth communication equipment to be connected, described control module 4 is further used for judging the device type of described current Bluetooth communication equipment to be connected, and control to preserve, from described information, the address extracting described current Bluetooth communication equipment to be connected module 3, verify that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of described information preservation module 3 storage, when the result is consistent, control further to preserve from described information module obtains preset communication port and set up communication connection with described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
As long as no matter be classic in the present embodiment or the bluetooth equipment ciphering type of low-power consumption type, the setting of password includes: arrange one section of password interval, bluetooth equipment to be connected simply enters any one value in interval and then can login, also include being solidificated in internal Bluetooth equipment the password of bluetooth equipment to be connected, connect as long as the attribute information such as address getting bluetooth equipment can set up communication.Also including having the webserver that bluetooth connects or when router is connected with bluetooth equipment to be connected, between the webserver, information belongs to opening alternately, it is not necessary to password, as long as according to can Bluetooth communication between type and address.
In above embodiments, set up by bluetooth equipment to be connected carried out based on communication interaction with the webserver or router.
Preferably,
The facility information that the attribute information of Bluetooth communication equipment current to be connected that described control module 4 is additionally operable to be obtained by described data obtaining module 1 prestores with described information storage module 3 after resolving is compared, when described facility information comparison is inconsistent, described control module 4 controls to extract described current Bluetooth communication equipment type to be connected from described information analysis module 2, extract described current Bluetooth communication equipment address information to be connected, the key of acquisition equipment is also saved to described information storage module 3, and control the communication port obtaining the storage of described information storage module 3 and the foundation communication connection of described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
Concrete, the present embodiment is reacquiring the bluetooth equipment to be connected that discovery is new, first time sets up communication, and all properties information carries out mutual setting, including password, address etc..
One provided by the invention, based on Linux system bluetooth equipment connection processing method and system, is based on Linux system and realizes, it is possible to automatically set up corresponding interface channel for all kinds equipment.
It should be noted that, above-described embodiment all can independent assortment as required.The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (10)
1. the bluetooth equipment connection processing method based on Linux system, it is characterised in that including:
Step S10 obtains the attribute information of current Bluetooth communication equipment to be connected;
Step S20 resolves the attribute information of the Bluetooth communication equipment current to be connected obtained;
Step S30 compares according to the attribute information of Bluetooth communication equipment current to be connected resolved and the bluetooth equipment attribute information of pre-stored;
Step S40, when Bluetooth communication equipment attribute information to be connected is consistent with the bluetooth equipment attribute information comparison of described pre-stored, sets up communication connection with described current bluetooth equipment to be connected.
2. the bluetooth equipment connection processing method based on Linux system according to claim 1, it is characterised in that described step S40 also includes:
When step S41 sets up communication connection with described current Bluetooth communication equipment to be connected, including the device type extracted in described current Bluetooth communication equipment attribute information to be connected;
Step S42 judges that described current Bluetooth communication equipment to be connected is the Second Type of the first kind of pre-stored or pre-stored, sets up communication connection according to the device type of described pre-stored with described current bluetooth equipment to be connected.
3. the bluetooth equipment connection processing method based on Linux system according to claim 2, it is characterised in that:
Step S421, when judging that described current Bluetooth communication equipment to be connected is the first kind, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4211 is when the key agreement of key and the pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select first to preset communication port, preset communication port by described first and set up communication connection with described current bluetooth equipment to be connected.
4. the bluetooth equipment connection processing method based on Linux system according to claim 3, it is characterised in that:
Step S422, when judging that described current Bluetooth communication equipment to be connected is Second Type, further determines whether as ciphering type;
Step S4221, when being judged as ciphering type, verifies that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key of pre-stored;
Step S4222 is when verifying the key agreement of key and pre-stored of described current Bluetooth communication equipment to be connected, obtain the address of described current Bluetooth communication equipment to be connected, select second to preset communication port, preset communication port by described second and set up communication connection with described current bluetooth equipment to be connected.
5. the bluetooth equipment connection processing method based on Linux system according to claim 4, it is characterised in that:
Step S4223, when for non-encrypted type, obtains the address of described current Bluetooth communication equipment to be connected, selects the 3rd to preset communication port, presets communication port by the described 3rd and sets up communication connection with described current bluetooth equipment to be connected.
6. the bluetooth equipment connection processing method based on Linux system according to claim 1, it is characterised in that also include:
Step 50 when the bluetooth equipment attribute information comparison of described step S40 Bluetooth communication equipment to be connected attribute information Yu described pre-stored is inconsistent, extraction equipment type from the attribute information of described current Bluetooth communication equipment to be connected;
Step S60 is extraction equipment address information from the attribute information of described current Bluetooth communication equipment to be connected.
7. the bluetooth equipment connection processing method based on Linux system according to claim 6, it is characterised in that also include:
Step S70 obtains the key of described current Bluetooth communication equipment to be connected, and preserves to the bluetooth equipment attribute information of described pre-stored;
Step S80 obtains and presets communication port and described current Bluetooth communication equipment to be connected and set up communication connection, and described communication port includes first presetting communication port, second presets communication port, the 3rd presets one of them of communication port three.
8. one kind processes system based on Linux system bluetooth equipment connection, it is characterised in that including:
Data obtaining module, for obtaining the attribute information of current Bluetooth communication equipment to be connected;
Information analysis module, for resolving the attribute information of the described current Bluetooth communication equipment to be connected of acquisition;
Information preserves module, for preserving the bluetooth equipment attribute information of pre-stored;
Control module, preserve module electrically connect with described data obtaining module, described information analysis module, described information respectively, described control module is compared for the facility information prestored with described memory module after being resolved by the attribute information of the Bluetooth communication equipment current to be connected of described information scanning module acquisition, when described facility information comparison is consistent, and control to set up communication connection.
9. the bluetooth equipment connection based on Linux system according to claim 8 processes system, it is characterised in that:
When described facility information comparison is consistent, when setting up communication connection with current Bluetooth communication equipment to be connected, described control module is further used for judging the device type of described current Bluetooth communication equipment to be connected, and control to preserve, from described information, the address extracting described current Bluetooth communication equipment to be connected module, verify that whether the key of described current Bluetooth communication equipment to be connected is consistent with the key that described information preserves module stores, when the result is consistent, control further to preserve from described information module obtains preset communication port and set up communication connection with described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
10. the bluetooth equipment connection based on Linux system according to claim 8 processes system, it is characterised in that:
The facility information that the attribute information of Bluetooth communication equipment current to be connected that described control module is additionally operable to be obtained by described data obtaining module prestores with described memory module after resolving is compared, when described facility information comparison is inconsistent, described control module controls to extract described current Bluetooth communication equipment type to be connected from described parsing module, extract described current Bluetooth communication equipment address information to be connected, the key of acquisition equipment is also saved to described information storage module, and control the communication port obtaining the storage of described information storage module and the foundation communication connection of described current Bluetooth communication equipment to be connected, described communication port includes first and presets communication port, second presets communication port, 3rd presets one of them of communication port three.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610178964.4A CN105792109A (en) | 2016-03-26 | 2016-03-26 | Bluetooth equipment connection processing method and system based on Linux system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610178964.4A CN105792109A (en) | 2016-03-26 | 2016-03-26 | Bluetooth equipment connection processing method and system based on Linux system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105792109A true CN105792109A (en) | 2016-07-20 |
Family
ID=56391009
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610178964.4A Pending CN105792109A (en) | 2016-03-26 | 2016-03-26 | Bluetooth equipment connection processing method and system based on Linux system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105792109A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106412814A (en) * | 2016-12-05 | 2017-02-15 | 爱国者电子科技有限公司 | Bluetooth device identifying method and wireless router |
CN108347720A (en) * | 2018-02-08 | 2018-07-31 | 广东欧珀移动通信有限公司 | communication connecting method, device, terminal and storage medium |
CN108684021A (en) * | 2018-03-20 | 2018-10-19 | 青岛海信电器股份有限公司 | A kind of Bluetooth Low Energy communication means and device |
CN108769973A (en) * | 2018-07-19 | 2018-11-06 | 深圳芯之联科技有限公司 | A kind of method for secret protection of bluetooth equipment |
CN110933614A (en) * | 2019-10-12 | 2020-03-27 | 阿里巴巴集团控股有限公司 | Communication processing method and device and electronic equipment |
CN111800772A (en) * | 2020-06-30 | 2020-10-20 | 深圳市中科蓝讯科技股份有限公司 | Bluetooth BLE (Low energy) method and device for reducing ATT (advanced technology attachment) information rediscovery and storage medium |
CN112261638A (en) * | 2020-09-30 | 2021-01-22 | 厦门亿联网络技术股份有限公司 | Method and device for rapidly identifying dual-mode Bluetooth device, IOS device and medium |
CN113573291A (en) * | 2021-08-04 | 2021-10-29 | 杭州涂鸦信息技术有限公司 | Bluetooth connection method, device, computer equipment and computer readable storage medium |
CN113840266A (en) * | 2020-06-24 | 2021-12-24 | 华为技术有限公司 | Bluetooth pairing method, device, system, electronic equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252376A (en) * | 2008-03-27 | 2008-08-27 | 宇龙计算机通信科技(深圳)有限公司 | System and method for connecting blue tooth equipment and mobile communication terminal thereof |
CN104320412A (en) * | 2014-11-11 | 2015-01-28 | 福建联迪商用设备有限公司 | Bluetooth POS and safe Bluetooth POS connecting method and device |
CN105246029A (en) * | 2015-10-23 | 2016-01-13 | 上海斐讯数据通信技术有限公司 | Bluetooth communication method and system and electronic device |
CN105430595A (en) * | 2015-10-26 | 2016-03-23 | 上海斐讯数据通信技术有限公司 | Connection method of bluetooth equipment and bluetooth equipment |
-
2016
- 2016-03-26 CN CN201610178964.4A patent/CN105792109A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252376A (en) * | 2008-03-27 | 2008-08-27 | 宇龙计算机通信科技(深圳)有限公司 | System and method for connecting blue tooth equipment and mobile communication terminal thereof |
CN104320412A (en) * | 2014-11-11 | 2015-01-28 | 福建联迪商用设备有限公司 | Bluetooth POS and safe Bluetooth POS connecting method and device |
CN105246029A (en) * | 2015-10-23 | 2016-01-13 | 上海斐讯数据通信技术有限公司 | Bluetooth communication method and system and electronic device |
CN105430595A (en) * | 2015-10-26 | 2016-03-23 | 上海斐讯数据通信技术有限公司 | Connection method of bluetooth equipment and bluetooth equipment |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106412814A (en) * | 2016-12-05 | 2017-02-15 | 爱国者电子科技有限公司 | Bluetooth device identifying method and wireless router |
CN106412814B (en) * | 2016-12-05 | 2019-11-22 | 爱国者电子科技有限公司 | Identify the method and wireless router of bluetooth equipment |
CN108347720A (en) * | 2018-02-08 | 2018-07-31 | 广东欧珀移动通信有限公司 | communication connecting method, device, terminal and storage medium |
CN108684021B (en) * | 2018-03-20 | 2021-06-04 | 海信视像科技股份有限公司 | Bluetooth low-power-consumption communication method and device |
CN108684021A (en) * | 2018-03-20 | 2018-10-19 | 青岛海信电器股份有限公司 | A kind of Bluetooth Low Energy communication means and device |
CN108769973A (en) * | 2018-07-19 | 2018-11-06 | 深圳芯之联科技有限公司 | A kind of method for secret protection of bluetooth equipment |
CN108769973B (en) * | 2018-07-19 | 2021-04-02 | 深圳全志在线有限公司 | Privacy protection method of Bluetooth equipment |
CN110933614A (en) * | 2019-10-12 | 2020-03-27 | 阿里巴巴集团控股有限公司 | Communication processing method and device and electronic equipment |
CN113840266A (en) * | 2020-06-24 | 2021-12-24 | 华为技术有限公司 | Bluetooth pairing method, device, system, electronic equipment and storage medium |
CN113840266B (en) * | 2020-06-24 | 2024-05-03 | 华为技术有限公司 | Bluetooth pairing method, device, system, electronic equipment and storage medium |
CN111800772A (en) * | 2020-06-30 | 2020-10-20 | 深圳市中科蓝讯科技股份有限公司 | Bluetooth BLE (Low energy) method and device for reducing ATT (advanced technology attachment) information rediscovery and storage medium |
CN112261638A (en) * | 2020-09-30 | 2021-01-22 | 厦门亿联网络技术股份有限公司 | Method and device for rapidly identifying dual-mode Bluetooth device, IOS device and medium |
CN112261638B (en) * | 2020-09-30 | 2022-08-12 | 厦门亿联网络技术股份有限公司 | Method and device for rapidly identifying dual-mode Bluetooth device, IOS device and medium |
CN113573291A (en) * | 2021-08-04 | 2021-10-29 | 杭州涂鸦信息技术有限公司 | Bluetooth connection method, device, computer equipment and computer readable storage medium |
CN113573291B (en) * | 2021-08-04 | 2024-07-30 | 杭州涂鸦信息技术有限公司 | Bluetooth connection method, device, computer equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105792109A (en) | Bluetooth equipment connection processing method and system based on Linux system | |
CN105208583B (en) | Method and device for configuring intelligent household electrical appliance to access network and intelligent equipment | |
CN103929748B (en) | A kind of Internet of Things wireless terminal and its collocation method and wireless network access point | |
US20160261601A1 (en) | Wireless router, fast access control method and authentication connection method of wireless routers | |
CN107094293A (en) | A kind of device and method for obtaining WiFi terminal real MAC address | |
CN109041140B (en) | Method for rapidly switching wireless network, intelligent hardware and terminal equipment | |
CN111615123A (en) | Method, device and storage medium for intelligent device network distribution | |
CN106851632A (en) | A kind of smart machine accesses the method and device of WLAN | |
CN108616882A (en) | Household appliance matches network method, method of network entry, device, storage medium and equipment | |
CN104853448A (en) | Method for automatically establishing wireless connection and device thereof | |
CN105636237A (en) | Network connection method, wireless device and system | |
CN105744642A (en) | Wireless network connection method, mobile terminal and intelligent household devices | |
CN101185308A (en) | Method for controlling connection of a peripheral to an access point, corresponding access point and peripheral | |
CN112689316B (en) | Binding method and device of intelligent equipment, storage medium and electronic device | |
CN103957580A (en) | Rapid WIFI networking matching method and module for smart hardware | |
CN105246029A (en) | Bluetooth communication method and system and electronic device | |
CN105281809A (en) | Auxiliary bluetooth low-power-consumption equipment pairing method and system | |
CN107396283A (en) | A kind of router wireless connection authentication method and system | |
CN104754495A (en) | Smart household device connecting method and smart terminal | |
CN106792802A (en) | Hotspot collocation method and system based on Quick Response Code | |
CN106454903A (en) | Method and device for accessing smart terminal equipment into Internet | |
CN111954039A (en) | Set top box Bluetooth configuration method and device, electronic equipment and storage medium | |
CN105991786A (en) | Wi-Fi access configuration method, Wi-Fi terminal and access equipment | |
CN105916187B (en) | Intelligent appliance equipment, terminal and intelligent appliance equipment distribution network systems | |
CN109841273B (en) | One-stop integration method and device of medical diagnosis software |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160720 |
|
WD01 | Invention patent application deemed withdrawn after publication |