Wireless communication module testing method, platform and system
Through the computer platform, the communication mode is determined according to the device type, and the multi-wireless communication chips are directly automated to solve the problems of high test complexity and poor quality in the prior art, and efficient and accurate testing results are achieved.
Patent Information
- Application Number
- CN202411849728.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
AI Technical Summary
The prior art tests multi-wireless communication chips through test script writing, resulting in high test complexity and difficult to guarantee the test quality.
Through the computer platform, intelligently identify the device types of physical communication devices connected to each wireless communication chip in the device to be tested, generate corresponding virtual communication devices, and determine their communication modes, and directly perform automated testing operations on each wireless communication chip based on the communication mode.
It realizes efficient and automated wireless communication module testing, reduces the test complexity, improves the test quality, and can accurately cover the protocol implementation and performance of different wireless communication chips.
Smart Images

Figure CN119788203A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automated testing technology, and in particular to a wireless communication module testing method, platform and system. Background Art
[0002] As a key component in a device, the wireless communication module integrates multiple wireless communication chips, providing higher flexibility and performance for communication between devices. Therefore, how to efficiently and conveniently test the wireless communication module is of great significance to ensure the communication quality between devices.
[0003] In the related art, for wireless communication modules, an automated testing method is usually developed based on the debugging application or interface of each wireless communication chip, which automatically completes the scanning, connection, testing, action execution and data reception of each wireless communication chip through a preset test script. However, different wireless communication chips have different protocol implementations and performances. If multiple wireless communication chips are tested through test script writing, the test complexity will be high and the test quality will be difficult to guarantee. Summary of the invention
[0004] The present invention provides a wireless communication module testing method, platform and system, which are used to solve the defects of the prior art that multiple wireless communication chips are tested by writing test scripts, resulting in high test complexity and poor test quality, and realize efficient and automated testing of wireless communication modules to reduce test complexity and improve test quality.
[0005] The present invention provides a wireless communication module testing method, comprising: Obtain the device type of the physical communication device to which each wireless communication chip in the device to be tested is connected; According to the device type, generating a virtual communication device corresponding to each of the wireless communication chips, and determining a communication mode of the corresponding virtual communication device; According to the communication mode, a test operation is performed on each of the wireless communication chips to obtain a test result of each of the wireless communication chips.
[0006] According to a wireless communication module testing method provided by the present invention, the testing operation is performed on each of the wireless communication chips according to the communication mode to obtain the test results of each of the wireless communication chips, including: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is a passive connection mode, controlling the virtual communication device connected to the wireless communication chip to perform a first state control operation; According to the communication state information under the first state control operation, the test result of the wireless communication chip is obtained; the communication state information is determined according to the communication state between the virtual communication device corresponding to the wireless communication chip and the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The first state control operation includes a control operation of closing a wireless connection channel and / or a control operation of disconnecting a wireless connection channel.
[0007] According to a wireless communication module testing method provided by the present invention, the testing operation is performed on each of the wireless communication chips according to the communication mode to obtain the test results of each of the wireless communication chips, including: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is the active connection mode, according to the communication protocol type corresponding to the wireless communication chip, the virtual communication device connected to the wireless communication chip is controlled to initiate a connection request message to the wireless communication chip; Acquire response information returned by the wireless communication chip according to the connection request information; According to the response information, obtaining a communication test result of the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The connection request information includes information requesting to establish a connection and / or information requesting to disconnect a connection.
[0008] According to a wireless communication module testing method provided by the present invention, the testing operation is performed on each of the wireless communication chips according to the communication mode to obtain the test results of each of the wireless communication chips, including: The control relay performs a second state control operation on the device to be tested; the second state control operation includes at least one of a power-on control operation, a power-off control operation, a sleep control operation, and a wake-up control operation; According to the communication mode, acquiring the working state of each of the wireless communication chips under the second state control operation; According to the working status, the test result of each of the wireless communication chips is obtained.
[0009] According to a wireless communication module testing method provided by the present invention, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: When the device type of the physical communication device corresponding to the wireless communication chip is a data output device or a data input device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip is a passive connection mode.
[0010] According to a wireless communication module testing method provided by the present invention, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data input and output device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is an active connection mode.
[0011] The present invention also provides a computer platform, comprising: An acquisition unit, used for acquiring a device type of a physical communication device connected to each wireless communication chip in the device to be tested; A processing unit, configured to generate, according to the device type, a virtual communication device corresponding to each of the wireless communication chips, and determine a communication mode of the corresponding virtual communication device; The testing unit is used to perform a testing operation on each of the wireless communication chips according to the communication mode to obtain a testing result of each of the wireless communication chips.
[0012] The present invention also provides a wireless communication module testing system, comprising: A computer platform as described above; A device to be tested, wherein the device to be tested comprises a wireless communication module, and the wireless communication module comprises a plurality of wireless communication chips; A relay, wherein a first end of the relay is connected to the computer platform, and a second end of the relay is connected to the device to be tested.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the wireless communication module testing method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the wireless communication module testing methods described above.
[0015] The wireless communication module testing method, platform and system provided by the present invention intelligently identify and obtain the specific device type of the physical communication device corresponding to each wireless communication chip in the device to be tested through a computer platform, so as to ensure the accuracy and pertinence of the test environment. Then, according to the corresponding device type, a virtual communication device matching each wireless communication chip is automatically generated, and the communication mode of the corresponding connected virtual communication device is accurately determined. According to the communication mode of the corresponding connected virtual communication device, an automated test operation is directly performed on each wireless communication chip to comprehensively cover the protocol implementation and performance of different wireless communication chips, so as to quickly, conveniently, comprehensively and accurately obtain the test results of each wireless communication chip, effectively avoid the problems of high complexity and poor test quality caused by the writing of test scripts, and effectively reduce the test complexity and improve the test quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 This is one of the flow charts of the wireless communication module testing method provided by the present invention.
[0018] Figure 2 It is one of the schematic diagrams of the test scenario of the device to be tested provided by the present invention.
[0019] Figure 3 This is the second schematic diagram of the test scenario of the device to be tested provided by the present invention.
[0020] Figure 4 This is the second flow chart of the wireless communication module testing method provided by the present invention.
[0021] Figure 5 It is a structural schematic diagram of the computer platform provided by the present invention.
[0022] Figure 6 This is one of the structural schematic diagrams of the wireless communication module testing system provided by the present invention.
[0023] Figure 7 This is the second structural schematic diagram of the wireless communication module testing system provided by the present invention. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] With the rapid development of the Internet of Things (IoT) and wireless communication technology, wireless communication chips, as a widely used short-range wireless communication technology, are playing an increasingly important role in various communication scenarios. Especially on mobile devices such as smartphones and tablets, wireless communication chips have become a standard configuration for connecting various peripherals and transmitting data. However, as device functions become increasingly complex, a single wireless communication chip can no longer meet all needs. Therefore, wireless communication modules that integrate multiple wireless communication chips are gradually entering the market, which provides higher flexibility and performance for communication between devices.
[0026] At present, the wireless communication module for wireless communication chips is often an automated test method developed based on the debugging application (Application, APP) of the wireless communication chip or the interface of the wireless communication chip. Through the preset test script, the scanning, connection, testing, action execution and data reception of each wireless communication chip are automatically completed. For devices with multiple wireless communication chips, the test script may become very complicated, and it is necessary to cover multiple situations such as the interaction between multiple chips, the switching of different configuration files, and the processing of concurrent connections. This increases the difficulty of script writing and maintenance, resulting in high test complexity. In addition, due to differences in protocol implementation and performance of wireless communication chips of different brands and models, the automated test tools may not work properly on some devices or the test results may be inaccurate, which makes it difficult to ensure the quality of the test.
[0027] In summary, in the related art, the testing of multiple wireless communication chips by writing test scripts has the defects of high test complexity and poor test quality.
[0028] Therefore, it is particularly important to develop a testing method that can simultaneously test multiple wireless communication chips, simulate real usage scenarios, and provide accurate test data.
[0029] In this regard, the present embodiment provides a wireless communication module testing method, which utilizes a computer platform as a testing platform to perform comprehensive and efficient automated testing on a device to be tested with multiple wireless communication chips. This method not only reduces the test complexity, but also enables high-quality testing of the integrity and stability of the communication functions of the wireless communication module in the device. It can also accurately evaluate its performance in scenarios where multiple wireless communication chips are connected, effectively improving the test quality and providing important test data and reference for device manufacturers and developers.
[0030] Figure 1 This is one of the flow charts of the wireless communication module testing method provided by the present invention.
[0031] It should be noted that the method can be applied to fields such as smart devices, wearable devices, smart homes, and industrial automation, and this embodiment does not specifically limit this.
[0032] The executor of the method may be a computer platform, which may be a platform with a multi-core central processing unit (CPU), capable of processing complex test tasks and concurrent connection tasks, and having good compatibility, such as a Raspberry Pi, a Banana Pi, etc. This embodiment does not specifically limit this. To simplify the description, the following description is made using the Raspberry Pi as an example of a computer platform.
[0033] Among them, Raspberry Pi, as a powerful, flexible and easy-to-use single-board computer, is an ideal choice for building such a test platform with its rich interfaces and powerful processing capabilities. There may be interference and concurrency problems between multiple wireless communication chips. Since Raspberry Pi is equipped with a multi-core CPU, it can handle complex test tasks and concurrent connections, and it can be configured to be compatible with multiple multi-system devices, so wireless communication module testing on Raspberry Pi can ensure efficient and high-quality test operation.
[0034] like Figure 1 As shown, the method includes: Step 110: Obtain the device type of the physical communication device to which each wireless communication chip in the device to be tested is connected.
[0035] The device to be tested here is the device required to perform wireless communication module testing, including but not limited to translation machines, mobile phones, tablet computers, laptops, PDAs, vehicle-mounted electronic devices, wearable devices, servers, network attached storage, and personal computers. The embodiments of the present application do not make specific limitations on this.
[0036] The wireless communication module here is a module integrating multiple wireless communication chips, such as a Bluetooth communication module or a WiFi communication module, etc. Correspondingly, the wireless communication chip integrated therein may be a Bluetooth chip or a WiFi chip, etc., and this embodiment does not specifically limit this.
[0037] The following describes the wireless communication module testing method provided in this embodiment by taking the wireless communication module as a Bluetooth module and the wireless communication chip as a Bluetooth chip as an example.
[0038] Optionally, when it is necessary to test the wireless communication module of the device to be tested, the computer platform needs to first obtain the device type of the physical communication device to which each wireless communication chip in the device to be tested is connected.
[0039] The physical communication device here refers to a physical device that is connected to each wireless communication chip in actual application scenarios. Specific types include but are not limited to data output devices, data input devices, or data input and output devices, such as mobile phones, microphones, and headphones, etc. This embodiment does not specifically limit this.
[0040] Here, the method for obtaining the device type includes: determining the device type of the physical communication device corresponding to each wireless communication chip connected according to the test scenario of the device to be tested; wherein, in different test scenarios, the physical communication device corresponding to the wireless communication chip required to be tested in the device to be tested is different.
[0041] Figure 2 It is one of the schematic diagrams of the test scenario of the device to be tested provided by the present invention; Figure 3 This is the second schematic diagram of the test scenario of the device to be tested provided by the present invention.
[0042] Exemplarily, the device to be tested includes three Bluetooth chips, namely BT (traditional) Bluetooth chip 1, BT Bluetooth chip 2 and BLE (low power) Bluetooth chip; among them, BT Bluetooth chip 1 is mainly connected to Bluetooth headset type devices for voice input and output; BLE Bluetooth chip is mainly connected to the collar microphone for directional sound reception; BT Bluetooth chip 2 is mainly used to connect to the mobile phone. When the mobile phone's Bluetooth headset is used and the mobile phone makes a call, the sound can be transmitted to the device to be tested for translation and transcription of the other party's words. Figure 2 As shown, in the test scenario of the device to be tested is to use the device to be tested to translate the other party's original voice, the physical communication devices corresponding to the wireless communication chip to be tested in the device to be tested are Bluetooth headsets and mobile phones, and the device types of the physical communication devices corresponding to the multiple wireless communication chips connected include data output devices and data input devices; Figure 3As shown, in the test scenario of the device to be tested, in which the device to be tested is used to translate our original voice, the physical communication devices to which the wireless communication chip to be tested in the device to be tested is connected are Bluetooth headsets, mobile phones and collar microphones, and the device types of the corresponding physical communication devices to which the multiple wireless communication chips are connected include data output devices, data input devices and data input devices. In the test scenario of the device to be tested, in which the device to be tested is used to simultaneously translate our original voice and the other party's original voice, the physical communication devices to which the wireless communication chip to be tested in the device to be tested is connected are Bluetooth headsets, mobile phones and collar microphones, and the device types of the corresponding physical communication devices to which the multiple wireless communication chips are connected include data output devices, data input devices and data input devices.
[0043] Step 120: Generate a virtual communication device corresponding to each of the wireless communication chips according to the device type, and determine a communication mode of the virtual communication device corresponding to the connection.
[0044] Optionally, after obtaining the device type of the physical communication device corresponding to each wireless communication chip, the computer platform can use the powerful processing power and rich interfaces of the computer platform to simulate and generate virtual communication devices corresponding to each wireless communication chip in the computer platform according to the device type of the physical communication device corresponding to each wireless communication chip, so as to interact with each wireless communication chip in the device to be tested through the corresponding virtual communication device, so as to realize the test of each wireless communication chip in the device to be tested. Here, the simulation generation method of the virtual communication device can be to load the device parameters, communication protocol and data definition format of the physical communication device corresponding to each wireless communication chip according to the device type of the physical communication device corresponding to each wireless communication chip, so as to simulate and generate the virtual communication device corresponding to each wireless communication chip according to the device parameters, communication protocol and data definition format. The virtual communication device is an entity at the software level of the computer platform, which is used to simulate the communication behavior and characteristics of the real physical communication device, and can be connected and communicated with the corresponding wireless communication chip.
[0045] In addition, the computer platform can also determine the communication mode of the virtual communication device corresponding to each wireless communication chip in the computer platform according to the device type of the physical communication device corresponding to each wireless communication chip. Among them, different device types correspond to different communication modes, which can be pre-configured according to the communication characteristics of different types of devices. The communication mode here can be an active connection mode or a passive connection mode, etc., which is not specifically limited in this embodiment.
[0046] Step 130: Perform a test operation on each of the wireless communication chips according to the communication mode to obtain a test result of each of the wireless communication chips.
[0047] Figure 4 FIG. 2 is a flow chart of the wireless communication module testing method provided by the present invention; Figure 4 As shown, after obtaining the virtual communication device corresponding to each wireless communication chip and the corresponding communication mode, the computer platform can monitor the status of each wireless communication chip in the device to be tested. When it is determined that each wireless communication chip in the device to be tested is in an open and searchable state, the computer platform can scan each wireless communication chip in the device to be tested, and establish a connection between the virtual communication device corresponding to each wireless communication chip and each wireless communication chip to build a test environment.
[0048] Then, the computer platform loads the corresponding test case script in the script storage area of the computer platform according to the communication mode of the virtual communication device corresponding to each wireless communication chip, and executes the corresponding test case script in the test environment to perform the corresponding state control operation on the virtual communication device corresponding to each wireless communication chip, and performs a test operation on each wireless communication chip under the corresponding state control operation; during the test operation, the communication state and / or working state generated by the test of each wireless communication chip under the corresponding state control operation is monitored in real time, and the monitored communication state and / or working state is compared and analyzed with the preset state corresponding to the corresponding state control operation to evaluate and determine the test results of each wireless communication chip, and the test results of each wireless communication chip are directly displayed in a test report for real-time viewing by users.
[0049] The so-called test operations include but are not limited to basic functions such as switching, connecting, scanning, disconnecting, communication protocols, and wireless connection functions of the device to be tested in different working modes (such as switching, sleeping, waking up, etc.), etc. This embodiment does not make specific limitations on this.
[0050] It should be noted that the association mapping relationship between different communication modes and different test case scripts can be pre-configured in the script storage area of the computer platform to simulate user use. The test case script can be written based on various computer languages, such as Python or C language, etc., and this embodiment does not specifically limit this. In addition, the computer platform does not need to be connected to the test computer and other software. When the platform of the iterative device is changed, it is only necessary to modify the test script in the script storage area, without the need to redevelop and adapt, and the practicality is strong.
[0051] The method provided in this embodiment intelligently identifies and obtains the specific device type of the physical communication device corresponding to each wireless communication chip in the device to be tested through a computer platform, so as to ensure the accuracy and pertinence of the test environment. Then, according to the corresponding device type, a virtual communication device matching each wireless communication chip is automatically generated, and the communication mode of the corresponding virtual communication device is accurately determined. According to the communication mode of the corresponding virtual communication device, an automated test operation is directly performed on each wireless communication chip to comprehensively cover the protocol implementation and performance of different wireless communication chips, thereby quickly, conveniently, comprehensively and accurately obtaining the test results of each wireless communication chip, effectively avoiding the problems of high complexity and poor test quality caused by the writing of test scripts, and effectively reducing the test complexity and improving the test quality.
[0052] In some embodiments, step 130 specifically includes: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is a passive connection mode, controlling the virtual communication device connected to the wireless communication chip to perform a first state control operation; According to the communication state information under the first state control operation, the test result of the wireless communication chip is obtained; the communication state information is determined according to the communication state between the virtual communication device corresponding to the wireless communication chip and the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The first state control operation includes a control operation of closing the wireless connection channel and a control operation of disconnecting the wireless connection channel.
[0053] Optionally, for any wireless communication chip, the computer platform may perform the following steps to implement a basic function test operation corresponding to the wireless communication chip: Determine whether the communication mode of the virtual communication device to which the wireless communication chip is connected is an active connection mode or a passive connection mode. If it is determined that the communication mode of the virtual communication device to which the wireless communication chip is connected is a passive connection mode, control the virtual communication device to which the wireless communication chip is connected to execute a control operation of closing the wireless connection channel and / or a control operation of disconnecting the wireless connection channel in a loop for multiple times, so as to perform a connection disconnection or closing test on the device to be tested, and monitor the communication state between the virtual communication device to which the wireless communication chip is connected and the wireless communication chip under each first state control operation, thereby obtaining the test result of the wireless communication chip. For example, if the communication state between the virtual communication device to which the wireless communication chip is connected and the wireless communication chip is consistent with the corresponding state under each first state control operation, it is determined that the wireless communication chip has passed the test; otherwise, it is determined that the wireless communication chip has not passed the test.
[0054] According to the above steps, each wireless communication chip is traversed in a loop to obtain the test result of each wireless communication chip.
[0055] The method provided in this embodiment, in a passive connection mode, controls the virtual communication device corresponding to each wireless communication chip to execute the operations of closing and disconnecting the wireless connection channel, and based on the communication status information under these operations, can comprehensively and accurately obtain and evaluate the test results of each wireless communication chip.
[0056] In some embodiments, step 130 further includes: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is the active connection mode, according to the communication protocol type corresponding to the wireless communication chip, the virtual communication device connected to the wireless communication chip is controlled to initiate a connection request message to the wireless communication chip; Acquire response information returned by the wireless communication chip according to the connection request information; According to the response information, obtaining a communication test result of the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The connection request information includes information requesting to establish a connection and / or information requesting to disconnect a connection.
[0057] Optionally, for any wireless communication chip, the computer platform may perform the following steps to implement a basic function test operation corresponding to the wireless communication chip: Determine whether the communication mode of the virtual communication device connected to the wireless communication chip is an active connection mode or a passive connection mode. If it is determined that the communication mode of the virtual communication device connected to the wireless communication chip is an active connection mode, then according to the communication protocol type corresponding to the wireless communication chip, such as the Advanced Audio Distribution Profile (A2DP) communication protocol, control the virtual communication device connected to the wireless communication chip to initiate connection request information to the wireless communication chip in multiple cycles to perform active connection scanning and / or disconnection testing on the device to be tested; the connection request information includes but is not limited to information requesting to establish a connection and / or information requesting to disconnect a connection. And monitor the response information returned by the wireless communication chip according to the connection request information initiated each time, thereby obtaining the test result of the wireless communication chip. For example, if it is determined that the wireless communication chip can respond correctly according to the response information returned by the wireless communication chip, it is determined that the wireless communication chip has passed the test; otherwise, it is determined that the wireless communication chip has not passed the test.
[0058] According to the above steps, each wireless communication chip is traversed in a loop to obtain the test result of each wireless communication chip.
[0059] The method provided in this embodiment, in the active connection mode, controls the virtual communication device corresponding to the connection of the wireless communication chip to actively initiate a connection request and listen to the response information according to the communication mode and protocol type, thereby finally realizing a comprehensive and automated test of the communication functions of multiple wireless communication chips, thereby ensuring the accuracy of the test results and the test efficiency.
[0060] like Figure 4 As shown below, the wireless communication module in the device to be tested is a Bluetooth module, and Raspberry Pi is used as a computer platform as an example to describe the basic function test steps of each Bluetooth chip in different connection modes: Monitor the status of the three Bluetooth chips (BT Bluetooth chip 1, BT Bluetooth chip 2, and BLE Bluetooth chip) in the Bluetooth module of the device to be tested. When it is determined that each Bluetooth chip in the device to be tested is turned on and searchable, the Raspberry Pi scans each Bluetooth chip in the device to be tested and establishes a connection with each Bluetooth chip to build a test environment.
[0061] For the BT Bluetooth chip 1, the Raspberry Pi can generate a virtual headset corresponding to the BT Bluetooth chip 1 based on the headset corresponding to the BT Bluetooth chip 1, and determine that the communication mode of the virtual headset is a passive connection mode. Thus, the virtual headset can be controlled to open or close the Bluetooth channel multiple times to perform a connection disconnection or closing test with the device to be tested, thereby obtaining the basic function test result corresponding to the BT Bluetooth chip 1.
[0062] For the BT Bluetooth chip 2, the Raspberry Pi can simulate and generate a virtual mobile phone corresponding to the BT Bluetooth chip 2 based on the mobile phone corresponding to the BT Bluetooth chip 2, and determine that the communication mode of the virtual mobile phone is the active connection mode. Thus, the virtual mobile phone can be controlled to actively initiate connection scanning and disconnection connection request information, and transmit it to the BT Bluetooth chip 2 through A2DP communication. By monitoring whether the BT Bluetooth chip 2 can correctly respond to the initiated connection request information, the basic function test results corresponding to the BT Bluetooth chip 2 can be obtained.
[0063] For the Ble Bluetooth chip, the Raspberry Pi can simulate and generate a virtual microphone corresponding to the Ble Bluetooth chip based on the microphone connected to the Ble Bluetooth chip, and determine the communication mode of the virtual microphone to be the passive connection mode. Thus, the virtual microphone can be controlled to open or close the Bluetooth channel multiple times to perform a connection disconnection or closing test of the Ble communication with the device to be tested, and then obtain the basic function test results corresponding to the Ble Bluetooth chip.
[0064] In some embodiments, step 130 further includes: The control relay performs a second state control operation on the device to be tested; the second state control operation includes at least one of a power-on control operation, a power-off control operation, a sleep control operation, and a wake-up control operation; According to the communication mode, acquiring the working state of each of the wireless communication chips under the second state control operation; According to the working status, the test result of each of the wireless communication chips is obtained.
[0065] For the wireless connection test scenario of the device under test in different working modes, since it is necessary to rely on the buttons of the device under test for operation, in this scenario, one end of the relay can be connected to the button of the device under test, and the other end of the relay can be connected to the general purpose input / output (GPIO) interface of the computer platform to realize the working mode switching function of the device under test.
[0066] Optionally, the computer platform may execute the following steps to implement the wireless connection test operation of each wireless communication chip of the device to be tested in different working modes: By controlling the current signal output of the relay, the relay is controlled to perform the second state control operation on the device to be tested for multiple cycles, thereby realizing the switching control of different working modes of the device to be tested; the second state control operation here includes at least one of the power-on control operation, the power-off control operation, the sleep control operation and the wake-up control operation.
[0067] Furthermore, according to the communication mode of the virtual communication device to which each wireless communication chip is connected, a working state acquisition method of each wireless communication chip is determined, and according to the corresponding working state acquisition method, the working state of each wireless communication chip under each second state control operation is acquired, thereby acquiring the test result of each wireless communication chip. For example, if the working state of any wireless communication chip under each second state control operation is consistent with the corresponding state under each second state control operation, it is determined that the wireless communication chip has passed the test, otherwise, it is determined that the wireless communication chip has not passed the test.
[0068] Different communication modes have different corresponding working status acquisition methods. For example, in active mode, the virtual communication device will actively initiate a connection request and try to establish communication with the wireless communication chip. Therefore, the working status of the wireless communication chip can be determined by monitoring the response information of the wireless communication chip. In passive mode, the virtual communication device will not actively initiate a connection request, but wait for the connection request or response of the wireless communication chip. At this time, the working status of the wireless communication chip can be determined by monitoring the request information of the wireless communication chip.
[0069] The method provided in this embodiment controls the relay to sequentially perform status control operations such as power on, power off, sleep and wake up on the device to be tested, and accurately obtains the working status of each wireless communication chip under different working modes of the device to be tested according to the communication mode of the virtual communication device to which each wireless communication chip is connected, so as to accurately obtain the test results of each wireless communication chip, thereby realizing comprehensive and efficient performance testing of multiple wireless communication chips.
[0070] In some embodiments, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data output device or a data input device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is a passive connection mode.
[0071] like Figure 4 As shown, when the device type of the physical communication device connected to any wireless communication chip is a data output device or a data input device, such as when the physical communication device connected to the wireless communication chip is an earphone or a microphone, the communication mode of the virtual communication device connected to the wireless communication chip is a passive connection mode.
[0072] In some embodiments, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data input / output device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is an active connection mode.
[0073] like Figure 4 As shown, when the device type of the physical communication device connected to any wireless communication chip is a data input and output device, such as when the physical communication device connected to the wireless communication chip is a mobile phone, the communication mode of the virtual communication device connected to the wireless communication chip is an active connection mode.
[0074] In summary, the method provided in this embodiment significantly improves the flexibility and accuracy of testing multiple wireless communication chips by dynamically determining the communication mode of the virtual communication device corresponding to each wireless communication chip according to the type of physical communication device to which the wireless communication chip is connected, and ensures that the test environment can accurately simulate actual communication scenarios, thereby more effectively and accurately evaluating and testing the performance of each wireless communication chip.
[0075] The computer platform provided by the present invention is described below. The computer platform described below and the wireless communication module testing method described above can be referenced to each other.
[0076] Figure 5 It is a schematic diagram of the structure of the computer platform provided by the present invention; Figure 5 As shown, the computer platform includes: The acquisition unit 510 is used to acquire the device type of the physical communication device connected to each wireless communication chip in the device to be tested; The processing unit 520 is used to generate a virtual communication device corresponding to each of the wireless communication chips according to the device type, and determine a communication mode of the corresponding virtual communication device; The testing unit 530 is used to perform a testing operation on each of the wireless communication chips according to the communication mode to obtain a testing result of each of the wireless communication chips.
[0077] The platform provided in this embodiment ensures the accuracy and pertinence of the test environment by intelligently identifying and obtaining the specific device type of the physical communication device corresponding to each wireless communication chip in the device to be tested. Then, according to the corresponding device type, a virtual communication device matching each wireless communication chip is automatically generated, and the communication mode of the corresponding virtual communication device is accurately determined. According to the communication mode of the corresponding virtual communication device, each wireless communication chip is directly subjected to automated testing operations to comprehensively cover the protocol implementation and performance of different wireless communication chips, thereby quickly, conveniently, comprehensively and accurately obtaining the test results of each wireless communication chip, effectively avoiding the problems of high complexity and poor test quality caused by the writing of test scripts, and effectively reducing the test complexity and improving the test quality.
[0078] In some embodiments, the testing unit is specifically configured to: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is a passive connection mode, controlling the virtual communication device connected to the wireless communication chip to perform a first state control operation; According to the communication state information under the first state control operation, the test result of the wireless communication chip is obtained; the communication state information is determined according to the communication state between the virtual communication device corresponding to the wireless communication chip and the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The first state control operation includes a control operation of closing a wireless connection channel and / or a control operation of disconnecting a wireless connection channel.
[0079] In some embodiments, the testing unit is further configured to: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is the active connection mode, according to the communication protocol type corresponding to the wireless communication chip, the virtual communication device connected to the wireless communication chip is controlled to initiate a connection request message to the wireless communication chip; Acquire response information returned by the wireless communication chip according to the connection request information; According to the response information, obtaining a communication test result of the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The connection request information includes information requesting to establish a connection and / or information requesting to disconnect a connection.
[0080] In some embodiments, the testing unit is further configured to: The control relay performs a second state control operation on the device to be tested; the second state control operation includes at least one of a power-on control operation, a power-off control operation, a sleep control operation, and a wake-up control operation; According to the communication mode, acquiring the working state of each of the wireless communication chips under the second state control operation; According to the working status, the test result of each of the wireless communication chips is obtained.
[0081] In some embodiments, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data output device or a data input device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is a passive connection mode.
[0082] In some embodiments, for any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data input / output device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is an active connection mode.
[0083] The platform provided by the present invention is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for the specific processes and detailed contents, which will not be repeated here.
[0084] In some embodiments, this embodiment also provides a wireless communication module testing system.
[0085] Figure 6 It is one of the structural schematic diagrams of the wireless communication module testing system provided by the present invention; Figure 7 This is the second structural schematic diagram of the wireless communication module testing system provided by the present invention.
[0086] like Figure 6 and Figure 7 As shown, the wireless communication module testing system includes a computer platform, a device to be tested and a relay, wherein the device to be tested includes a wireless communication module, the wireless communication module includes multiple wireless communication chips, and each wireless communication chip is connected to the computer platform; the first end of the relay is connected to the GPIO of the computer platform, and the second end of the relay is connected to the button of the device to be tested.
[0087] The wireless communication module testing system intelligently identifies and obtains the specific device type of the physical communication device corresponding to each wireless communication chip in the device to be tested through a computer platform, so as to ensure the accuracy and pertinence of the test environment. Then, according to the corresponding device type, a virtual communication device matching each wireless communication chip is automatically generated, and the communication mode of the corresponding virtual communication device is accurately determined. According to the communication mode of the corresponding virtual communication device, each wireless communication chip is directly subjected to automated testing operations to comprehensively cover the protocol implementation and performance of different wireless communication chips, so as to quickly, conveniently, comprehensively and accurately obtain the test results of each wireless communication chip, effectively avoid the problems of high complexity and poor test quality caused by the writing of test scripts, and effectively reduce the test complexity and improve the test quality.
[0088] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the wireless communication module testing method provided by the above methods, which includes: obtaining the device type of a physical communication device corresponding to each wireless communication chip in the device to be tested; based on the device type, generating a virtual communication device corresponding to each wireless communication chip, and determining a communication mode of the corresponding virtual communication device; based on the communication mode, performing a test operation on each wireless communication chip to obtain a test result of each wireless communication chip.
[0089] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the wireless communication module testing method provided by the above-mentioned methods. The method includes: obtaining the device type of the physical communication device corresponding to each wireless communication chip in the device to be tested; based on the device type, generating a virtual communication device corresponding to each wireless communication chip, and determining the communication mode of the corresponding virtual communication device; based on the communication mode, performing a test operation on each wireless communication chip to obtain the test result of each wireless communication chip.
[0090] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0091] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A wireless communication module testing method, characterized in that: include: Obtain the device type of the physical communication device to which each wireless communication chip in the device to be tested is connected; According to the device type, generating a virtual communication device corresponding to each of the wireless communication chips, and determining a communication mode of the corresponding virtual communication device; According to the communication mode, a test operation is performed on each of the wireless communication chips to obtain a test result of each of the wireless communication chips.
2. The wireless communication module testing method according to claim 1, characterized in that: The step of performing a test operation on each of the wireless communication chips according to the communication mode to obtain a test result of each of the wireless communication chips includes: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is a passive connection mode, controlling the virtual communication device connected to the wireless communication chip to perform a first state control operation; According to the communication state information under the first state control operation, the test result of the wireless communication chip is obtained; the communication state information is determined according to the communication state between the virtual communication device corresponding to the wireless communication chip and the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The first state control operation includes a control operation of closing a wireless connection channel and / or a control operation of disconnecting a wireless connection channel.
3. The wireless communication module testing method according to claim 1, characterized in that: The step of performing a test operation on each of the wireless communication chips according to the communication mode to obtain a test result of each of the wireless communication chips includes: For any of the wireless communication chips, when the communication mode of the virtual communication device connected to the wireless communication chip is the active connection mode, according to the communication protocol type corresponding to the wireless communication chip, the virtual communication device connected to the wireless communication chip is controlled to initiate a connection request message to the wireless communication chip; Acquire response information returned by the wireless communication chip according to the connection request information; According to the response information, obtaining a communication test result of the wireless communication chip; Traversing each of the wireless communication chips to obtain a test result of each of the wireless communication chips; The connection request information includes information requesting to establish a connection and / or information requesting to disconnect a connection.
4. The wireless communication module testing method according to claim 1, characterized in that: The step of performing a test operation on each of the wireless communication chips according to the communication mode to obtain a test result of each of the wireless communication chips includes: The control relay performs a second state control operation on the device to be tested; the second state control operation includes at least one of a power-on control operation, a power-off control operation, a sleep control operation, and a wake-up control operation; According to the communication mode, acquiring the working state of each of the wireless communication chips under the second state control operation; According to the working status, the test result of each of the wireless communication chips is obtained.
5. The wireless communication module testing method according to any one of claims 1 to 4, characterized in that: For any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data output device or a data input device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is a passive connection mode.
6. The wireless communication module testing method according to any one of claims 1 to 4, characterized in that: For any of the wireless communication chips, the communication mode of the virtual communication device to which the wireless communication chip is connected is determined based on the following steps: In a case where the device type of the physical communication device corresponding to the wireless communication chip connected is a data input / output device, it is determined that the communication mode of the virtual communication device corresponding to the wireless communication chip connected is an active connection mode.
7. A computer platform, characterized in that: include: An acquisition unit, used for acquiring a device type of a physical communication device connected to each wireless communication chip in the device to be tested; A processing unit, configured to generate, according to the device type, a virtual communication device corresponding to each of the wireless communication chips, and determine a communication mode of the corresponding virtual communication device; The testing unit is used to perform a testing operation on each of the wireless communication chips according to the communication mode to obtain a testing result of each of the wireless communication chips.
8. A wireless communication module testing system, characterized in that: include: The computer platform as claimed in claim 7; A device to be tested, wherein the device to be tested comprises a wireless communication module, and the wireless communication module comprises a plurality of wireless communication chips; A relay, wherein a first end of the relay is connected to the computer platform, and a second end of the relay is connected to the device to be tested.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the wireless communication module testing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the wireless communication module testing method as described in any one of claims 1 to 6 is implemented.