CN111954197A - Classic Bluetooth device detection method, device and readable storage medium - Google Patents

Classic Bluetooth device detection method, device and readable storage medium Download PDF

Info

Publication number
CN111954197A
CN111954197A CN202010850354.0A CN202010850354A CN111954197A CN 111954197 A CN111954197 A CN 111954197A CN 202010850354 A CN202010850354 A CN 202010850354A CN 111954197 A CN111954197 A CN 111954197A
Authority
CN
China
Prior art keywords
bluetooth device
classic bluetooth
public address
connection
classic
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.)
Withdrawn
Application number
CN202010850354.0A
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.)
Hangzhou Dbappsecurity Technology Co Ltd
Original Assignee
Hangzhou Dbappsecurity Technology 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 Hangzhou Dbappsecurity Technology Co Ltd filed Critical Hangzhou Dbappsecurity Technology Co Ltd
Priority to CN202010850354.0A priority Critical patent/CN111954197A/en
Publication of CN111954197A publication Critical patent/CN111954197A/en
Withdrawn 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
    • 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

Abstract

The application discloses a classic bluetooth device detection method, a device and a computer readable storage medium, wherein the method comprises the following steps: acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device; analyzing the data packet to obtain a public address; a connection attempt of classic Bluetooth equipment is carried out by utilizing a public address, and a corresponding connection result is obtained; if the connection result is successful, determining that the classic Bluetooth device is detected; the method comprises the steps that through a data packet of the low-power-consumption Bluetooth device acquired by using a target channel, the device address, namely a public address, of a classic Bluetooth device corresponding to the low-power-consumption Bluetooth device can be acquired; then, connection attempt can be carried out by using the public address, and if connection is successful, the classic Bluetooth device is determined to be detected; the classic Bluetooth device which can be connected can be detected after being hidden, and the classic Bluetooth device can be comprehensively detected.

Description

Classic Bluetooth device detection method, device and readable storage medium
Technical Field
The present invention relates to the field of bluetooth technology, and in particular, to a classic bluetooth device detection method, a classic bluetooth device detection apparatus, and a computer-readable storage medium.
Background
The Classic Bluetooth (Bluetooth class) refers to Bluetooth 3.0 and earlier versions of Bluetooth, an important branch of the Bluetooth family. Bluetooth Low Energy (BLE), another important branch of the Bluetooth family, was originally proposed in Bluetooth 4.0. BLE is more focused on maximizing the standby time and connection response speed of the device than classical bluetooth, so it finds wide application in smart devices that are sensitive to power consumption. In order to be compatible with intelligent devices with different forms, the devices such as personal computers or mobile phones generally support BLE while supporting classic bluetooth.
Taking a smart phone as an example, after a bluetooth switch is turned on, classic bluetooth devices can enter an inquirycan state, and only the classic bluetooth devices in the state can be discovered by other devices. However, the classic bluetooth device will not always be in this state, and after the time of discovery, the classic bluetooth device will exit the acquryscan state and hide itself. Such classic bluetooth devices can still be connected at this time, but cannot be detected. When performing bluetooth penetration tests or other safety tests, it is desirable to detect as many connectable classic bluetooth devices as possible. However, the classic bluetooth device is hidden after exiting the inquirycan state, and the classic bluetooth device cannot be detected, so that the detection is not complete.
Therefore, how to solve the incomplete problem of the detection of the classical bluetooth device is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a classic bluetooth device detection method, a classic bluetooth device detection apparatus, a classic bluetooth device detection device and a computer readable storage medium, which can still detect a connectable classic bluetooth device after being hidden, thereby implementing comprehensive detection of the classic bluetooth device.
In order to solve the above technical problem, the present application provides a classic bluetooth device detection method, including:
acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device;
analyzing the data packet to obtain a public address;
utilizing the public address to perform classic Bluetooth device connection attempt and obtain a corresponding connection result;
and if the connection result is successful, determining that the classic Bluetooth device is detected.
Optionally, the analyzing the data packet to obtain a public address includes:
analyzing the data packet according to a protocol specification corresponding to the low-power-consumption Bluetooth device to obtain an analysis field;
judging whether the public address exists in the analysis field;
and if so, obtaining the public address.
Optionally, the attempting of connecting to the classic bluetooth device by using the public address and obtaining a corresponding connection result includes:
performing page operation by using the public address;
judging whether bottom layer connection is established between the public address and the public address;
if so, the connection result is successful;
if not, the connection result is failure.
Optionally, the determining whether a bottom layer connection is established with the public address includes:
judging whether a link layer connection is established between the public address and the public address;
if the link layer connection is established, determining that the bottom layer connection is established;
and if the link layer connection is not established, determining that the bottom layer connection is not established.
Optionally, the method further comprises:
scanning classic Bluetooth equipment, and judging whether the classic Bluetooth equipment in a discoverable state exists or not;
if so, determining that the classic Bluetooth device is detected.
Optionally, after the determining detects the classic bluetooth device, further comprising:
and determining the public address as the device address of the classic Bluetooth device, and recording the device address.
Optionally, the method further comprises:
and carrying out Bluetooth penetration test on the detected classic Bluetooth equipment.
The application also provides a classic bluetooth equipment detection device, include:
an acquisition module for acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device;
the analysis module is used for analyzing the data packet to obtain a public address;
the connection attempt module is used for performing connection attempt of the classic Bluetooth equipment by using the public address and obtaining a corresponding connection result;
and the determining module is used for determining that the classic Bluetooth equipment is detected if the connection result is successful.
The application also provides a classic bluetooth device detection device, including memory and processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the classic bluetooth device detection method.
The present application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the classic bluetooth device detection method described above.
The classic Bluetooth device detection method provided by the application acquires a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device; analyzing the data packet to obtain a public address; a connection attempt of classic Bluetooth equipment is carried out by utilizing a public address, and a corresponding connection result is obtained; and if the connection result is successful, determining that the classic Bluetooth device is detected.
Therefore, the method obtains the data packet through the target channel, and the target channel is a data transmission channel of the low-power-consumption Bluetooth device, so that the obtained data packet is the data packet sent by the low-power-consumption Bluetooth device. Bluetooth low energy and classic bluetooth are usually integrated in one chip, so they may use the same device address, i.e. bluetooth low energy may use the device address of the classic bluetooth device as their own public address. After the data packet is analyzed to obtain a public address, classic Bluetooth equipment connection attempt is carried out by using the public address, and connection to a certain classic Bluetooth address by using the public address is attempted to obtain a corresponding connection result. If the connection is successful, the device address indicating that the public address is indeed a classic bluetooth address can be determined to detect classic bluetooth devices. It is possible to acquire a device address, i.e., a common address, of a classic bluetooth device corresponding to a bluetooth low energy device through a packet of the bluetooth low energy device acquired using a side channel, i.e., a target channel. A connection attempt may then be made using the public address and if successful, a classic bluetooth device is determined to have been detected. Still can detect the classic bluetooth equipment that can connect after being hidden, can carry out comprehensive detection to classic bluetooth equipment, solved the incomprehensive problem of classic bluetooth equipment detection.
In addition, the application also provides a classic bluetooth device detection device, a classic bluetooth device detection device and a computer readable storage medium, and the classic bluetooth device detection device and the computer readable storage medium also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a classic bluetooth device detection method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a workflow of a classic bluetooth device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a classical bluetooth device detection apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a classical bluetooth device detection device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Before describing the classic bluetooth device detection method proposed in the present application, technical terms in the present application are explained:
the term 1: a classic bluetooth device;
the classic bluetooth device, bluetooth class, is an important branch of the bluetooth family (the other branch is BLE). This technology is extremely common in today's smart phones and computers.
The term 2: BLE;
BLE, Bluetooth Low Energy, is an important branch of the Bluetooth family, and was originally proposed in Bluetooth 4.0. BLE is more focused on maximizing the standby time and connection response speed of the device than classical bluetooth (bluetooth 3.0 and before), so it finds wide application in smart devices that are sensitive to power consumption. In order to be compatible with intelligent devices with different forms, nowadays, a personal computer or a mobile phone commonly supports BLE while supporting classic bluetooth.
The term 3: SoC;
SoC, SystemonChip (system on chip), a programmable chip.
The term 4: nRF 51822;
the nRF51822 is a SoC product of Nordic corporation, integrates a communication module supporting BLE, and can realize sniffing of BLE communication data.
The term 5: public Address and Random Address;
public address and random address are two large device addresses for BLE. Among the other things, useful for the present invention is public address, since on the same device this address may be the same as the device address of classic bluetooth.
The term 6: inquiry;
a classic bluetooth device will be in the inquirycan state when it wants to be discovered by other devices. Inquiry is sent when other devices want to discover a classic bluetooth device. When the classic bluetooth device in the inquiry state receives inquiry, it replies to the corresponding packet indicating its presence. The other device then discovers itself. Generally, the device is in the acquryscan state for a period of time after the bluetooth switch is turned on, but once the discoverable time elapses, the device automatically exits the acquryscan state, so that other devices cannot discover themselves through normal means.
The term 7: page;
a classic bluetooth device will be in pagescan state when it is allowed to be connected by other devices. When other devices want to connect to a classic bluetooth device, a page is sent. When the classic bluetooth device in the pagescan state receives the page, the classic bluetooth device replies a corresponding data packet to indicate whether the classic bluetooth device accepts the connection. The device will normally be in pagescan state as long as it turns on the bluetooth switch.
The term 8: 2.4GHz wireless frequency band;
a large number of open source short-distance wireless transmission technologies exist in a 2.4GHz wireless frequency band, and the wireless frequency band is widely and universally used all over the world. Common wireless communication protocols such as Bluetooth, Wi-Fi and ZigBee work in the frequency band. The high-frequency-band-pass filter can obtain larger application range and stronger anti-interference capability when working under the frequency band of 2.4GHz, and is widely applied to the fields of household and business.
The term 9: adapting a physical channel PDU;
the inverting physical channel refers primarily to the three channels numbered 37, 38 and 39 in BLE. The adaptive physical channel PDU is the data packet transmitted on these three channels.
The term 10: bit is micro;
bit is a development board using nRF51822SoC, and can realize specific functions through programming.
The term 11: BD _ ADDR;
i.e. Bluetooth device address
Referring to fig. 1, fig. 1 is a flowchart of a typical bluetooth device detection method according to an embodiment of the present disclosure. The method comprises the following steps:
s101: acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power Bluetooth device.
The target channel is a data transmission channel of the low power consumption bluetooth device, namely an inverting physical channel, specifically, part or all of three signals numbered 37, 38, and 39. Because the target channel is a data transmission channel of the low-power-consumption Bluetooth device, the data packet acquired through the target channel is the data packet sent by the low-power-consumption Bluetooth device. Since bluetooth low energy and classic bluetooth are usually integrated on one chip, in some cases, the bluetooth low energy device will use the same device address as the classic bluetooth device, i.e. the device address of the classic bluetooth device is used as the public address of the bluetooth low energy device. The data packet can be retrieved from the target channel for performing the subsequent steps. The embodiment does not limit the specific obtaining manner of obtaining the data packet, and reference may be made to the related art. The data packet can be any form of data packet with any content sent by any bluetooth low energy device as long as the data packet conforms to the protocol specification of the bluetooth low energy device.
S102: and analyzing the data packet to obtain a public address.
After the data packet is obtained, the data packet is analyzed so as to obtain a public address. It should be noted that the specific parsing method corresponds to the data packet, and the parsing method for the data packet is different according to the protocol specification of the data packet. The public address is a field in the data packet, and the specific form thereof is not limited.
Further, in a possible implementation manner, in order to accurately acquire the public address, it is avoided that the classic bluetooth device cannot be detected due to the acquisition of the wrong public address; or when the public address does not exist in the data packet, the subsequent operation is executed, which causes the waste of computing resources. The S102 step may include:
step 11: and analyzing the data packet according to the protocol specification corresponding to the low-power-consumption Bluetooth equipment to obtain an analysis field.
Step 12: it is determined whether a public address is present in the resolution field,
step 13: if so, the public address is obtained.
After the data packet is obtained, the data packet is analyzed according to the protocol specification corresponding to the low-power-consumption Bluetooth device, so that an analyzed field which is analyzed correctly is obtained, and the situation that an incorrect public address is obtained due to the fact that the data packet is analyzed incorrectly is avoided, and further the classic Bluetooth device cannot be detected. After the analysis field is obtained, whether a public address exists is judged. It should be noted that, in some cases, a public address does not exist in all data packets, and therefore, before obtaining the public address, it is necessary to determine whether the public address exists first, so as to prevent other information (for example, a random address) from being mistaken as the public address, and further perform a subsequent operation using the wrong public address. Due to the error of the public address, the corresponding classic bluetooth device cannot be detected necessarily, and the waste of computing resources is caused. The present embodiment does not limit the operation performed when the public address does not exist, and for example, the operation may be a no operation, that is, no operation is performed; or may continue to acquire data packets from the target channel.
S103: and (4) performing a classic Bluetooth device connection attempt by using the public address, and obtaining a corresponding connection result.
After the public address is obtained, a classic bluetooth device connection attempt is made using the public address, i.e. the public address is used as the device address of the hypothetical classic bluetooth device, with which the connection is made with the hypothetical classic bluetooth device. It should be noted that, since it is not determined whether the public address is actually the device address of a certain classic bluetooth device, it is determined as the device address of the "hypothetical classic bluetooth device". The "imaginary classic bluetooth device" may or may not exist, i.e. the classic bluetooth device having the public address as the device address may or may not exist. After the classic bluetooth device connection attempt is performed by using the public address, a connection result can be obtained according to the actual connection condition, and the connection result indicates whether the connection is successfully established with the classic bluetooth device corresponding to the public address.
Further, in one possible implementation, since a classic bluetooth device is always in a pagescan state after being turned on, a connection attempt can be made using a page operation. The S103 step may include:
step 21: and performing page operation by using the public address.
Step 22: and judging whether a bottom layer connection is established between the public address and the public address.
Step 23: if so, the connection result is successful.
Step 24: if not, the connection result is failure.
The specific process and manner of page operation are not limited, and reference may be made to related technologies, which are not described herein in detail in this embodiment. After the page operation is performed, if the public address is determined to be the device address of a certain classic bluetooth device, the underlying connection can be established with the classic bluetooth device. If the public address is not the device address of any classic bluetooth device, or the corresponding classic bluetooth device is not connectable, the corresponding underlying connection cannot be established. And judging whether bottom layer connection is established between the Bluetooth device and the public address, if so, determining that the connection result is successful, namely determining that connection is established with one connectable classical Bluetooth device, and the connection attempt is successful, so that the corresponding connection result is successful. And if the bottom layer connection is not established, determining that the connection result is failure.
Further, the connection embodiment of which layer the bottom layer connection is specifically is not limited, and may be set according to actual conditions. For example, in one possible embodiment, the underlying connection is a link layer connection, and thus step 22 may include:
step 31: it is determined whether a link layer connection is established with the public address.
Step 32: and if the link layer connection is established, determining that the bottom layer connection is established.
Step 33: and if the link layer connection is not established, determining that the bottom layer connection is not established.
The present embodiment does not limit the specific determination manner of whether the link layer connection is established, and reference may be made to related technologies, which is not described herein again.
S104: and if the connection result is successful, determining that the classic Bluetooth device is detected.
If the connection result is successful, the classic Bluetooth device is determined to be detected. The public address obtained from the data packet does correspond to a classic bluetooth device integrated on the same chip as the sender of the data packet, i.e. the bluetooth low energy device sending the data packet. After determining that a classic bluetooth device is detected, may further include:
the public address is determined to be the device address of the classic bluetooth device and the device address is recorded.
The device address of the classic bluetooth device is recorded, and the detected classic bluetooth device can be tested subsequently by using the device address.
Further, in a possible implementation manner, when the classic bluetooth device is detected by using the public address, the classic bluetooth device may be scanned to determine whether the classic bluetooth device in the discoverable state exists, and the classic bluetooth device in the discoverable state is necessarily connectable. The method can also comprise the following steps:
step 41: and scanning the classic Bluetooth device to judge whether the classic Bluetooth device in the discoverable state exists.
Step 42: if so, it is determined that a classic Bluetooth device is detected.
The discoverable state is the inquirycan state. The execution timing of step 41 and step 42 is not limited. For example, the steps may be executed in parallel as in steps S101 to S104, or may be executed after the step S104 is executed or when the connection result is not successful.
After finishing detecting classic bluetooth equipment, can also carry out bluetooth penetration test to the classic bluetooth equipment that detects. The specific test procedure and mode of the bluetooth penetration test are not limited in this embodiment.
By applying the classic bluetooth device detection method provided by the embodiment of the application, the data packet is obtained through the target channel, and the target channel is the data transmission channel of the low-power-consumption bluetooth device, so that the obtained data packet is the data packet sent by the low-power-consumption bluetooth device. Bluetooth low energy and classic bluetooth are usually integrated in one chip, so they may use the same device address, i.e. bluetooth low energy may use the device address of the classic bluetooth device as their own public address. After the data packet is analyzed to obtain a public address, classic Bluetooth equipment connection attempt is carried out by using the public address, and connection to a certain classic Bluetooth address by using the public address is attempted to obtain a corresponding connection result. If the connection is successful, the device address indicating that the public address is indeed a classic bluetooth address can be determined to detect classic bluetooth devices. It is possible to acquire a device address, i.e., a common address, of a classic bluetooth device corresponding to a bluetooth low energy device through a packet of the bluetooth low energy device acquired using a side channel, i.e., a target channel. A connection attempt may then be made using the public address and if successful, a classic bluetooth device is determined to have been detected. Still can detect the classic bluetooth equipment that can connect after being hidden, can carry out comprehensive detection to classic bluetooth equipment, solved the incomprehensive problem of classic bluetooth equipment detection.
In the following, the classic bluetooth device detection device provided in the embodiment of the present application is introduced, and the classic bluetooth device detection device described below and the classic bluetooth device detection method described above may be referred to correspondingly.
In one embodiment, a classic bluetooth device detection device includes a memory and a processor, the memory for storing a computer program; a processor for executing a computer program to implement the classic bluetooth device detection method described above.
Optionally, the classic bluetooth device detection device may further include 3 micro bit development boards, and each micro bit development board corresponds to a target channel with a different serial number. Referring to fig. 2, fig. 2 is a schematic diagram of a working flow of a classic bluetooth device according to an embodiment of the present application. The bit development board sniffs signals 37, 38 and 39 respectively, and receives a data packet sent by the low-power Bluetooth device, namely a BLU Adv PDU (BLU advertising physical channel PDU). After receiving the data packet, the data packet is sent to the Host through the port, and the Host may be the processor. The processor analyzes the PDU and judges whether a public address exists or not, if not, the PDU is received again, if so, the public address is sent to a BR/EDR controller (namely a classic Bluetooth controller) through a port so as to carry out page operation, detect possible classic Bluetooth equipment and obtain a page result, namely a connection result. And the Host acquires the page result through the port and judges whether the page operation on the public address is successful or not. If the PDU is successfully acquired, the classic Bluetooth device is determined to be found, the PDU is continuously acquired, and if the PDU is not successfully acquired again.
The specific implementation steps are as follows:
1. first, 3 micro bits are configured, and the working channels are set to 37, 38 and 39 respectively. The three channels cover all channels on which BLE transmits the advertising physical channel PDU. The micro bit development board is then set to the acquisition only mode.
And 2.3 micro blocks, bit, are used for asynchronously transmitting the received data packet to the Host.
And 3, after receiving the data packet transmitted by the micro, analyzing each field of the data packet according to the BLE protocol specification by the Host, and judging whether the current data packet contains a public address (public address) of the BLE equipment. If a public address is found, it is transmitted to the BR/EDR controller, i.e. the classic Bluetooth controller. And if the public address is not found, the data packet transmitted by the micro bit development board is continuously received.
And 4, after receiving the public address, the BR/EDR controller directly takes the public address as the address of the classic Bluetooth device, tries to establish connection with the address through page, and returns the connection result to Host.
And 5, after receiving the connection result returned by the BR/EDR controller, judging whether the connection is successful or not by the Host. If the connection is successful, the public address is the address of the classic Bluetooth device, and the classic Bluetooth device is detected. If the connection fails, it is indicated that the current tested public address is not the classic bluetooth device address.
6. After the verification of one public address is finished, the host continues to process data packets returned by other micro bits. And the above process is repeated.
In the following, the classic bluetooth device detection apparatus provided in the embodiment of the present application is introduced, and the classic bluetooth device detection apparatus described below and the classic bluetooth device detection method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a classical bluetooth device detection apparatus according to an embodiment of the present application, including:
an obtaining module 110, configured to obtain a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device;
the analyzing module 120 is configured to analyze the data packet to obtain a public address;
a connection attempt module 130, configured to perform a connection attempt of a classic bluetooth device by using the public address, and obtain a corresponding connection result;
a determining module 140, configured to determine that a classic bluetooth device is detected if the connection result is successful.
Optionally, the parsing module 120 includes:
the analysis unit is used for analyzing the data packet according to the protocol specification corresponding to the low-power-consumption Bluetooth device to obtain an analysis field;
a presence determination unit configured to determine whether the public address exists in the resolution field;
and the existence determining unit is used for obtaining the public address if the public address exists.
Optionally, the connection attempt module 130 includes:
a page unit, configured to perform a page operation using the public address;
the bottom layer connection judging unit is used for judging whether bottom layer connection is established between the public address and the bottom layer connection judging unit;
a successful establishing unit, configured to establish a successful connection result if the bottom layer connection is established;
and the establishing failure unit is used for determining that the connection result is failure if the bottom layer connection is not established.
Optionally, the bottom layer connection determining unit includes:
a link layer judgment subunit, configured to judge whether a link layer connection is established with the public address;
a first determining subunit, configured to determine that the underlying connection is established if the link layer connection is established;
a second determining subunit, configured to determine that the bottom layer connection is not established if the link layer connection is not established.
Optionally, the method further comprises:
the scanning module is used for scanning classical Bluetooth equipment and judging whether the classical Bluetooth equipment in a discoverable state exists or not;
a scan determination module to determine that the classic Bluetooth device is detected if present.
Optionally, the method further comprises:
and the address recording module is used for determining the public address as the equipment address of the classic Bluetooth equipment and recording the equipment address.
Optionally, the method further comprises:
and the test module is used for carrying out Bluetooth penetration test on the detected classic Bluetooth equipment.
In the following, the classic bluetooth device detection device provided in the embodiment of the present application is introduced, and the classic bluetooth device detection device described below and the classic bluetooth device detection method described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a classical bluetooth device detection device according to an embodiment of the present application. Wherein the classic bluetooth device probe device 100 may include a processor 101 and a memory 102, and may further include one or more of a multimedia component 103, an information input/information output (I/O) interface 104, and a communication component 105.
The processor 101 is configured to control the overall operation of the classical bluetooth device detection apparatus 100 to complete all or part of the steps in the classical bluetooth device detection method described above; the memory 102 is used to store various types of data to support operation at the classic bluetooth device probe device 100, which may include, for example, instructions for any application or method operating on the classic bluetooth device probe device 100, as well as application-related data. The Memory 102 may be implemented by any type or combination of volatile and non-volatile Memory devices, such as one or more of Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic or optical disk.
The multimedia component 103 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 102 or transmitted through the communication component 105. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 104 provides an interface between the processor 101 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 105 is used for wired or wireless communication between the classical bluetooth device detection device 100 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 105 may include: Wi-Fi part, Bluetooth part, NFC part.
Classic bluetooth Device detection apparatus 100 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the classic bluetooth Device detection methods described in the above embodiments.
The following describes a computer-readable storage medium provided in an embodiment of the present application, and the computer-readable storage medium described below and the classic bluetooth device detection method described above may be referred to in correspondence.
The present application further provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the classic bluetooth device detection method described above.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relationships such as first and second, etc., are intended only to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms include, or any other variation is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A classic bluetooth device detection method, comprising:
acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device;
analyzing the data packet to obtain a public address;
utilizing the public address to perform classic Bluetooth device connection attempt and obtain a corresponding connection result;
and if the connection result is successful, determining that the classic Bluetooth device is detected.
2. The classic bluetooth device detection method of claim 1, wherein said parsing the packet to obtain a public address comprises:
analyzing the data packet according to a protocol specification corresponding to the low-power-consumption Bluetooth device to obtain an analysis field;
judging whether the public address exists in the analysis field;
and if so, obtaining the public address.
3. The classic bluetooth device detection method as claimed in claim 1, wherein the attempting of classic bluetooth device connection using the public address and obtaining a corresponding connection result comprises:
performing page operation by using the public address;
judging whether bottom layer connection is established between the public address and the public address;
if so, the connection result is successful;
if not, the connection result is failure.
4. The classic bluetooth device detection method of claim 3, wherein said determining whether an underlying connection is established with the public address comprises:
judging whether a link layer connection is established between the public address and the public address;
if the link layer connection is established, determining that the bottom layer connection is established;
and if the link layer connection is not established, determining that the bottom layer connection is not established.
5. The classical bluetooth device detection method according to claim 1, further comprising:
scanning classic Bluetooth equipment, and judging whether the classic Bluetooth equipment in a discoverable state exists or not;
if so, determining that the classic Bluetooth device is detected.
6. The classical bluetooth device detection method according to claim 1, further comprising, after said determining that a classical bluetooth device is detected:
and determining the public address as the device address of the classic Bluetooth device, and recording the device address.
7. The classical bluetooth device detection method according to claim 6, further comprising:
and carrying out Bluetooth penetration test on the detected classic Bluetooth equipment.
8. A classic bluetooth device detection apparatus, comprising:
an acquisition module for acquiring a data packet from a target channel; the target channel is a data transmission channel of the low-power-consumption Bluetooth device;
the analysis module is used for analyzing the data packet to obtain a public address;
the connection attempt module is used for performing connection attempt of the classic Bluetooth equipment by using the public address and obtaining a corresponding connection result;
and the determining module is used for determining that the classic Bluetooth equipment is detected if the connection result is successful.
9. A classic bluetooth device detection device, comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor for executing the computer program to implement the classic bluetooth device detection method of any of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the classic bluetooth device detection method of any of claims 1 to 7.
CN202010850354.0A 2020-08-21 2020-08-21 Classic Bluetooth device detection method, device and readable storage medium Withdrawn CN111954197A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010850354.0A CN111954197A (en) 2020-08-21 2020-08-21 Classic Bluetooth device detection method, device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010850354.0A CN111954197A (en) 2020-08-21 2020-08-21 Classic Bluetooth device detection method, device and readable storage medium

Publications (1)

Publication Number Publication Date
CN111954197A true CN111954197A (en) 2020-11-17

Family

ID=73359195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010850354.0A Withdrawn CN111954197A (en) 2020-08-21 2020-08-21 Classic Bluetooth device detection method, device and readable storage medium

Country Status (1)

Country Link
CN (1) CN111954197A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109417758A (en) * 2016-06-27 2019-03-01 华为技术有限公司 A kind of method and terminal of bluetooth connection
CN111246399A (en) * 2020-02-18 2020-06-05 Oppo(重庆)智能科技有限公司 Method for discovering Bluetooth device and related product
CN111436038A (en) * 2019-10-23 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth connection method and system, Bluetooth master and slave device connection method and Bluetooth master and slave device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109417758A (en) * 2016-06-27 2019-03-01 华为技术有限公司 A kind of method and terminal of bluetooth connection
CN111436038A (en) * 2019-10-23 2020-07-21 珠海市杰理科技股份有限公司 Bluetooth connection method and system, Bluetooth master and slave device connection method and Bluetooth master and slave device
CN111246399A (en) * 2020-02-18 2020-06-05 Oppo(重庆)智能科技有限公司 Method for discovering Bluetooth device and related product

Similar Documents

Publication Publication Date Title
KR101453973B1 (en) Method for wifi association and electronic device thereof
CN112261635B (en) Bluetooth testing method and device, electronic equipment and computer readable storage medium
WO2015058616A1 (en) Recognition method and device for malicious website
KR20140013058A (en) Over-the-air device configuration
WO2018103402A1 (en) Wireless fidelity (wifi) scan method and related product
CN104811524B (en) A kind of terminal radio frequency performance test methods and its device
US20140307574A1 (en) Communication connection control method and electronic apparatus supporting the same
CN112114892A (en) Deep learning model obtaining method, loading method and selecting method
KR20210110335A (en) Smart device network configuration method and related devices
CN112996020B (en) Bluetooth-based automatic test method and device and Bluetooth test terminal
CN108924908B (en) WiFi scanning method and device and electronic device
CN111148182B (en) Device control method, device, storage medium and electronic device
KR20130051811A (en) Apparatus and method for selecting access point
CN108696852A (en) Connection method of Bluetooth device, system, readable storage medium storing program for executing and bluetooth equipment
CN112911560A (en) Electronic business card transmission method and device
CN111954197A (en) Classic Bluetooth device detection method, device and readable storage medium
CN111338673B (en) Equipment debugging method and device, electronic equipment and storage medium
CN107153608B (en) Code detection method and code detection device
CN108833033B (en) Method and device for determining radio frequency calibration parameters, storage medium and mobile terminal
CN104954287B (en) A kind of method and mobile terminal for limiting network speed
CN107967363B (en) Data processing method and device and electronic equipment
CN114025014B (en) Asset detection method and device, electronic equipment and storage medium
CN108304369B (en) File type identification method and device
CN113766406A (en) Method, system and device for testing earphone
CN104424096A (en) Automatic testing system and method for Android platform based device

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20201117

WW01 Invention patent application withdrawn after publication