Charging test method and system
By replacing DC power supply with power supply equipment, the fast charging protocol testing method is simplified, the problems of complexity and high cost of testing logic in the prior art are solved, and efficient and accurate charging testing is achieved.
Patent Information
- Application Number
- CN202410266115.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-05
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2044-03-05
AI Technical Summary
The existing fast charging protocol testing method requires additional DC power supply, resulting in high logic complexity, high cost and poor portability of the test device, and it is difficult to ensure the accuracy and smooth progress of the test results.
Power supply equipment is used to replace DC power supply, and the charging protocols of charging equipment and power supply equipment are tested, simplifying the control logic of the test device, and using power supply equipment to provide the charging voltage required for testing, reducing the overall volume and cost of the test system.
The control logic of the test device is realized, the testing cost and development difficulty are reduced, the portability and accuracy of the test system are improved, and the compliance of the charging device's response to the charging voltage is ensured.
Smart Images

Figure CN119246983A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing technology, and in particular to a charging testing method and system. Background Art
[0002] In order to improve the charging speed and efficiency of electronic devices (such as mobile phones, tablets, etc.), the electronic devices and power supply devices used to charge the electronic devices (such as chargers, power banks, etc.) can support the same fast charging protocol to achieve fast charging through the fast charging protocol.
[0003] During the production and manufacturing process of electronic devices and power supply equipment that support the fast charging protocol, it is necessary to test the safety performance, charging performance, etc. of the fast charging protocol supported by the electronic devices and power supply equipment to ensure the safety and stability of the electronic devices and power supply equipment. Summary of the invention
[0004] In order to solve the above problems, the present application provides a charging test method and system, which can realize charging test.
[0005] In order to achieve the above objectives, in a first aspect, the present application provides a charging test method for testing the charging function of an electronic device, the method comprising: a testing device obtains a first message sent by a first device, the first message being used for charging negotiation between the first device and a second device; the testing device modifies the content of the first message to obtain a second message; the testing device sends the second message to the second device; wherein the first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device, and the power supply device is used to charge the charging device.
[0006] In the embodiments provided in the present application, the charging test method can be applied to a separate test of a charging device, or a separate test of a power supply device, and can also be used for a joint test of a charging device and a power supply device. During these tests, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive the charging voltage specified by the test requirements to replace the DC power supply in the traditional test process. At this time, the test device does not need to develop a module for communicating with the DC power supply, thereby effectively simplifying the control logic of the test device. In addition, since the response of the power supply device is based on the charging protocol, the use of the power supply device to provide the charging voltage can also facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device. In addition, compared with the DC power supply, the power supply device is smaller in size and lower in cost. Using the power supply device instead of the DC power supply can also reduce the overall volume of the test system, improve the portability of the test system, and reduce the test cost.
[0007] In an optional implementation, the first message is a negotiation request message sent by the first device to the second device, and the first message includes charging parameters; the test device modifies the content of the first message to obtain the second message, including: the test device modifies the charging parameters in the first message to obtain the second message. In this way, the charging test method can be applied to the test process that requires specifying the power supply parameters.
[0008] In an optional implementation, the first device is a charging device, the second device is a power supply device, and the charging parameters include a first charging voltage; the test device modifies the charging parameters in the first message to obtain the second message, including: the test device modifies the first charging voltage in the first message to a second charging voltage to obtain the second message. In this way, the test device can disguise the charging device and request the power supply device to provide the voltage required for the test, so as to facilitate the test of the charging device at the specified voltage.
[0009] In an optional implementation, the power supply device outputs a second charging voltage to the charging device based on the second message; the testing device determines whether the response of the charging device to the second charging voltage meets expectations. In this way, the testing device can confirm the response of the charging device to the charging voltage required by the test, so as to facilitate the test.
[0010] In an optional implementation, the first device is a power supply device, the second device is a charging device, the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; the test device modifies the content of the first message to obtain the second message, including: the test device modifies the response type of the negotiation response message to obtain the second message. In this way, the charging test method can be applied to the test process that requires specifying the negotiation response message.
[0011] In an optional implementation, the response type of the negotiation response message includes negotiation approval or negotiation rejection; the test device modifies the response type of the negotiation response message to obtain a second message, including: the test device modifies the response type of the negotiation response message from negotiation approval to negotiation rejection, or the test device modifies the response type of the negotiation response message from negotiation rejection to negotiation approval. In this way, the test device can disguise itself as a power supply device and modify the negotiation response message sent by the power supply device to the charging device according to the test needs, so as to facilitate the testing of the charging device.
[0012] In an optional implementation, after the test device sends the second message to the second device, the test device further includes: determining whether the charging device's response to the second message is as expected. In this way, the test device can confirm the charging device's response to the second message required by the test, so as to facilitate the test.
[0013] In an optional implementation, the testing device determines whether the response of the charging device to the second message meets expectations, including: if the charging device generates a target response to the second message, the testing device determines that the response of the charging device to the second message meets expectations, wherein the target response is a response that meets the target charging protocol; if the charging device does not generate a target response to the second message, the testing device determines that the response of the charging device to the second message does not meet expectations. In this way, the testing device can confirm whether the response of the charging device to the second message meets expectations.
[0014] In an optional implementation, the testing device determines whether the response of the charging device to the second charging voltage meets expectations, including: if the charging device generates a target response to the second charging voltage, the testing device determines that the response of the charging device to the second charging voltage meets expectations, wherein the target response is a response that meets the target charging protocol; if the charging device does not generate a target response to the second charging voltage, the testing device determines that the response of the charging device to the second charging voltage does not meet expectations. In this way, the testing device can confirm whether the response of the charging device to the second charging voltage meets expectations.
[0015] In an optional embodiment, the power supply device includes: any one of a power adapter of an electronic device, a mobile power supply, a charging pile, a charging station, and a switch with a charging function. In this way, the charging test method can be widely applied to various power supply devices, thereby improving the practicality of the charging test method.
[0016] In order to achieve the above-mentioned purpose, in a second aspect, the present application provides a charging test system, which includes: a testing device; a first device, the first device is electrically connected to the testing device; a second device, the second device is electrically connected to the testing device; a power supply path is electrically connected to the first device and the second device; the testing device is configured to obtain a first message sent by the first device, the first message is used for charging negotiation between the first device and the second device; modify the content of the first message to obtain a second message; and send the second message to the second device; wherein the first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device, and the power supply device is used to charge the charging device.
[0017] In the embodiments provided in the present application, the charging test system can be applied to a separate test of the charging device, or a separate test of the power supply device, and can also be used for the joint test of the charging device and the power supply device. During these tests, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive the charging voltage specified by the test requirements to replace the DC power supply in the traditional test process. At this time, the test device does not need to develop a module for communicating with the DC power supply, so that the control logic of the test device can be effectively simplified. In addition, since the response of the power supply device is based on the charging protocol, the power supply device provides the charging voltage, which can also facilitate the control of the response time required by the charging protocol, and further reduce the complexity of the control logic of the test device. In addition, compared with the DC power supply, the power supply device is smaller in size and lower in cost. Using the power supply device instead of the DC power supply can also reduce the overall volume of the test system, improve the portability of the test system and reduce the test cost.
[0018] In an optional implementation, the test device includes a main control module and a transmission module; the transmission module includes a protocol parsing module and a protocol camouflage module; the main control module is configured to control the protocol parsing module to obtain a first message sent by a first device; the protocol parsing module is configured to obtain and parse the content of the first message, and send the content of the first message to the main control module; the main control module is configured to send the content of the first message to the protocol camouflage module, and control the protocol camouflage module to modify the content of the first message; the protocol camouflage module is configured to receive and modify the content of the first message to obtain a second message, and send the second message to a second device. In this way, the protocol parsing module can be used to receive the first message and parse the content of the first message, and the protocol camouflage module can also be used to modify the first message to obtain a second message, and send the second message to a second device. At the same time, the main control module can be used to control the protocol parsing module and the protocol camouflage module to control the test process.
[0019] In an optional implementation, the first message is a negotiation request message sent by the first device to the second device, and the first message includes charging parameters; the protocol camouflage module is configured to modify the charging parameters in the first message. In this way, the charging test system can be applied to a test process that requires specifying power supply parameters.
[0020] In an optional implementation, the first device is a charging device, the second device is a power supply device, and the charging parameters include a first charging voltage; the protocol camouflage module is configured to modify the first charging voltage in the first message to a second charging voltage to obtain a second message. In this way, the test device can camouflage the charging device and request the power supply device to provide the voltage required for the test, so as to facilitate the test of the charging device at the specified voltage.
[0021] In an optional implementation, the power supply device is configured to: output a second charging voltage to the charging device based on the second message; the main control module is configured to: determine whether the response of the charging device to the second charging voltage meets expectations. In this way, the test device can confirm the response of the charging device to the charging voltage required by the test, so as to facilitate the test.
[0022] In an optional implementation, the first device is a power supply device, the second device is a charging device, the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; the protocol camouflage module is configured to modify the response type of the negotiation response message to obtain the second message. In this way, the charging test method can be applied to the test process that requires specifying the negotiation response message.
[0023] In an optional implementation, the response type of the negotiation response message includes negotiation approval or negotiation rejection; the protocol camouflage module is configured to change the response type of the negotiation response message from negotiation approval to negotiation rejection, or change the response type of the negotiation response message from negotiation rejection to negotiation approval. In this way, the test device can disguise itself as a power supply device, and modify the negotiation response message sent by the power supply device to the charging device according to the test requirements, so as to facilitate the test of the charging device.
[0024] In an optional implementation, the main control module is configured to determine whether the response of the charging device to the second message is as expected. In this way, the testing device can confirm the response of the charging device to the second message required by the test, so as to facilitate the test.
[0025] In an optional implementation, if the charging device generates a target response to the second message, the main control module is configured to: determine that the charging device's response to the second message meets expectations, wherein the target response is a response that meets the target charging protocol; if the charging device does not generate a target response to the second message, the main control module is configured to: determine that the charging device's response to the second message does not meet expectations. In this way, the test device can confirm whether the charging device's response to the second message meets expectations.
[0026] In an optional implementation, if the charging device generates a target response to the second charging voltage, the main control module is configured to: determine that the response of the charging device to the second charging voltage meets expectations, wherein the target response is a response that meets the target charging protocol; if the charging device does not generate a target response to the second charging voltage, the main control module is configured to: determine that the response of the charging device to the second charging voltage does not meet expectations. In this way, the test device can confirm whether the response of the charging device to the second charging voltage meets expectations.
[0027] In an optional implementation, the power supply device includes: any one of a power adapter of an electronic device, a mobile power supply, a charging pile, a charging station, and a switch with a charging function. In this way, the charging test method can be widely applied to various power supply devices, thereby improving the practicality of the charging test method.
[0028] In an optional embodiment, the first device is a charging device, the second device is a power supply device, and when both the charging device and the power supply device support a fusion fast charging standard or a super charging protocol, the switch module includes a first switch, a second switch, a third switch, and a fourth switch; the first switch is electrically connected to the D-end of the charging device and the D-end of the power supply device, and the first switch is configured to control the on / off communication between the D-end of the charging device and the D-end of the power supply device; the second switch is electrically connected to the D+ end of the charging device and the D+ end of the power supply device, and the second switch is configured to control the on / off communication between the D+ end of the charging device and the D+ end of the power supply device; one end of the third switch is electrically connected between the D-end of the power supply device and the first switch, and the other end of the third switch is electrically connected to the D-end of the power supply device and the first switch. The third switch is electrically connected to the protocol camouflage module, and is configured to control the on-off of the communication between the D- terminal of the power supply device and the protocol camouflage module; when both the charging device and the power supply device support the fusion fast charging standard, one end of the fourth switch is electrically connected between the D+ terminal of the charging device and the second switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the on-off of the communication between the D+ terminal of the charging device and the protocol camouflage module; when both the charging device and the power supply device support the super charging protocol, one end of the fourth switch is electrically connected between the D- terminal of the charging device and the first switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the on-off of the communication between the D- terminal of the charging device and the protocol camouflage module. In this way, each switch can be used to control the on-off of each communication path, so as to switch the test state of the test device. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0030] Figure 1 This is a fast charging protocol test architecture diagram of an electronic device provided in this embodiment;
[0031] Figure 2 This is a fast charging protocol joint debugging test architecture diagram of an electronic device and a charger provided in this embodiment;
[0032] Figure 3 is a flow chart of a first charging test method provided in this embodiment;
[0033] Figure 4 is a flow chart of a second charging test method provided in this embodiment;
[0034] Figure 5 This is a flow chart of the interaction between the first charging device and the power supply device provided in this embodiment;
[0035] Figure 6 is a partial flow chart of the second charging test method provided in this embodiment;
[0036] Figure 7 is a flow chart of a third charging test method provided in this embodiment;
[0037] Figure 8 is a flow chart of interaction between a second charging device and a power supply device provided in this embodiment;
[0038] Fig. 9 is a structural block diagram of a first charging test system provided in this embodiment;
[0039] Fig.10 is a structural block diagram of a second charging test system provided in this embodiment;
[0040] Fig.11 is a structural block diagram of a third charging test system provided in this embodiment;
[0041] Fig.12 is a structural block diagram of a fourth charging test system provided in this embodiment;
[0042] Fig.13 It is a structural block diagram of the fifth charging test system provided in this embodiment. DETAILED DESCRIPTION
[0043] The technical solutions in the embodiments of the present application will be described clearly below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments of the present application, other embodiments obtained by ordinary technicians in this field without making creative work all belong to the protection scope of the present application.
[0044] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.
[0045] In addition, in the present application, directional terms such as "upper", "lower", "inner" and "outer" are defined relative to the orientation of the components schematically placed in the drawings. It should be understood that these directional terms are relative concepts. They are used for relative description and clarification, and they can change accordingly according to the changes in the orientation of the components placed in the drawings.
[0046] The fast charging protocol is used for communication and collaboration between electronic devices and chargers to achieve faster charging speeds and higher charging efficiency, thereby improving the user's charging experience. In addition, the fast charging protocol can also ensure the safety of electronic devices and chargers during the charging process, thereby avoiding overheating, overloading and other potential safety issues.
[0047] At present, the existing fast charging protocols include quick charge (QC) protocol, power delivery (PD) protocol, universal fast charging specification (UFCS), super charge protocol (SCP), etc. Among them, in order to achieve fast charging, the fast charging protocol supported by the electronic device and the charger should be the same.
[0048] During the manufacturing process of electronic devices and chargers, the fast charging protocols supported by electronic devices and chargers can be tested. The main purposes of fast charging protocol testing can include:
[0049] Compatibility test: The fast charging protocol test can verify the compatibility between electronic devices and chargers, thereby confirming that the electronic devices and chargers can communicate and collaborate correctly to prevent charging failure or low charging efficiency due to mismatch between different devices.
[0050] Performance testing: The fast charging protocol test can evaluate the charging speed and efficiency of electronic devices in fast charging mode to help manufacturers determine the fast charging capabilities of the electronic devices or chargers they produce.
[0051] Safety testing: The fast charging protocol test can also consider the safety performance during the fast charging process, so as to ensure that electronic devices and chargers will not have safety problems such as overheating, overload, and voltage abnormalities during the fast charging process, so as to protect the safety of electronic devices and users.
[0052] It is worth noting that the purpose of the fast charging protocol test may include but is not limited to the above purposes, which will not be repeated here.
[0053] Generally speaking, fast charging protocol testing of electronic devices and chargers can include fast charging protocol testing of the electronic device itself, fast charging protocol testing of the charger itself, and fast charging protocol joint debugging testing of the electronic device and the charger.
[0054] Figure 1 This is a fast charging protocol test architecture diagram of an electronic device provided in this embodiment.
[0055] like Figure 1 As shown, when performing a fast charging protocol test on an electronic device itself, the test device can be connected to the electronic device, and a DC power supply can be connected to the test device at the same time. In this way, the test device can draw power from the DC power supply to provide the required voltage for the electronic device.
[0056] The test equipment can interact with the electronic device. For example, the electronic device sends a power request to the test equipment according to the fast charging protocol it supports, and the test equipment interacts with the DC power supply according to the power supply request of the electronic device, so that the voltage output by the DC power supply can meet the test requirements, so as to successfully complete the test process.
[0057] Figure 2 This is a fast charging protocol joint debugging test architecture diagram of an electronic device and a charger provided in this embodiment.
[0058] like Figure 2 As shown, when performing a joint test of the fast charging protocol test on the electronic device and the charger, the electronic device and the charger can be connected to the test device respectively, and the DC power supply can be connected to the test device at the same time, so that the test device can draw power from the DC power supply to provide the required voltage for the electronic device. Among them, both the electronic device and the charger can interact with the test device, and the test device can also interact with the DC power supply to adjust the voltage output by the DC power supply to the electronic device according to the request of the electronic device, so that the voltage output by the DC power supply can meet the test requirements to successfully complete the test process.
[0059] Depend on Figure 1 and Figure 2 It can be seen that during the test of the electronic device's own fast charging protocol, as well as during the joint test of the electronic device and the charger, an additional DC power supply needs to be set up to power the electronic device. During the test, the voltage provided by the DC power supply to the electronic device needs to change according to the test requirements. At this time, the test equipment needs to develop an additional program or control logic that meets the DC power supply interaction protocol to achieve interaction with the DC power supply to adjust the output voltage of the DC power supply.
[0060] It can be seen that the test equipment not only needs to support the fast charging protocol of electronic devices and chargers, but also needs to support the interactive protocol of DC power supply, which makes the logical control of the test equipment more complex and difficult to develop. At the same time, the response time of the test equipment interacting with the DC power supply will also affect the test process of the fast charging protocol, making it difficult to ensure the smooth progress of the test and the accuracy of the test results.
[0061] In addition, the overall volume of the DC power supply used for testing is usually large and difficult to move, resulting in the fast charging protocol test can only be carried out in a fixed position, which is difficult to operate and has poor portability. At the same time, the procurement cost of the DC power supply is high, which leads to increased testing costs.
[0062] In order to solve the above problems, the present application provides a charging test method and system, which can realize charging test and also realize miniaturized design of the test system, reduce test costs and reduce the difficulty of developing the test device.
[0063] Figure 3 This is a flow chart of the first charging test method provided in this embodiment.
[0064] like Figure 3 As shown, an embodiment of the present application provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of an electronic device. The method includes:
[0065] Step S110: the testing apparatus monitors the interaction between the first device and the second device.
[0066] The first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device. The charging device is a device to be charged, and the power supply device is a device that provides power. The power supply device is used to charge the charging device. During the charging protocol test, the charging device can also be called the load end of the charging protocol, and the power supply device can also be called the source end of the charging protocol.
[0067] Exemplarily, the charging device can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device, and other electronic devices. The embodiments of the present application do not impose any special restrictions on the specific type of the charging device.
[0068] The power supply device can be a power adapter, a mobile power supply, a charger, a power bank, a charging switch, a charging pile, a charging station, etc., which can provide power to the charging device and charge it. The embodiment of the present application does not impose any special restrictions on the specific type of the power supply device.
[0069] When the power supply device is a charger, the charger can be a standard charger for the charging device or a non-standard charger for the charging device. In other words, in some test processes, the charging protocol supported by the charger can be different from the charging protocol supported by the charging device, as long as the voltage and current levels output by the charger can meet the test requirements and the test device can communicate with the charger.
[0070] In the charging test method provided in this embodiment, the power supply device is used to provide the charging voltage required for the test to the charging device during the charging test, thereby being able to replace the function of the DC power supply. In this way, it can help reduce the complexity of the logic development of the test device. At the same time, compared with the DC power supply, the overall volume and cost of the power supply device are lower than the volume and cost of the DC power supply. In this way, using the power supply device instead of the DC power supply for power supply during the test can also improve the convenience of operation of the test system and reduce the test cost.
[0071] Optionally, the charging device and the power supply device may both support fast charging protocols, such as QC protocol, PD protocol, UFCS protocol, SCP protocol, etc.
[0072] Among them, the charging device can support one or more fast charging protocols, and the power supply device can also support one or more fast charging protocols.
[0073] If both the charging device and the power supply device support a fast charging protocol, the charging device and the power supply device can support the same fast charging protocol. In this case, the charging device and the power supply device can interact directly.
[0074] If both the charging device and the power supply device support one fast charging protocol, the charging device and the power supply device may also support different fast charging protocols. In this case, the charging device and the power supply device can interact indirectly through the test device. The test device can support the fast charging protocols of the charging device and the power supply device at the same time.
[0075] If the charging device supports one fast charging protocol and the power supply device supports multiple fast charging protocols. When the multiple fast charging protocols supported by the power supply device include the fast charging protocol supported by the charging device, the charging device and the power supply device can interact directly through the fast charging protocol supported by the charging device. When the multiple fast charging protocols supported by the power supply device do not include the fast charging protocol supported by the charging device, the charging device and the power supply device can interact indirectly through a test device, wherein the test device can simultaneously support the fast charging protocols of the charging device and the power supply device.
[0076] If the power supply device supports one fast charging protocol, and the charging device supports multiple fast charging protocols. When the multiple fast charging protocols supported by the charging device include the fast charging protocol supported by the power supply device, the charging device and the power supply device can interact directly through the fast charging protocol supported by the power supply device. When the multiple fast charging protocols supported by the power supply device do not include the fast charging protocol supported by the charging device, the charging device and the power supply device can interact indirectly through a test device, wherein the test device can simultaneously support the fast charging protocols of the charging device and the power supply device.
[0077] If both the power supply device and the charging device support multiple fast charging protocols. When the multiple fast charging protocols supported by the charging device include one or more of the multiple fast charging protocols supported by the power supply device, the charging device and the power supply device can interact through the fast charging protocols supported by both. When the multiple fast charging protocols supported by the charging device do not include any of the fast charging protocols supported by the power supply device, the charging device and the power supply device can interact indirectly through a testing device, wherein the testing device can simultaneously support the fast charging protocols of the charging device and the power supply device.
[0078] Step S120: the testing apparatus obtains a first message sent by the first device.
[0079] The first message is used for charging negotiation between the first device and the second device. The first message may be a negotiation request message, a negotiation response message, a control message, or a data message.
[0080] Exemplarily, the negotiation request message may be used by the first device to detect whether the target device exists, request to detect whether the data transmission between the first device and the target device is normal, etc., and these two types of negotiation request messages may also be referred to as Ping messages.
[0081] Exemplarily, when the first device is a charging device and the second device is a power supply device, the negotiation request message may also be used to request the power supply device to output a certain voltage value and current value. Such a negotiation request message may also be referred to as a Request message.
[0082] Exemplarily, when the first device is a charging device and the second device is a power supply device, the negotiation request message may also be used to request to obtain the voltage and current output capabilities of the power supply device. Such a negotiation request message may also be referred to as a Get_Output_Capabilities message.
[0083] Exemplarily, when the first device is a charging device and the second device is a power supply device, the negotiation request message can also be used to request information about the current working status of the power supply device, including output voltage, output current, and internal temperature, etc. This negotiation request message can also be called a Get_Source_Info message.
[0084] Exemplarily, when the first device is a power supply device and the second device is a charging device, the negotiation request message can also be used to request information about the current working status of the charging device, including battery voltage, charging current, and internal temperature, etc. This negotiation request message can also be called a Get_Sink_Info message.
[0085] In some examples, the negotiation request message may include parameters related to the negotiation request. For example, when the first device is a charging device and the second device is a power supply device, the negotiation request message includes charging parameters to request the second device to charge the first device based on the charging parameters.
[0086] The negotiation response message may be a response message sent by the first device in response to the negotiation request message after the first device receives the negotiation request message, for example, after the first device receives the negotiation request message sent by the second device or the test apparatus.
[0087] Exemplarily, the negotiation response message may include at least two response types, such as negotiation approval and negotiation rejection.
[0088] In some examples, the negotiation response message indicating negotiation approval may be an ACK (acknowledgement) + Accept message, and the negotiation response message indicating negotiation rejection may be an ACK + Refuse message.
[0089] In addition, the negotiation response message may also include other types, such as negotiation confirmation or negotiation negative confirmation. Among them, the negotiation confirmation indicates that the message or data sent by the other party has been received, and the negotiation negative confirmation indicates that the message or data sent by the other party has been received, but the message or data is lost or erroneous, and the message or data needs to be resent. Among them, the negotiation confirmation message may also be called an ACK message, and the negotiation negative confirmation may also be called an NCK message.
[0090] In some examples, the negotiation response message may also include response parameters, which may include charging-related parameters such as voltage value, current value, power, impedance or time.
[0091] It is understandable that the content of the first message may be different in different tests, and the specific content of the first message may be selected according to the test purpose, which is not limited in this embodiment.
[0092] During the test, when the first device sends a first message, the testing apparatus needs to acquire and intercept the first message in order to complete subsequent testing.
[0093] Before the test device obtains the first message, if the first device and the second device are interacting directly, the test device needs to block the direct interaction between the first device and the second device when obtaining the first message, and make the first device and the second device interact indirectly through the test device. In this way, the second device can be prevented from receiving the first message.
[0094] Before the test device obtains the first message, if the first device and the second device interact indirectly through the test device, the test device will no longer forward the first message to the second device when obtaining the first message. In this way, the second device can be prevented from receiving the first message.
[0095] Step S130: The testing device modifies the content of the first message to obtain a second message.
[0096] For example, if the first message is a negotiation request message, the test device may modify the request content. For example, if the first message requests a 10V voltage, the test device modifies it to request a 15V voltage according to the test requirements.
[0097] Alternatively, if the first message is a negotiation response message, the test device may modify the response type. For example, if the response type of the first message is negotiation confirmation, the test device may modify it to negotiation rejection according to the test requirements.
[0098] Step S140: the testing apparatus sends the second message to the second device.
[0099] When the first message comes from the charging device, the testing apparatus can disguise itself as the charging device and send the modified second message to the power supply device, thereby meeting the testing requirements.
[0100] Alternatively, when the first message comes from the power supply device, the testing apparatus may disguise itself as the power supply device and send the modified second message to the charging device, thereby meeting the testing requirements.
[0101] In one example, when the second device is a power supply device, after step S140, the testing apparatus may directly confirm whether the response of the power supply device to the second message meets expectations.
[0102] Alternatively, when the second device is a power supply device, after step S140, the power supply device sends a third message to the charging device after receiving the second message. The testing device can send the third message to the charging device and confirm whether the charging device's response to the third message meets expectations.
[0103] In another example, when the second device is a charging device, after step S140, after the charging device receives the second message, the testing device can directly confirm whether the response of the charging device to the second message meets expectations.
[0104] Alternatively, when the second device is a charging device, after step S140, the charging device sends a third message to the power supply device after receiving the second message. The testing device can send the third message to the power supply device and confirm whether the power supply device's response to the third message meets expectations.
[0105] In the above description, the testing apparatus can modify the content of the first message according to the test requirements to obtain the second message, thereby testing whether the response of the second device to the second message meets expectations.
[0106] In addition, the test device can also modify the normal negotiation message between the first device and the second device into an abnormal negotiation message, so as to test whether the response of the first device or the second device to the abnormal negotiation message meets expectations. The normal negotiation message is the first message, the abnormal negotiation message is the second message, and the abnormal negotiation message is a message that is not generated based on the charging protocol regulations and can be used to simulate abnormal situations.
[0107] The charging test method provided in this application can be applied to a separate test of a charging device, or a separate test of a power supply device, and can also be used for a joint test of a charging device and a power supply device. In these tests, the power supply device can be used to provide the charging voltage required for the test to the charging device, so that the charging device can receive the charging voltage specified by the test requirements, thereby replacing the DC power supply in the traditional test process.
[0108] Compared with the DC power supply, the power supply equipment can adjust the output voltage according to the test requirements. At the same time, since the test device needs to test the charging device and the power supply equipment, the test device can at least support the communication protocol of the charging device and the power supply equipment. If the power supply equipment is used instead of the DC power supply to power the power supply equipment, then the test device does not need to develop an additional module for communicating with the DC power supply, which can effectively simplify the control logic of the test device. In addition, since the response of the power supply equipment is based on the charging protocol, using the power supply equipment to provide the charging voltage can also facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device.
[0109] In addition, compared with DC power supplies, power supply equipment is smaller in size and lower in cost. Using power supply equipment instead of DC power supplies can also reduce the overall size of the test system, improve the portability of the test system, and reduce testing costs.
[0110] Figure 4 is a flow chart of a second charging test method provided in this embodiment.
[0111] like Figure 4 As shown, an embodiment of the present application provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of an electronic device. The method includes:
[0112] Step S210: the testing device monitors the interaction between the charging device and the power supply device.
[0113] Among them, the charging device is the device being charged, such as a mobile phone, and the power supply device is the device that provides power, such as a mobile phone charger. During the charging protocol test, the charging device can also be called the load end of the charging protocol, and the power supply device can also be called the source end of the charging protocol.
[0114] The specific description thereof can refer to the description of the above step S110, which will not be repeated here.
[0115] Figure 5 This is a flowchart of the interaction between the first charging device and the power supply device provided in this embodiment.
[0116] Combination Figure 4 and Figure 5 As shown, exemplarily, in step S210, the interaction process between the charging device and the power supply device may include:
[0117] Step S211: The charging device and the power supply device perform a fast charging protocol handshake interaction.
[0118] When the charging device, the power supply device and the testing device are connected, the charging device can send a protocol handshake request to the power supply device, and the power supply device receives the protocol handshake request and replies with confirmation; or the power supply device can send a protocol handshake request to the charging device, and the power supply device receives the protocol handshake request and replies with confirmation.
[0119] In this way, the charging device and the power supply device can identify each other and confirm the communication rules agreed in the protocol through the protocol handshake request, so as to achieve effective data transmission and communication. It can be understood that the protocol handshake request can be issued by the charging device or the power supply device, and this solution does not limit it.
[0120] It is worth noting that the specific process of the protocol handshake interaction between the charging device and the power supply device can be performed according to the protocol rules they support, which is not limited in this embodiment.
[0121] Step S212: the charging device sends a negotiation request message to the power supply device to obtain the voltage and current capabilities of the power supply device.
[0122] After the charging device and the power supply device establish communication, the charging device can obtain the voltage and current capabilities of the power supply device from the power supply device, so that the charging device can subsequently request voltage from the power supply device according to the power supply capability of the power supply device. The power supply capability of the power supply device refers to the voltage, current range, and power supply capability that the power supply device can provide.
[0123] It is worth noting that the power supply capability of the power supply device may be stored in the power supply device, or may be automatically detected by the power supply device after receiving a request from the charging device. In the embodiment of the present application, there is no limitation on how to obtain the power supply capability of the power supply device.
[0124] Step S213: the power supply device sends a response message to the charging device to report the voltage and current capabilities of the power supply device.
[0125] After receiving the negotiation request message from the charging device, the power supply device can respond to the request of the charging device and report its own voltage and current capabilities to the charging device to facilitate the next step.
[0126] Step S214: the charging device and the power supply device enter voltage and current regulation management.
[0127] After the charging device and the power supply device have completed the above preparations, the charging device and the power supply device can enter the voltage and current regulation management state. In this way, it is easy to realize that in the subsequent charging process, the power supply device can dynamically adjust the voltage provided to the charging device according to the provisions of the fast charging protocol to achieve fast charging.
[0128] Step S215: the charging device performs path impedance detection.
[0129] In this embodiment, the path impedance is the impedance on the path from the output end of the power supply device to the input end of the charging device. The charging device can calculate the path impedance by obtaining the current source end voltage of the power supply device and detecting the voltage received by the charging device itself. Among them, the current source end voltage of the power supply device can be reported by the power supply device at the same time as reporting the power supply capacity to the charging device, or it can be re-acquired by the charging device later, which is not limited in the embodiment of the present application.
[0130] Step S216: The charging device determines an initial power supply request according to the power supply capability of the power supply device, the cable capability, and the charging device's own capability.
[0131] In this embodiment, the cable capacity can be obtained by the charging device identifying the electronic tag of the cable, or by calculating the path impedance. The electronic tag of the cable indicates the working capacity of the cable, such as the maximum current or maximum voltage that can be tolerated, the transmission capacity of the power source, and the data transmission capacity. At the same time, the electronic tag of the cable can be a chip.
[0132] The capability of the charging device itself is the voltage, current and power range that the charging device can receive, so that a reasonable initial power request can be calculated.
[0133] It is worth noting that, during the above-mentioned process from step S211 to step S216, the charging device and the power supply device may also perform other interactions, which are not limited in the embodiments of the present application.
[0134] Exemplarily, between step S213 and step S214, a customized authentication interaction between the charging device and the power supply device may also be performed. In this embodiment, the normal interaction process between the charging device and the power supply device is not limited.
[0135] Among them, the custom authentication is when the charging power specified by the fast charging protocol is greater than the set threshold of the charging device or power supply device. The set threshold can be customized by the manufacturer. At this time, the charging device must perform the manufacturer's custom authentication.
[0136] Step S220: the testing device obtains a first message sent by the charging device.
[0137] The first message is a negotiation request message, and the request content of the first message includes charging parameters. The charging parameters may include charging voltage value, charging current value, charging time, charging power and other parameters in the process of the power supply device charging the charging device.
[0138] Optionally, the first message mentioned above may be a Request message.
[0139] The charging device may request the power supply device to provide the first charging voltage based on the initial power supply request calculated in step S216, wherein the initial power supply request includes the first charging voltage. The charging device may request the power supply device to provide the first charging voltage so that the power supply device can provide a reasonable charging voltage for the charging device.
[0140] When the charging device sends a first message with a first charging voltage, the testing device can acquire and intercept the message according to the test requirements.
[0141] The acquisition and interception of the first message by the test device can refer to the description of step S120, which will not be repeated here.
[0142] Step S230: the testing device modifies the charging parameters in the first message to obtain a second message.
[0143] When the charging parameter is a first charging voltage, the testing device may modify the first charging voltage to a second charging voltage. And obtain a second message. The second message includes a second charging voltage. The second charging voltage in the second message is different from the first charging voltage in the first message. For example, the first charging voltage requested in the first message is 10V, and the second charging voltage requested in the second message is 15V. In other words, the testing device may increase or decrease the first charging voltage value requested in the first message according to the test requirements, so as to detect whether the power supply device or the charging device can correctly respond to the request of the second message obtained after the modification.
[0144] Step S240: the testing device sends the second message to the power supply equipment.
[0145] After receiving the second message, the testing device sends the second message to the power supply device, so that the power supply device can provide the charging device with the second charging voltage required by the test.
[0146] Step S250: the power supply device outputs a second charging voltage to the charging device based on the second message.
[0147] From the above description, it can be seen that at this time, the second charging voltage output by the power supply device to the charging device according to the second message is different from the first charging voltage requested by the charging device in the first message, thereby detecting whether the charging device will respond according to the charging protocol according to the test requirements.
[0148] Figure 6 It is a partial flow chart of the second charging test method provided in this embodiment.
[0149] Combination Figure 4 and Figure 6 As shown, in some embodiments, after the above step S240 and before step S250, the following steps are further included:
[0150] Step S241: the power supply device receives the second message and confirms whether the second charging voltage requested in the second message is within the output range.
[0151] Since the power supply capacity of the power supply device is limited, after receiving the second message, the power supply device first needs to confirm whether the second charging voltage and current requested in the second message are within the output range.
[0152] Step S242: When the second charging voltage requested in the second message is within the output range, the power supply device sends a negotiation response message to the charging device, and the response type is negotiation agreement.
[0153] Exemplarily, the negotiation response message with the response type of negotiation agreement may be an ACK+Accept message to inform the charging device that the requested charging parameters can be provided.
[0154] Among them, ACK (acknowledgement) means that the receiving party sends a confirmation message to the sending party to inform the sending party that the data packet has been successfully received.
[0155] After receiving a message sent to it, the power supply device, charging device and cable electronic tag first perform a cyclic redundancy check (CRC) on the message. If the CRC check passes, a confirmation message is sent back to the sender after a set delay.
[0156] Accept means that the receiving party sends an acceptance message to the sending party to inform the sending party that it can accept the sending party's request. The power supply device receives the negotiation request message of the charging device, agrees to the output voltage and current requested by the charging device, and then adjusts the output voltage and current to the output voltage and current requested by the charging device.
[0157] Step S243: When the second charging voltage requested in the second message is not within the output range, the power supply device sends a negotiation response message to the charging device, and the response type is negotiation rejection.
[0158] Exemplarily, the negotiation response message whose response type is negotiation rejection may be an ACK+Refuse message.
[0159] Here, Refuse means that the receiving party sends a rejection message to the sending party to inform the sending party that the sender's request cannot be accepted.
[0160] For power supply equipment, charging equipment or cable electronic tags, after receiving a message, if it cannot respond or execute the action requested by the message due to some reason (such as unrecognizable, unsupported, etc.), it should reply with a Refuse message to the other party, and include the message number, message type, command number, and reason for rejection of the message it rejected in the Refuse message.
[0161] When the test device intercepts the first message, it may adjust the communication mode between the charging device and the power supply device. If the communication between the charging device and the power supply device is indirect communication through the test device, the negotiation response message sent by the power supply device needs to be forwarded through the test device so that the charging device can normally receive the message from the power supply device.
[0162] After the above step S242 or S243, the following steps are performed:
[0163] Step S244: After receiving the negotiation response message, the charging device sends a negotiation confirmation message to the power supply device.
[0164] The negotiation confirmation (ACK) message sent by the charging device may be forwarded by the testing device.
[0165] The ACK message sent by the charging device is to confirm receipt of the negotiation agreement response message sent by the power supply device, so as to inform the power supply device that it can proceed to the next step.
[0166] Step S245: the power supply device receives the negotiation confirmation message, adjusts the output charging voltage to the second charging voltage requested by the second message, and then sends a negotiation response message to the charging device indicating that it is ready to supply power.
[0167] At this time, the power supply device confirms to the charging device that it is ready for charging and can start charging.
[0168] Step S246: the charging device receives the negotiation response message, and receives the second charging voltage provided by the power supply device.
[0169] After the charging device receives the negotiation response message indicating that the power supply device is ready to supply power (Power_Ready), the power switch can be turned on and the second charging voltage provided by the power supply device can be received, thereby realizing the charging process of the charging device by the power supply device.
[0170] It is worth noting that in the above-mentioned steps S241 to S246, the power supply device and the charging device can communicate directly or indirectly through the test device, which is not limited in this embodiment. At the same time, the above-mentioned steps S241 to S246 are examples of some interactive steps provided by the power supply device of this embodiment before formally providing the charging voltage to the charging device, and other steps may be included in other embodiments, which are not limited in this embodiment of the application.
[0171] Step S260: The testing device determines whether the response of the charging device to the second charging voltage is as expected.
[0172] If the charging device generates a target response to the second charging voltage, the testing device determines that the response of the charging device to the second charging voltage meets expectations, wherein the target response is a response that meets the target charging protocol.
[0173] For example, it is assumed that the target response set in the target charging protocol is that when the charging voltage received by the charging device is greater than the originally requested charging voltage, the charging device exits charging to improve the safety of the charging device and the power supply device. The target charging protocol is the charging protocol required by the test, or the charging protocol supported by the charging device.
[0174] At this time, the first charging voltage requested by the charging device is 10V, and the second charging voltage provided by the power supply device is 15V. It can be seen that the second charging voltage provided by the power supply device is greater than the first charging voltage initially requested by the charging device. According to the provisions of the target charging protocol, the charging device should exit the fast charging process here. If the charging device exits the fast charging process at this time, it means that the charging device generates a target response to the second charging voltage, then the test device can confirm that the response of the charging device meets expectations.
[0175] It is understandable that the target response of the above-mentioned target charging protocol and the response of the charging device are all examples. In the actual charging protocol and during the test process, the expected results may be different, which is not limited in the embodiments of the present application.
[0176] If the charging device does not produce the target response to the second charging voltage, the test device determines that the response of the charging device to the second charging voltage does not meet expectations. For example, according to the above description, if the charging device does not exit the fast charging process when receiving the 15V charging voltage and continues to fast charge, then the test device can confirm that the response of the charging device does not meet expectations.
[0177] In the first charging test method provided in the present application, the power supply device can provide the charging voltage required during the test for the charging device, so there is no need to set up an additional DC power supply. At this time, the test device only needs to support the interaction protocol between the power supply device and the charging device, so as to simplify the control logic of the test device. At the same time, the test device can intercept and modify the message sent by the charging device to the power supply device. For the power supply device, the test device can disguise itself as a charging device to meet the test requirements of the test process.
[0178] Figure 7 It is a flow chart of the third charging test method provided in this embodiment.
[0179] like Figure 7 As shown, the embodiment of the present application also provides a charging test method for testing the charging function of an electronic device, especially the fast charging function of an electronic device. The method includes:
[0180] Step S310: the testing device monitors the interaction between the charging device and the power supply device.
[0181] The charging device is a device that is charged, such as a mobile phone, and the power supply device is a device that provides power, such as a mobile phone charger.
[0182] The description of the charging device and the power supply device can refer to the description of the above step S210, which will not be repeated here.
[0183] Figure 8 This is a flow chart of the interaction between the second charging device and the power supply device provided in this embodiment.
[0184] Combination Figure 7 and Figure 8 As shown, exemplarily, in step S310, the interaction process between the charging device and the power supply device may include:
[0185] Step S311: The charging device and the power supply device perform a fast charging protocol handshake interaction.
[0186] Step S312: the charging device sends a negotiation request message to the power supply device to obtain the voltage and current capabilities of the power supply device.
[0187] Step S313: the power supply device sends a negotiation response message to the charging device to report the voltage and current capabilities of the power supply device.
[0188] Step S314: the charging device and the power supply device enter voltage and current regulation management.
[0189] Step S315: the charging device performs path impedance detection.
[0190] Step S316: The charging device determines an initial power supply request according to the power supply capability of the power supply device, the cable capability, and the charging device's own capability.
[0191] It is worth noting that the description of steps S311 to S316 can refer to the process description of the above steps S211 to S216, which will not be repeated here.
[0192] Step S317: the charging device sends a negotiation request message with an initial power supply request to the power supply device.
[0193] The negotiation request message includes the initial power supply request determined by the charging device in step S316. At this time, the charging device can request the power supply device to provide the voltage and current values in the initial power supply request to determine that the power supply device can provide a reasonable power supply voltage and current for the power supply device.
[0194] Optionally, the negotiation request message may be a Request message.
[0195] Step S318: the power supply device receives the negotiation request message, and when confirming that the voltage value and current value requested in the negotiation request message are within the outputtable range, sends a first message to the charging device.
[0196] Since the power supply capacity of the power supply device is limited, when the power supply device receives the negotiation request message, it first needs to confirm whether the voltage value and current value requested in the negotiation request message are within the output range.
[0197] Step S320: the testing device obtains a first message sent by the power supply equipment.
[0198] The first message includes a negotiation response message.
[0199] The negotiation response message is a response message made by the power supply device according to the negotiation request message of the charging device.
[0200] The type of the negotiation response message is negotiation approval or negotiation rejection.
[0201] In step S318, the power supply device confirms that the voltage and current values in the negotiation request message are within the output range, and the response type of the first message is negotiation agreement. Exemplarily, the negotiation response message with the response type of negotiation agreement can be an ACK+Accept message to inform the charging device that it can charge at the requested voltage and current values.
[0202] Step S330: The testing device modifies the type of the negotiation response message to obtain a second message.
[0203] The test device modifies the type of the negotiation response message by changing the type of the negotiation response message from negotiation approval to negotiation rejection, or changing the type of the negotiation response message from negotiation rejection to negotiation approval. In other words, the test device can modify the normal response of the power supply device to an abnormal response to meet the test requirements.
[0204] In step S330, the test device modifies the type of the negotiation response message by changing the type of the negotiation response message from negotiation approval to negotiation rejection.
[0205] In one example, the first message is a negotiation agreement, such as an ACK+Accept message. The test device may modify the ACK+Accept message to a negotiation rejection, such as an ACK+Refuse message.
[0206] In another example, the testing device may directly discard the ACK or Accept in the ACK+Accept message, and send the remaining message to the charging device.
[0207] In another example, the testing device may directly discard all ACK+Accept messages and no longer send messages to the charging device.
[0208] In some embodiments, if in step S318, the power supply device confirms that the voltage value and the current value in the negotiation request message are not within the output range, the response type of the first message is negotiation rejection. The negotiation response message with the response type of negotiation rejection can be an ACK+Refuse message to inform the charging device that the requested charging parameters cannot be provided.
[0209] In step S330, the test device modifies the type of the negotiation response message by changing the type of the negotiation response message from negotiation rejection to negotiation approval.
[0210] In one example, the first message is a negotiation rejection, such as an ACK+Refuse message. The test device may modify the ACK+Refuse message to a negotiation acceptance, such as an ACK+Accept message.
[0211] In another example, the testing device may directly discard the ACK or Refuse in the ACK+Refuse message, and send the remaining message to the charging device.
[0212] In another example, the testing device may directly discard all ACK+Refuse messages and no longer send messages to the charging device.
[0213] Step S340: the testing device sends a second message to the charging device.
[0214] At this time, the testing device can send the modified second message to the charging device. Compared with the charging device, in this test process, the testing device disguises itself as a power supply device to send the message required for the test to the charging device.
[0215] Step S350: The testing device determines whether the response of the charging device to the second message meets expectations.
[0216] If the charging device generates a target response to the second message, the testing apparatus determines that the response of the charging device to the second message is consistent with expectations, wherein the target response is a response that complies with a target charging protocol.
[0217] For example, assume that the target response set in the target charging protocol is that the charging device stops the fast charging process after receiving the negotiation rejection. At this time, when the charging device receives the negotiation rejection, if the charging device exits the fast charging process, it means that the charging device generates the target response, and the test device can confirm that the response of the charging device meets expectations.
[0218] If the charging device does not generate a target response to the second message, the testing apparatus determines that the response of the charging device to the second message does not meet expectations.
[0219] Exemplarily, according to the above description, if the charging device does not exit the fast charging process upon receiving the negotiation rejection and continues to fast charge, the testing device can confirm that the response of the charging device does not meet expectations.
[0220] In the second charging test method provided in the present application, the power supply device can provide the charging voltage required during the test for the charging device, so there is no need to set up an additional DC power supply. At this time, the test device only needs to support the interaction protocol between the power supply device and the charging device, so as to simplify the control logic of the test device. At the same time, the test device can intercept and modify the message sent by the power supply device to the charging device. For the charging device, the test device can disguise itself as a power supply device to meet the test requirements of the test process.
[0221] Fig. 9 This is a structural block diagram of the first charging test system provided in this embodiment.
[0222] like Fig. 9 As shown, the embodiment of the present application also provides a charging test system 100, including a test device 10, a first device 20, a second device 30 and a power supply path 40. The power supply path 40 is electrically connected to the first device 20 and the second device 30. Among them, the first device 20 is a power supply device, the second device 30 is a charging device, or the first device 20 is a charging device, and the second device 30 is a power supply device.
[0223] When the first device 20 and the second device 30 are charging according to the charging protocol, the first device 20 and the second device 30 will negotiate charging by sending messages, thereby realizing information exchange before charging and control during charging. It can be understood that the first message can be any negotiation message between the first device 20 and the second device 30 during the interaction process, which is not limited in this embodiment.
[0224] Specifically, one end of the power supply path 40 is electrically connected to the Vbus_out end of the power supply device, and the other end is electrically connected to the Vbus_in end of the charging device. The power supply device is used to charge the charging device. During the test, the power supply device can provide a test voltage to the charging device through the power supply path 40. In the charging test method provided in this embodiment, when performing the charging test, the power supply device is used to provide a test voltage to the charging device, thereby replacing the function of the DC power supply.
[0225] Exemplarily, a power switch 50 is also provided on the power supply path 40, and the power switch 50 is used to control the on and off of the power supply path 40 of the first device 20 and the second device 30. When the test starts, the power switch 50 needs to be closed so that the power supply path 40 of the first device 20 and the second device 30 is open.
[0226] Furthermore, the testing device 10 is configured to obtain a first message sent by the first device 20 , where the first message is used for charging negotiation between the first device 20 and the second device 30 ; modify the content of the first message to obtain a second message, and send the second message to the second device 30 .
[0227] Exemplarily, the charging device can be a mobile phone, a tablet computer, a handheld computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device and / or a smart city device, and other electronic devices. The embodiments of the present application do not impose any special restrictions on the specific type of the charging device.
[0228] The power supply device can be a power adapter, a mobile power supply, a charger, a power bank, a charging pile, a charging switch, a charging station, etc., which can provide power to the charging device and charge it. The embodiment of the present application does not impose any special restrictions on the specific type of the power supply device.
[0229] Among them, when the power supply device is a charger, the charger used in the test process can be a standard charger of the charging device, or a non-standard charger of the charging device. In other words, in some test processes, the charging protocol supported by the charger can be different from the charging protocol supported by the charging device, as long as the voltage and current levels output by the charger can meet the test requirements and the test device 10 can achieve communication with the charger.
[0230] The charging test system 100 provided in this embodiment can be applied to a separate test of a charging device, or a separate test of a power supply device, and can also be used for a joint test of a charging device and a power supply device. In these test processes, the power supply device can be used to provide a test power supply for the charging device, so that the charging device can receive the charging voltage specified by the test requirements, to replace the DC power supply in the traditional test process. At this time, the test device 10 does not need to develop a module for communicating with the DC power supply, thereby effectively simplifying the control logic of the test device 10. In addition, since the response of the power supply device is based on the charging protocol, the use of the power supply device to provide the charging voltage can also facilitate the control of the response time required by the charging protocol, further reducing the complexity of the control logic of the test device 10. In addition, compared with the DC power supply, the power supply device is smaller in size and lower in cost. Using the power supply device instead of the DC power supply can also reduce the overall volume of the test system, improve the portability of the test system and reduce the test cost.
[0231] Fig.10 It is a structural block diagram of the second charging test system provided in this embodiment.
[0232] like Fig.10 As shown, the testing device 10 includes a main control module 11 and a transmission module 12 .
[0233] The main function of the main control module 11 is to simulate the protocol timing and control the test process. The main control module 11 communicates with the first device 20 and the second device 30 through two protocol paths.
[0234] Exemplarily, the main control module 11 communicates with the first device 20 through a first protocol, and communicates with the second device 30 through a second protocol.
[0235] It is worth noting that the first protocol is a charging protocol supported by the first device 20, and the second protocol is a charging protocol supported by the second device 30. From the above description, it can be seen that the first protocol and the second protocol can be the same protocol or different protocols, which is not limited in this embodiment.
[0236] Exemplarily, the main control module 11 may be a microcontroller unit (MCU) or a field programmable gate array (FPGA), etc. Meanwhile, in the main control module 11, the function of simulating the protocol timing of the main control module 11 may be implemented using C language or Verilog, etc. It is understandable that the logic control of the main control module 11 may also be implemented using other programming languages, which are not limited in this embodiment.
[0237] Optionally, the main control module 11 can be used to monitor the communication interaction between the first device 20 and the second device 30. For example, the main control module 11 can be used to implement the process of the above steps S210, S310 or S110. Alternatively, the first device 20 and the second device 30 can communicate and interact through the main control module 11 to implement the process of the above steps S220, S230, S240, S320, S330, S340, S120, S130 or S140, which is not limited in this embodiment.
[0238] The transmission module 12 is used to realize communication transmission between the first device 20 , the second device 30 and the main control module 11 .
[0239] Specifically, the transmission module 12 can be used to implement protocol output and sampling functions.
[0240] Among them, the protocol output is generally implemented using a digital-to-analog converter (DAC) or a comparator, so that the digital signal output by the main control module 11 can be converted into an analog signal that can be received by the first device 20 and the second device 30, such as converting the digital signal output by the main control module 11 into the level required by the protocol specifications of the first device 20 and the second device 30.
[0241] Protocol sampling is generally implemented using an analog-to-digital converter (ADC) or a comparator, so that the analog signals output by the first device 20 and the second device 30 can be converted into digital signals that can be received by the main control module 11, such as converting the levels of the first device 20 and the second device 30 that meet the requirements of the protocol specifications into digital signals.
[0242] It is worth noting that the DAC, ADC or comparator can be an independent chip in the main control module 11, or can be integrated in the MCU or FPGA, which is not limited in this embodiment.
[0243] In addition, if the main control module 11 can integrate a signal conversion function required by the protocol test, or the main control module 11 can have a built-in protocol physical layer PHY, the signal conversion can be achieved without using DAC and ADC.
[0244] Specifically, the transmission module 12 includes a protocol parsing module 121 and a protocol camouflage module 122 .
[0245] The protocol analysis module 121 is used to implement a sampling function, so as to analyze the communication signal sent by the first device 20 or the second device 30 , and convert it into a digital signal that can be received by the main control module 11 and transmit it to the main control module 11 .
[0246] Exemplarily, the protocol parsing module 121 may be used to implement the process of step S120 above.
[0247] The protocol camouflage module 122 is used to implement the protocol output function, so as to convert the digital signal output by the main control module 11 into an analog signal that can be received by the first device 20 and the second device 30. At the same time, the protocol camouflage module 122 can also modify the data of the original communication protocol and repackage it into new protocol communication data based on the test purpose, or directly discard the original communication data and generate new communication data. In other words, the protocol camouflage module 122 can modify the content of the first message, obtain the second message, and then send the second message to the second device 30.
[0248] It is understandable that the protocol camouflage module 122 may not modify the information and only play a role of transmission.
[0249] Exemplarily, the protocol camouflage module 122 may be used to implement the process of step S130 above.
[0250] Furthermore, during the test, the main control module 11 can control the protocol parsing module 121 to obtain the first message sent by the first device 20. At this time, the protocol parsing module 121 obtains and parses the first message, obtains the content of the first message and sends it to the main control module 11. The main control module 11 sends the content of the parsed first message to the protocol camouflage module 122, and controls the protocol camouflage module 122 to modify the content of the first message. The protocol camouflage module 122 can receive the content of the first message, and modify the content of the first message according to the test requirements to obtain the second message, and then send the second message to the second device 30.
[0251] In this way, the main control module 11 can use the protocol parsing module 121 to obtain and intercept the first message sent by the first device 20, and use the protocol camouflage module 122 to modify the content of the first message, and send the obtained second message to the main control module 11, so that it can disguise itself as the first device 20 to meet the test requirements.
[0252] Optionally, when the first device 20 is a charging device and the second device 30 is a power supply device, the main control module 11 can control the protocol parsing module 121 to obtain the first message sent by the charging device. The first message is a negotiation request message sent by the first device 20 to the second device 30, including charging parameters. At this time, the protocol parsing module 121 can obtain and parse the first message, and send the charging parameters to the main control module 11 after obtaining them.
[0253] Exemplarily, the main control module 11 and the protocol analysis module 121 can be used to implement the process of the above step S220. The specific process can refer to the description of the above step S220 and will not be repeated here.
[0254] Furthermore, the main control module 11 can send the parsed charging parameters to the protocol camouflage module 122, and control the protocol camouflage module 122 to modify the charging parameters. At this time, the protocol camouflage module 122 can receive the charging parameters and modify the charging parameters to obtain the second message.
[0255] Specifically, the charging parameters include a first charging voltage. The protocol camouflage module 122 can modify the first charging voltage in the first message to a second charging voltage, obtain a second message, and send the second message to the power supply device.
[0256] Exemplarily, the main control module 11 and the protocol camouflage module 122 can be used to implement the process of the above steps S230 and S240. The specific process can refer to the description of the above steps S230 and S240, which will not be repeated here.
[0257] In addition, the main control module 11 can also be used to control the power supply device to output a second charging voltage to the charging device, wherein the second charging voltage is output by the power supply device according to the second message and is different from the first charging voltage requested in the first message.
[0258] At the same time, the main control module 11 can also be used to confirm whether the response of the charging device to the second charging voltage meets expectations. When the charging device responds to the second charging voltage according to the charging protocol, the main control module 11 can confirm that the response of the charging device to the second charging voltage meets expectations. When the charging device does not respond to the second charging voltage according to the charging protocol, the main control module 11 can confirm that the response of the charging device to the second charging voltage does not meet expectations.
[0259] Exemplarily, the main control module 11 can be used to implement the process of the above step S250. The specific process can refer to the description of the above step S250, which will not be repeated here.
[0260] It is worth noting that the protocol parsing module 121, the protocol camouflage module 122 and the main control module 11 can also be used to implement the above-mentioned process of steps S241 to S246. The specific process can refer to the description of the above-mentioned steps S241 to S246 and will not be repeated here.
[0261] Optionally, when the first device 20 is a power supply device and the second device 30 is a charging device, the main control module 11 can control the protocol parsing module 121 to obtain the first message sent by the power supply device. The first message includes a negotiation response message. At this time, the protocol parsing module 121 can obtain and parse the first message, and send the negotiation response message to the main control module 11 after obtaining it.
[0262] Exemplarily, the main control module 11 and the protocol analysis module 121 can be used to implement the process of the above step S320. The specific process can refer to the description of the above step S320 and will not be repeated here.
[0263] Furthermore, the main control module 11 can send the parsed acceptance information to the protocol camouflage module 122, and control the protocol camouflage module 122 to modify the response type of the negotiation response message. At this time, the protocol camouflage module 122 can receive the negotiation response message, modify its response type, obtain a second message, and send the second message to the power supply device.
[0264] Specifically, the type of the negotiation response message includes negotiation approval or negotiation rejection. The protocol masquerading module 122 can modify the type of the negotiation response message from negotiation approval to negotiation rejection, or modify the type of the negotiation response message from negotiation rejection to negotiation approval.
[0265] Exemplarily, the main control module 11 and the protocol camouflage module 122 can be used to implement the process of the above steps S330 and S340. The specific process can refer to the description of the above steps S330 and S340, which will not be repeated here.
[0266] At the same time, the main control module 11 can also be used to confirm whether the response of the charging device to the received information is in line with expectations. When the charging device responds to the received information according to the charging protocol, the main control module 11 can confirm that the response of the charging device to the received information is in line with expectations. When the charging device does not respond to the received information according to the charging protocol, the main control module 11 can confirm that the response of the charging device to the received information is not in line with expectations.
[0267] Exemplarily, the main control module 11 can be used to implement the process of the above step S350. The specific process can refer to the description of the above step S350 and will not be repeated here.
[0268] Fig.11 It is a structural block diagram of the third charging test system provided in this embodiment.
[0269] like Fig.11 As shown, the transmission module 12 further includes a switch module 123. The switch module 123 can be used to control the communication between the protocol masquerading module 122 and the first device 20 and / or the second device 30 under the control of the main control module 11.
[0270] In an example, when the first device 20 is a charging device, the second device 30 is a power supply device, and when the charging device and the power supply device support the same charging protocol, the switch module 123 includes a first switch k1, a second switch k2, a third switch k3, and a fourth switch k4.
[0271] Take the case where both the charging device and the power supply device support the UFCS protocol as an example:
[0272] The first switch k1 is electrically connected to the D-end of the charging device and the D-end of the power supply device. The first switch k1 can be used to control the on / off communication between the D-end of the charging device and the D-end of the power supply device.
[0273] The second switch k2 is electrically connected to the D+ terminal of the charging device and the D+ terminal of the power supply device. The second switch k2 can be used to control the on / off communication between the D- terminal of the charging device and the D- terminal of the power supply device.
[0274] One end of the third switch k3 is electrically connected between the D-end of the power supply device and the first switch k1, and the other end of the third switch k3 is electrically connected to the protocol camouflage module 122. The third switch k3 can be used to control the on / off communication between the D-end of the power supply device and the protocol camouflage module 122.
[0275] One end of the fourth switch k4 is electrically connected between the D+ end of the charging device and the second switch k2, and the other end of the fourth switch k4 is electrically connected to the protocol camouflage module 122. The fourth switch k4 can be used to control the communication between the D+ end of the charging device and the protocol camouflage module 122.
[0276] Meanwhile, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device.
[0277] In the UFCS protocol, the D+ and D- ends of the charging device are the transceiver ends of the protocol path of the charging device, the transmitting end of the charging device is the D- end, and the receiving end of the charging device is the D+ end; the D+ and D- ends of the power supply device are the transceiver ends of the protocol path of the power supply device, the receiving end of the power supply device is the D+ end, and the transmitting end of the power supply device is the D- end.
[0278] Table 1 below is a comparison table of the on / off state of the switch module 123 and the state of the test device 10 based on the UFCS protocol.
[0279] Table 1
[0280]
[0281] Specifically, in combination with the above Fig.11 As can be seen from Table 1, when the first switch k1 and the second switch k2 are connected and the other switches are disconnected, the D- end of the charging device can communicate with the D- end of the power supply device, and the D+ end of the charging device can communicate with the D+ end of the power supply device.
[0282] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D- end of the power supply device through the D- end of the charging device. At the same time, the signal sent by the power supply device can be directly sent to the D+ end of the charging device through the D+ end of the power supply device, thereby realizing direct interaction between the charging device and the power supply device.
[0283] At the same time, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device, so as to monitor the interaction between the charging device and the power supply device.
[0284] Exemplarily, the testing device 10 is in a monitoring state and can be used to implement the process of the above steps S210, S310 or S110. The specific process can refer to the above description and will not be repeated here.
[0285] When the first switch k1 and the fourth switch k4 are connected and the other switches are open, the D- end of the charging device can communicate with the D- end of the power supply device, the D+ end of the power supply device can communicate with the main control module 11 through the protocol parsing module 121, and the D+ end of the charging device can communicate with the main control module 11 through the protocol camouflage module 122.
[0286] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D- end of the power supply device through the D- end of the charging device. At the same time, the signal sent by the power supply device is first sent to the protocol parsing module 121 through the D+ end of the power supply device, and the protocol parsing module 121 then sends the signal to the main control module 11. The main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D+ end of the charging device.
[0287] It is understandable that the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the power supply device.
[0288] Exemplarily, the testing device 10 is in a state of masquerading as a power supply device and can be used to implement the above steps S320, S330 and S340. The specific process can refer to the above description and will not be repeated here.
[0289] When the second switch k2 and the third switch k3 are connected and the other switches are open, the D+ end of the charging device can communicate directly with the D+ end of the power supply device, the D- end of the charging device can communicate with the main control module 11 through the protocol parsing module 121, and the D- end of the power supply device can communicate with the main control module 11 through the protocol camouflage module 122.
[0290] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol parsing module 121 through the D- end of the charging device, and the protocol parsing module 121 then sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D- end of the power supply device; at the same time, the signal sent by the power supply device can be directly sent to the D+ end of the charging device through the D+ end of the power supply device.
[0291] It is understandable that the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the charging device.
[0292] Exemplarily, the testing device 10 is in a state of masquerading as a charging device and can be used to implement the above steps S220, S230 and S240. The specific process can refer to the above description and will not be repeated here.
[0293] When the third switch k3 and the fourth switch k4 are connected and the other switches are open, the D-end of the charging device can communicate with the main control module 11 through the protocol parsing module 121, and the D-end of the power supply device can communicate with the main control module 11 through the protocol camouflage module 122; the D+ end of the power supply device can communicate with the main control module 11 through the protocol parsing module 121, and the D+ end of the charging device can communicate with the main control module 11 through the protocol camouflage module 122.
[0294] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol parsing module 121 through the D- end of the charging device, and the protocol parsing module 121 then sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D- end of the power supply device; at the same time, the signal sent by the power supply device is first sent to the protocol parsing module 121 through the D+ end of the power supply device, and the protocol parsing module 121 then sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D+ end of the charging device.
[0295] It can be understood that in this state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust or not adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device.
[0296] When the protocol camouflage module 122 does not adjust the signal, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device, which can be used to implement the process of steps S241 to S246. The specific process can refer to the description of the above steps S241 to S246, which will not be repeated here.
[0297] Fig.12 It is a structural block diagram of the fourth charging test system provided in this embodiment.
[0298] like Fig.12 As shown in the figure, it is taken as an example that both the charging device and the power supply device support the SCP protocol:
[0299] The first switch k1 is electrically connected to the D-end of the charging device and the D-end of the power supply device. The first switch k1 can be used to control the on / off communication between the D-end of the charging device and the D-end of the power supply device.
[0300] The second switch k2 is electrically connected to the D+ terminal of the charging device and the D+ terminal of the power supply device. The second switch k2 can be used to control the on / off of the D+ terminal of the charging device and the D+ terminal of the power supply device.
[0301] One end of the third switch k3 is electrically connected between the D-end of the power supply device and the first switch k1, and the other end of the third switch k3 is electrically connected to the protocol camouflage module 122. The third switch k3 can be used to control the on / off communication between the D-end of the power supply device and the protocol camouflage module 122.
[0302] One end of the fourth switch k4 is electrically connected between the D-end of the charging device and the first switch k1, and the other end of the fourth switch k4 is electrically connected to the protocol camouflage module 122. The fourth switch k4 can be used to control the communication between the D-end of the charging device and the protocol camouflage module 122.
[0303] Meanwhile, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device.
[0304] In the SCP protocol, the D+ and D- ends of the charging device are ports of the protocol path of the charging device, and the transmitting end and receiving end of the charging device are both D- ends; the D+ and D- ends of the power supply device are ports of the protocol path of the power supply device, and the transmitting end and receiving end of the power supply device are both D- ends, and the D+ end of the charging device and the D+ end of the power supply device need to be connected at all times.
[0305] Table 2 below is a comparison table of the on / off state of the switch module 123 based on the SCP protocol and the state of the test device 10 .
[0306] Table 2
[0307]
[0308] Specifically, in combination with the above Fig.12 As can be seen from Table 2, when the first switch k1 and the second switch k2 are connected and the other switches are disconnected, the D- terminal of the charging device can communicate with the D- terminal of the power supply device, and the D+ terminal of the charging device can maintain connection with the D+ terminal of the power supply device. At this time, the receiving end and the transmitting end of the charging device are both D- terminals, and the receiving end and the transmitting end of the power supply device are both D- terminals.
[0309] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the D-end of the power supply device through the D-end of the charging device. At the same time, the signal sent by the power supply device can be directly sent to the D-end of the charging device through the D-end of the power supply device, thereby realizing direct interaction between the charging device and the power supply device.
[0310] At the same time, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device, so as to monitor the interaction between the charging device and the power supply device.
[0311] Exemplarily, the testing device 10 is in a monitoring state and can be used to implement the process of the above steps S210, S310 or S110. The specific process can refer to the above description and will not be repeated here.
[0312] When the second switch k2, the third switch k3 and the fourth switch k4 are connected and the other switches are disconnected, the D+ end of the charging device can be connected to the D+ end of the power supply device. The signal sent by the charging device can be sent to the protocol analysis module 121 through the D- end of the charging device, and the protocol analysis module 121 then sends the signal to the main control module 11, and the main control module 11 transmits the signal to the protocol analysis module 121, and the protocol analysis module 121 then sends the signal to the D- end of the power supply device; the D- end of the power supply device can communicate with the main control module 11 through the protocol analysis module 121, and the D- end of the charging device can communicate with the main control module 11 through the protocol camouflage module 122.
[0313] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be sent to the protocol parsing module 121 through the D-end of the charging device, and the protocol parsing module 121 then sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D-end of the power supply device; at the same time, the signal sent by the power supply device is first sent to the protocol parsing module 121 through the D-end of the power supply device, and the protocol parsing module 121 then sends the signal to the main control module 11, the main control module 11 transmits the signal to the protocol parsing module 121, and the protocol parsing module 121 then sends the signal to the D-end of the charging device.
[0314] In one state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the power supply device. At this time, the test state of the test device 10 is in the state of camouflaging the power supply device.
[0315] Exemplarily, the testing device 10 is in a state of masquerading as a power supply device and can be used to implement the above steps S320, S330 and S340. The specific process can refer to the above description and will not be repeated here.
[0316] In another state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the charging device. At this time, the test state of the test device 10 is in the state of camouflaging the charging device.
[0317] Exemplarily, the testing device 10 is in a state of masquerading as a charging device and can be used to implement the above steps S220, S230 and S240. The specific process can refer to the above description and will not be repeated here.
[0318] It can be understood that in this state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust or not adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device.
[0319] When the protocol camouflage module 122 does not adjust the signal, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device, which can be used to implement the process of steps S241 to S246. The specific process can refer to the description of the above steps S241 to S246, which will not be repeated here.
[0320] Fig.13 It is a structural block diagram of the fifth charging test system provided in this embodiment.
[0321] like Fig.13 As shown in the figure, when the charging device and the power supply device support different protocols, take the case where the charging device supports the UFCS protocol and the power supply device supports the PD protocol as an example:
[0322] The switch module 123 includes a third switch k3 and a fourth switch k4.
[0323] The third switch k3 is electrically connected to the CC1 terminal of the power supply device and the protocol masquerade module 122 . The third switch k3 can be used to control the on / off communication between the CC1 terminal of the power supply device and the protocol masquerade module 122 .
[0324] One end of the fourth switch k4 is electrically connected to the D+ end protocol masquerade module 122 of the charging device. The fourth switch k4 can be used to control the on / off communication between the D+ end of the charging device and the protocol masquerade module 122 .
[0325] Meanwhile, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device.
[0326] In the PD protocol, the CC1' end and CC2 end of the power supply device are the transceiver ends of the protocol path of the power supply device, the CC1 end of the power supply device is the receiving end, and the CC2 end is the sending end.
[0327] Table 3 below is a comparison table of the on / off state of the switch module 123 and the state of the test device 10 based on the UFCS-PD protocol.
[0328] Table 3
[0329] Monitoring and disguising power supply and charging equipment The third switch k3 Pass The fourth switch k4 Pass
[0330] Specifically, in combination with the above Fig.13As can be seen from Table 3, since the charging device and the power supply device support different fast charging protocols, the charging device and the power supply device cannot communicate directly, and can only interact indirectly using the protocol parsing module 121, the protocol camouflage module 122 and the main control module 11. When the third switch k3 and the fourth switch k4 are connected, the D+ terminal of the charging device can communicate with the CC1 terminal of the power supply device.
[0331] At this time, the communication process between the charging device and the power supply device is that the signal sent by the charging device can be directly sent to the protocol parsing module 121 through the D-end of the charging device, the protocol parsing module 121 sends the signal to the main control module 11, the main control module 11 sends the signal to the protocol camouflage module 122, and the protocol camouflage module 122 sends the signal to the CC1 end of the power supply device through the third switch k3; at the same time, the signal sent by the power supply device can be sent to the protocol parsing module 121 through the CC2 end of the power supply device, the protocol parsing module 121 sends the signal to the main control module 11, the main control module 11 sends the signal to the protocol camouflage module 122, and the protocol camouflage module 122 sends the signal to the D+ end of the charging device through the fourth switch k4, thereby realizing direct interaction between the charging device and the power supply device.
[0332] At the same time, the protocol parsing module 121 is electrically connected to the transmitting end and the receiving end of the power supply device and the transmitting end and the receiving end of the charging device, so as to monitor the interaction between the charging device and the power supply device.
[0333] Exemplarily, the testing device 10 is in a monitoring state and can be used to implement the process of the above steps S210, S310 or S110. The specific process can refer to the above description and will not be repeated here.
[0334] In one state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the power supply device. At this time, the test state of the test device 10 is in the state of camouflaging the power supply device.
[0335] Exemplarily, the testing device 10 is in a state of masquerading as a power supply device and can be used to implement the above steps S320, S330 and S340. The specific process can refer to the above description and will not be repeated here.
[0336] In another state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust the signal sent by the charging device. At this time, the test state of the test device 10 is in the state of camouflaging the charging device.
[0337] Exemplarily, the testing device 10 is in a state of masquerading as a charging device and can be used to implement the above steps S220, S230 and S240. The specific process can refer to the above description and will not be repeated here.
[0338] It can be understood that in this state, the protocol parsing module 121 can parse the signal, and the main control module 11 can control the protocol camouflage module 122 to adjust or not adjust the signal. At this time, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device.
[0339] When the protocol camouflage module 122 does not adjust the signal, the test state of the test device 10 is in the state of camouflaging the charging device and the power supply device, which can be used to implement the process of steps S241 to S246. The specific process can refer to the description of the above steps S241 to S246, which will not be repeated here.
[0340] Exemplarily, each of the above switches may be a relay switch, or a transistor chip switch, etc.
[0341] Alternatively, in some charging test systems 100 , the above switch is not provided, and the main control module 11 only needs to control whether each module interacts to realize the on-off control of communication. In other words, the control logic of the main control module 11 can be used for control.
[0342] It is worth noting that the on and off of the switch module 123 can also be controlled by a tester to achieve the switching of the test state.
[0343] In addition, by Figures 11 to 13 It can be known that there can be two protocol parsing modules 121 and two protocol masquerading modules 122 respectively, or in other embodiments, there can be only one or more protocol parsing modules 121 and two protocol masquerading modules 122, which is not limited in this embodiment.
[0344] It should be noted that those skilled in the art will easily think of other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope of the present application is indicated by the claims.
[0345] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A charging test method, characterized in that: The method comprises: The testing device obtains a first message sent by a first device, where the first message is used for charging negotiation between the first device and a second device; The testing device modifies the content of the first message to obtain a second message; The testing device sends the second message to the second device; The first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device, and the power supply device is used to charge the charging device.
2. The charging test method according to claim 1, characterized in that: The first message is a negotiation request message sent by the first device to the second device, and the first message includes charging parameters; The testing device modifies the content of the first message to obtain a second message, including: The testing device modifies the charging parameters in the first message to obtain a second message.
3. The charging test method according to claim 2, characterized in that: The first device is a charging device, the second device is a power supply device, and the charging parameter includes a first charging voltage; The testing device modifies the charging parameter in the first message to obtain a second message, including: The testing device modifies the first charging voltage in the first message into a second charging voltage to obtain a second message.
4. The charging test method according to claim 3, characterized in that: After the testing device sends the second message to the second device, the test device further includes: The power supply device outputs the second charging voltage to the charging device based on the second message; The testing device determines whether the response of the charging device to the second charging voltage is as expected.
5. The charging test method according to claim 1, characterized in that: The first device is a power supply device, the second device is a charging device, and the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; The testing device modifies the content of the first message to obtain a second message, including: The testing device modifies the response type of the negotiation response message to obtain a second message.
6. The charging test method according to claim 5, characterized in that: The response type of the negotiation response message includes negotiation approval or negotiation rejection; The testing device modifies the response type of the negotiation response message to obtain a second message, including: The testing device modifies the response type of the negotiation response message from the negotiation approval to the negotiation rejection, or, The test device modifies the response type of the negotiation response message from the negotiation rejection to the negotiation approval.
7. The charging test method according to claim 6, characterized in that: After the testing device sends the second message to the second device, the test device further includes: The testing device determines whether the response of the charging device to the second message is consistent with expectations.
8. The charging test method according to claim 7, characterized in that: The testing device determines whether the response of the charging device to the second message meets expectations, including: If the charging device generates a target response to the second message, the testing device determines that the response of the charging device to the second message is in accordance with expectations, wherein the target response is a response that complies with a target charging protocol; If the charging device does not generate a target response to the second message, the testing apparatus determines that the response of the charging device to the second message does not meet expectations.
9. The charging test method according to claim 4, characterized in that: The testing device determines whether the response of the charging device to the second charging voltage meets expectations, including: If the charging device generates a target response to the second charging voltage, the testing device determines that the response of the charging device to the second charging voltage is in accordance with expectations, wherein the target response is a response that complies with a target charging protocol; If the charging device does not produce a target response to the second charging voltage, the testing apparatus determines that the response of the charging device to the second charging voltage is not as expected.
10. The charging test method according to any one of claims 1 to 9, characterized in that: The power supply device comprises: Any one of a power adapter, a mobile power supply, a charging pile, a charging station, and a switch with a charging function for an electronic device.
11. A charging test system, characterized in that: The charging test system comprises: Test equipment; a first device, the first device being electrically connected to the testing apparatus; a second device, the second device being electrically connected to the testing device; a power supply path electrically connected to the first device and the second device; The testing device is configured to obtain a first message sent by the first device, the first message being used for charging negotiation between the first device and the second device; modify the content of the first message to obtain a second message; and send the second message to the second device; wherein the first device is a power supply device and the second device is a charging device, or the first device is a charging device and the second device is a power supply device, and the power supply device is used to charge the charging device.
12. The charging test system according to claim 11, characterized in that: The testing device comprises a main control module and a transmission module; The transmission module includes a protocol parsing module and a protocol camouflage module; The main control module is configured to control the protocol parsing module to obtain the first message sent by the first device; The protocol parsing module is configured to obtain and parse the content of the first message, and send the content of the first message to the main control module; The main control module is further configured to send the content of the first message to the protocol camouflage module, and control the protocol camouflage module to modify the content of the first message; The protocol camouflage module is configured to receive and modify the content of the first message to obtain a second message, and send the second message to the second device.
13. The charging test system according to claim 12, characterized in that: The first message is a negotiation request message sent by the first device to the second device, and the first message includes charging parameters; The protocol camouflage module is configured to modify the charging parameters in the first message.
14. The charging test system according to claim 13, characterized in that: The first device is a charging device, the second device is a power supply device, and the charging parameter includes a first charging voltage; The protocol camouflage module is configured to modify the first charging voltage in the first message to a second charging voltage to obtain a second message.
15. The charging test system according to claim 14, characterized in that: The power supply device is configured to: output the second charging voltage to the charging device based on the second message; The main control module is configured to determine whether the response of the charging device to the second charging voltage is as expected.
16. The charging test system according to claim 12, characterized in that: The first device is a power supply device, the second device is a charging device, and the first message is a negotiation response message sent by the first device in response to a negotiation request message of the second device; The protocol camouflage module is configured to modify the response type of the negotiation response message to obtain a second message.
17. The charging test system according to claim 16, characterized in that: The response type of the negotiation response message includes negotiation approval or negotiation rejection; The protocol masquerading module is configured to change the response type of the negotiation response message from the negotiation approval to the negotiation rejection, or to change the response type of the negotiation response message from the negotiation rejection to the negotiation approval.
18. The charging test system according to claim 17, characterized in that: The main control module is configured to determine whether the response of the charging device to the second message is consistent with expectations.
19. The charging test system according to claim 18, characterized in that: If the charging device generates a target response to the second message, the main control module is configured to: determine that the response of the charging device to the second message meets expectations, wherein the target response is a response that meets a target charging protocol; If the charging device does not generate a target response to the second message, the main control module is configured to: determine that the response of the charging device to the second message does not meet expectations.
20. The charging test system according to claim 15, characterized in that: If the charging device generates a target response to the second charging voltage, the main control module is configured to: determine that the response of the charging device to the second charging voltage is in accordance with expectations, wherein the target response is a response that complies with a target charging protocol; If the charging device does not generate a target response to the second charging voltage, the main control module is configured to: determine that the response of the charging device to the second charging voltage does not meet expectations.
21. The charging test system according to any one of claims 11 to 20, characterized in that: The power supply device comprises: Any one of a power adapter, a mobile power supply, a charging pile, a charging station, and a switch with a charging function for an electronic device.
22. The charging test system according to any one of claims 12 to 20, characterized in that: The transmission module also includes a switch module; The switch module is configured to control the on / off communication between the protocol camouflage module and the first device and / or the second device under the control of the main control module.
23. The charging test system according to claim 22, characterized in that: When the first device is a charging device, the second device is a power supply device, and both the charging device and the power supply device support the fusion fast charging standard or the super fast charging protocol, The switch module includes a first switch, a second switch, a third switch and a fourth switch; The first switch is electrically connected to the D-end of the charging device and the D-end of the power supply device, and the first switch is configured to control the on / off communication between the D-end of the charging device and the D-end of the power supply device; The second switch is electrically connected to the D+ terminal of the charging device and the D+ terminal of the power supply device, and the second switch is configured to control the on / off communication between the D+ terminal of the charging device and the D+ terminal of the power supply device; One end of the third switch is electrically connected between the D-end of the power supply device and the first switch, and the other end of the third switch is electrically connected to the protocol camouflage module, and the third switch is configured to control the on / off communication between the D-end of the power supply device and the protocol camouflage module; When both the charging device and the power supply device support the fusion fast charging standard, one end of the fourth switch is electrically connected between the D+ end of the charging device and the second switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the on / off communication between the D+ end of the charging device and the protocol camouflage module; When both the charging device and the power supply device support the super fast charging protocol, one end of the fourth switch is electrically connected between the D-end of the charging device and the first switch, and the other end of the fourth switch is electrically connected to the protocol camouflage module, and the fourth switch is configured to control the on and off of communication between the D-end of the charging device and the protocol camouflage module.
Citation Information
Patent Citations
Bidirectional test system and method for electric vehicle BMS and direct-current charging pile
CN111762050A
Electric vehicle charging interoperability test system and method
CN111856302A
Independent power supply protocol decoy device supporting multiple fast charge protocols
CN112928792A
Charging pile vulnerability detection method and detection device based on communication protocol
CN113810403A
Variation test method and device, storage medium and chip
CN115687144A
