CN109495870B - Bluetooth test method and device - Google Patents

Bluetooth test method and device Download PDF

Info

Publication number
CN109495870B
CN109495870B CN201811460540.2A CN201811460540A CN109495870B CN 109495870 B CN109495870 B CN 109495870B CN 201811460540 A CN201811460540 A CN 201811460540A CN 109495870 B CN109495870 B CN 109495870B
Authority
CN
China
Prior art keywords
protocol
bluetooth
layer
equipment
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811460540.2A
Other languages
Chinese (zh)
Other versions
CN109495870A (en
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.)
Huawei Machine Co Ltd
Original Assignee
Huawei Machine 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 Huawei Machine Co Ltd filed Critical Huawei Machine Co Ltd
Publication of CN109495870A publication Critical patent/CN109495870A/en
Application granted granted Critical
Publication of CN109495870B publication Critical patent/CN109495870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • 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 provides a method and a device for testing Bluetooth. In the embodiment of the application, the main test equipment generates the test case of the data message, and the configuration parameters of each layer in the test case are determined according to the pre-stored configuration parameters of each layer of the Bluetooth protocol. The configuration parameters of each layer of the pre-stored Bluetooth protocol can be flexibly configured, so that the main equipment in the embodiment of the application can simulate various types of data messages to generate different test cases, and the main equipment can replace various Bluetooth entity equipment and tested equipment to perform connection pairing and data interaction based on the main equipment, so that the function, performance and compatibility of the tested equipment can be comprehensively tested. Because master equipment in the embodiment of the application can replace various bluetooth entity equipment, operations such as detaching flying lines between a plurality of bluetooth entity equipment and tested equipment can be avoided, the test preparation time is shortened, the automatic coverage rate is improved, and the bluetooth test efficiency is improved.

Description

Bluetooth test method and device
Technical Field
The present application relates to the field of communications, and more particularly, to a method and apparatus for bluetooth testing in the field of communications.
Background
Bluetooth low energy is receiving more and more attention from the market as a solution for near field communication. The existing intelligent terminal largely uses low-power consumption Bluetooth communication modules, and the performance of the Bluetooth communication modules is an important index of the terminal. In the product development stage, a device prototype is usually required to be subjected to bluetooth testing, for example, various bluetooth entity devices sold in the market are selected, and the device prototype is accessed to the development prototype to test various performance performances of the prototype device.
Currently, invasive tests are used to perform bluetooth tests on device prototypes. When various Bluetooth entity devices are selected for invasive testing, operations such as detaching, flying and the like need to be performed on the Bluetooth entity devices respectively, so that the preparation time is long, the automatic coverage rate is low, and the Bluetooth testing efficiency is very low.
Disclosure of Invention
The application provides a Bluetooth testing method and device, which can improve the automatic coverage rate and improve the Bluetooth testing efficiency.
In a first aspect, a method for bluetooth testing is provided, including:
the main equipment and the Bluetooth module of the equipment to be tested are connected and paired through a Bluetooth protocol;
the main test equipment generates a test case of a data message according to pre-stored configuration parameters of each protocol layer of the Bluetooth protocol;
and the main test device sends the test case to the tested device.
Therefore, in the embodiment of the application, after the master device and the tested device are connected and paired, the master device generates the test case of the data message, and the configuration parameters of each layer in the test case are determined according to the configuration parameters of each layer of the pre-stored bluetooth protocol. The configuration parameters of each layer of the pre-stored Bluetooth protocol can be flexibly configured, so that the main equipment in the embodiment of the application can simulate various types of data messages to generate different test cases, and the main equipment can replace various Bluetooth entity equipment and tested equipment to perform connection pairing and data interaction based on the main equipment, so that the function, performance and compatibility of the tested equipment can be comprehensively tested. Because master equipment in the embodiment of the application can replace various bluetooth entity equipment, operations such as detaching flying lines between a plurality of bluetooth entity equipment and tested equipment can be avoided, the test preparation time is shortened, the automatic coverage rate is improved, and the bluetooth test efficiency is improved.
With reference to the first aspect, in some implementation manners of the first aspect, before the generating, by the master device, a test case of a data packet according to a pre-stored configuration parameter of each protocol layer of the bluetooth protocol, the method further includes:
the master equipment acquires an air interface message, wherein the air interface message is configured based on the Bluetooth protocol;
the main equipment analyzes the configuration parameters of each protocol layer in the air interface message to obtain the configuration parameters of each protocol layer of the Bluetooth protocol;
and the main equipment stores the configuration parameters of each protocol layer of the Bluetooth protocol.
Specifically, the embodiment of the present application may capture an empty message sent when a mobile phone and a bracelet interact with each other in a simulated real environment through the packet capturing module, and the packet capturing module is only used as a listener in a current networking environment and does not affect a device in an original networking environment, so that the embodiment of the present application can ensure that the message captured by the packet capturing module is a message sent in a real testing environment, and further, the embodiment of the present application can test configuration parameters of each protocol layer of a bluetooth protocol in the real environment.
With reference to the first aspect, in certain implementations of the first aspect, the bluetooth protocol is a bluetooth low energy, BLE, protocol.
With reference to the first aspect, in certain implementations of the first aspect, each protocol layer parameter of the BLE protocol includes at least one of a link layer parameter, a logical link control and adaptation protocol, L2CAP, layer parameter, and an attribute protocol, ATT, layer parameter.
And link layer configuration: the data message header contains 4 fields, configurable, the 4 fields being a Logical Link Identifier (LLID), a Next Expected Sequence Number (NESN), a Sequence Number (SN), and More Data (MD), respectively.
L2CAP layer: the method is mainly responsible for segmenting and assembling the data packets, wherein the message length depends on the maximum transmission size of the maximum transmission unit, and the message length is configurable.
ATT layer: the attribute handle, attribute type, and payload value are all configured at this level, defining how a device discovers, reads, and writes the attributes of another device.
In a second aspect, an apparatus for bluetooth testing is provided, the apparatus being configured to perform the method of the first aspect or any possible implementation manner of the first aspect. In particular, the apparatus may comprise means for performing the method of the first aspect or any possible implementation manner of the first aspect.
In a third aspect, an apparatus for bluetooth testing is provided, the apparatus comprising a memory for storing instructions and a processor for executing the instructions stored by the memory, and execution of the instructions stored in the memory causes the processor to perform the first aspect or the method in any possible implementation manner of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, having stored therein instructions that, when executed on a computer, cause the computer to perform the method of the first aspect or any possible implementation manner of the first aspect.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect or any possible implementation manner of the first aspect.
Therefore, in the embodiment of the application, after the master device and the tested device are connected and paired, the master device generates the test case of the data message, and the configuration parameters of each layer in the test case are determined according to the configuration parameters of each layer of the pre-stored bluetooth protocol. The configuration parameters of each layer of the pre-stored Bluetooth protocol can be flexibly configured, so that the main equipment in the embodiment of the application can simulate various types of data messages to generate different test cases, and the main equipment can replace various Bluetooth entity equipment and tested equipment to perform connection pairing and data interaction based on the main equipment, so that the function, performance and compatibility of the tested equipment can be comprehensively tested. Because master equipment in the embodiment of the application can replace various bluetooth entity equipment, operations such as detaching flying lines between a plurality of bluetooth entity equipment and tested equipment can be avoided, the test preparation time is shortened, the automatic coverage rate is improved, and the bluetooth test efficiency is improved.
Drawings
Fig. 1 is a schematic diagram of a bluetooth test system according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a specific bluetooth test system according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a flow of a bluetooth test according to an embodiment of the present application.
Figure 4 is a schematic diagram of a datagram based on BLE protocol.
Fig. 5 is a schematic block diagram of an apparatus for bluetooth test according to an embodiment of the present application.
Fig. 6 is a schematic block diagram of another bluetooth test flow provided by an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings. (Host Control Interface, HCI)
Fig. 1 is a schematic diagram of a bluetooth test system 100 according to an embodiment of the present application. The bluetooth test system 100 includes a device under test 10, a master device 20, and a server 30. The device under test 10 and the server 3 may be connected through a USB interface, and the main device 20 and the server 30 may also be connected through a USB interface. Here, a test board or a test system for bluetooth test may be included in the server 30. Specifically, the server 30 may issue a test instruction and capture a log through the USB interface with the main device and/or the device under test, and analyze and store the log, where the log records the content of interaction between the main device 20 and the device under test 10.
Specifically, the master device 20 and the device under test 10 may perform pairing connection based on the bluetooth protocol. After the pairing connection between the main device 20 and the device under test 10 is successful, the main device 20 may send a test case of a data packet to the device under test 10 according to a test instruction sent by the server 30, after the device under test 10 receives the test case, the main device 20 sends feedback information to the main device 20, and then the main device 20 sends the feedback information to the server 30, and the server 30 determines a test result by analyzing the feedback information, an expected test result and a log.
Here, the Bluetooth protocol may be a Bluetooth Low Energy (BLE) protocol, or another Bluetooth protocol, which is not limited in this embodiment of the application.
In this embodiment of the present application, the device under test 10 may be an electronic device with a bluetooth function, such as a mobile phone, a computer, a tablet computer, or a handheld device, which is not limited in this embodiment of the present application.
In the embodiment of the present application, the main device 20 is a bluetooth analog device with flexibly configurable parameters. Specifically, the main device 20 may flexibly configure a test case of a data packet having different combinations of parameters, where the range of the combination of parameters may exceed the range of the parameters of an actual product, and based on this, the main device 20 may replace various entity devices to perform connection pairing with the device under test 10 and data interaction, thereby implementing a comprehensive test on the function, performance, and compatibility of the device under test 10. Here, the parameter may be a configuration parameter of each protocol layer of the bluetooth protocol, which is not limited in this embodiment of the present application.
Fig. 2 is a schematic diagram illustrating a specific system 100 for bluetooth testing according to an embodiment of the present application. Specifically, the device under test 10 includes a bluetooth module 101, and the main device under test 20 includes a packet capturing module 201, a protocol extracting module 202, a protocol implementing module 203, and a message generating module 204.
It should be understood that fig. 2 shows modules or units of the system for bluetooth testing, but these modules or units are only examples, and the embodiments of the present application may also include other modules, and possibly not all of the modules in fig. 2. The same reference numerals in fig. 2 as in fig. 1 denote the same or similar meanings, and are not described herein again for the sake of brevity. In addition, for convenience, the bluetooth protocol will be described as an example of the BLE protocol, but this does not limit the embodiments of the present application.
The packet capturing module 201 is configured to obtain an air interface message.
Specifically, as shown in fig. 3, a tester may capture an air interface message interacted between a master device (e.g., a bracelet) and a device under test (e.g., a mobile phone) in a real environment through a packet capturing module 201 of the master device 20 based on the current real environment. It should be noted that, here, the real environment itself includes a real main device (such as a bracelet) and a device under test (such as a mobile phone). For example, some errors (bugs) are found when the mobile phone and the bracelet in the real environment are connected by bluetooth, and at this time, a scene in which the mobile phone and the bracelet interact with each other in the real environment may be simulated, and the main device 20 in the embodiment of the present application may simply take an air interface message interacted between the mobile phone and the bracelet as a role of a listener, and does not participate in the interaction between the mobile phone and the bracelet in the real scene.
In this embodiment, the air interface message may be a data message transmitted when the master device and the device to be tested perform data communication. As a specific example, the air interface message includes user information that needs to be transferred by the BLE device simulated by the master device, and the user information includes information that is needed when the BLE device performs data transmission with the device under test, such as data of user movement steps, heartbeat, weight, and the like).
Therefore, in the embodiment of the application, the packet capturing module 201 may capture an air interface packet sent when the mobile phone and the bracelet perform packet interaction in a simulated real environment, and then may test configuration parameters of each protocol layer of the bluetooth protocol in the real environment.
As an optional embodiment, each layer parameter of the BLE protocol includes at least one of a link layer parameter, a logical link control and adaptation protocol L2CAP layer parameter, and an attribute protocol ATT layer parameter.
And link layer configuration: the data message header contains 4 fields, configurable, the 4 fields being a Logical Link Identifier (LLID), a Next Expected Sequence Number (NESN), a Sequence Number (SN), and More Data (MD), respectively.
L2CAP layer: the method is mainly responsible for segmenting and assembling the data packets, wherein the message length depends on the maximum transmission size of the maximum transmission unit, and the message length is configurable.
ATT layer: the attribute handle, attribute type, and payload value are all configured at this level, defining how a device discovers, reads, and writes the attributes of another device.
Fig. 4 shows a schematic diagram of a data packet based on a BLE protocol, where the data packet includes a preamble (preamble), an access address (access address), a header, a packet length (PDU length), data, and a Cyclic Redundancy Check (CRC). Further, a Logical Link Identifier (LLID), a Next Expected Sequence Number (NESN), a Sequence Number (SN), More Data (MD), and a reserved field are included in the header.
It should be noted that, the tester may set the configuration parameters of each layer of the air interface message according to the test requirement. For example, the test value of the logical link identifier may be set to (start and continue), the test value of the next expected sequence number is (0 or 1), the test value of the sequence number is (the value alternates between 1 and 0), the test value of more data is (0 and 1,0 indicates that there is no next data), the packet length is (all lengths supported by BLE protocol, actual length of payload data supported by BLE is at most 27 bytes), and the like, which is not limited by the embodiment of the present application.
At this time, the packet capture module 201 in the master device 20 obtains the air interface message, and the process corresponds to the message capture 310 in fig. 3. In a possible implementation manner, because bluetooth has a frequency hopping function, and an air interface message is demodulated by a modulator, an FPGA chip may be used to complete the demodulation function, and an ARM processor is used to perform other processing.
It should be noted that the packet capturing module 201 is only used as a listener in the current networking environment, and does not affect the device in the original networking environment, so that the embodiment of the present application can ensure that the packet captured by the packet capturing module 201 is a packet sent in the real testing environment.
Then, the message captured by the packet capturing module 201 is buffered and sent to the next-level protocol analysis module (i.e., the parsing and extracting module 202) for message structure parsing. The parsing and extracting module 202 is configured to obtain and store configuration parameters of each layer of the bluetooth protocol in the air interface message. The parse extraction module 202 may be processed by the CPU. This process corresponds to protocol analysis 320 in fig. 3.
Specifically, the parsing and extracting module 202 parses the packet frame structure of the air interface packet obtained by the packet capturing module 201 according to the BLE protocol structure, and extracts key parameters of each protocol layer of the air interface packet according to a parsing result. The parsing extraction module 202 then saves the configuration parameters. As an example, the parse extraction module 202 may store the configuration parameters in a cache. Specifically, the configuration parameters may refer to the description above, and are not described herein again to avoid repetition.
The protocol implementation module 203 is used for implementing a bluetooth protocol with the bluetooth module 101 of the device under test 10. As an example, the protocol implementation module 203 is configured to implement functions of each layer of the BLE protocol. This process corresponds to protocol implementation 330 in fig. 3.
Specifically, the protocol implementation module 203 is configured to implement main functions of the bluetooth protocol, including complete processes of broadcasting, connecting, disconnecting, pairing, and the like of the master device. In the pairing process, a private protocol needs to be established, and encryption needs to be carried out after pairing so as to improve the security of data interaction. As an example, the encryption algorithm may be an AES-128 algorithm, which mainly implements at least one of the following functions: encrypting payload data, calculating a message integrity check value, data signing, and generating a private address.
The process steps of establishing connection and pairing binding between the master device 20 and the device under test 10 are as follows:
(1) after the initialization of the main test equipment is finished, the main test equipment is in a broadcast state and starts to continuously send broadcast messages;
(2) after the initialization of the tested equipment is finished, the equipment is in a scanning state, and the equipment starts to be scanned;
(3) after the tested device scans and finds the main testing device in a connectable state, a scanning request is immediately initiated to the main testing device;
(4) the main equipment receives the scanning request and then performs scanning reply response on the tested equipment;
(5) the tested equipment receives the scanning reply and then initiates a connection request, enters a connection state and plays a role of a host;
(6) the main test equipment enters a connection state after receiving the connection request and plays a role of a slave machine;
(7) the master device may initiate a pairing request for generating encryption and authentication keys to enhance the security of the connection.
After the steps are completed, the simulation device and the tested equipment can carry out data communication, namely data messages are transmitted, and the connection can be disconnected after the data communication is completed.
Moreover, the protocol implementation module 203 may implement functions such as a transmission frame structure and device address classification, define various broadcast type events and scanning events, and define various broadcast frame types and data frame types.
The message generating module 204 is configured to generate a test case of a data message after the connection between the master device and the device under test is successful, where configuration parameters of each layer based on a bluetooth protocol in the test case of the data message are determined according to configuration parameters of each layer of the bluetooth protocol stored in advance.
As an optional embodiment, the message generating module 204 backfills the key parameters of each layer of the air interface message extracted by the parsing and extracting module 202 in each layer according to the message structure defined by each service in the protocol based on the protocol implementation process of the protocol implementing module 203, and backfills the key parameters of each layer to the specified position of the hierarchical structure corresponding to the test case of the data message to be generated, so as to generate the test case.
As another alternative embodiment, the message generating module 204 fills the key parameters of each layer of the pre-configured BLE protocol into the message structure defined according to each service based on the protocol implementation process of the protocol implementation module 203. In the embodiment of the application, the test range of the configuration parameters of each layer in the message structure defined by each service can be stored in advance, and in the message generation stage, each test data in the test range is filled into the specified position of the hierarchical structure corresponding to the test case of the data message to be generated, so that the test case is generated.
In the embodiment of the present application, the configuration parameters of the hierarchical structure corresponding to the test case to be filled mainly include at least one of the following parameters:
1) link layer parameters: logical Link Identifier (LLID), Next Expected Sequence Number (NESN), Sequence Number (SN), More Data (MD), etc.;
2) l2CAP layer parameters: message length, maximum transmission size of maximum transmission unit, etc.;
3) ATT layer parameters: parameters defining how a device is discovered, reading and writing to another device's attribute handle, attribute type, and payload value.
Based on this, in the embodiment of the present application, through a combination of various parameters, various types of messages, that is, test cases of data messages, may be generated. And then, the main test device sends the test case to the tested device, and performs Bluetooth test according to the test case.
Therefore, in the embodiment of the application, after the master device and the tested device are connected and paired, the master device generates the test case of the data message, and the configuration parameters of each layer in the test case are determined according to the configuration parameters of each layer of the pre-stored bluetooth protocol. The configuration parameters of each layer of the pre-stored Bluetooth protocol can be flexibly configured, so that the main equipment in the embodiment of the application can simulate various types of data messages to generate different test cases, and the main equipment can replace various Bluetooth entity equipment and tested equipment to perform connection pairing and data interaction based on the main equipment, so that the function, performance and compatibility of the tested equipment can be comprehensively tested. Because master equipment in the embodiment of the application can replace various bluetooth entity equipment, operations such as detaching flying lines between a plurality of bluetooth entity equipment and tested equipment can be avoided, the test preparation time is shortened, the automatic coverage rate is improved, and the bluetooth test efficiency is improved.
Fig. 5 shows a schematic block diagram of an apparatus 500 for bluetooth test according to an embodiment of the present application. The apparatus 500 for bluetooth test includes a connection pairing unit 510, a generating unit 520, and a transmitting unit 530. The apparatus 500 for bluetooth test may be, for example, the above master device 20, the connection pairing unit 510 may correspond to the protocol implementation module 203 in the master device 20, and the generating unit 520 may correspond to the message generating module 204 in the master device 20.
And the connection pairing sheet 510 is used for performing connection pairing with the Bluetooth module of the device to be tested through a Bluetooth protocol.
The generating unit 520 is configured to generate a test case of the data packet according to the pre-stored configuration parameters of each protocol layer of the bluetooth protocol.
A sending unit 530, configured to send the test case to the device under test.
Therefore, in the embodiment of the application, after the master device and the tested device are connected and paired, the master device generates the test case of the data message, and the configuration parameters of each layer in the test case are determined according to the configuration parameters of each layer of the pre-stored bluetooth protocol. The configuration parameters of each layer of the pre-stored Bluetooth protocol can be flexibly configured, so that the main equipment in the embodiment of the application can simulate various types of data messages to generate different test cases, and the main equipment can replace various Bluetooth entity equipment and tested equipment to perform connection pairing and data interaction based on the main equipment, so that the function, performance and compatibility of the tested equipment can be comprehensively tested. Because master equipment in the embodiment of the application can replace various bluetooth entity equipment, operations such as detaching flying lines between a plurality of bluetooth entity equipment and tested equipment can be avoided, the test preparation time is shortened, the automatic coverage rate is improved, and the bluetooth test efficiency is improved.
Optionally, the apparatus 500 for bluetooth test further includes:
an obtaining unit, configured to obtain an air interface message, where the air interface message is configured based on the bluetooth protocol;
the analysis unit is used for analyzing the configuration parameters of each protocol layer in the air interface message to obtain the configuration parameters of each protocol layer of the Bluetooth protocol;
and the storage unit is used for storing the configuration parameters of each protocol layer of the Bluetooth protocol.
The obtaining unit may correspond to a packet capturing module in the main device 20, and the parsing unit may correspond to the parsing and extracting module 202 in the main device 20.
Optionally, the bluetooth protocol is a bluetooth low energy BLE protocol.
Optionally, each protocol layer parameter of the BLE protocol includes at least one of a link layer parameter, a logical link control and adaptation protocol L2CAP layer parameter, and an attribute protocol ATT layer parameter.
It should be noted that in the embodiment of the present application, the connection pairing unit 510 and the generation unit 520 may be implemented by a processor, and the transmission unit 530 may be implemented by a transceiver. As shown in fig. 6, the apparatus 600 for bluetooth testing may include a processor 610, a memory 620, and a transceiver 630. The memory 620 may be used for storing codes and the like executed by the processor 610, and the processor 610 may be used for processing data or programs.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 610. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 620, and the processor 610 reads the information in the memory 620 and performs the steps of the above method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
The apparatus 500 shown in fig. 5 or the apparatus 600 shown in fig. 6 can implement each process of the main device 20 corresponding to the foregoing method embodiment, and specifically, the apparatus 500 or the apparatus 600 may refer to the description above, and is not described here again to avoid repetition.
The embodiment of the present application further provides a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method corresponding to the above-mentioned method embodiment.
An embodiment of the present application further provides a computer program product, where the computer program product includes: computer program code means for causing the apparatus for avoiding packet fragmentation to perform the method according to any of the above-described method embodiments when said computer program means is run on behalf of a processor of an apparatus for bluetooth testing.
The embodiments in the present application may be used independently or jointly, and are not limited herein.
It should be understood that the descriptions of the first, second, etc. appearing in the embodiments of the present application are only for illustrating and differentiating the objects, and do not represent a particular limitation to the number of devices in the embodiments of the present application, and do not constitute any limitation to the embodiments of the present application.
It should also be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: 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 above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of bluetooth testing, comprising:
the main equipment and the Bluetooth module of the equipment to be tested are connected and paired through a Bluetooth protocol;
the main equipment generates a test case of a data message according to pre-stored configuration parameters of each protocol layer of the Bluetooth protocol, wherein the configuration parameters of each protocol layer of the Bluetooth protocol are obtained by analyzing air interface messages interacted between the main equipment and the equipment to be tested;
and the main test device sends the test case to the tested device.
2. The method according to claim 1, wherein before the master device generates the test cases of the data packets according to the pre-stored configuration parameters of each protocol layer of the bluetooth protocol, the method further comprises:
the main equipment acquires the air interface message, wherein the air interface message is configured based on the Bluetooth protocol;
the main equipment analyzes the configuration parameters of each protocol layer in the air interface message to obtain the configuration parameters of each protocol layer of the Bluetooth protocol;
and the main equipment stores the configuration parameters of each protocol layer of the Bluetooth protocol.
3. The method according to claim 1 or 2, wherein the Bluetooth protocol is a Bluetooth Low Energy (BLE) protocol.
4. The method according to claim 3, wherein each protocol layer parameter of the BLE protocol comprises at least one of a link layer parameter, a logical link control and adaptation protocol (L2 CAP) layer parameter, and an attribute protocol (ATT) layer parameter.
5. An apparatus for bluetooth testing, comprising:
the connection pairing unit is used for performing connection pairing with a Bluetooth module of the tested equipment through a Bluetooth protocol;
a generating unit, configured to generate a test case of a data packet according to a pre-stored configuration parameter of each protocol layer of the bluetooth protocol, where the configuration parameter of each protocol layer of the bluetooth protocol is obtained by parsing an air interface packet exchanged between the device for bluetooth test and the device under test;
and the sending unit is used for sending the test case to the tested device.
6. The apparatus of claim 5, further comprising:
an obtaining unit, configured to obtain the air interface message, where the air interface message is configured based on the bluetooth protocol;
the analysis unit is used for analyzing the configuration parameters of each protocol layer in the air interface message to obtain the configuration parameters of each protocol layer of the Bluetooth protocol;
and the storage unit is used for storing the configuration parameters of each protocol layer of the Bluetooth protocol.
7. The device according to claim 5 or 6, wherein the Bluetooth protocol is a Bluetooth Low Energy (BLE) protocol.
8. The apparatus according to claim 7, wherein each protocol layer parameter of the BLE protocol comprises at least one of a link layer parameter, a logical link control and adaptation protocol (L2 CAP) layer parameter, and an attribute protocol (ATT) layer parameter.
9. An apparatus for bluetooth testing, the apparatus comprising:
a memory to store instructions;
a processor to execute the memory-stored instructions and execution of the instructions stored in the memory causes the processor to perform the method of any of claims 1-4.
10. A computer-readable storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of any one of claims 1-4.
CN201811460540.2A 2018-07-24 2018-12-01 Bluetooth test method and device Active CN109495870B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2018108207520 2018-07-24
CN201810820752 2018-07-24

Publications (2)

Publication Number Publication Date
CN109495870A CN109495870A (en) 2019-03-19
CN109495870B true CN109495870B (en) 2022-02-01

Family

ID=65698961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811460540.2A Active CN109495870B (en) 2018-07-24 2018-12-01 Bluetooth test method and device

Country Status (1)

Country Link
CN (1) CN109495870B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110545265B (en) * 2019-08-19 2021-12-31 重庆大学 Data communication system and method for carrying out adaptation depending on ATT and indication
CN111328056B (en) * 2020-01-20 2023-03-24 钟代笛 Communication method and system for carrying out protocol adaptation based on ATT (advanced technology transfer) and read-write command
CN111818493B (en) * 2020-05-21 2023-11-07 上海橙群微电子有限公司 Data transmission method, wireless network system, node, and readable storage medium
CN111800767B (en) * 2020-06-15 2024-04-05 易兆微电子(杭州)股份有限公司 System and method for realizing OTA upgrading of terminal product based on BNEP Bluetooth
CN111726795A (en) * 2020-06-30 2020-09-29 展讯通信(上海)有限公司 Method and equipment for testing intelligent terminal
CN112383911B (en) * 2020-12-24 2023-09-29 福建新大陆支付技术有限公司 POS Bluetooth automatic test method, system and storage medium
CN112911565B (en) * 2021-02-01 2022-12-13 中汽数据(天津)有限公司 Bluetooth packet sending method, system, device and storage medium
WO2022205234A1 (en) * 2021-03-31 2022-10-06 华为技术有限公司 Communication method and apparatus
CN114222320A (en) * 2021-12-16 2022-03-22 展讯通信(上海)有限公司 Method, device, apparatus, storage medium, and program for testing communication device
CN114928482B (en) * 2022-05-13 2023-06-27 北京百度网讯科技有限公司 Method and device for testing network communication function of software, electronic equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996899A (en) * 2005-12-29 2007-07-11 中兴通讯股份有限公司 Testing method of the mobile terminal protocol and its system
CN101478449A (en) * 2009-01-22 2009-07-08 凌阳科技股份有限公司 Protocol automatic test method and system thereof
CN102420891A (en) * 2011-09-23 2012-04-18 展讯通信(上海)有限公司 Mobile terminal and test method, equipment and system thereof
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
CN102523052A (en) * 2011-12-01 2012-06-27 无锡中星微电子有限公司 Testing method and testing device
CN104219689A (en) * 2014-09-16 2014-12-17 京信通信系统(中国)有限公司 LTE wireless communication air interface protocol software self testing device and method
CN105024873A (en) * 2014-04-29 2015-11-04 中国科学院沈阳自动化研究所 Protocol conformance testing system and method based on equipment and scene simulation
CN105577461A (en) * 2014-10-10 2016-05-11 北京风行在线技术有限公司 Multi-layer protocol automatic testing method, multi-layer protocol automatic testing device, and multi-layer protocol automatic testing system
CN105636080A (en) * 2015-12-30 2016-06-01 福建联迪商用设备有限公司 Bluetooth test method and system
WO2016203373A1 (en) * 2015-06-16 2016-12-22 Telefonaktiebolaget Lm Ericsson (Publ) Automation testing apparatus
CN106502886A (en) * 2016-10-13 2017-03-15 上海华虹集成电路有限责任公司 Low-power consumption bluetooth test system based on TCL

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009529277A (en) * 2006-03-06 2009-08-13 エヌエックスピー ビー ヴィ Wireless network device inspection method
US8265017B2 (en) * 2008-04-11 2012-09-11 Apple Inc. Methods and apparatus for network capacity enhancement for wireless device coexistence
US8442248B2 (en) * 2008-09-03 2013-05-14 Starkey Laboratories, Inc. Systems and methods for managing wireless communication links for hearing assistance devices
TWI453693B (en) * 2011-12-16 2014-09-21 Universal Scient Ind Shanghai Method for automatically testing communication functionality of device under test and computer-readable media thereof
US20150245163A1 (en) * 2014-02-25 2015-08-27 Sony Corporation Proximity detection of candidate companion display device in same room as primary display using wi-fi or bluetooth signal strength
CN104202454B (en) * 2014-09-24 2017-12-08 福建联迪商用设备有限公司 The method and system that a kind of handset compatibility test case performs automatically
CN104734911A (en) * 2015-02-10 2015-06-24 重庆邮电大学 CAN bus network management test system and method
CN105262551A (en) * 2015-11-25 2016-01-20 上海市计量测试技术研究院 Wireless signal tester calibration device and method, and automatic testing system and method
CN107769865B (en) * 2017-08-24 2020-09-25 江阴市创新气门嘴有限公司 Automatic test method for radio frequency parameters of Bluetooth module

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996899A (en) * 2005-12-29 2007-07-11 中兴通讯股份有限公司 Testing method of the mobile terminal protocol and its system
CN101478449A (en) * 2009-01-22 2009-07-08 凌阳科技股份有限公司 Protocol automatic test method and system thereof
CN102420891A (en) * 2011-09-23 2012-04-18 展讯通信(上海)有限公司 Mobile terminal and test method, equipment and system thereof
CN102523052A (en) * 2011-12-01 2012-06-27 无锡中星微电子有限公司 Testing method and testing device
CN102438055A (en) * 2011-12-06 2012-05-02 广东欧珀移动通信有限公司 Mobile phone automated testing method based on bluetooth communication
CN105024873A (en) * 2014-04-29 2015-11-04 中国科学院沈阳自动化研究所 Protocol conformance testing system and method based on equipment and scene simulation
CN104219689A (en) * 2014-09-16 2014-12-17 京信通信系统(中国)有限公司 LTE wireless communication air interface protocol software self testing device and method
CN105577461A (en) * 2014-10-10 2016-05-11 北京风行在线技术有限公司 Multi-layer protocol automatic testing method, multi-layer protocol automatic testing device, and multi-layer protocol automatic testing system
WO2016203373A1 (en) * 2015-06-16 2016-12-22 Telefonaktiebolaget Lm Ericsson (Publ) Automation testing apparatus
CN105636080A (en) * 2015-12-30 2016-06-01 福建联迪商用设备有限公司 Bluetooth test method and system
CN106502886A (en) * 2016-10-13 2017-03-15 上海华虹集成电路有限责任公司 Low-power consumption bluetooth test system based on TCL

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
蓝牙设备的测试方案;郑之光;《数据通信》;20021231;正文第2-4节 *
蓝牙设备的测试方案探析;沈亮;《现代信息科技》;20180131;全文 *

Also Published As

Publication number Publication date
CN109495870A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109495870B (en) Bluetooth test method and device
CN106535288B (en) Method for sending and acquiring wifi networking information and corresponding device
CN105933888B (en) A kind of eSIM card method for burn-recording and device based on NFC
CN103647869B (en) A kind of matching method of terminal, terminal and system
CN111327758B (en) Camera sharing method and device
Van Den Broek et al. Security testing of GSM implementations
CN104619040A (en) Method and system for quickly connecting WIFI equipment
CN112333019A (en) Router configuration and test method and system and readable storage medium
US20190260631A1 (en) Deployable linear bitwise protocol transfromation
CN108874612A (en) A kind of method of acquisition of information, relevant device and system
CN105049280B (en) The interface Behavior modeling test macro and method of Business Management Platform
CN101827453A (en) Method and system for establishing connection between PC and wireless terminal
CN107368334B (en) Business plug-in interaction system and method
CN105117344B (en) A kind of Interface integration method of testing and system based on PB
CN103841143A (en) File sending method, receiving method, system and device
CN113596832B (en) Network connection establishment method and device, storage medium and electronic device
CN110876155B (en) Simulation system and method for wireless mesh network
CN105704710A (en) Wi-Fi (Wireless Fidelity) parameter configuration method
CN103888264A (en) Inter-mobile-phone data transferring method based on background data exchange, terminal and system
CN113965904A (en) Device registration method, device and storage medium
CN110113771A (en) Data processing method, device, gateway and storage medium
CN111225077A (en) Network distribution method, device and system for Internet of things equipment
CN113114465B (en) Method and device for processing attribution authority, storage medium and electronic device
KR20090106103A (en) System and Method for Managing Smart Card Information
CN105763516B (en) The method and apparatus that terminal sends data to net external equipment out of WLAN

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant