Communication test method and related device

By using the self-negotiation operation between the test equipment and the device under test, communication parameters are automatically adjusted, which solves the problems of poor versatility and high cost caused by multiple test equipment in the existing technology. It realizes unified testing of different types of domain controllers and improves the versatility and security of the test equipment.

CN120915709APending Publication Date: 2025-11-07BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511207408.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-27
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

In the existing technology, the CAN and CANFD communication modules of the vehicle controller require a variety of test equipment during testing, resulting in poor versatility, high cost and complicated operation. Furthermore, frequent replacement of test equipment can easily lead to equipment damage.

Method used

A communication testing method and apparatus are adopted, which automatically adjusts communication parameters through the communication auto-negotiation operation between the test equipment and the device under test, so that the test equipment can adapt to different types of devices under test, realize a unified test interface, and improve versatility and security.

Benefits of technology

It enables unified testing of different types of domain controllers, reduces the design and production costs of test equipment, simplifies operation, improves the safety and reliability of test equipment, and avoids equipment damage and human error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120915709A_ABST
    Figure CN120915709A_ABST
Patent Text Reader

Abstract

The invention provides a communication testing method and a related device, and relates to the field of testing. In the application, each first communication module of the tested device is connected with the corresponding second communication module of the test device one by one, and the communication parameter of the second communication module in the test device is set as the target communication parameter of the first communication module connected with the second communication module. And the second communication module is used for sending the test message to the corresponding first communication module of the tested equipment, so that the communication test result of each first communication module of the tested equipment is obtained, and the test of the tested equipment is realized. Besides, in the application, the test equipment can correspondingly set the communication parameter of the second communication module of the test equipment according to the target communication parameter of the first communication module of the tested equipment so as to match the communication mode of the tested equipment, so that the test equipment can realize corresponding communication test operation when being connected with any tested equipment, and the test efficiency is improved. And the universality of the test equipment during the communication test is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of testing, and more particularly, to a communication testing method and related device. BACKGROUND

[0002] At present, products such as vehicles are configured with controllers, and the controllers can control corresponding devices to act.

[0003] The communication mode of the controller can be a CAN (Controller Area Network) communication mode or a CANFD (Controller Area Network with Flexible Data-Rate) communication mode. In an implementation manner, the controller can be configured with multiple CANs or multiple CANFDs, or at least one CAN and at least one CANFD at the same time.

[0004] Before use, the CAN communication module and / or the CANFD communication module in the controller need to be tested to ensure that the CAN communication module and / or the CANFD communication module are in normal communication. Then, how to implement the corresponding test is a technical problem that technicians in the field urgently need to solve. SUMMARY

[0005] Therefore, the present application provides a communication testing method and related device to solve the problem of testing the CAN communication module and / or the CANFD communication module in the controller.

[0006] To solve the above technical problem, the present application adopts the following technical solution:

[0007] A communication testing method applied to a test device, each first communication module of a device under test is connected to a corresponding second communication module of the test device one by one.

[0008] The communication testing method comprises:

[0009] Setting a communication parameter of the second communication module in the test device as a target communication parameter of the first communication module connected to the second communication module;

[0010] Sending a test message to the corresponding first communication module of the device under test by using each second communication module to obtain a communication testing result of each first communication module of the device under test.

[0011] In a possible implementation, setting a communication parameter of the second communication module in the test device as a target communication parameter of the first communication module connected to the second communication module comprises:

[0012] performing a communication self-negotiation operation with the device under test to obtain target communication parameters of each of the first communication modules of the device under test, in a case where it is determined that the reference communication parameters are not stored;

[0013] setting the communication parameters of the second communication modules in the test device to the target communication parameters of the first communication modules with the same serial numbers as the second communication modules.

[0014] In a possible implementation, the performing of the communication self-negotiation operation with the device under test to obtain target communication parameters of each of the first communication modules of the device under test comprises:

[0015] sending, by each of the second communication modules, a first communication message with a set baud rate; the set baud rate is initially a first baud rate;

[0016] if a second communication message fed back by the device under test in response to the first communication message is received, obtaining target communication parameters of each of the first communication modules of the device under test in the second communication message;

[0017] if the second communication message fed back by the device under test in response to the first communication message is not received for a continuous specified number of times, setting the set baud rate to a second baud rate, returning to the step of sending the first communication message with the set baud rate, and sequentially performing until the target communication parameters of each of the first communication modules of the device under test are obtained, or stopping when the set baud rate is an nth baud rate and the second communication message fed back by the device under test in response to the first communication message is not received for a continuous specified number of times, where n is a preset positive integer.

[0018] In a possible implementation, after the target communication parameters of each of the first communication modules of the device under test are obtained, the method further comprises:

[0019] storing reference communication parameters; the reference communication parameters comprise the target communication parameters of each of the first communication modules of the device under test.

[0020] In a possible implementation, the setting of the communication parameters of the second communication modules in the test device to the target communication parameters of the first communication modules with the same serial numbers as the second communication modules comprises:

[0021] setting a baud rate of the second communication modules in the test device to a baud rate in the target communication parameters of the first communication modules with the same serial numbers as the second communication modules;

[0022] setting a communication type of the second communication module in the test device to a communication type in the target communication parameter of the first communication module with the same serial number as the second communication module.

[0023] In a possible implementation, the setting of the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module connected with the second communication module includes:

[0024] In a case where it is determined that the reference communication parameter is stored, setting the communication parameter of the second communication module in the test device to a corresponding communication parameter value in the reference communication parameter;

[0025] sending, by each second communication module, a first test packet to the device under test;

[0026] If the target communication parameter of the first communication module in the received first feedback packet is different from the reference communication parameter, setting the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0027] In a possible implementation, after the sending of the first test packet to the device under test by each second communication module, the method further includes:

[0028] If the first feedback packet corresponding to the first test packet sent by the device under test is not received, performing a communication self-negotiation operation with the device under test to obtain the target communication parameter of each first communication module of the device under test;

[0029] setting the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0030] In a possible implementation, the sending of the test packet to the corresponding first communication module of the device under test by each second communication module to obtain the communication test result of each first communication module of the device under test includes:

[0031] generating a second test packet;

[0032] sending, by each second communication module, the second test packet to the corresponding first communication module of the device under test;

[0033] receiving a second feedback packet fed back by each first communication module of the device under test;

[0034] determining that the communication test result of the first communication module corresponding to the second feedback packet with the preset content is a test pass.

[0035] The communication test result of the first communication module corresponding to the second feedback message whose content is not the preset content is determined to be a test failure.

[0036] A communication testing device is applied to a testing equipment, wherein each first communication module of the device under test is connected to a corresponding second communication module of the testing equipment.

[0037] The communication testing device includes:

[0038] The parameter setting module sets the communication parameters of the second communication module in the test device to the target communication parameters of the first communication module to which the second communication module is connected;

[0039] The test module uses each of the second communication modules to send test messages to the corresponding first communication module of the device under test, so as to obtain the communication test results of each of the first communication modules of the device under test.

[0040] A communication testing system includes a device under test and a testing device for performing the above-described communication testing method;

[0041] After receiving the test message sent by the test device, the device under test sends a feedback message to the test device, so that the test device can use the feedback message to obtain the communication test results of each of the first communication modules of the device under test.

[0042] This application provides a communication testing method and related apparatus. In this application, each first communication module of the device under test (DUT) is connected to a corresponding second communication module of the testing device. The communication parameters of the second communication modules in the testing device are set to the target communication parameters of the first communication modules to which the second communication modules are connected. Test messages are sent from the second communication modules to the corresponding first communication modules of the DUT to obtain the communication test results of each first communication module of the DUT, thus realizing the testing of the DUT. Furthermore, in this application, the testing device can set the communication parameters of its own second communication modules according to the target communication parameters of the first communication modules of the DUT to match the communication mode of the DUT. This allows the testing device to perform corresponding communication test operations when connected to any DUT, improving the versatility of the testing device during communication testing. Attached Figure Description

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the drawings needed to be used in the embodiments or related art description. Obviously, the drawings in the following description only are a part of the present application, and for those skilled in the art, other drawings can be obtained based on the provided drawings without any creative effort.

[0044] Figure 1 A test schematic diagram in the related art;

[0045] Figure 2 A test schematic diagram provided by the embodiments of the present application;

[0046] Figure 3 A flow chart of a communication test method provided by the embodiments of the present application;

[0047] Figure 4 A flow chart of a self-negotiation method provided by the embodiments of the present application;

[0048] Figure 5 A scene schematic diagram of self-negotiation provided by the embodiments of the present application;

[0049] Figure 6 Another test schematic diagram provided by the embodiments of the present application;

[0050] Figure 7 Still another test schematic diagram provided by the embodiments of the present application;

[0051] Figure 8 Yet another test schematic diagram provided by the embodiments of the present application;

[0052] Figure 9 A test process flow chart provided by the embodiments of the present application;

[0053] Figure 10 A structural schematic diagram of a communication test device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.

[0055] Currently, a product such as a vehicle is configured with a controller, which can be a domain controller, and the domain controller can control the corresponding device to act. Among them, the domain controller can be an auxiliary driving domain controller, a reversing controller, an automatic parking controller, etc. These domain controllers participate in data acquisition, operation, data output, logic control, etc. A car will have many domain controllers working together.

[0056] The communication mode of the domain controller can be a CAN communication mode or a CANFD communication mode. In an implementation mode, the controller can be configured with multiple CANs or multiple CANFDs, or at least one CAN and at least one CANFD at the same time.

[0057] Before the controller is used, specifically in the production process, for the domain controller with multiple CANs or CANFDs, or at least one CAN and at least one CANFD at the same time, it is necessary to check whether the CAN or CANFD communication is normal.

[0058] Currently, after the production of the domain controller is completed, the domain controller is connected with a test device by manual operation to detect whether the CAN or CANFD communication is normal. Since the functions of domain controllers of different projects are different, the number or type of CAN and / or CANFD configured by the domain controller is different, and different CANs and / or CANFDs are incompatible due to different baud rates, communication types, etc. Therefore, it is necessary to design corresponding test devices to test domain controllers with different functions. For example, there are 1-5 domain controllers with different functions, and five test devices need to be designed to test the corresponding domain controllers.

[0059] For example, referring to Figure 1 , product 1 and product 2 are two different domain controller products, product 1 has one ordinary CAN channel and one CANFD channel, the ordinary CAN channel can be named CAN1, and the CANFD channel can be named CAN2. The communication rate of CAN1 is 500K, and the communication rate of CAN2 is 2M / 500K. Product 2 has two ordinary CANs, CAN1 and CAN2, the communication rate of CAN1 is 500K, and the communication rate of CAN2 is 250K. Product 1 and product 2 need to verify the communication of the CAN / CANFD carried by themselves.

[0060] In the existing CAN / CANFD communication test software scheme, product 1 and product 2 need to design test equipment 1 and test equipment 2 respectively. Among them, test equipment 1 needs to design one ordinary CAN, specifically CAN1, the communication rate is 500K, one CANFD, specifically CAN2, the communication rate is 2M / 500K, and product 1 is interconnected with the CAN1 channel of test equipment 1 and the CAN2 channel. During the test, product 1 sends Message2 test message to test equipment 1 on the CAN1 channel, and test equipment 1 sends Message1 test message to product 1 on the CAN1 channel. If Message1 and Message2 are normally sent and received, it is considered that the communication performance of this CAN1 channel meets the requirements. Product 1 sends Message4 test message to test equipment 1 on the CAN2 channel, and test equipment 1 sends Message3 test message to product 1 on the CAN2 channel. If Message3 and Message4 are normally sent and received, it is considered that the CAN2 channel meets the requirements, and the CAN / CANFD communication test is considered to meet the requirements, and the CAN / CANFD communication detection of product 1 is passed.

[0061] Product 2 and product 1 are the same, respectively through Message1 / 2 on CAN1 network segment and Message3 / 4 on CAN2 network segment to detect whether the CAN / CANFD communication of product 2 is normal.

[0062] According to the above description, when there are multiple domain controllers, multiple test equipment need to be designed accordingly, and each domain controller uses corresponding test equipment for test operation, so that the universality of the test equipment is poor, and when the types of domain controllers are more, more test equipment needs to be designed, which is high in cost.

[0063] In addition, if different types of domain controllers are generated alternately, manual adjustment of the used test equipment is required, which is complex to operate, increases the time of domain controller production detection, and frequently changes the test load, which is easy to cause unstable wiring or equipment damage, resulting in communication test failure.

[0064] Therefore, in the embodiment of the present application, one test equipment capable of adjusting communication parameters can be used to test the measured equipment, and the test equipment can adjust the communication parameters of the CAN / CANFD of the test equipment according to the target communication parameters of each CAN / CANFD of the measured equipment, so that the communication between the test equipment and the measured equipment is compatible. Therefore, only one test equipment is needed to test different types of measured equipment, which improves the universality of the test equipment and reduces the high cost problem caused by designing and generating multiple test equipment.

[0065] In addition, in the scenario of alternately generating different types of domain controllers, since the test device can test different types of domain controllers, manual change of the test device is not required, the test operation is simplified, the time for production and testing of the domain controller is reduced, the device is prevented from being damaged due to frequent replacement, the safety and reliability of the test device are improved, and the service life of the test device is improved.

[0066] Based on the above, an embodiment of the present application provides a communication test method, and the execution subject is a test device. Since the test device can adjust the communication parameters of the communication module thereof, the test device can adjust the CAN communication module to the CANFD communication module or adjust the CANFD communication module to the CAN communication module. Therefore, the test device can be configured with only the CAN communication module, or only the CANFD communication module, and in addition, the test device can be configured with both the CAN communication module and the CANFD communication module. The number of CAN / CANFD modules of the test device can be configured according to actual needs.

[0067] In an actual scenario, the device under test can be a domain controller, and the domain controller can be configured with at least one CAN communication module and / or CANFD communication module, and the CAN and the CANFD are the communication modules in the embodiment. The device under test is configured with at least one communication module, each communication module is referred to as a first communication module, so as to realize the test of the CAN communication module and / or the CANFD communication module of the domain controller in the manufacturing process.

[0068] Similarly, the test device is also configured with at least one communication module, each communication module is referred to as a second communication module, and the second communication module can be a CAN communication module or a CANFD communication module. It should be noted that the second communication module can also be expanded through an expansion interface to expand multiple interfaces that can connect the communication modules of the test device. For example, the device under test is configured with ten second communication modules, and each second communication module can be expanded to two interfaces, so that the device under test can be connected with at most twenty first communication modules.

[0069] When the test device is connected with the device under test, each first communication module of the device under test is connected with a corresponding second communication module of the test device.

[0070] As shown in FIG. 1, Figure 2 the device under test can be product 1 and product 2, product 1 is configured with CAN1 and CAN2, product 2 is also configured with CAN1 and CAN2, the test device is also configured with CAN1 and CAN2, and the CAN1 and the CAN2 configured by the test device can be expanded to multiple interfaces.

[0071] In an actual scenario, the test device can be connected with multiple products, Figure 3In this setup, CAN1 of Product 1 and CAN1 of Product 2 are both connected to CAN1 of the test equipment, and CAN2 of Product 1 and CAN2 of Product 2 are both connected to CAN2 of the test equipment. During the test, only one product needs to be powered on; that is, only one product is allowed to be tested at a time.

[0072] Reference Figure 3 The communication testing method includes:

[0073] S11. Set the communication parameters of the second communication module in the test equipment to the target communication parameters of the first communication module to which the second communication module is connected.

[0074] like Figure 2 As shown, the testing equipment is connected to both Product 1 and Product 2. During testing, the electrical testing equipment automates the entire testing logic. The electrical testing equipment can be a controller that can control the power supply to and from both the device under test (DUT) and the testing equipment to perform testing on a specific DUT.

[0075] If product 1 is tested first, the electrical testing equipment starts testing, powering on the testing equipment and then powering on product 1. After product 1 is tested, the electrical testing equipment powers off product 1, then powers off the testing equipment. The control channel is then switched, powering on the testing equipment and then powering on product 2, thus testing product 2. During product 2 testing, since product 1 has already been tested, product 1 can be replaced with product 3. After product 2 testing is complete, product 3 is tested. During product 3 testing, product 2 can be replaced with product 4, and so on, until all products have been tested.

[0076] It should be noted that products 1, 2, 3 and 4 in this embodiment can be the same product, such as a domain controller of the same type, or they can be different types of domain controllers, depending on the actual needs.

[0077] When testing any product, such as product 1, product 1 is the device under test. Product 1 is equipped with CAN1 and CAN2. Therefore, connect CAN1 of product 1 to CAN1 of the test device, and connect CAN2 of product 1 to CAN2 of the test device.

[0078] In real-world scenarios, the CAN1 of the test device can only form a CAN channel with the CAN1 of the product 1 when the communication parameters of the CAN1 of the test device and the CAN1 of the product 1 are the same. The CAN1 of the test device and the CAN1 of the product 1 communicate through this CAN channel.

[0079] Therefore, in the embodiment, when testing, the communication parameter of the second communication module in the testing device needs to be set as the target communication parameter of the first communication module connected with the second communication module.

[0080] The communication parameter can include a communication type and a baud rate, and the communication type can be CAN or CANFD. The baud rate can be 250K, 500K, 2M / 500K, etc. The target communication parameter has the same content.

[0081] In the embodiment, the target communication parameter of the first communication module connected with the second communication module is acquired first, and then the communication parameter of the second communication module in the testing device is set as the target communication parameter of the corresponding first communication module.

[0082] Further, in order to enable the testing device to support the setting of the communication parameter, the testing device is configured with a control module, which can be AutoCanT module. Similarly, the device under test is also configured with a corresponding control module, which can be AutoCanP module. In the embodiment, the modular software architecture design of AutoCanP module is adopted, the coupling of the software is low, the portability is strong, and the AutoCanP module can be applied to any CAN / CANFD domain controller.

[0083] The AutoCanT module and the AutoCanP module can communicate with each other, so that the AutoCanT module acquires the target communication parameter of the first communication module from the AutoCanP module. In the specific implementation, the AutoCanP module sends the target communication parameter of the CAN / CANFD of the device under test to the AutoCanT module.

[0084] After acquiring the target communication parameter, the AutoCanT module can configure the communication parameter by using parameter adjustment, so as to set the communication parameter of the second communication module in the testing device as the target communication parameter of the first communication module connected with the second communication module.

[0085] In the specific implementation, the AutoCanT module manages the CAN / CANFD channel of the testing device. Based on the target communication parameter of the CAN / CANFD of different products, the baud rate and the communication type of the CAN / CANFD channel of the AutoCanT module are changed by using parameter adjustment, so that the communication parameter of the CAN1 of the device under test is the same as the communication parameter of the CAN1 of the product 1, and the communication parameter of the CAN2 of the device under test is the same as the communication parameter of the CAN2 of the product 1, thereby enabling the device under test to establish normal communication with the product 1, and then completing the communication test.

[0086] S12, sending a test message to the corresponding first communication module of the measured device by using each second communication module to obtain the communication test result of each first communication module of the measured device.

[0087] As shown in the specific embodiment Figure 2 When the product 1 is tested by the test device, the product 1 sends a test message of Message1 by using CAN1 and a test message of Message3 by using CAN2. After receiving Message1, the CAN1 of the measured device sends a Message2 message to the CAN1 of the test device by using CAN1. Meanwhile, after receiving Message3, the CAN2 of the product 1 sends a Message4 message to the CAN2 of the test device by using CAN2. The test device can determine the test result of the product 1 based on the contents of Message2 and Message4.

[0088] Similarly, when the product 2 is tested by the test device, the test device sends a test message of Message1 by using CAN1 and a test message of Message3 by using CAN2. After receiving Message1, the CAN1 of the product 2 sends a Message2 message to the CAN1 of the test device by using CAN1. Meanwhile, after receiving Message3, the CAN2 of the product 2 sends a Message4 message to the CAN2 of the test device by using CAN2. The test device can determine the test result of the product 1 based on the contents of Message2 and Message4.

[0089] In the embodiment, each first communication module of the measured device is connected to the corresponding second communication module of the test device one by one. The communication parameters of the second communication module in the test device are set as the target communication parameters of the first communication module connected to the second communication module. A test message is sent to the corresponding first communication module of the measured device by using the second communication module to obtain the communication test result of each first communication module of the measured device, thereby realizing the test of the measured device. In addition, in the present application, the test device can set the communication parameters of the second communication module according to the target communication parameters of the first communication module of the measured device to match the communication mode of the measured device, so that the test device can realize the corresponding communication test operation when connected to any measured device, thereby improving the versatility of the test device in communication test.

[0090] In addition, the communication module of the test device in the embodiment of the present application can be adaptively configured, so that the test device can provide a unified test interface for different types of domain controllers, and can be connected to any type of domain controller for test operation, thereby reducing design and test resources, and the test device does not need to be replaced multiple times after installation, thereby reducing the hardware loss of the test device caused by the multiple plugging and unplugging of the power supply and other parts of the test device.

[0091] In addition, since the test device has universality and does not need to be frequently replaced, the problem of test failure caused by human error due to frequent manual adjustment of the test device can be avoided.

[0092] When the test device in the above embodiment obtains the target communication parameters of the first communication module, it is obtained through a communication self-negotiation operation mode of the test device and the device under test. In another implementation manner of the present application, a specific implementation of the communication self-negotiation operation is given, as shown in the following table: Figure 4 The specific implementation includes the following steps:

[0093] S21, using each second communication module, a first communication message with a set baud rate is sent.

[0094] Specifically, when the communication self-negotiation is performed, the test device does not know the baud rate and communication type and other target communication parameters of each first communication module of the device under test, so the test device can only establish communication with the device under test by trying to send messages with different baud rates.

[0095] The test device has multiple baud rates built-in, such as a first baud rate, a second baud rate, a third baud rate,..., and an n-th baud rate, where n is a preset positive integer, such as 10, 15, etc.

[0096] The values of the first baud rate, the second baud rate, the third baud rate,..., and the n-th baud rate are different, and when multiple baud rates are configured, they can be configured in a certain order. For example, the first baud rate is 250K, the second baud rate is 500K, the third baud rate is 2M / 250K, the third baud rate is 2M / 500K,..., and the n-th baud rate is 2000k.

[0097] It should be noted that since the test device does not know whether the communication module configured by the device under test is CAN or CANFD, the set baud rate includes both the baud rate supported by the CAN communication module and the baud rate supported by the CANFD. In the set baud rate, the baud rate supported by the CAN communication module can be in front, and the baud rate supported by the CANFD can be in back, or the baud rate supported by the CAN communication module and the baud rate supported by the CANFD can be mixed. Regardless of how it is set, it is necessary to ensure that the set baud rate includes the baud rate commonly used by the CAN and CANFD communication modules.

[0098] In the self-negotiation, first, the first baud rate is set as the set baud rate, and then the first communication message with the set baud rate is sent by each of the second communication modules.

[0099] For example, as shown in Figure 2 , the test equipment includes CAN1 and CAN2, and the AutoCanT module is self-started when the test equipment is powered on, and then the baud rates of CAN1 and CAN2 of the AutoCanT module are both set as the first baud rate. After the baud rate is set, since the CAN has only one baud rate and the CANFD has two baud rates, if the baud rate is a certain value, such as 250K, the communication types of CAN1 and CAN2 are set as CAN accordingly, and if the baud rate is a certain two values, such as 2M / 500K, the communication types of CAN1 and CAN2 are set as CANFD accordingly, and then CAN1 and CAN2 send the first communication message with the first baud rate.

[0100] As shown in Figure 5 , after the AutoCanT module is self-started, the AutoCanT module sends the normal CAN message to the CAN1 channel of the product 1 at the baud rate of 250K, specifically Message1, and sends the normal CAN message to the CAN2 channel, specifically Message3. The Message1 and Message3 in this embodiment are the first communication message in this embodiment.

[0101] S22, determining whether the second communication message fed back by the measured equipment for the first communication message is received; if yes, step S23 is performed; if no, step S24 is performed.

[0102] Specifically, after the diagnostic equipment sends the first communication message at the first baud rate, in one case, the first baud rate is not the baud rate of the first communication module of the measured equipment, which can cause that the diagnostic equipment and the measured equipment do not normally establish communication. In another case, the first baud rate is the baud rate of one or more first communication modules of the measured equipment, and at this time, the diagnostic equipment and the measured equipment normally establish communication, and the AutoCanP module of the measured equipment sends the target communication parameters of each of the first communication modules of the measured equipment to the test equipment through the CAN channel of the established communication connection.

[0103] The content of the target communication parameters of each of the first communication modules of the measured equipment can be as follows:

[0104] CAN1: the communication type is CAN, and the baud rate is 500K;

[0105] CAN2: the communication type is CANFD, and the baud rate is 2M / 500K;

[0106] …

[0107] Therefore, in the embodiment of the present application, it is necessary to determine whether the second communication message fed back by the measured device for the first communication message is received to determine which subsequent step is executed.

[0108] S23, obtaining the target communication parameters of each first communication module of the measured device in the second communication message.

[0109] In the embodiment, if the first baud rate is the baud rate of one or more first communication modules of the measured device, the first communication module with the first baud rate in the measured device can normally receive the first communication message, and then send the first communication message to the AutoCanP module. The AutoCanP module can obtain the target communication parameters of each first communication module of the measured device. The content of the target communication parameters of each first communication module is specifically referred to the above corresponding description. Subsequently, the AutoCanP module will send a second communication message to the test device by using the first communication module with the first baud rate. The second communication message includes the target communication parameters of each first communication module of the measured device. The AutoCanT module of the test device extracts the target communication parameters of each first communication module of the measured device from the obtained second communication message.

[0110] In addition, an ACK (Acknowledge character, confirmation character) message can also be replied before sending the second communication message to prove that the sent first communication message is received. If the test device receives the ACK message, it indicates that subsequent communication can be normal. If no ACK is received, the upper application will be notified of a communication error.

[0111] S24, the number of times of continuously not receiving the second communication message is greater than a specified number of times; if yes, step S25 is executed; if no, step S21 is executed.

[0112] Specifically, if the first communication message is sent only once, there may be some accidental factors that cause the first communication message to be not successfully sent to the measured device. Therefore, in the embodiment of the present application, in order to avoid this situation, the first communication message is continuously sent at a certain time period, which can be 100 ms, etc. If the number of times of continuously not receiving the second communication message is greater than a specified number of times, it can be concluded that the measured device has a high probability of not receiving the second communication message, that is, the first baud rate is not the baud rate of CAN / CANFD in the measured device. The specified number of times can be configured according to actual conditions, such as ten times.

[0113] If the number of times of continuously not receiving the second communication message is not greater than the specified number of times, it indicates that the number of times of sending the first communication message is less, and the method can return to step S21, and each second communication module sends the first communication message with the set baud rate, and the subsequent steps are executed.

[0114] Therefore, in the embodiment, the number of times of continuously not receiving the second communication message is greater than the specified number of times, and the subsequent step is determined.

[0115] S25, determining whether the set baud rate is the nth baud rate; if not, step S26 is executed.

[0116] Specifically, the nth baud rate is the last baud rate in all the set baud rates, if the set baud rate is the nth baud rate, it indicates that the communication self-negotiation has been performed with the last baud rate, and the nth baud rate is still not the baud rate of the CAN / CANFD of the measured device, at this time, it indicates that the baud rate of the CAN / CANFD of the measured device is not obtained through the self-negotiation mode, and the test can be ended, and the subsequent set baud rate value can be manually adjusted, and then the self-negotiation operation is performed again.

[0117] If the set baud rate is not the nth baud rate, it indicates that there is another baud rate that has not been used, and the next baud rate is used for the communication operation at this time.

[0118] S26, adjusting the value of the set baud rate.

[0119] In the embodiment, when the set baud rate is adjusted, it is adjusted from the current baud rate to the next baud rate, for example, if the current set baud rate is the first baud rate, the set baud rate can be adjusted to the second baud rate, and for example, if the current set baud rate is the second baud rate, the set baud rate can be adjusted to the third baud rate.

[0120] After the adjustment of the set baud rate is performed, the method can return to step S21, and each second communication module sends the first communication message with the set baud rate, and the subsequent steps are executed.

[0121] For example, Figure 5For example, after the AutoCanT module completes its self-start, it sends a normal CAN message (Message1) to the CAN1 channel of Product 1 at a baud rate of 250K, and a normal CAN message (Message3) to the CAN2 channel. In this embodiment, Message1 and Message3 are the first communication messages. Since CAN1 of Product 1 is a normal CAN with a baud rate of 500K, and CAN2 is a CANFD with a baud rate of 2M / 500K, while Message1 and Message3 have a baud rate of 250K, which is different from the baud rates of CAN1 and CAN2 of Product 1, CAN1 of Product 1 cannot receive the first communication message, and CAN2 of Product 1 also cannot receive the first communication message. Therefore, the first communication message transmission fails, generating a stuffing error flag.

[0122] After continuously sending the first communication message at a certain time period, if the number of error flags generated exceeds the threshold of 10, the flag is cleared and Message1 / 3 with a baud rate of 500K is sent again. At this time, the CAN1 rate and communication type of the test device and the CAN1 of product 1 are the same, and CAN1 communication is successfully established. The AutoCanP module will use the successfully established CAN1 channel to send the second communication message to the test device. The AutoCanT module of the test device extracts the target communication parameters of each of the first communication modules of the device under test from the acquired second communication message and compares them with the set baud rate of itself. If they are consistent, the communication auto-negotiation is completed. If the comparison is inconsistent, it enters the error state.

[0123] like Figure 6 As shown, after obtaining the target communication parameters of each of the first communication modules of the device under test through Message1 / 3, parameter setting operations are performed, and then test messages such as Message1 and Message2 are periodically sent through each of the second communication modules. The test results of each first communication channel are determined based on Message3 fed back by CAN1 and Message4 fed back by CAN2 of the device under test.

[0124] If the test device sends a first communication message with a baud rate of 500K and still cannot establish a communication connection with the device under test, it will continue to try the next baud rate until all baud rates have been tried in the order of baud rate.

[0125] In this embodiment, a plurality of baud rates are pre-configured, and then each baud rate is used to attempt to establish communication with the device under test according to the arrangement order of the baud rates. In addition, in this application, the second communication message fed back by the device under test after receiving the first communication message includes the target communication parameters of each first communication module of the device under test, so that the test device can obtain the target communication parameters of each first communication module of the device under test to configure the subsequent communication parameters.

[0126] It should be noted that, in order to improve the efficiency of subsequent device under test testing, the obtained target communication parameters of each first communication module of the device under test can be stored. Specifically, after the communication negotiation is completed, the AutoCanT module stores the target communication parameters of each first communication module of the device under test as reference communication parameters in the EEPROM (Electrically Erasable Programmable read only memory, Electrically Erasable Programmable read only memory). When testing the next device, the stored reference communication parameters are used for testing first. If no feedback message of the device under test is received, the target communication parameters of the CAN / CANFD of the device under test need to be obtained again through the self-negotiation operation. If the target communication parameters of each first communication module of the device under test in the feedback message corresponding to the test message sent by the device under test are inconsistent with the reference communication parameters, the communication parameter setting operation of the second communication module of the test device needs to be performed again.

[0127] In this embodiment, the target communication parameters of each first communication module of the device under test are stored as reference communication parameters, so that when the subsequent device under test is the same as the device under test, the existing reference communication parameters can be used for communication testing directly without the self-negotiation operation, simplifying the testing process and improving the testing efficiency.

[0128] According to the above description, if the test device tests the device under test for the first time, no reference communication parameters are stored in the EEPROM of the test device, and the target communication parameters of each first communication module of the device under test need to be obtained through the self-negotiation operation. If the test device tests the device under test for the second time, the reference communication parameters are stored in the EEPROM of the test device, and the device under test can be tested by referring to the reference communication parameters. If no feedback message of the device under test is received, the target communication parameters of the CAN / CANFD of the device under test need to be obtained again through the self-negotiation operation. If the target communication parameters of each first communication module of the device under test in the feedback message corresponding to the test message sent by the device under test are inconsistent with the reference communication parameters, the communication parameter setting operation of the second communication module of the test device needs to be performed again.

[0129] Therefore, in an implementation of the present application, setting the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module to which the second communication module is connected comprises:

[0130] 1) in the case where it is determined that the reference communication parameter is not stored, performing a communication self-negotiation operation with the device under test to obtain the target communication parameter of each first communication module of the device under test.

[0131] In an implementation, the communication self-negotiation operation with the device under test to obtain the target communication parameter of each first communication module of the device under test comprises:

[0132] Using each second communication module, a first communication message with a set baud rate is sent; the set baud rate is initially a first baud rate;

[0133] If a second communication message fed back by the device under test in response to the first communication message is received, the target communication parameter of each first communication module of the device under test in the second communication message is obtained;

[0134] If the second communication message fed back by the device under test in response to the first communication message is not received for a continuous specified number of times, the set baud rate is set to a second baud rate, and the step of sending the first communication message with the set baud rate is returned to be executed in sequence until the target communication parameter of each first communication module of the device under test is obtained, or, when the set baud rate is an nth baud rate and the second communication message fed back by the device under test in response to the first communication message is not received for a continuous specified number of times, the process is stopped, wherein n is a preset positive integer.

[0135] In an implementation, after the target communication parameter of each first communication module of the device under test is obtained, the method further comprises:

[0136] Storing a reference communication parameter; the reference communication parameter comprises the target communication parameter of each first communication module of the device under test.

[0137] In the embodiments, the specific implementation of each step can be understood with reference to the above description.

[0138] 2) setting the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0139] Specifically, after the target communication parameter of each first communication module of the device under test is obtained, the test device performs a setting operation of the communication parameter of its own second communication module.

[0140] In a specific setting, in one implementation, the baud rate of the second communication module in the test device is set to the baud rate in the target communication parameter of the first communication module with the same serial number as the second communication module; the communication type of the second communication module in the test device is set to the communication type in the target communication parameter of the first communication module with the same serial number as the second communication module.

[0141] Specifically, for example, CAN1 of the test device is connected with CAN1 of product 1, and CAN2 of the test device is connected with CAN2 of product 1, where 1 and 2 in CAN1 and CAN2 are the serial numbers in this embodiment. That is, the first communication module and the second communication module with the same serial number are connected. Figure 2 For example, CAN1 of the test device is connected with CAN1 of product 1, and CAN2 of the test device is connected with CAN2 of product 1, where 1 and 2 in CAN1 and CAN2 are the serial numbers in this embodiment. That is, the first communication module and the second communication module with the same serial number are connected.

[0142] Therefore, when the communication parameters of CAN1 and CAN2 of the test device are configured, the baud rate and the communication type of CAN1 of the test device are set to the baud rate and the communication type of CAN1 of product 1, so that the baud rate and the communication type of CAN1 of the test device are the same as those of CAN1 of product 1, and the two can normally communicate. In addition, the baud rate and the communication type of CAN2 of the test device are set to the baud rate and the communication type of CAN2 of product 1, so that the baud rate and the communication type of CAN2 of the test device are the same as those of CAN2 of product 1, and the two can normally communicate.

[0143] The above embodiment introduces the case where the test device does not store the reference communication parameter. In another implementation of the present application, when it is determined that the reference communication parameter is stored, the communication parameter of the second communication module in the test device is set to the target communication parameter of the first communication module connected with the second communication module, which can include:

[0144] The communication parameter of the second communication module in the test device is set to the corresponding communication parameter value in the reference communication parameter, and a first test packet is sent to the device under test by each second communication module. If the target communication parameter of the first communication module is different from the reference communication parameter in the received first feedback packet, the communication parameter of the second communication module in the test device is set to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0145] Specifically, in actual application, there can be a domain controller of the same type between the current device under test and the next device under test, and thus the corresponding target communication parameters are the same. Therefore, if the reference communication parameter is stored in the EEPROM, the reference communication parameter can be used to perform communication test preferentially.

[0146] like Figure 7 As shown, after the AutoCanT module starts up, it retrieves the stored reference communication parameters from the EEPROM and then executes the parameter setting step. When setting the parameters, the communication parameters of the second communication module in the test device are set to the corresponding communication parameter values ​​in the reference communication parameters. For example, the baud rate and communication type of CAN1 in the test device are set to the first first communication module in the reference communication parameters, such as the baud rate and communication type of CAN1. The baud rate and communication type of CAN2 in the test device are set to the second first communication module in the reference communication parameters, such as the baud rate and communication type of CAN2.

[0147] Then, the first test messages, such as Message1 and Message2, are periodically sent through each of the second communication modules. If the first feedback message is received from the device under test, it means that at least one of the second communication modules of the device under test has the same baud rate as the corresponding first communication module of the test device. At this time, the first feedback message from the device under test includes the target communication parameters of each of the first communication modules of the device under test. If the target communication parameters of each of the first communication modules of the device under test are consistent with the reference communication parameters, it means that all Messages have been successfully sent. At this time, the device under test is the same type of domain controller as the device under test in the previous test. The baud rate and communication type of each of the currently set second communication modules are correct. At this time, there is no need to re-negotiate. The test results of each first communication channel are determined directly based on Message3 fed back by CAN1 and Message4 fed back by CAN2 of the device under test.

[0148] In this embodiment, since reference communication parameters are pre-stored, if multiple domain controllers of the same type are tested consecutively in a single test, redundant operations of multiple auto-negotiations can be avoided, simplifying the test process and improving test efficiency.

[0149] If the target communication parameters of the first communication module in the received first feedback message are different from the reference communication parameters, then the communication parameters of the second communication module in the test device are set to the target communication parameters of the first communication module that have the same serial number as the second communication module.

[0150] In this embodiment, as Figure 8As shown, if the target communication parameters of the first communication module in the first feedback message received by the test device are different from the reference communication parameters, it means that the communication parameters of some second communication modules are the same as the target communication parameters of the corresponding first communication module, so that the first communication module can normally receive the first communication message and feedback the first feedback message, but the communication parameters of some second communication modules are different from the target communication parameters of the corresponding first communication module. For example, when product 1 is replaced by product 2, because the CAN1 types of product 1 and product 2 are the same, and the CAN2 types of product 1 and product 2 are different, the test device can normally communicate with the CAN1 channel of product 2, but cannot normally communicate with the CAN2 channel, and thus the first feedback message received by the test device may have the target communication parameters of the first communication module different from the reference communication parameters, in which case the parameters need to be re-set, and the specific parameter setting process is as described above. After the parameter setting is completed, the test device sends Message1 and Message2 for testing.

[0151] In another implementation of the present application, after sending the first test message to the test device by each second communication module, the method further comprises:

[0152] If the first feedback message corresponding to the first test message sent by the test device is not received, a self-negotiation operation is performed with the test device to obtain the target communication parameters of each first communication module of the test device, and the communication parameters of the second communication module in the test device are set to the target communication parameters of the first communication module with the same serial number as the second communication module.

[0153] After the AutoCanT module is automatically started, the reference communication parameters stored in the EEPROM are obtained for parameter setting, and subsequently the first test message such as Message1 and Message2 is periodically sent by each second communication module. If the first feedback message corresponding to the first test message sent by the test device is not received, it means that the communication parameters of each second communication module are different from those of the corresponding first communication module, in which case the self-negotiation operation described above can be performed to obtain the target communication parameters of each first communication module of the test device, and corresponding parameter setting is performed. After the parameter setting is completed, corresponding testing operation is performed.

[0154] In the present embodiment, the processing flow in the case of successful or unsuccessful communication connection is given, and thus appropriate processing flow is selected for parameter setting operation according to requirements.

[0155] On the basis of any of the above embodiments, in another implementation of the present application, a specific implementation of sending a test message by each second communication module to the corresponding first communication module of the measured device to obtain the communication test result of each first communication module of the measured device is given, as shown in Figure 9 may include the following steps:

[0156] S31, generating a second test message.

[0157] Specifically, the corresponding second test message can be generated according to the communication configuration between the measured device and the test device, and the second test message can be Message1 and Message2 as the first test message.

[0158] S32, sending the second test message by each second communication module to the corresponding first communication module of the measured device.

[0159] Specifically, since each first communication module of the measured device needs to be tested, the second test message needs to be sent to the corresponding first communication module through each second communication module.

[0160] S33, receiving the second feedback message fed back by each first communication module of the measured device.

[0161] Specifically, after receiving the second test message, the first communication module can be reported to the AutoCanP module, the AutoCanP module obtains the target communication parameters of each first communication module, and then encapsulates to obtain the second feedback message, the second feedback message includes the target communication parameters of each first communication module,

[0162] The AutoCanP module sends the second feedback message to the second communication module through each second communication module. The second feedback message can be Message3 and Message4 as the first feedback message.

[0163] S34, determining that the communication test result of the first communication module corresponding to the second feedback message with preset content is test passed.

[0164] Wherein, the preset content is the target communication parameter of each first communication module of the measured device, if the content of the second feedback message received by the second communication module is the target communication parameter of each first communication module of the measured device, it means that the first communication module transmitting the second feedback message can communicate normally, and its communication test result is test passed.

[0165] S35, determining that the communication test result of the first communication module corresponding to the second feedback message with content not being the preset content is test failed.

[0166] If the content of the second feedback message received by the second communication module is not the target communication parameter of each first communication module of the device under test, since the second feedback message generated by the AutoCanP module includes the target communication parameter of each first communication module, it indicates that the first communication module that transmits the second feedback message causes message errors in the process of transmitting the message, i.e., the first communication module cannot normally communicate, and at this time, the communication test result of the first communication module is that the test fails.

[0167] In this embodiment, the preset content is pre-configured, and then the communication test result of the first communication module can be determined according to the feedback message of the actual test.

[0168] On the basis of the embodiment of the communication test method, another embodiment of the present application provides a communication test device, characterized in that it is applied to a test device, each first communication module of a device under test is connected to a corresponding second communication module of the test device one by one.

[0169] Reference Figure 10 , the communication test device comprises:

[0170] The parameter setting module 11 is configured to set the communication parameter of the second communication module in the test device as the target communication parameter of the first communication module connected to the second communication module.

[0171] The test module 12 is configured to send a test message to the corresponding first communication module of the device under test by using each second communication module, so as to obtain the communication test result of each first communication module of the device under test.

[0172] In an implementation manner, the parameter setting module 11 comprises:

[0173] The self-negotiation sub-module is configured to perform a communication self-negotiation operation with the device under test in the case where it is determined that the reference communication parameter is not stored, so as to obtain the target communication parameter of each first communication module of the device under test.

[0174] The parameter setting sub-module is configured to set the communication parameter of the second communication module in the test device as the target communication parameter of the first communication module with the same serial number as the second communication module.

[0175] In an implementation manner, the self-negotiation sub-module comprises:

[0176] The first message sending unit is configured to send a first communication message with a set baud rate by using each second communication module; the set baud rate is initially a first baud rate.

[0177] The parameter acquisition unit is configured to acquire target communication parameters of each first communication module of the DUT in a second communication message fed back by the DUT in response to the first communication message if the second communication message is received.

[0178] The baud rate setting unit is configured to set the set baud rate as a second baud rate if the second communication message fed back by the DUT in response to the first communication message is not received for a continuous specified number of times.

[0179] The first message sending unit is further configured to perform the step of sending the first communication message with the set baud rate as the set baud rate after the baud rate setting unit sets the set baud rate as the second baud rate, and sequentially perform until the target communication parameters of each first communication module of the DUT are obtained, or stop when the set baud rate is the nth baud rate and the second communication message fed back by the DUT in response to the first communication message is not received for a continuous specified number of times, wherein n is a preset positive integer.

[0180] In an implementation manner, the parameter setting module further comprises:

[0181] The storage sub-module is configured to store reference communication parameters; the reference communication parameters comprise the target communication parameters of each first communication module of the DUT.

[0182] In an implementation manner, the parameter setting sub-module comprises:

[0183] The first setting unit is configured to set the baud rate of the second communication module in the test device as the baud rate in the target communication parameters of the first communication module with the same serial number as the second communication module;

[0184] The second setting unit is configured to set the communication type of the second communication module in the test device as the communication type in the target communication parameters of the first communication module with the same serial number as the second communication module.

[0185] In an implementation manner, the parameter setting module 11 comprises:

[0186] The first parameter configuration sub-module is configured to set the communication parameters of the second communication module in the test device as the corresponding communication parameter values in the reference communication parameters if it is judged that the reference communication parameters are stored.

[0187] The test message sending sub-module is configured to send a first test message to the DUT by each second communication module.

[0188] The second parameter configuration sub-module is configured to, if the target communication parameter of the first communication module in the received first feedback message is different from the reference communication parameter, set the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0189] In an implementation, the parameter setting module 11 comprises:

[0190] The parameter determination sub-module is configured to, if the first feedback message corresponding to the first test message sent by the DUT is not received, perform a communication self-negotiation operation with the DUT to obtain the target communication parameter of each first communication module of the DUT.

[0191] The parameter setting sub-module is further configured to, after the parameter determination sub-module obtains the target communication parameter of each first communication module of the DUT, set the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

[0192] In an implementation, the test module 12 comprises:

[0193] The message generation sub-module is configured to generate a second test message.

[0194] The data sending sub-module is configured to send the second test message to the corresponding first communication module of the DUT by using each second communication module.

[0195] The message receiving sub-module is configured to receive a second feedback message fed back by each first communication module of the DUT.

[0196] The result determination sub-module is configured to determine that the communication test result of the first communication module corresponding to the second feedback message with the preset content is test passed, and determine that the communication test result of the first communication module corresponding to the second feedback message without the preset content is test failed.

[0197] In the embodiment, each first communication module of the device under test is connected with a corresponding second communication module of the test device one by one, the communication parameter of the second communication module in the test device is set as the target communication parameter of the first communication module connected with the second communication module, the second communication module is used to send a test packet to the corresponding first communication module of the device under test, and the communication test result of each first communication module of the device under test is obtained, so that the test of the device under test is realized. In addition, in the application, the test device can set the communication parameter of the second communication module according to the target communication parameter of the first communication module of the device under test, so as to match the communication mode of the device under test, so that the test device can realize the corresponding communication test operation when connected with any device under test, and the versatility of the test device in communication test is improved.

[0198] It should be noted that the working processes of the modules, sub-modules and units in the embodiment are described above, and will not be described here.

[0199] Another embodiment of the application provides a communication test system, comprising a device under test and a test device used for executing the above communication test method.

[0200] After receiving the test packet sent by the test device, the device under test sends a feedback packet to the test device, so that the test device obtains the communication test result of each first communication module of the device under test by using the feedback packet.

[0201] In the embodiment, the connection relationship between the test device and the device under test can be referred to as shown in Figure 2 , 5

[0202] In the embodiment, the application further provides a computer program product comprising computer readable instructions, which, when executed on an electronic device, enable the electronic device to implement any of the communication test methods provided in the embodiments of the application.

[0203] In the embodiment, the application further provides a computer readable storage medium, which carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement any of the communication test methods provided in the embodiments of the application.

[0204] ​The foregoing description of the disclosed embodiments enables a person skilled in the art to make or use the application. Modifications of these embodiments will occur to persons of skill in the art, and that the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of communication testing, characterized by, The application is applied to a test device, and each first communication module of a measured device is connected with a corresponding second communication module of the test device one by one. The communication test method comprises: Setting the communication parameters of the second communication module in the test device as target communication parameters of the first communication module connected with the second communication module; Sending a test message by each second communication module to the corresponding first communication module of the measured device to obtain the communication test result of each first communication module of the measured device.

2. The communication test method of claim 1, wherein, Setting the communication parameters of the second communication module in the test device as target communication parameters of the first communication module connected with the second communication module, comprising: If it is judged that the reference communication parameters are not stored, performing a communication self-negotiation operation with the measured device to obtain the target communication parameters of each first communication module of the measured device; Setting the communication parameters of the second communication module in the test device as target communication parameters of the first communication module with the same serial number as the second communication module.

3. The communication test method of claim 2, wherein, The communication self-negotiation operation with the measured device to obtain the target communication parameters of each first communication module of the measured device, comprising: Sending a first communication message with a set baud rate by each second communication module; the set baud rate is initially a first baud rate; If a second communication message fed back by the measured device for the first communication message is received, the target communication parameters of each first communication module of the measured device in the second communication message are obtained; If the second communication message fed back by the measured device for the first communication message is not received for a continuous specified number of times, the set baud rate is set as a second baud rate, and the step of sending a first communication message with a set baud rate is returned to be executed in sequence until the target communication parameters of each first communication module of the measured device are obtained, or the process is stopped when the set baud rate is an nth baud rate and the second communication message fed back by the measured device for the first communication message is not received for a continuous specified number of times, wherein n is a preset positive integer.

4. The communication test method of claim 2, wherein, After the target communication parameters of each first communication module of the measured device are obtained, the method further comprises: Storing reference communication parameters; the reference communication parameters comprise the target communication parameters of each first communication module of the measured device.

5. The communication test method of claim 2, wherein, Setting the communication parameters of the second communication module in the test device as target communication parameters of the first communication module with the same serial number as the second communication module, comprising: Setting the baud rate of the second communication module in the test device as the baud rate in the target communication parameters of the first communication module with the same serial number as the second communication module; Setting the communication type of the second communication module in the test device as the communication type in the target communication parameters of the first communication module with the same serial number as the second communication module.

6. The method of claim 1-5, wherein, setting a communication parameter of the second communication module in the test device to a target communication parameter of the first communication module connected to the second communication module, comprising: setting the communication parameter of the second communication module in the test device to a corresponding communication parameter value in the reference communication parameter when it is determined that the reference communication parameter is stored; sending a first test packet to the device under test by each of the second communication modules; setting the communication parameter of the second communication module in the test device to a target communication parameter of the first communication module with the same serial number as the second communication module if the target communication parameter of the first communication module in the received first feedback packet is different from the reference communication parameter.

7. The communication test method of claim 6, wherein, after sending the first test packet to the device under test by each of the second communication modules, further comprising: performing a communication self-negotiation operation with the device under test to obtain a target communication parameter of each of the first communication modules of the device under test if the first feedback packet corresponding to the first test packet sent by the device under test is not received; setting the communication parameter of the second communication module in the test device to the target communication parameter of the first communication module with the same serial number as the second communication module.

8. The communication test method of claim 1, wherein, sending a test packet to the corresponding first communication module of the device under test by each of the second communication modules to obtain a communication test result of each of the first communication modules of the device under test, comprising: generating a second test packet; sending the second test packet to the corresponding first communication module of the device under test by each of the second communication modules; receiving a second feedback packet fed back by each of the first communication modules of the device under test; determining that a communication test result of the first communication module corresponding to the second feedback packet with preset content is test passed; determining that a communication test result of the first communication module corresponding to the second feedback packet without preset content is test failed.

9. A communications test apparatus, characterized by, application to a test device, each of the first communication modules of a device under test is connected to a corresponding second communication module of the test device one by one; the communication test device comprises: a parameter setting module, which sets a communication parameter of the second communication module in the test device to a target communication parameter of the first communication module connected to the second communication module; a test module, which sends a test packet to the corresponding first communication module of the device under test by each of the second communication modules to obtain a communication test result of each of the first communication modules of the device under test.

10. A communication test system, characterized by, comprising a device under test and a test device for performing the communication test method according to any one of claims 1-8; after receiving the test packet sent by the test device, the device under test sends a feedback packet to the test device, so that the test device obtains a communication test result of each of the first communication modules of the device under test by using the feedback packet.