CN112469021A - Method for scanning Bluetooth equipment - Google Patents

Method for scanning Bluetooth equipment Download PDF

Info

Publication number
CN112469021A
CN112469021A CN202011481166.1A CN202011481166A CN112469021A CN 112469021 A CN112469021 A CN 112469021A CN 202011481166 A CN202011481166 A CN 202011481166A CN 112469021 A CN112469021 A CN 112469021A
Authority
CN
China
Prior art keywords
equipment
identification information
unique identification
target peripheral
bluetooth
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
CN202011481166.1A
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202011481166.1A priority Critical patent/CN112469021A/en
Publication of CN112469021A publication Critical patent/CN112469021A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention relates to the technical field of Bluetooth communication, and discloses a method for scanning Bluetooth equipment, which solves the problems that in the process of scanning low-power-consumption Bluetooth equipment in the prior art, central equipment cannot automatically, accurately and uniquely and quickly scan target peripheral equipment, so that resource waste and poor user experience are caused. The method comprises the following steps: the target peripheral equipment uploads the unique equipment identification information to a cloud server for storage; the central equipment acquires and stores the unique identification information of the target peripheral equipment from the cloud server; the central equipment starts scanning, analyzes the searched connectable broadcast packet around and obtains the unique identification information of the corresponding equipment; and the only identification information of the target peripheral equipment which is stored is taken out for comparison, if the unique identification information is consistent with the unique identification information of the target peripheral equipment, the target peripheral equipment is successfully matched, and the scanning is stopped; and then, storing the matched device information of the target peripheral device, and displaying the matched target peripheral device.

Description

Method for scanning Bluetooth equipment
Technical Field
The invention relates to the technical field of Bluetooth communication, in particular to a method for scanning Bluetooth equipment.
Background
In recent years, electronic devices have become more and more sophisticated as well as more and more communication methods. For example, a computer, a mobile phone, a tablet, a wearable device, a vehicle-mounted device and the like which are closely related to the production and life of people can communicate by being provided with a Bluetooth module. Device communication via bluetooth has become a very popular and important way.
The bluetooth protocol has undergone many iterations of upgrading for multiple versions over the years of development. Including single mode bluetooth, dual mode bluetooth, and classic bluetooth versions. Among these, the most advanced is currently single-mode bluetooth, that is, Bluetooth Low Energy (BLE). Compared with the traditional Bluetooth equipment, the Bluetooth low energy has the biggest characteristic of reducing the cost and the power consumption. Currently, the world is entering a brand new internet of things era, various systems need to collect and exchange data, and low-power consumption bluetooth devices (BLE) play a crucial role in the system.
To realize a BLE application, a chip supporting BLE radio frequency and a BLE protocol stack matched with the chip are needed. The BLE protocol stack is the key to implementing the entire function. There are 2 important roles in BLE, central and peripheral. The periphery is a data provider and the center is a data consumer or processor. One center can be connected with a plurality of peripheries at the same time, but one periphery can be connected with only one center at any time.
An unconnected BLE peripheral device may send broadcast data out continuously to let the central device know his presence, such as a bluetooth bracelet, watch, etc. The peripheral device sets a broadcast interval, and each broadcast interval transmits its own broadcast data. The longer the broadcast time interval, the more power is saved. And when the peripheral equipment is connected by the central equipment once, the peripheral equipment can stop sending the broadcast data immediately.
The central device may scan the peripheral device and write data to the peripheral device's characteristic value (characteristic) or read the peripheral device's characteristic value data. The data at this time may be power, temperature, etc. Because of the frequency band of the bluetooth, if the user directly scans without any filtering identification, a useless bank of strange devices will be scanned. The user is not easy to find the needed target equipment, and the operability and the experience of the system are reduced.
The essence of the problem is that the common bluetooth scanning device method is difficult to achieve effective matching of target devices, and the existing bluetooth protocol provides a method for filtering and scanning through condition identifications such as device names, UUIDs, MACs and the like.
Before scanning the equipment, a user can search out equipment meeting the filtering condition by setting the filtering condition, and useless equipment is filtered with a certain probability. But this method still cannot perfectly satisfy the requirement of scanning uniqueness. Since for practical scanning systems a class of devices is typically searched for by UUIDs. Although the MAC address can be ready to scan out a device, it cannot be preset in advance directly in the code because different users want to identify different types of devices when the system is user oriented. In the existing known method, the probability of obtaining effective equipment by a user is improved and the user experience is optimized only by caching equipment connection identifiers or by carrying out distance sequencing on the equipment according to the strength of equipment signals. The problem is not solved at all, and the first use by the user still requires finding a valid device from a stack of devices.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method for scanning the Bluetooth device is provided, and the problems that in the process of scanning the low-power-consumption Bluetooth device in the traditional technology, the central device cannot automatically, accurately and uniquely scan the target peripheral device quickly, so that resource waste is caused, and user experience is poor are solved.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a method for scanning Bluetooth devices, applied to a system comprising a central device, peripheral devices and a cloud server, wherein the peripheral devices include target peripheral devices and non-target peripheral devices, the method comprising the following steps:
A. the target peripheral equipment uploads the unique equipment identification information to a cloud server for storage;
B. the central equipment acquires the unique identification information of the target peripheral equipment from the cloud server and stores the unique identification information in a database;
C. each peripheral device around the central device sends out a connectable broadcast packet, wherein the connectable broadcast packet comprises corresponding device information and a characteristic value, and the characteristic value is written with unique identification information of the corresponding device;
D. the central equipment starts scanning, analyzes characteristic value data in the broadcast packet for the searched connectable broadcast packet, and obtains unique identification information of the corresponding equipment;
E. d, the central equipment takes out the stored unique identification information of the target peripheral equipment from the database of the central equipment, compares the unique identification information with the unique identification information of the corresponding equipment obtained in the step D, and if the unique identification information is consistent with the unique identification information of the corresponding equipment, the target peripheral equipment is successfully matched, and the scanning is stopped;
F. the central device stores the matched device information of the target peripheral device and displays the matched target peripheral device.
As a further optimization, the central device is loaded with a mobile application system, and the central device automatically starts scanning through the mobile application system.
As a further optimization, the device unique identification information includes, but is not limited to, random and unique character strings, numeric symbols, MAC addresses, unique names, and other unique identification information.
As a further optimization, the device information includes, but is not limited to: the name of the device, the MAC address, and the RSSI value.
The invention has the beneficial effects that:
the central device downloads the unique identification information of the target peripheral device from the cloud server in advance for storage, and compares the unique identification information in the broadcast packet of the peripheral device by analyzing during scanning, so that the target peripheral device is accurately searched, the target peripheral device can be quickly positioned, and only the target peripheral device required by a user is displayed. The waste of system resources and time cost in the bluetooth purposeless scanning process is reduced, and the operation experience of a user is improved. When only one target peripheral device exists, even the user does not need to manually select the target peripheral device, the system program can be set to automatically enter the matching connection, and therefore the user experience is greatly optimized.
The traditional Bluetooth connection mode user needs the following operation steps: (1) the user starts a Bluetooth mode; (2) scanning the Bluetooth device; (3) displaying a Bluetooth device list; (4) identifying a target bluetooth device; (5) and clicking the pairing connection to successfully connect. If the target Bluetooth device does not exist, the process of scanning the Bluetooth device is re-entered. Here, the agreement of the target bluetooth device needs to be informed to the user through a specification and the like, and the user can find the agreement. The user operation steps are complicated, and the experience is poor.
By adopting the means, the method comprises the following operation steps that: (1) the user starts a Bluetooth mode; (2) scanning the Bluetooth device; (3) the system automatically searches for the accurate unique target equipment and displays the unique equipment, and the connection is automatically matched and connected successfully. And if the target Bluetooth device is not matched, re-entering the Bluetooth device scanning process. Here, the user does not need to know the information of the target device in advance, and the system automatically recognizes.
As can be seen comparatively, the invention has greatly simplified the operation step of users.
Drawings
FIG. 1 is a schematic diagram of the system relationship of the present invention;
fig. 2 is a flowchart of a method for scanning bluetooth devices in accordance with the present invention.
Detailed Description
The invention aims to provide a method for scanning Bluetooth equipment, which solves the problems that in the process of scanning low-power-consumption Bluetooth equipment in the prior art, central equipment cannot automatically, accurately and uniquely and quickly scan target peripheral equipment, so that resource waste is caused, and user experience is poor. The system applied by the method of the present invention is shown in fig. 1, and comprises a central device, a peripheral device and a cloud server, wherein the peripheral device comprises a target peripheral device and a non-target peripheral device, the target peripheral device refers to a device which is searched by a user through the central device and is to be connected, and the peripheral device at least comprises a low power consumption bluetooth module and a wireless communication module, and the wireless communication module is a wide area network module, including but not limited to a 2G, 3G, 4G, 5G, Wi-Fi, GPRS module and nb-iot module.
The central device is further provided with a set of mobile terminal application systems, wherein the mobile terminal application systems include but are not limited to Android, iOS, windows phone, Symbian, windows mobile and Harmony systems; the cloud server is used for receiving the unique identification information data reported by the target peripheral equipment and providing the central equipment with access to obtain the unique identification information data of the target peripheral equipment.
Based on the above system, the method flow of scanning bluetooth device implemented by the present invention is shown in fig. 2, which includes:
s1, the target peripheral device uploads the unique device identification information to the cloud server and stores the unique device identification information:
the target peripheral equipment uploads the unique identification information of the equipment to a cloud server through a wireless communication module, and the cloud server identifies and preprocesses the acquired data and stores the data in a database of the cloud server;
the "device unique identification information" herein can uniquely represent the target peripheral device, and is in a one-to-one mapping relationship with the target peripheral device, and includes, but is not limited to, random and unique character strings, numeric symbols, MAC addresses of the target peripheral device, unique names, and other unique identification information.
S2, the central device acquires the unique identification information of the target peripheral device from the cloud server and stores the information:
the central device is communicated through a network in advance, unique identification information of one or more target peripheral devices is obtained from a database of the cloud server, and the unique identification information is stored in the database of the central device.
S3, peripheral equipment around the central equipment sends out a connectable broadcast packet:
the peripheral devices around the central device send out connectable broadcast packets including, but not limited to, the name, MAC address, unique identification information, RSSI value, etc. of the bluetooth device, and the target peripheral device stores the device unique identification information in a characteristic value and sends out it by continuous broadcast.
S4, the central device searches for a connectable broadcast packet:
the central device starts a Bluetooth device scanning instruction through a carried mobile terminal application system, enters a scanning mode, searches connectable broadcast packets sent by peripheral devices, and filters non-connectable broadcast packets.
S5, the central device parses the device unique identification information from the connectable broadcast packet:
the central device analyzes the characteristic value data for the searched connectable broadcast packet, and acquires device unique identification information.
S6, the central device matches the acquired device unique identification information with the stored target peripheral device unique identification information:
extracting the unique equipment identification information from the central equipment database, comparing the unique equipment identification information with the unique equipment identification information obtained in the step S5, if the unique equipment identification information is consistent with the unique equipment identification information obtained in the step S5, matching successfully, and stopping scanning;
because the unique identification information is obtained in advance through the cloud service system, the target equipment can be obtained by directly scanning without judging by a user or knowing the unique identification information of the equipment in advance, and the whole operation flow is simplified.
S7, the central device stores the matched target peripheral device information and displays:
and the central equipment stores the information of the matched target peripheral equipment and displays one or more matched target peripheral equipment for subsequent operation of a user or the system.
Example (b):
in this embodiment, for example, the target peripheral device is a bracelet including a bluetooth low energy module and an nb-iot module, and the central device is a mobile phone with an Android system. First, the bracelet needs to transmit a piece of device unique identification information to the cloud server through the nb-iot module, and the device unique identification information in this example adopts the MAC address of the device bluetooth module. The MAC address corresponds to the Bluetooth module, and the Bluetooth module and the target peripheral equipment are in one-to-one mapping relation, so that the condition of being used as unique identification information of one equipment is met.
After the mobile phone is connected with the cloud server, the unique identification information of the equipment of the bracelet, namely the MAC address of the bracelet, is acquired from the cloud server and is stored in a database of the mobile phone.
When Bluetooth pairing with the bracelet is needed, the mobile phone starts a Bluetooth scanning function, and can acquire a connectable broadcast packet sent by surrounding Bluetooth equipment (including target peripheral equipment, namely the bracelet and non-target peripheral equipment, such as a Bluetooth headset and a Bluetooth watch), wherein the broadcast packet contains the MAC address of the equipment. The mobile phone can acquire the MAC addresses of the devices by analyzing the broadcast packet, then the MAC addresses of the bracelet are taken out from the database and are accurately matched with the MAC addresses of the devices, so that the bracelet is quickly and accurately matched, and then the device information (such as the name of the bracelet device, the RSSI value and the like) of the bracelet is displayed.

Claims (4)

1. A method for scanning bluetooth devices in a system comprising a central device, peripheral devices and a cloud server, wherein the peripheral devices include target peripheral devices and non-target peripheral devices, the method comprising the steps of:
A. the target peripheral equipment uploads the unique equipment identification information to a cloud server for storage;
B. the central equipment acquires the unique identification information of the target peripheral equipment from the cloud server and stores the unique identification information in a database;
C. each peripheral device around the central device sends out a connectable broadcast packet, wherein the connectable broadcast packet comprises corresponding device information and a characteristic value, and the characteristic value is written with unique identification information of the corresponding device;
D. the central equipment starts scanning, analyzes characteristic value data in the broadcast packet for the searched connectable broadcast packet, and obtains unique identification information of the corresponding equipment;
E. d, the central equipment takes out the stored unique identification information of the target peripheral equipment from the database of the central equipment, compares the unique identification information with the unique identification information of the corresponding equipment obtained in the step D, and if the unique identification information is consistent with the unique identification information of the corresponding equipment, the target peripheral equipment is successfully matched, and the scanning is stopped;
F. the central device stores the matched device information of the target peripheral device and displays the matched target peripheral device.
2. The method of claim 1, wherein the Bluetooth device is selected from the group consisting of a Bluetooth enabled device,
the central equipment is loaded with a mobile end application system, and the scanning is automatically started through the mobile end application system.
3. The method of claim 1 or 2, wherein the Bluetooth device is selected from the group consisting of Bluetooth (R) enabled devices,
the device unique identification information is any of: a random and unique string, a number symbol, a MAC address, a unique name.
4. The method of claim 1 or 2, wherein the Bluetooth device is selected from the group consisting of Bluetooth (R) enabled devices,
the device information includes: the name of the device, the MAC address, and the RSSI value.
CN202011481166.1A 2020-12-15 2020-12-15 Method for scanning Bluetooth equipment Pending CN112469021A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011481166.1A CN112469021A (en) 2020-12-15 2020-12-15 Method for scanning Bluetooth equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011481166.1A CN112469021A (en) 2020-12-15 2020-12-15 Method for scanning Bluetooth equipment

Publications (1)

Publication Number Publication Date
CN112469021A true CN112469021A (en) 2021-03-09

Family

ID=74802973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011481166.1A Pending CN112469021A (en) 2020-12-15 2020-12-15 Method for scanning Bluetooth equipment

Country Status (1)

Country Link
CN (1) CN112469021A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453383A (en) * 2021-06-28 2021-09-28 惠州经济职业技术学院 Multi-module intelligent terminal control method, device and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488053A (en) * 2014-09-17 2016-04-13 阿里巴巴集团控股有限公司 Method and device for information matching
US20190281547A1 (en) * 2018-03-09 2019-09-12 Samsung Electronics Co., Ltd. Display device and control method thereof
CN111641996A (en) * 2020-06-16 2020-09-08 青岛亿联客信息技术有限公司 Equipment network access method and device based on Bluetooth Mesh network, and storage medium
CN111683359A (en) * 2019-06-28 2020-09-18 阿里巴巴集团控股有限公司 BLE communication method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105488053A (en) * 2014-09-17 2016-04-13 阿里巴巴集团控股有限公司 Method and device for information matching
US20190281547A1 (en) * 2018-03-09 2019-09-12 Samsung Electronics Co., Ltd. Display device and control method thereof
CN111683359A (en) * 2019-06-28 2020-09-18 阿里巴巴集团控股有限公司 BLE communication method, device, equipment and storage medium
CN111641996A (en) * 2020-06-16 2020-09-08 青岛亿联客信息技术有限公司 Equipment network access method and device based on Bluetooth Mesh network, and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113453383A (en) * 2021-06-28 2021-09-28 惠州经济职业技术学院 Multi-module intelligent terminal control method, device and system

Similar Documents

Publication Publication Date Title
TWI717732B (en) Awakening, information pushing method and device, computing equipment and storage medium
US7853939B2 (en) Device-aware content delivery
CN106471468B (en) Wireless device firmware is updated in context
CN100356734C (en) Method and apparatus for automatically configuring wireless network device
CN106879047B (en) Method for near-field information transfer, information transmission and receiving client and information system
CN106793007B (en) Interactive communication method and system of cloud and Bluetooth device and wireless router
US20090080390A1 (en) Method of Discovering Devices Located in Different Wireless Networks
CN108781473B (en) Method and equipment for sharing files among different terminals
CN110278568B (en) Method and network system for constructing networking based on network equipment
KR20100053759A (en) Method for pairing wireless communication devices and apparatus for the same
CN106658756B (en) Method and device for identifying connection between terminal equipment and hotspot
US10104601B2 (en) Identification of mobile nodes in WLAN communications
US20130124630A1 (en) Device and/or user identification
CN105956463B (en) A kind of apparatus control method, device and terminal
CN112637874A (en) BLE Mesh-based intelligent device network distribution method
CN112929224A (en) Network distribution method and device of equipment, server and computer readable storage medium
CN113691609B (en) Data acquisition method and device, electronic equipment and storage medium
CN112469021A (en) Method for scanning Bluetooth equipment
CN113691610B (en) Data acquisition method and device, electronic equipment and storage medium
CN110198533B (en) Method for remotely controlling BLE Bluetooth device and BLE Bluetooth device
CN111314855B (en) Electronic equipment searching method and device
CN102654850A (en) Pairing method for computer and wireless electronic device
CN105340238A (en) System and method of ANQP querying using common ANQP group version
KR100467478B1 (en) Method for establishing a fast connection between two bluetooth devices
CN107222633A (en) A kind of sales statistics method of testing, device, terminal

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: 20210309

RJ01 Rejection of invention patent application after publication