WO2023103802A1 - Protocol information testing method, tester, storage medium, and program product - Google Patents

Protocol information testing method, tester, storage medium, and program product Download PDF

Info

Publication number
WO2023103802A1
WO2023103802A1 PCT/CN2022/134115 CN2022134115W WO2023103802A1 WO 2023103802 A1 WO2023103802 A1 WO 2023103802A1 CN 2022134115 W CN2022134115 W CN 2022134115W WO 2023103802 A1 WO2023103802 A1 WO 2023103802A1
Authority
WO
WIPO (PCT)
Prior art keywords
protocol
charging protocol
electronic device
handshake
charging
Prior art date
Application number
PCT/CN2022/134115
Other languages
French (fr)
Chinese (zh)
Inventor
郑连生
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023103802A1 publication Critical patent/WO2023103802A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00036Charger exchanging data with battery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • H02J7/0036Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits using connection detecting circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2207/00Indexing scheme relating to details of circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J2207/30Charge provided using DC bus or data bus of a computer

Definitions

  • the function of electronic equipment is more and more perfect with the optimization of its hardware device and software architecture, but it also makes the power consumption of electronic equipment faster. Therefore, the existing technology proposes a variety of fast charging protocols, so that electronic equipment that supports fast charging protocols can Fast charging is achieved in the manner stipulated by the agreement.
  • the electronic device For some specific fast charging protocols, it is stipulated that the electronic device must take the fast charging protocol as the first priority charging protocol while supporting the fast charging protocol.
  • the electronic devices declare that they support the specific fast charging protocol and regard the specific fast charging protocol as the first priority charging protocol, their real support for the specific fast charging protocol may be different from the statement . Based on this, it is necessary to detect the fast charging protocol supported by the electronic device.
  • the method further includes: the first recording result only includes the pulse information of the handshake signal with the first charging protocol When the pulse information is the same, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; when the first record result includes pulse information different from the handshake signal of the first charging protocol When the pulse is pulsed, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
  • the method further includes: combining the first recording result with the When the pulse information of the handshake signal of the first charging protocol does not match, compare the first recorded result with the pulse information of the handshake signal of other charging protocols in at least one charging protocol except the first charging protocol; When a record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols, it is determined that the second charging protocol is the first priority in the electronic device under test.
  • the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol. Further, the first record result only includes pulse information related to the second charging protocol When the pulse information of the handshake signals is the same as the pulse, it can be considered that the first handshake signal is the handshake signal of the second charging protocol. In this way, it can be further determined that the second charging protocol is the first priority in the electronic device under test, so as to obtain more comprehensive priority information of the electronic device under test according to the first recording result.
  • the tester is set not to send a handshake response signal
  • the The method also includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; recording the nth record result including the nth handshake signal, wherein the duration of the nth record result greater than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; between the nth record result and the at least one charging protocol
  • the priority information of the third charging protocol in the electronic device under test is determined according to the determined priority information of the charging protocol in the electronic device under test.
  • the tester can not only determine whether the first charging protocol is the first priority of the electronic device under test, but also record the corresponding Record the results and get more priority information according to the record results, thereby improving the tester's ability to test the priority information of each protocol of the electronic device under test.
  • the priority sequence of the charging protocols supported by the electronic device under test can be sequentially determined.
  • the test result of the priority information of each protocol supported by the electronic equipment under test by the tester is made more specific.
  • an embodiment of the present application provides a protocol information testing method, the method is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol
  • the protocol includes a first charging protocol
  • the method includes: receiving a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is when the electronic device determines that the port of the tester is dedicated for charging The first signal sent after the port; record the first record result including the first handshake signal, wherein the duration of the first record result is longer than the handshake signal of any charging protocol in the at least one charging protocol Duration or equal to the duration of the handshake signal of the charging protocol with the longest duration; when the first record result matches the pulse information of the handshake signal of the first charging protocol, send the handshake response signal of the first charging protocol to the The electronic device under test; according to the data information received after sending the handshake response signal of the first charging protocol, determine the priority information of the first charging protocol in the electronic device under test.
  • the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol.
  • the tester only receives the signal once and determines that the first recorded result matches the pulse information of the handshake signal of the first charging protocol.
  • the tester sends a handshake response signal and receives the corresponding data information to determine the first record of the electronic device under test.
  • the priority is specific to the first charging protocol, and the tester does not need to determine whether the first record result matches the pulse information of the handshake signals of other protocols, nor does it need to send handshake response signals of other protocols, which can reduce data processing costs.
  • the first handshake signal is the information generated in the handshake phase.
  • the data information received after sending the handshake response signal of the first charging protocol may include the information generated in the protocol identification phase. In this way, the information in the protocol identification phase can be combined with the handshake. Phase information is used to determine the priority of the first charging protocol in the electronic device under test, so that the obtained test results are more accurate.
  • the method further includes: the first recording result only includes the pulse information of the handshake signal with the first charging protocol When the pulse information is the same, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; when the first record result includes pulse information different from the handshake signal of the first charging protocol When the pulse is pulsed, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
  • the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be wrongly determined that the first charging protocol is the first priority in the electronic device under test, ensuring the accuracy of the test result.
  • determining the priority information of the first charging protocol in the electronic device under test includes: after sending a handshake response signal of the first charging protocol, receiving a message of the first charging protocol from the electronic device under test When detecting the data packet from the Internet packet detector, it is determined that the first charging protocol is the first priority in the electronic device under test.
  • the Internet packet detector data packet is the information generated in the protocol identification stage. If the electronic device under test sends an Internet packet detector data packet of a certain protocol and receives the corresponding confirmation data packet, it can configure charging parameters based on the protocol. And accept power supply, therefore, if the tester receives the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, it means that the electronic device under test does support the first charging protocol. charging protocol. It is determined that the first charging protocol is the first priority in the electronic device under test by receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
  • the third possible implementation of the protocol information testing method according to the data received after sending the handshake response signal of the first charging protocol information, determining the priority information of the first charging protocol in the electronic device under test, including: after sending the handshake response signal of the first charging protocol, the first charging from the electronic device under test is not received When the Internet packet detector data packet of the protocol is received and the second handshake signal sent for the first time is received from the electronic device under test, it is determined that the first charging protocol is not the first priority in the electronic device under test , the second handshake signal is different from the first handshake signal.
  • the electronic device under test If the electronic device under test receives a handshake response signal of a certain protocol but does not support the protocol, it will not send the Internet packet detector data packet of the protocol, but send another handshake signal until it sends out the Internet packet of a certain protocol.
  • the charging parameters can be configured based on this protocol and the power supply can be accepted. Therefore, if the tester does not receive the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, but receives the second handshaking signal sent for the first time , indicating that the electronic device under test does not support the first charging protocol. It is determined that the first charging protocol is not the first priority in the electronic device under test by not receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
  • the method further includes: receiving the first The nth handshake signal sent, n is an integer greater than 1; when the charging protocol of the first priority in the electronic device under test is not determined, record the nth recording result including the nth handshake signal, wherein the nth The duration of the n record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration;
  • the pulse information of the handshake signal of the second charging protocol in one charging protocol matches, send the handshake response signal of the second charging protocol to the electronic device under test; after sending the handshake response signal of the second charging protocol,
  • the Internet packet detector data packet of the second charging protocol from the electronic device under test it is determined that the second charging protocol is the first priority in the electronic device under test.
  • the tester determines that the electronic device under test does not use the first charging protocol as the first priority, it can also determine the specific type of the first priority charging protocol of the electronic device under test, that is, the second charging protocol. protocol, and determine that charging protocols other than the second charging protocol on the electronic device under test are not the first priority, further improving the tester's ability to test the priority information of the charging protocol of the electronic device under test.
  • the embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol
  • the protocol includes a first charging protocol
  • the device includes: a first receiving module, configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is determined after the electronic device determines the The port of the tester is sent after the dedicated charging port; the first recording module is used to record the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the at least one charging protocol
  • the device further includes: a first comparison module, configured to When the first recorded result does not match the pulse information of the handshake signal of the first charging protocol, compare the first recorded result with the handshake signal of at least one charging protocol other than the first charging protocol. Pulse information; a fourth determining module, configured to determine that the second charging protocol is in the measured Electronic equipment is the first priority.
  • the nth record result and the third charging in the at least one charging protocol determine the priority information of the third charging protocol in the electronic device under test, including: When the charging protocol of the tth priority of the electronic device under test has been determined, it is determined that the third charging protocol is the t+1 priority in the electronic device under test, and t is a positive integer; When determining the charging protocol of the first priority of the electronic device under test, it is determined that the third charging protocol is the first priority of the electronic device under test.
  • an embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol
  • the protocol includes a first charging protocol
  • the device includes: a third receiving module, configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is determined after the electronic device determines the The port of the tester is the first signal sent after the dedicated charging port; the third recording module is used to record the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the at least The duration of the handshake signal of any charging protocol in a charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; the first sending module is used to compare the first recording result with the first charging protocol When the pulse information of the handshake signal matches, send the handshake response signal of the first charging protocol to the electronic device under test; the sixth determination module is used to transmit the data information received after sending
  • the device further includes: a seventh determination module, configured to include only information related to the first charge in the first record result.
  • a seventh determination module configured to include only information related to the first charge in the first record result.
  • the eighth determination module is configured to match the first record result with the pulse information of the handshake signal of the first charging protocol;
  • the pulse information of the handshake signal of the first charging protocol is different, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
  • the protocol information testing device according to the data received after sending the handshake response signal of the first charging protocol information, determining the priority information of the first charging protocol in the electronic device under test, including: after sending the handshake response signal of the first charging protocol, the first charging from the electronic device under test is not received When the Internet packet detector data packet of the protocol is received and the second handshake signal sent for the first time is received from the electronic device under test, it is determined that the first charging protocol is not the first priority in the electronic device under test , the second handshake signal is different from the first handshake signal.
  • the device further includes: a fourth receiving module, configured to receive the The nth handshake signal sent by the electronic device under test for the first time, n is an integer greater than 1; the fourth recording module is used to record the first priority charging protocol in the electronic device under test including the The nth recorded result of the nth handshake signal, wherein the duration of the nth recorded result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration Duration; the second sending module, configured to send the handshake response signal of the second charging protocol when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol to the electronic device under test; the ninth determination module is configured to receive the Internet packet detector data packet of the second charging protocol from the electronic device under test after sending the handshake response signal of the second charging protocol, It is
  • an embodiment of the present application provides a tester, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the above-mentioned first test when executing the instructions.
  • a tester including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the above-mentioned first test when executing the instructions.
  • Fig. 2 shows an exemplary application scenario of a method for testing protocol information according to an embodiment of the present application.
  • Fig. 4 shows another exemplary workflow of the handshake priority testing method according to the embodiment of the present application.
  • Fig. 8 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
  • Fig. 9 shows an exemplary structural diagram of a tester according to an embodiment of the present application.
  • the tester After the tester is connected to the electronic device under test, the tester first sends an extended message (Source Capabilities) to the electronic device under test. If no request message (Request message) is received from the electronic device under test, ), the tester determines that the electronic device under test does not support the USB PD protocol.
  • an extended message (Source Capabilities)
  • Another detection method is that the tester can test different kinds of fast charging protocols.
  • This detection method is generally aimed at more common fast charging protocols, such as Apple2.4, DCP, QC2.0, QC3.0, AFC, FCP and other fast charging protocols.
  • MCU internal microcontroller unit
  • the tester actively switches between different protocol signals and port voltages through the internal microcontroller unit (MCU), and records the electronic device under test for different The response of the protocol signal and the port voltage, and determine the fast charging protocol supported by the electronic device under test according to the recorded response.
  • the fast charging protocols supported by the tested electronic device are presented in the form of a list, and the order of the protocols in the list is usually random, and this detection method cannot determine the priority information of the protocols in the list.
  • the tester can only display the protocol name and power information of the protocol, and cannot provide effective information for determining the priority of the fast charging protocol supported by the mobile phone.
  • the above-mentioned prior art fast charging protocol detection method is only used for fast charging capability evaluation, it is only necessary to determine which fast charging protocols are supported by the electronic device under test, and it is not necessary to determine the priority of the fast charging protocol on the electronic device under test. Due to certain specific fast charging protocols, such as the universal fast charging specification (UFCS) for mobile terminals, electronic devices that support this protocol are required to choose this protocol first when charging (that is, to use a specific fast charging protocol as the first A priority), obviously, the above-mentioned prior art fast charging protocol detection method cannot determine the priority of the fast charging protocol supported by the electronic device under test, that is, it cannot determine whether the electronic device under test is supporting a specific fast charging protocol. , abide by the specific fast charging protocol, and take the specific fast charging protocol as the first priority protocol.
  • UCS universal fast charging specification
  • the UFCS fast charging method defined by the UFCS specification is as follows: the device to be charged is connected to the charger or power supply device using a standard cable (USB cable, including D+, D- signal lines), and the device to be charged supports the UFCS specification. After connection, the device being charged and the charger or power supply device communicate based on battery charging specification revision 1.2 (BC1.2), and BC1.2 communication is used to determine the charging port type of the charger or power supply device .
  • BC1.2 battery charging specification revision 1.2
  • the implementation of the UFCS specification is carried out after determining that the charging port type of the charger or power supply equipment is a dedicated charging port (DCP).
  • DCP dedicated charging port
  • the implementation of the UFCS specification can be seen as going through four stages in sequence: handshake stage, protocol identification stage, parameter Adjustment phase, charging phase.
  • the charged device sends a UFCS handshake signal to the charger or power supply device through the D+ and D- signal lines, and the charger or power supply device receives the signal transmitted on the D- signal line and identifies its Whether it is a UFCS handshake signal. If it is not a UFCS handshake signal, the charger or the power supply device does not respond to the UFCS handshake signal, and the charged device does not receive the UFCS handshake response signal.
  • the charger or power supply device if the charger or power supply device recognizes the UFCS handshake signal, the charger or power supply device sends a UFCS handshake response signal to the charged device in response to the UFCS handshake signal, and the charged device receives the UFCS handshake response signal, Indicates that the handshake is successful. After the handshake is successful, enter the second stage (protocol identification stage).
  • Fig. 1 shows an example of signals transmitted on the D+ and D- signal lines when the handshake is successful and the protocol identification is successful in the prior art.
  • the charger or power supply device After the protocol identification is successful, enter the third stage (parameter adjustment stage), the charger or power supply device communicates with the charged device to adjust charging parameters (such as rated power, rated voltage, rated current, etc.), and then enters the fourth stage (charging phase), the charger or the power supply device charges the device being charged with the adjusted charging parameters.
  • charging parameters such as rated power, rated voltage, rated current, etc.
  • the following describes the manner in which the tester tests the support of the UFCS specification by the electronic device (device to be charged) based on the UFCS specification with reference to FIG. 1 .
  • the test is implemented through the following steps:
  • Step 3 when the UFCS handshake signal is detected, the tester shakes hands with the electronic device under test;
  • the hardware reset and/or software reset is used to repeat the above steps 2 to 3 several times.
  • the first signal from the electronic device under test is the UFCS handshake signal. , it can be determined that the electronic device supports the UFCS specification.
  • the above detection method is to detect and determine that the electronic device supports the UFCS specification by identifying the UFCS handshake signal.
  • the level of the UFCS handshake signal can be shown in FIG. 1 (for example, including 2 pulses).
  • identifying the UFCS handshake signal in the prior art, it is generally recognized that the UFCS handshake signal is recognized only if the signal includes the same pulse as the UFCS handshake signal.
  • part of the handshake signal of another fast charging protocol different from the UFCS specification is the same as the level of the UFCS handshake signal (for example, including 4 pulses), or set a pseudo-pulse signal of the handshake signal of a non-quick charging protocol, so that A part of the false pulse signal has the same level as the UFCS handshake signal, and after confirming that the charging port type of the tester is a dedicated charging port, the electronic device under test first sends out a handshake signal or a false pulse signal of another fast charging protocol , then in step 2, when the tester is testing, it is easy to identify the handshake signal or pseudo-pulse signal of another fast charging protocol as the UFCS handshake signal, thus obtaining a wrong test result that the electronic device under test supports the UFCS specification.
  • protocol information testing method tester, storage medium and program product are proposed.
  • the protocol information testing method of the embodiment of the application it is possible to detect and determine the priority of a specific fast charging protocol in the electronic device under test. Level conditions to determine whether the electronic device under test violates a specific fast charging protocol.
  • Fig. 2 shows an exemplary application scenario of a method for testing protocol information according to an embodiment of the present application.
  • the protocol information testing method can be applied to a tester, and the tester can include a protocol information testing device, a microcontroller unit MCU and a power supply, wherein the microcontroller unit MCU and the power supply pass a common
  • the interface bus general purpose interface bus, GPI B
  • GPI B general purpose interface bus
  • I2C integrated circuit bus
  • the protocol information testing device can be realized by a programmable logic unit (field programmable gate array, FPGA) or another microcontroller unit, and the protocol information testing device can be used to receive handshaking signals (such as the first handshaking signal, the second handshaking signal hereinafter) signal, the nth handshake signal), send a handshake response signal (such as the handshake response signal of the first charging protocol below, the handshake response signal of the second charging protocol below), receive the Ping data packet (such as the first charging protocol below An internet packet detector data packet, an internet packet detector data packet of the second charging protocol), sending an ACK data packet, and the like.
  • the tester and the electronic device under test are connected through a USB cable (including VBUS signal line, D+ signal line, D- signal line, ground line GND, etc.).
  • the electronic device under test can be, for example, the above-mentioned charged device, or it can be a terminal device such as a smart phone, a notebook computer, a tablet computer, a headset, a smart speaker, and an AR/VR display device.
  • the electronic device under test may include a battery, a charge management circuit, a system-on-a-chip (SOC), and a protocol information processing device, wherein the charge management circuit is connected to the protocol information processing device and the system-on-a-chip through an integrated circuit Bus connection, the protocol information processing device can be a single chip or a programmable logic unit integrated into the charging management circuit, etc.
  • the protocol information processing device can be used to send handshake signals, receive handshake response signals, send Ping data packets, and receive ACK packets etc.
  • the electronic equipment under test can be realized by existing technology.
  • the power supply of the tester can be connected to the charging management circuit of the electronic device under test through the VBUS signal line of the USB cable, and the protocol information testing device can be connected to the protocol of the electronic device under test through the D+ and D- signal lines of the USB cable. information processing device.
  • the tester can supply power to the electronic device under test through the VBUS signal line.
  • the tester and the electronic device under test can first perform BC1.2 communication, and its exemplary implementation can refer to the above "step two" related description.
  • the electronic device under test When the BC1.2 communication determines that the charging port of the tester is a dedicated charging port DCP, the electronic device under test starts to output signals to the tester through the D+ and D- signal lines. Wherein, for all fast charging protocols supported by the electronic device under test (such as UFCS specification, QC protocol, VOOC protocol, etc.), the electronic device under test can send a handshake signal corresponding to the protocol. The electronic device under test can also emit a false pulse signal that is used to disguise the handshake signal of a specific fast charging protocol (such as the UFCS specification).
  • the tester can have the ability to identify handshake signals of various protocols (such as UFCS specification, QC protocol, VOOC protocol, etc.).
  • the support of the electronic device for a specific fast charging protocol (such as the UFCS specification), and whether the specific fast charging protocol supported by the electronic device under test is the first priority.
  • the tester can also determine some or all of all charging protocols (such as UFCS specification, QC protocol, VOOC protocol, etc.) supported by the electronic device under test according to the signal reception situation of the signal from the electronic device under test order of priority.
  • the microcontroller unit can further sort out the determined test results and output them to other units, such as a memory (not shown), to be stored for subsequent display and the like.
  • protocol information test method is the handshake priority test method (or called handshake identification, handshake request, etc.), which can complete the support and priority of the electronic device under test for the protocol according to the information in the handshake phase information detection.
  • handshake priority test method or called handshake identification, handshake request, etc.
  • the electronic device under test After the electronic device under test determines that the charging port of the tester is a dedicated charging port DCP, it can send a handshake signal to the tester for the first time (the example of the first handshake signal below), and in the tester, the protocol information testing device first When a signal is received once (for example, when the level changes from low to high), start recording the level change of the D+/D- signal line until the level change information with a duration equal to the preset time period is recorded, as the corresponding to the first The recording result of the second received signal (hereinafter an example of the first recording result).
  • the preset time period may be greater than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to the duration of the handshake signal of the charging protocol with the longest duration.
  • the comparison confirms that the record result matches the handshake signal of protocol A, that is, the level change in the record result conforms to the level change of the handshake signal of protocol A, and Except for the pulse corresponding to the level change of the protocol A handshake signal, there are no other pulses, that is, as shown in case 1 in Figure 3, the protocol A handshake signal includes 2 pulses, and the recording result only includes 2 pulses and
  • the microcontroller unit can determine that the electronic device under test supports protocol A, and the electronic device under test does use protocol A as the first priority. In the application scenario where it is only necessary to confirm whether protocol A is the first priority, the test can end.
  • the electronic device under test does not use the handshake signal of protocol A as the signal sent for the first time, that is, it does not take protocol A as the first priority, and does not support protocol A.
  • the electronic device under test sends a pseudo-pulse signal disguised as a protocol A handshake signal for the first time, that is, as shown in case 2 in Figure 3, the protocol A handshake signal includes 2 pulses, and the recorded result includes 3 pulses And there are 2 pulses in agreement with the protocol A handshake signal, and the level change of the handshake signal including only 3 pulses is not stored in the tester, the tester cannot determine the first priority of the electronic device under test.
  • the specific type of protocol at the level is not be used.
  • the microcontroller unit can further determine that the electronic device under test supports protocol X, and The electronic equipment under test has protocol X as the first priority. In the scenario where it is only necessary to record the record result once and compare it to determine the priority information of the electronic device under test, the test can end.
  • the electronic device under test will consider the handshake failure.
  • the electronic device under test will switch to another protocol and continue sending signals.
  • the electronic device under test can send handshake signals of all the protocols it supports one after another, and the tester receives each handshake signal in turn, and can identify and determine the protocol type and priority corresponding to each handshake signal received, so that It can determine the types of all protocols supported by the tested electronic equipment and the priority order of each protocol.
  • the electronic equipment under test sends out the first signal (such as the first handshake signal) for the first time
  • the protocol information testing device receives the first signal for the first time
  • it can record Below is the recording result corresponding to the first signal received for the first time (hereinafter an example of the first recording result).
  • the recording result corresponding to the first signal received for the first time can be identified and determined by the microcontroller unit to determine the type and priority information of the fast charging protocol of the electronic device under test.
  • the determined information may include the type of the first priority protocol of the electronic device under test.
  • the tester Since the tester does not send a handshake response signal during the handshake priority test, when the electronic device under test does not receive the handshake response signal after sending out the second signal for the first time and reaching the number of retries of the second signal, Switch to other protocols and send a third signal for the first time.
  • the tester can record the recording result corresponding to the third signal received for the first time, and continue to identify the type and priority information of the fast charging protocol of the electronic device under test according to the recording result.
  • the determined information may include the type of the first priority protocol or the type of the second priority protocol or the type of the third priority protocol of the electronic device under test.
  • the microcontroller unit can obtain the protocol supported by the electronic equipment under test.
  • the priority order of parts or all of the protocol For example, in the example of FIG. 4 , all protocols supported by the electronic device under test include protocol A, protocol B, and protocol C, and the priority order of each protocol on the electronic device under test is protocol A>protocol B>protocol C.
  • the electronic equipment under test can send the signals to the tester sequentially in the order of protocol A, protocol B, and protocol C.
  • protocol information testing method is a protocol priority testing method (or called protocol identification, protocol request, etc.), which can complete the electronic equipment under test for the electronic device under test according to the information in the handshake phase and the information in the protocol identification phase Protocol support and detection of priority information.
  • protocol priority testing method or called protocol identification, protocol request, etc.
  • the electronic device under test can be an electronic device that declares that it supports protocol A (such as the UFCS specification). Since the UFCS specification requires electronic devices that support this protocol to take it as the first priority, theoretically, , on the electronic device under test, the fast charging protocol with the first priority is protocol A (hereinafter an example of the first charging protocol).
  • protocol A hereinafter an example of the first charging protocol.
  • the protocol information testing device can transmit the recording result to the microcontroller unit, and the microcontroller unit can compare the level change information with the level characteristics of the handshake signals of the stored protocols (the handshake signal of at least one charging protocol hereinafter) example of pulse information) for comparison.
  • the record result can be compared with the handshake signal of protocol A. If the comparison confirms that the record result matches the handshake signal of protocol A, that is, the level change in the record result conforms to the level change of the handshake signal of protocol A, you can
  • the control protocol information testing device sends a protocol A handshake response signal (hereinafter an example of a handshake response signal of the first charging protocol) through the D+/D ⁇ signal line.
  • Protocol A Ping data packet (the example of the Internet packet detector data packet of the first charging protocol below) to the tester through the D+/D- signal line after receiving the protocol A handshake response signal
  • test If the instrument receives the Protocol A Ping data packet it can be considered that the electronic device under test supports Protocol A, and indeed takes Protocol A as the first priority.
  • the electronic device under test supports a specific fast charging protocol, and whether the specific fast charging protocol supported by the electronic device under test is the first priority.
  • the specific fast charging protocol may be the UFCS specification, or other regulations other than the UFCS specification must be the first priority fast charging protocol.
  • the embodiment of the present application is specific to the specific fast charging protocol. The specific type is not limited.
  • the handshake signal of a certain protocol includes a pulse
  • a certain pseudo-pulse signal also includes a pulse
  • the handshake signal using the protocol and the pseudo-pulse signal are combined to form UFCS
  • the protocol information test device may misidentify the combined signal as a UFCS handshake signal and send a UFCS handshake response signal
  • the electronic equipment under test Unable to send protocol UFCS ping packets to tester.
  • the tester does not receive the protocol UFCS Ping data packet, so it can detect and confirm that the electronic device under test does not take the UFCS protocol as the first priority, so as to obtain more accurate test results.
  • Fig. 6 shows another exemplary workflow of the protocol priority testing method according to the embodiment of the present application.
  • the duration of the recorded result may be longer than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to the duration of the handshake signal of the charging protocol with the longest duration.
  • the tester After the tester identifies and determines that the recorded result matches the handshake signal of protocol B (the example of the second charging protocol below), it can send a protocol B handshake response signal (the example of the handshake response signal of the second charging protocol below) to the electronic device under test. equipment. If the tester receives the protocol B Ping data packet (the example of the Internet packet detector data packet of the second charging protocol below) after sending the protocol B handshake response signal, it can be considered that the electronic device under test supports the protocol B, and uses the protocol B as first priority.
  • the tester does not receive the protocol B Ping data packet within a certain period of time, it can be considered that the electronic device under test does not support protocol B.
  • the tester sends a handshake response signal in response to a handshake signal of a certain protocol (for example, protocol X), and receives the Ping packet of the protocol (or further, sends the ACK packet of the protocol), It can be considered that the electronic device under test supports the protocol, and takes the protocol X as the first priority.
  • protocol X for example, protocol X
  • a retry mechanism similar to a handshake signal may also be set for the Ping data packet.
  • the electronic device under test receives the protocol A handshake response signal, it sends the protocol A Ping data packet of the first preset bit rate to the tester for the first time, but does not receive the protocol A ACK data packet, and the electronic device under test The device can send out the protocol A Ping data packet of the first preset bit rate for the second time. If the protocol A ACK data packet has not been received yet, the electronic device under test can send a protocol A Ping data packet of the second preset bit rate, and wait for receiving the protocol A ACK data packet. If the electronic device under test has successively sent protocol A Ping data packets of all the preset bit rates it supports, but has not received the protocol A ACK data packet, then switch to other protocols and send out handshake signals of other protocols.
  • the tester may send a reset signal to the electronic device under test, so that the electronic device under test can determine again that the charging port of the tester is a dedicated charging port DCP After that, send the signal to the signal of the tester for the first time, and then execute the flow in Fig. 5 and Fig. 6 .
  • it is equivalent to performing a handshake priority test first, followed by a protocol priority test. If the results of the two tests are different, the result of the protocol priority test may prevail.
  • the charging parameter configuration and charging operation are not started directly only when the handshake is successful in the handshake phase, but after the handshake is successful, it enters the protocol identification phase and starts when the protocol identification is successful. Perform charging parameter configuration and charging operation.
  • the handshake priority test is based on the information in the handshake phase to complete the detection of the electronic device under test’s support for the protocol and the priority information
  • the protocol priority test is based on the information in the handshake phase and the protocol identification phase. Information, to complete the detection of the electronic device under test's support for the protocol and the priority information.
  • the information used in the protocol priority test is more comprehensive, so that more accurate detection results can be obtained.
  • the accuracy rate of the support status and priority information of the electronic device under test obtained by the tester for the protocol can be further improved.
  • the protocol information testing device confirms whether the electronic device under test takes protocol A as the first priority as an example.
  • the protocol information testing device can also perform more functions, for example, it can store the level information of the handshake signals of each protocol, and complete the comparison and confirmation of the microcontroller unit in the above example.
  • the embodiment of the present application does not limit the specific execution units of the above functions.
  • the protocol information testing method of the embodiment of the present application it is possible to effectively identify some counterfeit behaviors in which the electronic equipment under test claims to support a specific protocol but does not comply with the provisions of the specific protocol, so as to ensure the compliance of the electronic equipment under test with respect to the specific protocol, and avoid
  • the use of other protocols leads to security issues and affects the reputation of specific protocols, promoting the development of integrated fast charging ecology.
  • By testing the priority it can provide design trend reference for electronic equipment designers, which facilitates the design of electronic equipment to normalize the protocols with relatively high priority in the market, and is no longer compatible with low priority protocols, reducing multi-protocol support cost and the resulting design risk.
  • Fig. 7 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
  • an embodiment of the present application provides a method for testing protocol information.
  • the method is applied to a tester, and the tester records pulse information of at least one handshake signal of a charging protocol.
  • the at least one A charging protocol includes a first charging protocol, the method comprising:
  • Step S1 receiving the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
  • Step S2 recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the longest duration The duration of the handshake signal of the charging protocol;
  • Step S3 when the first recording result matches the pulse information of the handshake signal of the first charging protocol, determine that the first charging protocol is the first priority in the electronic device under test.
  • the tester can refer to the example of the tester in the above and the relevant descriptions of Fig. 2, Fig. 3, and Fig. 4, and at least one charging protocol can include the above-mentioned UFCS specification, QC protocol, VOOC protocol, etc. protocol
  • the present application does not limit the specific type and quantity of each protocol included in at least one charging protocol.
  • the pulse information of the handshake signal of at least one charging protocol refer to the examples of the handshake signal of protocol A and the handshake signal of protocol X in the above and related descriptions of FIG. 3 and FIG. 4 .
  • the present application also does not limit the specific waveform of the pulse information of the handshake signal of at least one charging protocol.
  • the first charging protocol reference may be made to protocol A in the above and related descriptions of FIG. 2 , FIG. 3 , and FIG. 4 , that is, an example of the UFCS specification.
  • the present application does not limit the specific type of the first charging protocol.
  • the electronic equipment under test can refer to the example of the electronic equipment under test in the relevant descriptions of the above and FIG. 2, FIG.
  • For a handshake signal reference may be made to the example of the signal sent for the first time in the related description of FIG. 3 and the first signal in the related description of FIG. 4 .
  • the "first sending" mentioned in this article means that the electronic device sends a handshake signal of a charging protocol for the first time (for example, the first handshake signal mentioned above, or the first signal).
  • An electronic device may send a handshake signal of a certain charging protocol multiple times.
  • the first recording result can refer to the example of the recording result corresponding to the signal received for the first time in the related description of the above and FIG. 3 , and the first recording result corresponding to the first received signal in the related description of FIG. An example of the recorded result of a signal.
  • step S3 the first record result is matched with the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of "Case 1" in the above and related descriptions of FIG. 3 .
  • the tester obtains the first record result based on the first handshake signal sent for the first time.
  • the tester can also re-obtain the first record result based on the first handshake signal sent for the second time or the third time.
  • the electronic device under test sends the first handshake signal for the first time, and the first record result is obtained on the tester based on the first handshake signal sent for the first time.
  • the second The first handshake signal is sent for the first time, and the first recording result is obtained on the tester based on the first handshake signal sent for the second time.
  • the tester can be set to execute step S3 again based on the newly obtained first record result, so as to ensure the accuracy of the test result of the protocol information test method in the embodiment of the present application, or it can also be set to identify and determine the first record result obtained again When the included pulse information is the same as the previously obtained first record result, the re-obtained first record result is not processed, so as to save the data processing cost of the protocol information testing method in the embodiment of the present application.
  • the present application does not limit the manner in which the tester processes the retrieved first record result.
  • the tester obtains the nth record result based on the nth handshake signal sent for the first time.
  • the tester can also be based on the second, the first
  • the nth handshake signal sent three times waits to re-obtain the nth record result, and then perform similar processing on the re-obtained nth record result as the re-obtained first record result.
  • the processing method of the results is not limited.
  • the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol.
  • the protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test.
  • the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
  • the tester only receives the signal once and confirms that the first record result matches the pulse information of the handshake signal of the first charging protocol, so that it can be determined that the first priority of the electronic device under test is a specific first charging protocol, without further Determining whether the first record result matches the pulse information of handshake signals of other protocols can reduce data processing costs.
  • the method further includes: when the first record result only includes the same pulse information as the pulse information of the handshake signal of the first charging protocol, determining that the first record result is the same as The pulse information of the handshake signal of the first charging protocol matches; when the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, determine that the first record result is different from the pulse information of the handshake signal of the first charging protocol.
  • the pulse information of the handshake signal of the first charging protocol does not match.
  • the first recording result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of “Case 1” in the above and related descriptions of FIG. 3 .
  • the first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, and reference may be made to the examples of "case 2" and "case 3" in the above and related descriptions of FIG. 3 .
  • the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol
  • the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol.
  • the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be mistakenly determined that the first priority among the electronic devices under test is the first charging protocol, so as to ensure the accuracy of the test results.
  • the method further includes: when the first recorded result does not match the pulse information of the handshake signal of the first charging protocol, comparing the first recorded result with at least one charging In the protocol, the pulse information of the handshake signal of other charging protocols except the first charging protocol; when the first record result matches the pulse information of the handshake signal of the second charging protocol in the other charging protocol, determine The second charging protocol is a first priority in the electronic device under test.
  • the second charging protocol can refer to the example of protocol X in the above and related descriptions of Fig. 3 and Fig. 4, and the pulse information of the handshake signal of the second charging protocol can refer to the above and related descriptions of Fig. Example of protocol X handshake signals.
  • the first record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols, and reference may be made to the example of "Case 3" in the above and related descriptions of FIG. 3 .
  • the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol. Further, the first record result only includes pulse information related to the second charging protocol When the pulse information of the handshake signals is the same as the pulse, it can be considered that the first handshake signal is the handshake signal of the second charging protocol. In this way, it can be further determined that the second charging protocol is the first priority in the electronic device under test, so as to obtain more comprehensive priority information of the electronic device under test according to the first recording result.
  • the tester is set not to send a handshake response signal
  • the method further includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1 ; Record the nth record result including the nth handshake signal, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the charging with the longest duration The duration of the handshake signal of the protocol; when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined charging protocol in the electronic device under test The priority information of the third charging protocol is used to determine the priority information of the third charging protocol in the electronic device under test.
  • nth handshake signal reference may be made to the examples of the second signal and the third signal in the above and related descriptions of FIG. 4 .
  • nth recording result reference may be made to the examples of the recording result corresponding to the second signal received for the first time and the recording result corresponding to the third signal received for the first time in the above and related descriptions of FIG. 4 .
  • the manner of determining that the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol can refer to the manner of determining that the first record result matches the pulse information of the handshake signal of the first charging protocol example of .
  • the tester can not only determine whether the first charging protocol is the first priority of the electronic device under test, but also record the corresponding Record the results and get more priority information according to the record results, thereby improving the tester's ability to test the priority information of each protocol of the electronic device under test.
  • determining the priority information of the third charging protocol in the electronic device under test includes: when the t-th priority charging protocol of the electronic device under test has been determined, determining the In the third charging protocol, it is the t+1th priority in the electronic device under test, and t is a positive integer; when the charging protocol of the first priority of the electronic device under test is not determined, determine the third The charging protocol is the first priority in the electronic device under test.
  • the third charging protocol is the t+1th priority of the electronic device under test, which can be referred to above
  • protocol B such as the QC protocol
  • protocol B can be identified as an example of the second priority.
  • the charging protocol of the first priority of the electronic device under test is not determined, it is determined that the third charging protocol is the first priority of the electronic device under test, and reference may be made to the relevant descriptions above and in FIG. 4
  • protocol B can be confirmed as an example of the first priority.
  • the priority sequence of the charging protocols supported by the electronic device under test can be sequentially determined.
  • the test result of the priority information of each protocol supported by the electronic equipment under test by the tester is made more specific.
  • Fig. 8 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
  • an embodiment of the present application provides a method for testing protocol information.
  • the method is applied to a tester, and the tester records pulse information of at least one handshake signal of a charging protocol.
  • the at least one A charging protocol includes a first charging protocol, the method comprising:
  • Step S4 receiving the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is the first signal sent after the electronic device determines that the port of the tester is a dedicated charging port;
  • Step S5 recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the longest duration The duration of the handshake signal of the charging protocol;
  • Step S6 when the first record result matches the pulse information of the handshake signal of the first charging protocol, sending a handshake response signal of the first charging protocol to the electronic device under test;
  • Step S7 according to the data information received after sending the handshake response signal of the first charging protocol, determine the priority information of the first charging protocol in the electronic device under test.
  • the tester can refer to the example of the tester in the above and the relevant descriptions of Figure 2, Figure 5, and Figure 6, and at least one charging protocol can include the above-mentioned UFCS specification, QC protocol, VOOC protocol, etc. protocol
  • the present application does not limit the specific type and quantity of each protocol included in at least one charging protocol.
  • the pulse information of the handshake signal of at least one charging protocol refer to the examples of the handshake signal of protocol A and the handshake signal of protocol X in the above and related descriptions of FIG. 5 and FIG. 6 .
  • the present application also does not limit the specific waveform of the pulse information of the handshake signal of at least one charging protocol.
  • the first charging protocol reference may be made to protocol A in the above description and related descriptions of FIG. 2 , FIG. 5 , and FIG. 6 , that is, an example of the UFCS specification.
  • the present application does not limit the specific type of the first charging protocol.
  • the electronic equipment under test can refer to the example of the electronic equipment under test in the relevant descriptions of the above and FIG. 2, FIG.
  • For a handshake signal reference may be made to the example of the first signal sent above and in the related description of FIG. 5 and the first signal in the related description of FIG. 6 .
  • the "first sending” mentioned here refers to the handshake signal of a certain charging protocol sent by the electronic device for the first time (for example, the first handshake signal mentioned above, or the first signal).
  • An electronic device may send a handshake signal of a certain charging protocol multiple times.
  • For the first recording result reference may be made to the example of the recording result corresponding to the signal received for the first time in the above and related descriptions of FIG. 5 and FIG. 6 .
  • step S6 the first record result is matched with the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of "case 1" in the above and related descriptions of FIG. 3 .
  • the tester obtains the first record result based on the first handshake signal sent for the first time as an example.
  • the tester can also re-obtain the first record result based on the first handshake signal sent for the second and third times.
  • the electronic device under test sends the first handshake signal for the first time, and the first record result is obtained on the tester based on the first handshake signal sent for the first time. If the electronic device under test does not receive the handshake response signal, the second The first handshake signal is sent for the first time, and the first recording result is obtained on the tester based on the first handshake signal sent for the second time.
  • the tester can be set to perform step S6 again based on the newly obtained first record result, so as to ensure the accuracy of the test result of the protocol information test method in the embodiment of the present application, or it can also be set to identify and determine the first record result obtained again When the included pulse information is the same as the previously obtained first record result, the re-obtained first record result is not processed, so as to save the data processing cost of the protocol information testing method in the embodiment of the present application.
  • the present application does not limit the manner in which the tester processes the retrieved first record result.
  • the nth record result obtained by the tester based on the nth handshake signal sent for the first time is used as an example.
  • the nth handshake signal sent three times re-obtains the nth record result, and then performs similar processing to the re-obtained first nth record result on the re-obtained nth record result.
  • the processing method is not limited.
  • the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol.
  • the tester can determine the priority information of the first charging protocol in the electronic device under test.
  • the protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test.
  • the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
  • the tester only receives the signal once and determines that the first recorded result matches the pulse information of the handshake signal of the first charging protocol.
  • the tester sends a handshake response signal and receives the corresponding data information to determine the first record of the electronic device under test.
  • the priority is specific to the first charging protocol, and the tester does not need to determine whether the first record result matches the pulse information of the handshake signals of other protocols, nor does it need to send handshake response signals of other protocols, which can reduce data processing costs.
  • the first handshake signal is the information generated in the handshake phase.
  • the data information received after sending the handshake response signal of the first charging protocol may include the information generated in the protocol identification phase. In this way, the information in the protocol identification phase can be combined with the handshake. Phase information is used to determine the priority of the first charging protocol in the electronic device under test, so that the obtained test results are more accurate.
  • the method further includes: when the first record result only includes the same pulse information as the pulse information of the handshake signal of the first charging protocol, determining that the first record result is the same as The pulse information of the handshake signal of the first charging protocol matches; when the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, determine that the first record result is different from the pulse information of the handshake signal of the first charging protocol.
  • the pulse information of the handshake signal of the first charging protocol does not match.
  • the first recording result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of “Case 1” in the above and related descriptions of FIG. 3 .
  • the first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, and reference may be made to the examples of "case 2" and "case 3" in the above and related descriptions of FIG. 3 .
  • the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol
  • the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol.
  • the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be wrongly determined that the first charging protocol is the first priority in the electronic device under test, ensuring the accuracy of the test result.
  • determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, when receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, it is determined that the first charging protocol in the electronic device under test is number one priority.
  • the Internet packet detector data packet of the first charging protocol can refer to the example of the protocol A Ping data packet in the above description and the related description of FIG. 5 .
  • the tester After sending the handshake response signal of the first charging protocol, receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, you can refer to the above and related descriptions in Figure 5, the tester sends protocol A Example of a Protocol A Ping packet received after the handshake response signal.
  • the Internet packet detector data packet is the information generated in the protocol identification stage. If the electronic device under test sends an Internet packet detector data packet of a certain protocol and receives the corresponding confirmation data packet, it can configure charging parameters based on the protocol. And accept power supply, therefore, if the tester receives the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, it means that the electronic device under test does support the first charging protocol. charging protocol. It is determined that the first charging protocol is the first priority in the electronic device under test by receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
  • determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second handshake sent for the first time is received from the electronic device under test signal, it is determined that the first charging protocol is not the first priority in the electronic device under test, and the second handshake signal is different from the first handshake signal.
  • the second handshake signal may be a second signal sent by the electronic device under test.
  • the second handshake signal sent for the first time reference may be made to the example of the second signal in the above and related descriptions of FIG. 6 .
  • the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second packet sent for the first time is received from the electronic device under test.
  • the handshake signal you can refer to the above and the relevant description in Figure 6, after the tester sends the protocol A handshake response signal, it does not receive the protocol A Ping data packet and receives the second signal example.
  • the electronic device under test If the electronic device under test receives a handshake response signal of a certain protocol but does not support the protocol, it will not send the Internet packet detector data packet of the protocol, but send another handshake signal until it sends out the Internet packet of a certain protocol.
  • the charging parameters can be configured based on this protocol and the power supply can be accepted. Therefore, if the tester does not receive the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, but receives the second handshaking signal sent for the first time , indicating that the electronic device under test does not support the first charging protocol. It is determined that the first charging protocol is not the first priority in the electronic device under test by not receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
  • the method further includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; In the charging protocol of the above-mentioned level, record the nth record result including the nth handshake signal, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to The duration of the handshake signal of the charging protocol with the longest duration; when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol, send the handshake signal of the second charging protocol A handshake response signal is sent to the electronic device under test; after sending the handshake response signal of the second charging protocol, when receiving an Internet packet detector data packet of the second charging protocol from the electronic device under test, it is determined that the first The second charging protocol is the first priority in the electronic device under test.
  • nth handshake signal reference may be made to the example of the second signal in the above and related descriptions of FIG. 6 .
  • nth recording result reference may be made to the example of the recording result corresponding to the second type of signal in the above and related descriptions of FIG. 6 .
  • second charging protocol reference may be made to the example of protocol B in the above and related descriptions of FIG. 6 .
  • the manner of determining that the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol can refer to the manner of determining that the first record result matches the pulse information of the handshake signal of the first charging protocol example of .
  • the tester After sending the handshake response signal of the second charging protocol, receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test, you can refer to the above and the related description in Figure 6, the tester sends the protocol B handshake Example of a Protocol B Ping packet received after a response signal.
  • the tester determines that the electronic device under test does not use the first charging protocol as the first priority, it can also determine the specific type of the first priority charging protocol of the electronic device under test, that is, the second charging protocol. protocol, and determine that charging protocols other than the second charging protocol on the electronic device under test are not the first priority, further improving the tester's ability to test the priority information of the charging protocol of the electronic device under test.
  • An embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol includes the first charging protocol, the device includes:
  • the first receiving module is configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
  • the first recording module is configured to record a first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
  • a first determining module configured to determine that the first charging protocol is the first priority among the electronic devices under test when the first recording result matches the pulse information of the handshake signal of the first charging protocol class.
  • the device further includes:
  • a second determining module configured to determine the handshake between the first record result and the first charging protocol when the first record result only includes pulse information identical to the pulse information of the handshake signal of the first charging protocol The pulse information of the signal matches;
  • a third determination module configured to determine the first record result and the handshake signal of the first charging protocol when the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol The pulse information does not match.
  • the device further includes:
  • a first comparison module configured to compare the first recorded result with at least one charging protocol except the first charging protocol when the first recorded result does not match the pulse information of the handshake signal of the first charging protocol The pulse information of the handshake signal of other charging protocols;
  • a fourth determining module configured to determine that the second charging protocol is in the electronic device under test when the first record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols.
  • Medium is the first priority.
  • the tester is set not to send a handshake response signal
  • the device further includes:
  • the second receiving module is used to receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
  • the second recording module is configured to record the nth recording result including the nth handshake signal, wherein the duration of the nth recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
  • the fifth determination module is configured to, when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined charging protocol in the electronic device under test
  • the priority information of the third charging protocol is used to determine the priority information of the third charging protocol in the electronic device under test.
  • determining the priority information of the third charging protocol in the electronic device under test includes: when the t-th priority charging protocol of the electronic device under test has been determined, determining the In the third charging protocol, it is the t+1th priority in the electronic device under test, and t is a positive integer; when the charging protocol of the first priority of the electronic device under test is not determined, determine the third The charging protocol is the first priority in the electronic device under test.
  • An embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol includes the first charging protocol, the device includes:
  • the third receiving module is used to receive the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is the first handshake signal sent after the electronic device determines that the port of the tester is a dedicated charging port a signal;
  • a third recording module configured to record a first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
  • a first sending module configured to send a handshake response signal of the first charging protocol to the electronic device under test when the first record result matches the pulse information of the handshake signal of the first charging protocol
  • the sixth determination module is configured to determine the priority information of the first charging protocol in the electronic device under test according to the data information received after sending the handshake response signal of the first charging protocol.
  • a seventh determination module configured to determine the handshake between the first record result and the first charging protocol when the first record result only includes pulse information identical to the pulse information of the handshake signal of the first charging protocol The pulse information of the signal matches;
  • An eighth determination module configured to determine the first record result and the handshake signal of the first charging protocol when the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol The pulse information does not match.
  • determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second handshake sent for the first time is received from the electronic device under test signal, it is determined that the first charging protocol is not the first priority in the electronic device under test, and the second handshake signal is different from the first handshake signal.
  • the device further includes:
  • the second sending module is configured to send the handshake response signal of the second charging protocol to the at least one charging protocol when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol. Describe the electronic equipment under test;
  • the ninth determination module is configured to determine that the second charging protocol is in the second charging protocol when receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test after sending the handshake response signal of the second charging protocol.
  • the electronic equipment under test is the first priority.
  • Fig. 9 shows an exemplary structural diagram of a tester according to an embodiment of the present application.
  • An embodiment of the present application provides a tester, including: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
  • the tester can be a stand-alone electronic device, or integrated as a device in a mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, speaker with screen , ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, augmented reality (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, drone , on-board equipment, smart home equipment, or at least one of smart city equipment.
  • augmented reality augmented reality, AR
  • VR virtual reality
  • AI artificial intelligence
  • the tester may include a processor 110, an internal memory 121, a communication module 160, and the like.
  • the communication module 160 and the processor 110 may correspond to the protocol information testing device in FIG. 3 .
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 may execute the protocol information testing method of the embodiment of the present application.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a general-purpose input/output (general-purpose input/output, GPIO) interface, and the like.
  • the processor 110 may be connected to modules such as a communication module through at least one of the above interfaces.
  • the memory 121 may be used to store computer-executable program code including instructions.
  • the memory 121 may include an area for storing programs and an area for storing data.
  • the storage program area can store an operating system, at least one application program required by a function (such as an application program that determines that the first record result matches the pulse information of the handshake signal of the first charging protocol, etc.) and the like.
  • the storage data area can store data created during the use of the tester (such as the first record result, the nth record result, protocol priority information, etc.) and the like.
  • the memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional methods or data processing of the tester by executing instructions stored in the memory 121 and/or instructions stored in the memory provided in the processor.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the computing device.
  • the computing device may include more or fewer components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • An embodiment of the present application provides a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
  • An embodiment of the present application provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium bearing computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
  • a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
  • a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Non-exhaustive list of computer-readable storage media include: portable computer disk, hard disk, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), erasable Electrically Programmable Read-Only-Memory (EPROM or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD -ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing .
  • RAM Random Access Memory
  • ROM read only memory
  • EPROM or flash memory erasable Electrically Programmable Read-Only-Memory
  • Static Random-Access Memory SRAM
  • Portable Compression Disk Read-Only Memory Compact Disc Read-Only Memory
  • CD -ROM Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • Computer readable program instructions or codes described herein may be downloaded from a computer readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, local area network, wide area network, and/or wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • Computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages.
  • Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet).
  • electronic circuits such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present application.
  • These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
  • each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts can be implemented with hardware (such as circuits or ASIC (Application Specific Integrated Circuit, application-specific integrated circuit)), or it can be realized by a combination of hardware and software, such as firmware.
  • hardware such as circuits or ASIC (Application Specific Integrated Circuit, application-specific integrated circuit)
  • firmware such as firmware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The present application relates to a protocol information testing method, a tester, a storage medium, and a program product. The method is applied to a tester, the tester records pulse information of a handshake signal of at least one charging protocol, and the at least one charging protocol comprises a first charging protocol. The method comprises: receiving a first handshake signal sent for the first time by an electronic device under test; recording a first record result comprising the first handshake signal; and if the first record result is matched with the pulse information of the handshake signal of the first charging protocol, determining that the first charging protocol has a first priority in the electronic device under test. According to the protocol information testing method in the embodiments of the present application, the priority of the first charging protocol as a specific fast charging protocol in all fast charging protocols supported by the electronic device under test can be determined by testing, so as to determine whether the electronic device under test violates regulations of the specific fast charging protocol.

Description

协议信息测试方法、测试仪、存储介质及程序产品Protocol information test method, tester, storage medium and program product
本申请要求于2021年12月8日提交中国专利局、申请号为202111492413.2、申请名称为“协议信息测试方法、测试仪、存储介质及程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application submitted to the China Patent Office on December 8, 2021, with the application number 202111492413.2, and the application name is "protocol information test method, tester, storage medium and program product", all of which are passed References are incorporated in this application.
技术领域technical field
本申请涉及信息检测领域,尤其涉及一种协议信息测试方法、测试仪、存储介质及程序产品。The present application relates to the field of information detection, in particular to a method for testing protocol information, a tester, a storage medium and a program product.
背景技术Background technique
电子设备的功能随其硬件装置及软件架构的优化而越发完善,但也使得电子设备的耗电速度更快,因此,现有技术提出多种快速充电协议,使得支持快速充电协议的电子设备能够按照协议规定的方式实现快速充电。对于一些特定的快速充电协议,其规定电子设备必须在支持该快速充电协议的同时、将该快速充电协议作为第一优先级的充电协议。然而,一些电子设备虽声明其支持该特定的快速充电协议,并将该特定的快速充电协议作为第一优先级的充电协议,但其对该特定的快速充电协议的真实支持情况可能与其声明不同。基于此,需要对电子设备支持的快速充电协议进行检测。The function of electronic equipment is more and more perfect with the optimization of its hardware device and software architecture, but it also makes the power consumption of electronic equipment faster. Therefore, the existing technology proposes a variety of fast charging protocols, so that electronic equipment that supports fast charging protocols can Fast charging is achieved in the manner stipulated by the agreement. For some specific fast charging protocols, it is stipulated that the electronic device must take the fast charging protocol as the first priority charging protocol while supporting the fast charging protocol. However, although some electronic devices declare that they support the specific fast charging protocol and regard the specific fast charging protocol as the first priority charging protocol, their real support for the specific fast charging protocol may be different from the statement . Based on this, it is necessary to detect the fast charging protocol supported by the electronic device.
现有技术或仅能检测被测的电子设备是否支持一种快速充电协议,或仅能检测被测的电子设备是否支持多种快速充电协议,尚不能确定检测到的快速充电协议在电子设备支持的全部快速充电协议中的优先级情况。The existing technology can only detect whether the electronic device under test supports a fast charging protocol, or can only detect whether the electronic device under test supports multiple fast charging protocols, and it is not yet possible to determine whether the detected fast charging protocol is supported by the electronic device. priority cases in all fast charging protocols.
发明内容Contents of the invention
有鉴于此,提出了一种协议信息测试方法、测试仪、存储介质及程序产品,根据本申请实施例的协议信息测试方法,能够检测确定特定的快速充电协议在被测的电子设备支持的全部快速充电协议中的优先级情况,从而确定被测的电子设备是否违反特定的快速充电协议规定。In view of this, a protocol information testing method, a tester, a storage medium, and a program product are proposed. According to the protocol information testing method of the embodiment of the present application, it is possible to detect and determine that a specific fast charging protocol is supported by all electronic devices under test. Priority conditions in the fast charging protocol to determine whether the electronic device under test violates a specific fast charging protocol.
第一方面,本申请的实施例提供了一种协议信息测试方法,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。In the first aspect, an embodiment of the present application provides a protocol information testing method, the method is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol The protocol includes a first charging protocol, and the method includes: receiving a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is when the electronic device determines that the port of the tester is dedicated for charging Sent after the port; record the first record result including the first handshake signal, wherein the duration of the first record result is longer than or equal to the duration of the handshake signal of any charging protocol in the at least one charging protocol The duration of the handshake signal of the longest charging protocol; when the first record result matches the pulse information of the handshake signal of the first charging protocol, it is determined that the first charging protocol is in the electronic device under test is the first priority.
根据本申请实施例的协议信息测试方法,在电子设备确定测试仪的端口是专用充电端口之后,通过测试仪接收被测的电子设备第一次发送的第一握手信号,并记录下包括第一握手信号的第一记录结果。由于第一记录结果的时长大于至少一种充电协议中的任一充电协议的 握手信号的时长或等于至少一种充电协议中时长最长的充电协议的握手信号的时长,且至少一种充电协议包括第一充电协议,因此,第一记录结果具备包括第一充电协议的握手信号的全部信息的能力。通过确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,可以确定第一握手信号确实是第一充电协议的握手信号,因此,可以确定第一充电协议在被测的电子设备中是第一优先级。本申请实施例的协议信息测试方法可以直接得到第一充电协议在被测的电子设备中的优先级情况,第一充电协议为特定的快速充电协议时,使得能够检测确定特定的快速充电协议在被测的电子设备支持的全部快速充电协议中的优先级情况。According to the protocol information testing method of the embodiment of the present application, after the electronic device determines that the port of the tester is a dedicated charging port, the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol. By determining that the first record result matches the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshaking signal is indeed the handshaking signal of the first charging protocol, and therefore, it can be determined that the first charging protocol is in the electronic device under test is the first priority. The protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test. When the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
测试仪仅接收一次信号并确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,即可确定被测的电子设备的第一优先级是特定的第一充电协议,而不需再确定第一记录结果和其他协议的握手信号的脉冲信息是否匹配,可以降低数据处理成本。The tester only receives the signal once and confirms that the first record result matches the pulse information of the handshake signal of the first charging protocol, so that it can be determined that the first priority of the electronic device under test is a specific first charging protocol, without further Determining whether the first record result matches the pulse information of handshake signals of other protocols can reduce data processing costs.
根据第一方面,在所述协议信息测试方法的第一种可能的实现方式中,所述方法还包括:在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。According to the first aspect, in the first possible implementation of the protocol information testing method, the method further includes: the first recording result only includes the pulse information of the handshake signal with the first charging protocol When the pulse information is the same, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; when the first record result includes pulse information different from the handshake signal of the first charging protocol When the pulse is pulsed, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号确实是第一充电协议的握手信号,第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,而是其他协议的脉冲信号或者伪脉冲信号。通过这种方式,可以区分第一握手信号确实是第一充电协议的握手信号的情况以及非第一充电协议的握手信号的情况,从而在出现第一握手信号非第一充电协议的握手信号的情况时不会错误地确定被测的电子设备中第一优先级的是第一充电协议,保证检测结果的准确度。When the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol When the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol. In this way, it is possible to distinguish between the case where the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be mistakenly determined that the first priority among the electronic devices under test is the first charging protocol, so as to ensure the accuracy of the test results.
根据第一方面或者第一方面的第一种可能的实现方式,在所述协议信息测试方法的第二种可能的实现方式中,所述方法还包括:在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配时,对比所述第一记录结果和至少一个充电协议中、除第一充电协议之外的其他充电协议的握手信号的脉冲信息;在所述第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。According to the first aspect or the first possible implementation of the first aspect, in the second possible implementation of the protocol information testing method, the method further includes: combining the first recording result with the When the pulse information of the handshake signal of the first charging protocol does not match, compare the first recorded result with the pulse information of the handshake signal of other charging protocols in at least one charging protocol except the first charging protocol; When a record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols, it is determined that the second charging protocol is the first priority in the electronic device under test.
第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,进一步地,第一记录结果仅包括与第二充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号是第二充电协议的握手信号。通过这种方式,可以进一步确定第二充电协议在被测的电子设备中是第一优先级,以根据第一记录结果获得被测的电子设备的更加全面的优先级信息。When the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol. Further, the first record result only includes pulse information related to the second charging protocol When the pulse information of the handshake signals is the same as the pulse, it can be considered that the first handshake signal is the handshake signal of the second charging protocol. In this way, it can be further determined that the second charging protocol is the first priority in the electronic device under test, so as to obtain more comprehensive priority information of the electronic device under test according to the first recording result.
根据第一方面以及以上第一方面的任意一种可能的实现方式,在所述协议信息测试方法的第三种可能的实现方式中,所述测试仪被设置为不发送握手响应信号,所述方法还包括:接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确 定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息。According to the first aspect and any possible implementation of the above first aspect, in a third possible implementation of the protocol information testing method, the tester is set not to send a handshake response signal, the The method also includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; recording the nth record result including the nth handshake signal, wherein the duration of the nth record result greater than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; between the nth record result and the at least one charging protocol When the pulse information of the handshake signal of the third charging protocol matches, the priority information of the third charging protocol in the electronic device under test is determined according to the determined priority information of the charging protocol in the electronic device under test.
通过这种方式,使得测试仪不仅能够确定第一充电协议是否为被测电子设备的第一优先级,还可以在每次接收到的一种握手信号时,根据握手信号的顺序分别记录下对应的记录结果并根据记录结果得到更多的优先级信息,从而提升测试仪对于被测的电子设备的各协议优先级信息的测试能力。In this way, the tester can not only determine whether the first charging protocol is the first priority of the electronic device under test, but also record the corresponding Record the results and get more priority information according to the record results, thereby improving the tester's ability to test the priority information of each protocol of the electronic device under test.
根据第一方面的第三种可能的实现方式,在所述协议信息测试方法的第四种可能的实现方式中,在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息,包括:在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协议中在所述被测的电子设备中是第t+1优先级,t为正整数;在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级。According to the third possible implementation of the first aspect, in the fourth possible implementation of the protocol information testing method, the nth record result and the third charging in the at least one charging protocol When the pulse information of the handshake signal of the protocol matches, according to the determined priority information of the charging protocol in the electronic device under test, determine the priority information of the third charging protocol in the electronic device under test, including: When the charging protocol of the tth priority of the electronic device under test has been determined, it is determined that the third charging protocol is the t+1 priority in the electronic device under test, and t is a positive integer; When determining the charging protocol of the first priority of the electronic device under test, it is determined that the third charging protocol is the first priority of the electronic device under test.
通过这种方式,可以根据记录下的多个记录结果,结合已经确定的优先级信息,依次确定被测的电子设备支持的各充电协议的优先级顺序。使得测试仪对于被测的电子设备所支持的各协议的优先级信息的测试结果更加具体。In this way, according to the multiple recording results recorded, combined with the determined priority information, the priority sequence of the charging protocols supported by the electronic device under test can be sequentially determined. The test result of the priority information of each protocol supported by the electronic equipment under test by the tester is made more specific.
第二方面,本申请的实施例提供了一种协议信息测试方法,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的第一种信号;记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,发送第一充电协议的握手响应信号到所述被测的电子设备;根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息。In the second aspect, an embodiment of the present application provides a protocol information testing method, the method is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol The protocol includes a first charging protocol, and the method includes: receiving a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is when the electronic device determines that the port of the tester is dedicated for charging The first signal sent after the port; record the first record result including the first handshake signal, wherein the duration of the first record result is longer than the handshake signal of any charging protocol in the at least one charging protocol Duration or equal to the duration of the handshake signal of the charging protocol with the longest duration; when the first record result matches the pulse information of the handshake signal of the first charging protocol, send the handshake response signal of the first charging protocol to the The electronic device under test; according to the data information received after sending the handshake response signal of the first charging protocol, determine the priority information of the first charging protocol in the electronic device under test.
根据本申请实施例的协议信息测试方法,在电子设备确定测试仪的端口是专用充电端口之后,通过测试仪接收被测的电子设备第一次发送的第一握手信号,并记录下包括第一握手信号的第一记录结果。由于第一记录结果的时长大于至少一种充电协议中的任一充电协议的握手信号的时长或等于至少一种充电协议中时长最长的充电协议的握手信号的时长,且至少一种充电协议包括第一充电协议,因此,第一记录结果具备包括第一充电协议的握手信号的全部信息的能力。通过确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,可以确定第一握手信号确实是第一充电协议的握手信号,发送第一充电协议的握手响应信号到被测的电子设备。测试仪再根据发送第一充电协议的握手响应信号之后接收到的数据信息,可以确定所述第一充电协议在被测的电子设备中的优先级信息。本申请实施例的协议信息测试方法可以直接得到第一充电协议在被测的电子设备中的优先级情况,第一充电协议为特定的快速充电协议时,使得能够检测确定特定的快速充电协议在被测的电子设备支持的全部快速充电协议中的优先级情况。According to the protocol information testing method of the embodiment of the present application, after the electronic device determines that the port of the tester is a dedicated charging port, the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol. By determining that the first record result matches the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshaking signal is indeed the handshaking signal of the first charging protocol, and the handshaking response signal of the first charging protocol is sent to the electronic device under test . According to the data information received after sending the handshake response signal of the first charging protocol, the tester can determine the priority information of the first charging protocol in the electronic device under test. The protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test. When the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
测试仪仅接收一次信号并确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,在匹配时发送握手响应信号并接收相应的数据信息,即可确定被测的电子设备的第一优先级 是特定的第一充电协议,测试仪不需再确定第一记录结果和其他协议的握手信号的脉冲信息是否匹配,也不需再发送其他协议的握手响应信号,可以降低数据处理成本。The tester only receives the signal once and determines that the first recorded result matches the pulse information of the handshake signal of the first charging protocol. When matching, the tester sends a handshake response signal and receives the corresponding data information to determine the first record of the electronic device under test. The priority is specific to the first charging protocol, and the tester does not need to determine whether the first record result matches the pulse information of the handshake signals of other protocols, nor does it need to send handshake response signals of other protocols, which can reduce data processing costs.
第一握手信号是握手阶段产生的信息,发送第一充电协议的握手响应信号之后接收到的数据信息可以包括协议识别阶段产生的信息,通过这种方式,使得能够结合协议识别阶段的信息和握手阶段的信息来确定第一充电协议在被测的电子设备中的优先级情况,使得得到的测试结果更加准确。The first handshake signal is the information generated in the handshake phase. The data information received after sending the handshake response signal of the first charging protocol may include the information generated in the protocol identification phase. In this way, the information in the protocol identification phase can be combined with the handshake. Phase information is used to determine the priority of the first charging protocol in the electronic device under test, so that the obtained test results are more accurate.
根据第二方面,在所述协议信息测试方法的第一种可能的实现方式中,所述方法还包括:在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。According to the second aspect, in the first possible implementation of the protocol information testing method, the method further includes: the first recording result only includes the pulse information of the handshake signal with the first charging protocol When the pulse information is the same, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; when the first record result includes pulse information different from the handshake signal of the first charging protocol When the pulse is pulsed, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号确实是第一充电协议的握手信号,第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,而是其他协议的脉冲信号或者伪脉冲信号。通过这种方式,可以区分第一握手信号确实是第一充电协议的握手信号的情况以及非第一充电协议的握手信号的情况,从而在出现第一握手信号非第一充电协议的握手信号的情况时不会错误地确定第一充电协议在被测的电子设备中是第一优先级,保证检测结果的准确度。When the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol When the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol. In this way, it is possible to distinguish between the case where the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be wrongly determined that the first charging protocol is the first priority in the electronic device under test, ensuring the accuracy of the test result.
根据第二方面或第二方面的第一种可能的实现方式,在所述协议信息测试方法的第二种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。According to the second aspect or the first possible implementation of the second aspect, in the second possible implementation of the protocol information testing method, according to the data information received after sending the handshake response signal of the first charging protocol , determining the priority information of the first charging protocol in the electronic device under test includes: after sending a handshake response signal of the first charging protocol, receiving a message of the first charging protocol from the electronic device under test When detecting the data packet from the Internet packet detector, it is determined that the first charging protocol is the first priority in the electronic device under test.
网际包探测器数据包是在协议识别阶段产生的信息,被测的电子设备若发出某一协议的网际包探测器数据包并接收到对应的确认数据包时即可基于该协议进行充电参数配置并接受供电,因此,若测试仪发出第一充电协议的握手响应信号之后接收到来自被测的电子设备的第一充电协议的网际包探测器数据包,说明被测的电子设备确实支持第一充电协议。通过接收到协议识别阶段的网际包探测器数据包来确定第一充电协议在被测的电子设备中是第一优先级,使得得到的测试结果与被测的电子设备的实际情况相符合。The Internet packet detector data packet is the information generated in the protocol identification stage. If the electronic device under test sends an Internet packet detector data packet of a certain protocol and receives the corresponding confirmation data packet, it can configure charging parameters based on the protocol. And accept power supply, therefore, if the tester receives the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, it means that the electronic device under test does support the first charging protocol. charging protocol. It is determined that the first charging protocol is the first priority in the electronic device under test by receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
根据第二方面以及以上第二方面的任意一种可能的实现方式,在所述协议信息测试方法的第三种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号时,确定所述第一充电协议在所述被测的电子设备中不是第一优先级,所述第二握手信号不同与第一握手信号。According to the second aspect and any possible implementation of the above second aspect, in the third possible implementation of the protocol information testing method, according to the data received after sending the handshake response signal of the first charging protocol information, determining the priority information of the first charging protocol in the electronic device under test, including: after sending the handshake response signal of the first charging protocol, the first charging from the electronic device under test is not received When the Internet packet detector data packet of the protocol is received and the second handshake signal sent for the first time is received from the electronic device under test, it is determined that the first charging protocol is not the first priority in the electronic device under test , the second handshake signal is different from the first handshake signal.
被测的电子设备若接收到某一协议的握手响应信号但不支持该协议时,不会发出该协议的网际包探测器数据包,而是发出另外的握手信号,直到发出某一协议的网际包探测器数据包并接收到对应的确认数据包时即可基于该协议进行充电参数配置并接受供电。因此,若测试仪发出第一充电协议的握手响应信号之后未接收到来自被测的电子设备的第一充电协议的 网际包探测器数据包,而是接收到第一次发送的第二握手信号,说明被测的电子设备并不支持第一充电协议。通过未接收到协议识别阶段的网际包探测器数据包来确定第一充电协议在被测的电子设备中不是第一优先级,使得得到的测试结果与被测的电子设备的实际情况相符合。If the electronic device under test receives a handshake response signal of a certain protocol but does not support the protocol, it will not send the Internet packet detector data packet of the protocol, but send another handshake signal until it sends out the Internet packet of a certain protocol. When the packet detector data packet is received and the corresponding confirmation data packet is received, the charging parameters can be configured based on this protocol and the power supply can be accepted. Therefore, if the tester does not receive the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, but receives the second handshaking signal sent for the first time , indicating that the electronic device under test does not support the first charging protocol. It is determined that the first charging protocol is not the first priority in the electronic device under test by not receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
根据第二方面以及以上第二方面的任意一种可能的实现方式,在所述协议信息测试方法的第四种可能的实现方式中,所述方法还包括:接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;在未确定被测的电子设备中第一优先级的充电协议时,记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配时,发送所述第二充电协议的握手响应信号到所述被测的电子设备;在发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。According to the second aspect and any possible implementation of the above second aspect, in a fourth possible implementation of the protocol information testing method, the method further includes: receiving the first The nth handshake signal sent, n is an integer greater than 1; when the charging protocol of the first priority in the electronic device under test is not determined, record the nth recording result including the nth handshake signal, wherein the nth The duration of the n record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; When the pulse information of the handshake signal of the second charging protocol in one charging protocol matches, send the handshake response signal of the second charging protocol to the electronic device under test; after sending the handshake response signal of the second charging protocol, When receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test, it is determined that the second charging protocol is the first priority in the electronic device under test.
通过这种方式,使得测试仪在确定被测电子设备不以第一充电协议作为第一优先级时,还能够确定被测电子设备的第一优先级的充电协议的具体类型,即第二充电协议,并确定被测电子设备上除第二充电协议外的充电协议均不是第一优先级,进一步提升测试仪对于被测的电子设备的充电协议的优先级信息的测试能力。In this way, when the tester determines that the electronic device under test does not use the first charging protocol as the first priority, it can also determine the specific type of the first priority charging protocol of the electronic device under test, that is, the second charging protocol. protocol, and determine that charging protocols other than the second charging protocol on the electronic device under test are not the first priority, further improving the tester's ability to test the priority information of the charging protocol of the electronic device under test.
第三方面,本申请的实施例提供了一种协议信息测试装置,所述装置应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述装置包括:第一接收模块,用于接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;第一记录模块,用于记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;第一确定模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。In the third aspect, the embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol The protocol includes a first charging protocol, and the device includes: a first receiving module, configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is determined after the electronic device determines the The port of the tester is sent after the dedicated charging port; the first recording module is used to record the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the at least one charging protocol The duration of the handshake signal of any of the charging protocols or equal to the duration of the handshake signal of the charging protocol with the longest duration; the first determination module is used to compare the first recording result with the handshake signal of the first charging protocol When the pulse information matches, it is determined that the first charging protocol is the first priority in the electronic device under test.
根据第三方面,在所述协议信息测试装置的第一种可能的实现方式中,所述装置还包括:第二确定模块,用于在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;第三确定模块,用于在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。According to the third aspect, in the first possible implementation manner of the device for testing protocol information, the device further includes: a second determination module, configured to include only information related to the first charge in the first recording result. When the pulse information of the handshake signal of the protocol is the same as the pulse, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; the third determination module is configured to match the first record result with the pulse information of the handshake signal of the first charging protocol; When the pulse information of the handshake signal of the first charging protocol is different, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
根据第三方面或者第三方面的第一种可能的实现方式,在所述协议信息测试装置的第二种可能的实现方式中,所述装置还包括:第一对比模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配时,对比所述第一记录结果和至少一个充电协议中、除第一充电协议之外的其他充电协议的握手信号的脉冲信息;第四确定模块,用于在所述第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。According to the third aspect or the first possible implementation of the third aspect, in the second possible implementation of the protocol information testing device, the device further includes: a first comparison module, configured to When the first recorded result does not match the pulse information of the handshake signal of the first charging protocol, compare the first recorded result with the handshake signal of at least one charging protocol other than the first charging protocol. Pulse information; a fourth determining module, configured to determine that the second charging protocol is in the measured Electronic equipment is the first priority.
根据第三方面以及以上第三方面的任意一种可能的实现方式,在所述协议信息测试装置的第三种可能的实现方式中,所述测试仪被设置为不发送握手响应信号,所述装置还包括: 第二接收模块,用于接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;第二记录模块,用于记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;第五确定模块,用于在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息。According to the third aspect and any possible implementation manner of the third aspect above, in a third possible implementation manner of the device for testing protocol information, the tester is configured not to send a handshake response signal, and the The device also includes: a second receiving module, configured to receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; a second recording module, configured to record the nth handshake signal including the nth handshake signal The nth record result, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; the fifth determination A module, configured to, when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined priority of the charging protocol in the electronic device under test The information is used to determine the priority information of the third charging protocol in the electronic device under test.
根据第三方面的第三种可能的实现方式,在所述协议信息测试装置的第四种可能的实现方式中,在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息,包括:在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协议中在所述被测的电子设备中是第t+1优先级,t为正整数;在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级。According to the third possible implementation of the third aspect, in the fourth possible implementation of the protocol information testing device, the nth record result and the third charging in the at least one charging protocol When the pulse information of the handshake signal of the protocol matches, according to the determined priority information of the charging protocol in the electronic device under test, determine the priority information of the third charging protocol in the electronic device under test, including: When the charging protocol of the tth priority of the electronic device under test has been determined, it is determined that the third charging protocol is the t+1 priority in the electronic device under test, and t is a positive integer; When determining the charging protocol of the first priority of the electronic device under test, it is determined that the third charging protocol is the first priority of the electronic device under test.
第四方面,本申请的实施例提供了一种协议信息测试装置,所述装置应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述装置包括:第三接收模块,用于接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的第一种信号;第三记录模块,用于记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;第一发送模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,发送第一充电协议的握手响应信号到所述被测的电子设备;第六确定模块,用于根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息。In the fourth aspect, an embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol The protocol includes a first charging protocol, and the device includes: a third receiving module, configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is determined after the electronic device determines the The port of the tester is the first signal sent after the dedicated charging port; the third recording module is used to record the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the at least The duration of the handshake signal of any charging protocol in a charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; the first sending module is used to compare the first recording result with the first charging protocol When the pulse information of the handshake signal matches, send the handshake response signal of the first charging protocol to the electronic device under test; the sixth determination module is used to transmit the data information received after sending the handshake response signal of the first charging protocol , determining priority information of the first charging protocol in the electronic device under test.
根据第四方面,在所述协议信息测试装置的第一种可能的实现方式中,所述装置还包括:第七确定模块,用于在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;第八确定模块,用于在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。According to the fourth aspect, in the first possible implementation manner of the device for testing protocol information, the device further includes: a seventh determination module, configured to include only information related to the first charge in the first record result. When the pulse information of the handshake signal of the protocol is the same as the pulse, it is determined that the first record result matches the pulse information of the handshake signal of the first charging protocol; the eighth determination module is configured to match the first record result with the pulse information of the handshake signal of the first charging protocol; When the pulse information of the handshake signal of the first charging protocol is different, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
根据第四方面或第四方面的第一种可能的实现方式,在所述协议信息测试装置的第二种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。According to the fourth aspect or the first possible implementation of the fourth aspect, in the second possible implementation of the protocol information testing device, according to the data information received after sending the handshake response signal of the first charging protocol , determining the priority information of the first charging protocol in the electronic device under test includes: after sending a handshake response signal of the first charging protocol, receiving a message of the first charging protocol from the electronic device under test When detecting the data packet from the Internet packet detector, it is determined that the first charging protocol is the first priority in the electronic device under test.
根据第四方面以及以上第四方面的任意一种可能的实现方式,在所述协议信息测试装置的第三种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号时,确定所述第一充电协议在所述被测的电子设备中不是第一优先级,所述第二握手信号不同与第一握手信号。According to the fourth aspect and any possible implementation of the above fourth aspect, in the third possible implementation of the protocol information testing device, according to the data received after sending the handshake response signal of the first charging protocol information, determining the priority information of the first charging protocol in the electronic device under test, including: after sending the handshake response signal of the first charging protocol, the first charging from the electronic device under test is not received When the Internet packet detector data packet of the protocol is received and the second handshake signal sent for the first time is received from the electronic device under test, it is determined that the first charging protocol is not the first priority in the electronic device under test , the second handshake signal is different from the first handshake signal.
根据第四方面以及以上第四方面的任意一种可能的实现方式,在所述协议信息测试装置的第四种可能的实现方式中,所述装置还包括:第四接收模块,用于接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;第四记录模块,用于在未确定被测的电子设备中第一优先级的充电协议时,记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;第二发送模块,用于在所述第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配时,发送所述第二充电协议的握手响应信号到所述被测的电子设备;第九确定模块,用于在发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。According to the fourth aspect and any possible implementation manner of the above fourth aspect, in a fourth possible implementation manner of the device for testing protocol information, the device further includes: a fourth receiving module, configured to receive the The nth handshake signal sent by the electronic device under test for the first time, n is an integer greater than 1; the fourth recording module is used to record the first priority charging protocol in the electronic device under test including the The nth recorded result of the nth handshake signal, wherein the duration of the nth recorded result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration Duration; the second sending module, configured to send the handshake response signal of the second charging protocol when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol to the electronic device under test; the ninth determination module is configured to receive the Internet packet detector data packet of the second charging protocol from the electronic device under test after sending the handshake response signal of the second charging protocol, It is determined that the second charging protocol is the first priority in the electronic device under test.
第五方面,本申请的实施例提供了一种测试仪,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的协议信息测试方法,或者实现上述第二方面或者第二方面的多种可能的实现方式中的一种或几种的协议信息测试方法。In a fifth aspect, an embodiment of the present application provides a tester, including: a processor; a memory for storing processor-executable instructions; wherein, the processor is configured to implement the above-mentioned first test when executing the instructions. A method for testing protocol information in one or more of the multiple possible implementations of the first aspect, or one or more of the above-mentioned second aspect or one or more of the multiple possible implementations of the second aspect Protocol information test method.
第六方面,本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的协议信息测试方法,或者实现上述第二方面或者第二方面的多种可能的实现方式中的一种或几种的协议信息测试方法。In the sixth aspect, the embodiments of the present application provide a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned first aspect or the first aspect is realized A method for testing protocol information in one or more of the multiple possible implementations of the second aspect, or a protocol information testing method for implementing the second aspect or one or more of the multiple possible implementations of the second aspect.
第七方面,本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的协议信息测试方法,或者实现上述第二方面或者第二方面的多种可能的实现方式中的一种或几种的协议信息测试方法。In the seventh aspect, the embodiments of the present application provide a computer program product, including computer readable code, or a non-volatile computer readable storage medium bearing computer readable code, when the computer readable code is stored in an electronic When running in the device, the processor in the electronic device executes the protocol information testing method of the above-mentioned first aspect or one or more of the multiple possible implementations of the first aspect, or implements the above-mentioned second aspect or the first aspect. A method for testing protocol information in one or more of the multiple possible implementations of the second aspect.
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。These and other aspects of the present application will be made more apparent in the following description of the embodiment(s).
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the specification, serve to explain the principles of the application.
图1示出现有技术中握手成功、协议识别成功时D+、D-信号线上传输的信号的示例。Fig. 1 shows an example of signals transmitted on the D+ and D- signal lines when the handshake is successful and the protocol identification is successful in the prior art.
图2示出根据本申请实施例的协议信息测试方法的示例性应用场景。Fig. 2 shows an exemplary application scenario of a method for testing protocol information according to an embodiment of the present application.
图3示出根据本申请实施例的握手优先级测试方法的一种示例性工作流程。Fig. 3 shows an exemplary workflow of the handshake priority testing method according to the embodiment of the present application.
图4示出根据本申请实施例的握手优先级测试方法的另一种示例性工作流程。Fig. 4 shows another exemplary workflow of the handshake priority testing method according to the embodiment of the present application.
图5示出根据本申请实施例的协议优先级测试方法的一种示例性工作流程。Fig. 5 shows an exemplary workflow of the protocol priority testing method according to the embodiment of the present application.
图6示出根据本申请实施例的协议优先级测试方法的另一种示例性工作流程。Fig. 6 shows another exemplary workflow of the protocol priority testing method according to the embodiment of the present application.
图7示出根据本申请实施例的协议信息测试方法的示例性流程示意图。Fig. 7 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
图8示出根据本申请实施例的协议信息测试方法的示例性流程示意图。Fig. 8 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
图9示出根据本申请实施例的测试仪的示例性结构示意图。Fig. 9 shows an exemplary structural diagram of a tester according to an embodiment of the present application.
具体实施方式Detailed ways
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures indicate functionally identical or similar elements. While various aspects of the embodiments are shown in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior or better than other embodiments.
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。In addition, in order to better illustrate the present application, numerous specific details are given in the following specific implementation manners. It will be understood by those skilled in the art that the present application may be practiced without certain of the specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail in order to highlight the gist of the present application.
下面对现有技术的快速充电协议检测方式进行介绍。The detection method of the fast charging protocol in the prior art will be introduced below.
现有技术中快速充电协议检测方式通常分为两种,第一种检测方式是,测试仪只测试单一协议,不用于测试被测的电子设备是否还支持其他协议。这种检测方式只针对USB功率传输协议(USB power delivery,USB PD)等对电子设备的充电接口有一定要求的协议,例如,USB PD协议要求电子设备使用USB Type-C接口,目前而言,这种接口是不能使用其他非USB协议进行充电功率协商的。因此,若某一电子设备支持USB PD协议,对于检测被测的电子设备是否支持USB PD协议的测试仪,没有必要考虑测试电子设备是否支持USB PD协议之外的协议,也不必对USB PD协议的优先级信息进行检测。In the prior art, fast charging protocol detection methods are usually divided into two types. The first detection method is that the tester only tests a single protocol, and is not used to test whether the electronic device under test supports other protocols. This detection method is only for protocols such as the USB power delivery protocol (USB power delivery, USB PD) that have certain requirements for the charging interface of electronic devices. For example, the USB PD protocol requires electronic devices to use USB Type-C interfaces. Currently, This interface cannot use other non-USB protocols for charging power negotiation. Therefore, if an electronic device supports the USB PD protocol, for a tester that detects whether the electronic device under test supports the USB PD protocol, it is not necessary to consider whether the electronic device supports protocols other than the USB PD protocol, and it is not necessary to test the USB PD protocol. The priority information is detected.
在测试时,测试仪和被测的电子设备连接后,由测试仪首先发送扩展消息(Source Capabilities)给被测的电子设备,如果没有接收到被测的电子设备回复的请求报文(Request message),则测试仪确定被测的电子设备不支持USB PD协议。During the test, after the tester is connected to the electronic device under test, the tester first sends an extended message (Source Capabilities) to the electronic device under test. If no request message (Request message) is received from the electronic device under test, ), the tester determines that the electronic device under test does not support the USB PD protocol.
另一种检测方式是,测试仪可以测试不同种类的快速充电协议。这种检测方式一般针对较为通用的快速充电协议,例如Apple2.4、DCP、QC2.0、QC3.0、AFC、FCP等快速充电协议。在测试时,测试仪和被测的电子设备连接后,测试仪通过内部的微控制器单元(microcontroller unit,MCU)主动切换不同的协议信号和端口电压,并记录被测的电子设备对于不同的协议信号和端口电压的响应情况,根据记录的响应情况确定被测的电子设备支持的快速充电协议。通常情况下,被测的电子设备支持的快速充电协议以列表的形式呈现,列表中各协议的顺序通常是随机的,这种检测方式也无法确定列表中的协议的优先级信息。例如在被测电子设备是手机时,测试仪仅能显示协议名称和协议的功率信息,无法对确定手机支持的快速充电协议的优先级提供有效信息。Another detection method is that the tester can test different kinds of fast charging protocols. This detection method is generally aimed at more common fast charging protocols, such as Apple2.4, DCP, QC2.0, QC3.0, AFC, FCP and other fast charging protocols. During the test, after the tester is connected to the electronic device under test, the tester actively switches between different protocol signals and port voltages through the internal microcontroller unit (MCU), and records the electronic device under test for different The response of the protocol signal and the port voltage, and determine the fast charging protocol supported by the electronic device under test according to the recorded response. Usually, the fast charging protocols supported by the tested electronic device are presented in the form of a list, and the order of the protocols in the list is usually random, and this detection method cannot determine the priority information of the protocols in the list. For example, when the electronic device under test is a mobile phone, the tester can only display the protocol name and power information of the protocol, and cannot provide effective information for determining the priority of the fast charging protocol supported by the mobile phone.
上述现有技术快速充电协议检测方式仅用于快速充电能力评测,只需确定被测的电子设备支持哪些快速充电协议即可,无需确定被测的电子设备上快速充电协议的优先级情况。由于某些特定的快速充电协议,例如移动终端融合快速充电技术规范(universal fast charging specification,UFCS),要求支持该协议的电子设备在充电时优先选择该协议(即以特定的快速充电协议作为第一优先级),显然,上述现有技术的快速充电协议检测方式无法确定被测电子设备所支持的快速充电协议的优先级,即无法确定被测电子设备是否在支持特定的快速充电协议的同时,遵守特定的快速充电协议规定,将特定的快速充电协议作为第一优先级的协议的。The above-mentioned prior art fast charging protocol detection method is only used for fast charging capability evaluation, it is only necessary to determine which fast charging protocols are supported by the electronic device under test, and it is not necessary to determine the priority of the fast charging protocol on the electronic device under test. Due to certain specific fast charging protocols, such as the universal fast charging specification (UFCS) for mobile terminals, electronic devices that support this protocol are required to choose this protocol first when charging (that is, to use a specific fast charging protocol as the first A priority), obviously, the above-mentioned prior art fast charging protocol detection method cannot determine the priority of the fast charging protocol supported by the electronic device under test, that is, it cannot determine whether the electronic device under test is supporting a specific fast charging protocol. , abide by the specific fast charging protocol, and take the specific fast charging protocol as the first priority protocol.
UFCS规范定义的UFCS快速充电方式如下:被充电的设备和充电器或供电设备使用标准线缆(USB线缆,包括D+、D-信号线)连接,其中被充电的设备支持UFCS规范。连接后,被 充电的设备和充电器或供电设备基于电池充电规范修订版1.2(battery charging specification revision 1.2,BC1.2)进行通信,BC1.2通信用于确定充电器或供电设备的充电端口类型。UFCS规范的实现在确定充电器或供电设备的充电端口类型是专用充电端口(dedicated charging port,DCP)之后进行,UFCS规范的实现可看作依次经历四个阶段:握手阶段、协议识别阶段、参数调整阶段、充电阶段。The UFCS fast charging method defined by the UFCS specification is as follows: the device to be charged is connected to the charger or power supply device using a standard cable (USB cable, including D+, D- signal lines), and the device to be charged supports the UFCS specification. After connection, the device being charged and the charger or power supply device communicate based on battery charging specification revision 1.2 (BC1.2), and BC1.2 communication is used to determine the charging port type of the charger or power supply device . The implementation of the UFCS specification is carried out after determining that the charging port type of the charger or power supply equipment is a dedicated charging port (DCP). The implementation of the UFCS specification can be seen as going through four stages in sequence: handshake stage, protocol identification stage, parameter Adjustment phase, charging phase.
在第一个阶段(握手阶段),被充电的设备会通过D+、D-信号线向充电器或供电设备发出UFCS握手信号,充电器或供电设备接收D-信号线上传输的信号并识别其是否为UFCS握手信号。如果不是UFCS握手信号,充电器或供电设备不响应UFCS握手信号,被充电的设备未接收到UFCS握手响应信号,如果被充电的设备重试发出UFCS握手信号三次后仍未接收到UFCS握手响应信号,表示握手失败;如果充电器或供电设备识别到是UFCS握手信号,充电器或供电设备响应于UFCS握手信号向被充电的设备发出UFCS握手响应信号,被充电的设备接收到UFCS握手响应信号,表示握手成功。在握手成功后,进入第二个阶段(协议识别阶段),在接收到UFCS握手响应信号之后,如果被充电的设备未产生UFCS网际包探测器(packet internet groper,Ping)数据包,而是发送其他协议的握手信号给充电器或供电设备,表示协议识别失败;如果被充电的设备产生某一预设波特率的UFCS Ping数据包并通过D-信号线传输给充电器或供电设备,充电器或供电设备接收到UFCS Ping数据包后,产生UFCS确认(Acknowledge,ACK)数据包并通过D+信号线传输给被充电的设备,或被充电的设备发出其他预设波特率的UFCS Ping数据包也能使充电器或供电设备回应UFCS ACK数据包时,表示协议识别成功。图1示出现有技术中握手成功、协议识别成功时D+、D-信号线上传输的信号的示例。在协议识别成功后,进入第三个阶段(参数调整阶段),充电器或供电设备与被充电的设备通信调整充电参数(例如额定功率、额定电压、额定电流等),而后进入第四个阶段(充电阶段),充电器或供电设备以调整后的充电参数为被充电的设备充电。In the first stage (handshake stage), the charged device sends a UFCS handshake signal to the charger or power supply device through the D+ and D- signal lines, and the charger or power supply device receives the signal transmitted on the D- signal line and identifies its Whether it is a UFCS handshake signal. If it is not a UFCS handshake signal, the charger or the power supply device does not respond to the UFCS handshake signal, and the charged device does not receive the UFCS handshake response signal. , indicating a handshake failure; if the charger or power supply device recognizes the UFCS handshake signal, the charger or power supply device sends a UFCS handshake response signal to the charged device in response to the UFCS handshake signal, and the charged device receives the UFCS handshake response signal, Indicates that the handshake is successful. After the handshake is successful, enter the second stage (protocol identification stage). After receiving the UFCS handshake response signal, if the charged device does not generate a UFCS Internet packet detector (packet internet groper, Ping) packet, but sends The handshake signal of other protocols is sent to the charger or power supply equipment, indicating that the protocol identification fails; if the charged device generates a UFCS Ping data packet with a preset baud rate and transmits it to the charger or power supply equipment through the D-signal line, charging After the converter or power supply device receives the UFCS Ping data packet, it generates a UFCS confirmation (Acknowledge, ACK) data packet and transmits it to the charged device through the D+ signal line, or the charged device sends UFCS Ping data with other preset baud rates The packet can also make the charger or power supply equipment respond to the UFCS ACK packet, indicating that the protocol identification is successful. Fig. 1 shows an example of signals transmitted on the D+ and D- signal lines when the handshake is successful and the protocol identification is successful in the prior art. After the protocol identification is successful, enter the third stage (parameter adjustment stage), the charger or power supply device communicates with the charged device to adjust charging parameters (such as rated power, rated voltage, rated current, etc.), and then enters the fourth stage (charging phase), the charger or the power supply device charges the device being charged with the adjusted charging parameters.
下面结合图1介绍测试仪基于UFCS规范测试电子设备(被充电的设备)对于UFCS规范的支持情况的方式。测试通过如下步骤来实现:The following describes the manner in which the tester tests the support of the UFCS specification by the electronic device (device to be charged) based on the UFCS specification with reference to FIG. 1 . The test is implemented through the following steps:
步骤一,使用标准线缆将测试仪与被测的电子设备相连接; Step 1, use a standard cable to connect the tester to the electronic device under test;
步骤二,测试仪与被测电子设备进行BC1.2通信,在被测的电子设备确定测试仪的充电端口类型是专用充电端口之后,测试仪检测来自被测电子设备的第一个信号是否是UFCS握手信号;Step 2: The tester performs BC1.2 communication with the electronic device under test. After the electronic device under test determines that the charging port type of the tester is a dedicated charging port, the tester detects whether the first signal from the electronic device under test is UFCS handshake signal;
步骤三,在检测到UFCS握手信号时,测试仪与被测的电子设备进行握手;Step 3, when the UFCS handshake signal is detected, the tester shakes hands with the electronic device under test;
在握手完成后通过硬件复位和/或软件复位,重复上述步骤二至步骤三若干次,在每次执行步骤二得到的检测结果中,来自被测电子设备的第一个信号均是UFCS握手信号时,可以确定电子设备支持UFCS规范。After the handshake is completed, the hardware reset and/or software reset is used to repeat the above steps 2 to 3 several times. In the detection results obtained by performing step 2 each time, the first signal from the electronic device under test is the UFCS handshake signal. , it can be determined that the electronic device supports the UFCS specification.
由图1及相关描述可知,上述检测方式是通过识别UFCS握手信号来检测确定电子设备支持UFCS规范,UFCS握手信号的电平情况可如图1所示(例如包括2个脉冲)。现有技术在识别UFCS握手信号时,通常仅确认信号中包括与UFCS握手信号相同的脉冲即认为识别到UFCS握手信号。假设不同于UFCS规范的另一快速充电协议的握手信号中的一部分与UFCS握手信号的电平情况相同(例如包括4个脉冲),或者设置一个非快速充电协议的握手信号的伪脉冲信号,使得伪脉冲信号中的一部分与UFCS握手信号的电平情况相同,且确定测试仪的充电端口类型是专用充电端口之后,被测电子设备最先发出是另一快速充电协议的握手信号或者伪 脉冲信号,那么步骤二中,测试仪在进行检测时,很容易将另一快速充电协议的握手信号或者伪脉冲信号识别为UFCS握手信号,从而得到被测电子设备支持UFCS规范的错误的测试结果。It can be seen from FIG. 1 and related descriptions that the above detection method is to detect and determine that the electronic device supports the UFCS specification by identifying the UFCS handshake signal. The level of the UFCS handshake signal can be shown in FIG. 1 (for example, including 2 pulses). When identifying the UFCS handshake signal in the prior art, it is generally recognized that the UFCS handshake signal is recognized only if the signal includes the same pulse as the UFCS handshake signal. Assume that part of the handshake signal of another fast charging protocol different from the UFCS specification is the same as the level of the UFCS handshake signal (for example, including 4 pulses), or set a pseudo-pulse signal of the handshake signal of a non-quick charging protocol, so that A part of the false pulse signal has the same level as the UFCS handshake signal, and after confirming that the charging port type of the tester is a dedicated charging port, the electronic device under test first sends out a handshake signal or a false pulse signal of another fast charging protocol , then in step 2, when the tester is testing, it is easy to identify the handshake signal or pseudo-pulse signal of another fast charging protocol as the UFCS handshake signal, thus obtaining a wrong test result that the electronic device under test supports the UFCS specification.
有鉴于此,提出了一种协议信息测试方法、测试仪、存储介质及程序产品,根据本申请实施例的协议信息测试方法,能够检测确定特定的快速充电协议在被测的电子设备中的优先级情况,从而确定被测的电子设备是否违反特定的快速充电协议规定。In view of this, a protocol information testing method, tester, storage medium and program product are proposed. According to the protocol information testing method of the embodiment of the application, it is possible to detect and determine the priority of a specific fast charging protocol in the electronic device under test. Level conditions to determine whether the electronic device under test violates a specific fast charging protocol.
图2示出根据本申请实施例的协议信息测试方法的示例性应用场景。Fig. 2 shows an exemplary application scenario of a method for testing protocol information according to an embodiment of the present application.
如图2所示,根据本申请实施例的协议信息测试方法可以应用于测试仪,测试仪可以包括协议信息测试装置、微控制器单元MCU和电源,其中,微控制器单元MCU和电源通过通用接口总线(general purpose interface bus,GPI B)连接,微控制器单元MCU和协议信息测试装置通过集成电路总线(inter IC,I2C)连接。协议信息测试装置可以通过可编程逻辑单元(field programmable gate array,FPGA)或另一微控制器单元实现,协议信息测试装置可以用于接收握手信号(例如下文中的第一握手信号、第二握手信号、第n握手信号)、发出握手响应信号(例如下文中的第一充电协议的握手响应信号、第二充电协议的握手响应信号)、接收Ping数据包(例如下文中的第一充电协议的网际包探测器数据包、第二充电协议的网际包探测器数据包)、发出ACK数据包等。测试仪和被测的电子设备通过USB线缆(包括VBUS信号线、D+信号线、D-信号线、地线GND等)连接。As shown in Figure 2, the protocol information testing method according to the embodiment of the present application can be applied to a tester, and the tester can include a protocol information testing device, a microcontroller unit MCU and a power supply, wherein the microcontroller unit MCU and the power supply pass a common The interface bus (general purpose interface bus, GPI B) is connected, and the microcontroller unit MCU and the protocol information testing device are connected through an integrated circuit bus (inter IC, I2C). The protocol information testing device can be realized by a programmable logic unit (field programmable gate array, FPGA) or another microcontroller unit, and the protocol information testing device can be used to receive handshaking signals (such as the first handshaking signal, the second handshaking signal hereinafter) signal, the nth handshake signal), send a handshake response signal (such as the handshake response signal of the first charging protocol below, the handshake response signal of the second charging protocol below), receive the Ping data packet (such as the first charging protocol below An internet packet detector data packet, an internet packet detector data packet of the second charging protocol), sending an ACK data packet, and the like. The tester and the electronic device under test are connected through a USB cable (including VBUS signal line, D+ signal line, D- signal line, ground line GND, etc.).
被测的电子设备,例如可以是上文中的被充电的设备,可以是智能手机、笔记本电脑,平板电脑,头戴式耳机,智能音箱,AR/VR显示设备等终端设备。被测的电子设备可以包括电池、充电管理电路、片上系统(system-on-a-chip,SOC)、以及协议信息处理装置,其中,充电管理电路分别和协议信息处理装置、片上系统通过集成电路总线连接,协议信息处理装置可以是单颗芯片或者是集成到充电管理电路内部的可编程逻辑单元等,协议信息处理装置可以用于发出握手信号、接收握手响应信号、发出Ping数据包、接收ACK数据包等。被测的电子设备可以通过现有技术来实现。The electronic device under test can be, for example, the above-mentioned charged device, or it can be a terminal device such as a smart phone, a notebook computer, a tablet computer, a headset, a smart speaker, and an AR/VR display device. The electronic device under test may include a battery, a charge management circuit, a system-on-a-chip (SOC), and a protocol information processing device, wherein the charge management circuit is connected to the protocol information processing device and the system-on-a-chip through an integrated circuit Bus connection, the protocol information processing device can be a single chip or a programmable logic unit integrated into the charging management circuit, etc. The protocol information processing device can be used to send handshake signals, receive handshake response signals, send Ping data packets, and receive ACK packets etc. The electronic equipment under test can be realized by existing technology.
其中,测试仪的电源可以通过USB线缆的VBUS信号线连接被测的电子设备的充电管理电路,协议信息测试装置可以通过USB线缆的D+、D-信号线连接被测的电子设备的协议信息处理装置。测试仪可以通过VBUS信号线为被测的电子设备供电,在此情况下,测试仪与被测的电子设备可以首先进行BC1.2通信,其示例性实现方式可以参照上文“步骤二”的相关描述。Among them, the power supply of the tester can be connected to the charging management circuit of the electronic device under test through the VBUS signal line of the USB cable, and the protocol information testing device can be connected to the protocol of the electronic device under test through the D+ and D- signal lines of the USB cable. information processing device. The tester can supply power to the electronic device under test through the VBUS signal line. In this case, the tester and the electronic device under test can first perform BC1.2 communication, and its exemplary implementation can refer to the above "step two" related description.
在BC1.2通信确定测试仪的充电端口是专用充电端口DCP时,被测的电子设备开始通过D+、D-信号线向测试仪输出信号。其中,对于被测的电子设备支持的全部快速充电协议(例如UFCS规范、QC协议、VOOC协议等),被测的电子设备均可以发出与协议对应的握手信号。被测的电子设备还可以发出用于伪装特定的快速充电协议(例如UFCS规范)的握手信号的伪脉冲信号。When the BC1.2 communication determines that the charging port of the tester is a dedicated charging port DCP, the electronic device under test starts to output signals to the tester through the D+ and D- signal lines. Wherein, for all fast charging protocols supported by the electronic device under test (such as UFCS specification, QC protocol, VOOC protocol, etc.), the electronic device under test can send a handshake signal corresponding to the protocol. The electronic device under test can also emit a false pulse signal that is used to disguise the handshake signal of a specific fast charging protocol (such as the UFCS specification).
测试仪可以具备识别多种协议(例如UFCS规范、QC协议、VOOC协议等)的握手信号的能力,测试仪可以识别通过D+、D-信号线传输的信号,并根据信号的收发情况确定被测的电子设备对于特定的快速充电协议(例如UFCS规范)的支持情况,以及被测的电子设备支持的特定的快速充电协议是否为第一优先级。可选地,测试仪还可以根据来自被测的电子设备的信号的信号接收情况,确定被测的电子设备支持的所有充电协议(例如UFCS规范、QC协议、VOOC协议等)中的部分或全部的优先级顺序。微控制器单元可以将确定的测试结果进一步整 理并输出给其他单元,例如存储器(未示出),进行存储以便后续用于显示等。The tester can have the ability to identify handshake signals of various protocols (such as UFCS specification, QC protocol, VOOC protocol, etc.). The support of the electronic device for a specific fast charging protocol (such as the UFCS specification), and whether the specific fast charging protocol supported by the electronic device under test is the first priority. Optionally, the tester can also determine some or all of all charging protocols (such as UFCS specification, QC protocol, VOOC protocol, etc.) supported by the electronic device under test according to the signal reception situation of the signal from the electronic device under test order of priority. The microcontroller unit can further sort out the determined test results and output them to other units, such as a memory (not shown), to be stored for subsequent display and the like.
根据本申请实施例的协议信息测试方法的一个示例是握手优先级测试方法(或者称为握手识别、握手请求等),可以根据握手阶段的信息完成被测电子设备对于协议的支持情况和优先级信息的检测。An example of the protocol information test method according to the embodiment of the present application is the handshake priority test method (or called handshake identification, handshake request, etc.), which can complete the support and priority of the electronic device under test for the protocol according to the information in the handshake phase information detection.
图3示出根据本申请实施例的握手优先级测试方法的一种示例性工作流程。Fig. 3 shows an exemplary workflow of the handshake priority testing method according to the embodiment of the present application.
如图3所示,被测的电子设备可以是一个声明其支持协议A(例如UFCS规范)的电子设备,由于UFCS规范要求支持该协议的电子设备将其作为第一优先级,因此,理论上,被测的电子设备上,第一优先级的快速充电协议是协议A(下文中第一充电协议的示例)。被测的电子设备确定测试仪的充电端口是专用充电端口DCP之后,被测的电子设备开始第一次发送握手信号到测试仪。在此情况下,有如下两种可能性:一是被测的电子设备确实以协议A作为第一优先级,第一次发送的确实是协议A握手信号;二是被测的电子设备并未以协议A作为第一优先级,第一次发送的是伪装成协议A握手信号的其他协议的握手信号(例如协议X握手信号)或伪脉冲信号。信号通过D+、D-信号线传输,使得D+、D-信号线的电平产生变化。As shown in Figure 3, the electronic device under test can be an electronic device that declares that it supports protocol A (such as the UFCS specification). Since the UFCS specification requires electronic devices that support this protocol to take it as the first priority, theoretically, , on the electronic device under test, the fast charging protocol with the first priority is protocol A (hereinafter an example of the first charging protocol). After the electronic device under test determines that the charging port of the tester is the dedicated charging port DCP, the electronic device under test starts to send a handshake signal to the tester for the first time. In this case, there are two possibilities as follows: one is that the electronic device under test does take protocol A as the first priority, and the handshake signal of protocol A is indeed sent for the first time; the other is that the electronic device under test does not With protocol A as the first priority, what is sent for the first time is a handshake signal of other protocols disguised as a handshake signal of protocol A (for example, a handshake signal of protocol X) or a pseudo-pulse signal. The signal is transmitted through the D+ and D- signal lines, so that the levels of the D+ and D- signal lines change.
在被测的电子设备确定测试仪的充电端口是专用充电端口DCP之后,可向测试仪第一次发送握手信号(下文中第一握手信号的示例),在测试仪中,协议信息测试装置第一次接收到信号时(例如电平由低变高时)开始记录D+/D-信号线的电平变化情况,直到记录到时长等于预设时间段的电平变化信息,作为对应于第一次接收到的信号的记录结果(下文中第一记录结果的示例)。预设时间段可以大于测试仪记录的至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长。由于被测的电子设备使用其他协议握手信号或者伪脉冲信号伪装协议A的握手信号时,其他协议握手信号或者伪脉冲信号的前几个脉冲可以与协议A握手信号的脉冲相同。因此,预设时间段可例如选取大于或等于协议A握手信号的时长的时间段,从而排除其他协议握手信号或者伪脉冲信号对测试结果的干扰。例如协议A握手信号的时长是20ms时,预设时间段的时长可以是25ms-2s(图3中以2s作为示例)。After the electronic device under test determines that the charging port of the tester is a dedicated charging port DCP, it can send a handshake signal to the tester for the first time (the example of the first handshake signal below), and in the tester, the protocol information testing device first When a signal is received once (for example, when the level changes from low to high), start recording the level change of the D+/D- signal line until the level change information with a duration equal to the preset time period is recorded, as the corresponding to the first The recording result of the second received signal (hereinafter an example of the first recording result). The preset time period may be greater than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to the duration of the handshake signal of the charging protocol with the longest duration. Since the electronic device under test uses other protocol handshake signals or pseudo-pulse signals to disguise protocol A handshake signals, the first few pulses of other protocol handshake signals or pseudo-pulse signals may be the same as the pulses of protocol A handshake signals. Therefore, the preset time period may, for example, be selected to be greater than or equal to the time period of the handshake signal of protocol A, so as to exclude the interference of other protocol handshake signals or false pulse signals on the test results. For example, when the duration of the handshake signal of protocol A is 20ms, the duration of the preset time period may be 25ms-2s (2s is taken as an example in FIG. 3 ).
协议信息测试装置可以将记录结果传输给微控制器单元,微控制器单元可以将电平变化信息与储存的各协议的握手信号的电平特征(下文中的至少一种充电协议的握手信号的脉冲信息的示例)进行对比。例如,可将记录结果与协议A的握手信号进行比对,如果对比确认记录结果与协议A的握手信号匹配,即记录结果中的电平变化情况符合协议A握手信号的电平变化情况,且除对应于协议A握手信号的电平变化情况的脉冲之外,不存在其他脉冲,即如图3中情况1所示,协议A握手信号包括2个脉冲、记录结果也仅包括2个脉冲且与协议A握手信号相符合时,可以认为协议信息测试装置第一次接收到的信号确实是协议A握手信号,即被测的电子设备第一次发送的确实是协议A握手信号。因此,微控制器单元可以确定被测的电子设备支持协议A,且被测的电子设备确实以协议A作为第一优先级。在仅需要确认协议A是否为第一优先级的应用场景下,测试可以结束。The protocol information testing device can transmit the recording result to the microcontroller unit, and the microcontroller unit can compare the level change information with the level characteristics of the handshake signals of the stored protocols (the handshake signal of at least one charging protocol hereinafter) example of pulse information) for comparison. For example, the record result can be compared with the handshake signal of protocol A. If the comparison confirms that the record result matches the handshake signal of protocol A, that is, the level change in the record result conforms to the level change of the handshake signal of protocol A, and Except for the pulse corresponding to the level change of the protocol A handshake signal, there are no other pulses, that is, as shown in case 1 in Figure 3, the protocol A handshake signal includes 2 pulses, and the recording result only includes 2 pulses and When it matches the handshake signal of protocol A, it can be considered that the signal received by the protocol information testing device for the first time is indeed the handshake signal of protocol A, that is, the electronic device under test sends the handshake signal of protocol A for the first time. Therefore, the microcontroller unit can determine that the electronic device under test supports protocol A, and the electronic device under test does use protocol A as the first priority. In the application scenario where it is only necessary to confirm whether protocol A is the first priority, the test can end.
如果对比确认记录结果与协议A的握手信号不匹配,即记录结果中包括与对应于协议A握手信号的电平变化情况的脉冲不同的其他脉冲,例如如图3中情况2和情况3所示,协议A握手信号包括2个脉冲、记录结果包括3个或4个脉冲且其中有2个脉冲与协议A的握手信号相同,其他脉冲与协议A的握手信号不同时,可以认为协议信息测试装置第一次接收到的信号是伪装成协议A握手信号的其他协议的握手信号或伪脉冲信号,即被测的电子设备第 一次发送的是伪装成协议A握手信号的其他协议的握手信号或伪脉冲信号。因此,被测的电子设备没有以协议A握手信号作为第一次发送的信号,也即没有以协议A作为第一优先级,也并不支持协议A。对于被测的电子设备第一次发送的是伪装成协议A握手信号的伪脉冲信号的情况,即如图3中情况2所示,协议A握手信号包括2个脉冲,记录结果包括3个脉冲且其中有2个脉冲与协议A握手信号相符合,且测试仪中并未储存仅包括3个脉冲的握手信号的电平变化情况时,测试仪尚不能确定被测的电子设备的第一优先级的协议的具体类型。对于被测的电子设备第一次发送的是其他协议的握手信号(例如协议X的握手信号)的情况,即如图3中情况3所示,协议A握手信号包括2个脉冲、协议X(下文中第二充电协议的示例)握手信号包括4个脉冲、记录结果包括4个脉冲且与协议X握手信号相符合时,微控制器单元还可以进一步确定被测的电子设备支持协议X,且被测的电子设备以协议X作为第一优先级。在仅需要记录一次记录结果并进行比对确定被测的电子设备的优先级信息的场景,测试可以结束。If the comparison confirms that the record result does not match the handshake signal of protocol A, that is, the record result includes other pulses different from the pulse corresponding to the level change of the handshake signal of protocol A, for example, as shown in case 2 and case 3 in Figure 3 , the protocol A handshake signal includes 2 pulses, the record result includes 3 or 4 pulses and 2 pulses are the same as the protocol A handshake signal, and other pulses are different from the protocol A handshake signal, it can be considered as a protocol information test device The signal received for the first time is a handshake signal or a pseudo-pulse signal of other protocols disguised as a handshake signal of Protocol A, that is, the electronic device under test sends a handshake signal of other protocols disguised as a handshake signal of Protocol A for the first time or false pulse signal. Therefore, the electronic device under test does not use the handshake signal of protocol A as the signal sent for the first time, that is, it does not take protocol A as the first priority, and does not support protocol A. For the case where the electronic device under test sends a pseudo-pulse signal disguised as a protocol A handshake signal for the first time, that is, as shown in case 2 in Figure 3, the protocol A handshake signal includes 2 pulses, and the recorded result includes 3 pulses And there are 2 pulses in agreement with the protocol A handshake signal, and the level change of the handshake signal including only 3 pulses is not stored in the tester, the tester cannot determine the first priority of the electronic device under test. The specific type of protocol at the level. For the first time that the electronic device under test sends handshake signals of other protocols (such as the handshake signal of protocol X), that is, as shown in case 3 in Figure 3, the handshake signal of protocol A includes 2 pulses, and the handshake signal of protocol X ( In the example of the second charging protocol below) when the handshake signal includes 4 pulses and the recording result includes 4 pulses and is consistent with the protocol X handshake signal, the microcontroller unit can further determine that the electronic device under test supports protocol X, and The electronic equipment under test has protocol X as the first priority. In the scenario where it is only necessary to record the record result once and compare it to determine the priority information of the electronic device under test, the test can end.
通过这种方式,可以确定被测电子设备是否支持特定的快速充电协议,以及被测的电子设备支持的特定的快速充电协议是否为第一优先级。本领域技术人员应理解,特定的快速充电协议可以是UFCS规范,也可以是除UFCS规范之外的其他规定必须作为第一优先级的快速充电协议,本申请实施例对于特定的快速充电协议的具体类型不作限制。In this way, it can be determined whether the electronic device under test supports a specific fast charging protocol, and whether the specific fast charging protocol supported by the electronic device under test is the first priority. Those skilled in the art should understand that the specific fast charging protocol may be the UFCS specification, or other regulations other than the UFCS specification must be the first priority fast charging protocol. The embodiment of the present application is specific to the specific fast charging protocol. The specific type is not limited.
图4示出根据本申请实施例的握手优先级测试方法的另一种示例性工作流程。Fig. 4 shows another exemplary workflow of the handshake priority testing method according to the embodiment of the present application.
参见上文UFCS规范定义的UFCS快速充电方式的相关描述,现有技术中,被充电的设备发出UFCS握手信号后,如重试发出三次同样的信号后,仍未接收到相应的UFCS握手响应信号,也即握手失败后,被充电的设备将切换至其他协议的快速充电方式,发出其他协议的握手信号。基于此,如图4所示,在图3的工作流程的基础上,在测试仪中,可以设置为协议信息测试装置每次接收到信号后不发出握手响应信号,使得被测电子设备每次发送一种信号后,在一段时间内接收不到该信号的握手响应信号。根据上文描述,被测的电子设备将认为握手失败。被测的电子设备将切换至其他协议,继续发送信号。在此情况下,被测的电子设备可以陆续发送出其支持的全部协议的握手信号,测试仪依次接收到各握手信号,可以识别确定接收到的各握手信号对应的协议类型及优先级,从而能确定被测的电子设备所支持的全部协议的类型以及各协议的优先级顺序。Refer to the relevant description of the UFCS fast charging method defined by the UFCS specification above. In the prior art, after the device being charged sends out the UFCS handshake signal, if the same signal is retried three times, the corresponding UFCS handshake response signal is still not received. , that is, after the handshake fails, the charged device will switch to the fast charging mode of other protocols and send out handshake signals of other protocols. Based on this, as shown in Figure 4, on the basis of the workflow in Figure 3, in the tester, it can be set that the protocol information test device does not send a handshake response signal every time it receives a signal, so that the electronic device under test After sending a signal, the handshake response signal of the signal cannot be received within a period of time. According to the above description, the electronic device under test will consider the handshake failure. The electronic device under test will switch to another protocol and continue sending signals. In this case, the electronic device under test can send handshake signals of all the protocols it supports one after another, and the tester receives each handshake signal in turn, and can identify and determine the protocol type and priority corresponding to each handshake signal received, so that It can determine the types of all protocols supported by the tested electronic equipment and the priority order of each protocol.
举例来说,在被测的电子设备第一次发送出第一种信号(例如第一握手信号)后,在测试仪中,协议信息测试装置第一次接收到第一种信号时,可以记录下对应于第一次接收到的第一种信号的记录结果(下文中第一记录结果的示例)。该对应于第一次接收到的第一种信号的记录结果,可以由微控制器单元识别确定一次被测的电子设备的快速充电协议的类型及优先级信息。确定的信息可能包括被测的电子设备的第一优先级协议的类型。其示例性实现方式可以参照上文图3的相关描述。For example, after the electronic equipment under test sends out the first signal (such as the first handshake signal) for the first time, in the tester, when the protocol information testing device receives the first signal for the first time, it can record Below is the recording result corresponding to the first signal received for the first time (hereinafter an example of the first recording result). The recording result corresponding to the first signal received for the first time can be identified and determined by the microcontroller unit to determine the type and priority information of the fast charging protocol of the electronic device under test. The determined information may include the type of the first priority protocol of the electronic device under test. For an exemplary implementation manner thereof, reference may be made to the related description of FIG. 3 above.
由于测试仪在握手优先级测试过程中不发出握手响应信号,因此被测的电子设备在第一次发出第一种信号及达到第一种信号的重试次数后未接收到握手响应信号时,切换到其他协议,第一次发送出第二种信号(下文中第n握手信号的示例,n是大于1的整数,这里n=2)。在测试仪中,协议信息测试装置第一次接收到第二种信号时开始记录D+/D-信号线的电平变化情况,直到记录到时长等于预设时间段的电平变化信息,作为对应于第一次接收到的第二种信号的记录结果(下文中第n记录结果的示例)。这里,预设时间段可以大于测试仪记录的 至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长。该对应于第一次接收到的第二种信号的记录结果可以由微控制器单元识别确定一次被测的电子设备的快速充电协议的类型优先级信息。确定的信息可能包括被测的电子设备的第一优先级协议的类型或者第二优先级协议的类型。其示例性实现方式可以参照上文图3的相关描述中,微控制器单元根据第一次接收到的第一种信号识别确定被测的电子设备的快速充电协议的类型及优先级信息的示例性实现方式。Since the tester does not send a handshake response signal during the handshake priority test, when the electronic device under test does not receive the handshake response signal after sending out the first signal for the first time and reaching the number of retries of the first signal, Switch to other protocols, and send out the second signal for the first time (the nth handshake signal example in the following, n is an integer greater than 1, where n=2). In the tester, when the protocol information testing device receives the second signal for the first time, it starts to record the level change of the D+/D- signal line until the level change information with a duration equal to the preset time period is recorded, as a corresponding The recording result of the second signal received for the first time (an example of the nth recording result below). Here, the preset time period may be longer than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester or equal to the duration of the handshake signal of the charging protocol with the longest duration. The recording result corresponding to the second signal received for the first time can be identified and determined by the microcontroller unit to determine the type priority information of the fast charging protocol of the electronic device under test. The determined information may include the type of the first priority protocol or the type of the second priority protocol of the electronic device under test. Its exemplary implementation can refer to the relevant description of FIG. 3 above. The microcontroller unit identifies and determines the type and priority information of the fast charging protocol of the electronic device under test according to the first signal received for the first time. sexual realization.
举例来说,协议信息测试装置可以将记录结果传输给微控制器单元,微控制器单元可以将电平变化信息(即第n记录结果)与储存的各协议的握手信号的电平特征(即至少一种充电协议的握手信号的脉冲信息)进行对比。如果经对比确认记录结果与协议B的握手信号匹配,可以认为被测的电子设备支持协议B(例如QC协议),且此前已经确认被测的电子设备支持其他协议并作为第一优先级(例如协议A或协议X),那么可以确认协议B(下文中第三充电协议的示例)作为第二优先级。如果经对比确认被测的电子设备支持协议B,且此前尚未确认被测的电子设备的第一优先级的协议,那么可以确认协议B作为第一优先级。For example, the protocol information testing device can transmit the recording result to the microcontroller unit, and the microcontroller unit can compare the level change information (i.e. the nth recording result) with the level characteristics of the stored handshake signals of each protocol (i.e. The pulse information of the handshake signal of at least one charging protocol) is compared. If it is confirmed by comparison that the recorded result matches the handshake signal of protocol B, it can be considered that the electronic device under test supports protocol B (such as the QC protocol), and it has been confirmed that the electronic device under test supports other protocols and is the first priority (such as QC protocol). Protocol A or Protocol X), then Protocol B (an example of the third charging protocol hereinafter) may be confirmed as the second priority. If it is confirmed by comparison that the electronic device under test supports protocol B, and the first priority protocol of the electronic device under test has not been confirmed before, then protocol B may be confirmed as the first priority.
由于测试仪在握手优先级测试过程中不发出握手响应信号,因此被测的电子设备在第一次发出第二种信号及达到第二种信号的重试次数后未接收到握手响应信号时,切换到其他协议,第一次发送出第三种信号。测试仪可以记录对应于第一次接收到的第三种信号的记录结果,并根据记录结果继续识别被测的电子设备的快速充电协议的类型及优先级信息。确定的信息可能包括被测的电子设备的第一优先级协议的类型或第二优先级协议的类型或第三优先级协议的类型。以此类推,对于被测的电子设备支持的协议,其中部分或者全部协议的握手信号的电平特征都在微控制器单元中存储时,微控制器单元可以得出被测的电子设备支持的协议的部分或者全部的优先级顺序。例如图4的示例中,被测的电子设备支持的所有协议包括协议A、协议B、协议C,并且被测的电子设备上各协议的优先级顺序是协议A>协议B>协议C。按照上述协议信息测试装置的示例性工作方式,被测的电子设备可按照协议A、协议B、协议C的顺序,依次发送给测试仪的信号中,第一次发送的第一种信号可以是协议A握手信号,第一次发送的第二种信号可以是协议B握手信号,第一次发送的第三种信号可以是协议C握手信号。测试仪中,微控制器单元通过对比确认被测的电子设备支持的所有协议的优先级顺序按照由先到后的排序可以是协议A>协议B>协议C。Since the tester does not send a handshake response signal during the handshake priority test, when the electronic device under test does not receive the handshake response signal after sending out the second signal for the first time and reaching the number of retries of the second signal, Switch to other protocols and send a third signal for the first time. The tester can record the recording result corresponding to the third signal received for the first time, and continue to identify the type and priority information of the fast charging protocol of the electronic device under test according to the recording result. The determined information may include the type of the first priority protocol or the type of the second priority protocol or the type of the third priority protocol of the electronic device under test. By analogy, for the protocols supported by the electronic equipment under test, when the level characteristics of handshake signals of part or all of the protocols are stored in the microcontroller unit, the microcontroller unit can obtain the protocol supported by the electronic equipment under test. The priority order of parts or all of the protocol. For example, in the example of FIG. 4 , all protocols supported by the electronic device under test include protocol A, protocol B, and protocol C, and the priority order of each protocol on the electronic device under test is protocol A>protocol B>protocol C. According to the exemplary working method of the above-mentioned protocol information testing device, the electronic equipment under test can send the signals to the tester sequentially in the order of protocol A, protocol B, and protocol C. The first signal sent for the first time can be Protocol A handshake signal, the second signal sent for the first time may be a protocol B handshake signal, and the third signal sent for the first time may be a protocol C handshake signal. In the tester, the microcontroller unit confirms by comparison that the priority order of all protocols supported by the electronic equipment under test may be protocol A>protocol B>protocol C in a first-to-last order.
通过这种方式,可以确定被测的电子设备支持的协议的优先级顺序。相比仅确认被测电子设备是否以特定快速充电协议作为第一优先级的方案,可以确认的被测电子设备对于协议的支持情况和优先级信息都更加全面,可以提升用户对测试仪的使用体验。In this way, the order of priority of the protocols supported by the electronic device under test can be determined. Compared with the scheme of only confirming whether the electronic device under test takes a specific fast charging protocol as the first priority, the support status and priority information of the protocol that can be confirmed by the electronic device under test are more comprehensive, which can improve the user's use of the tester experience.
上述图3、图4的示例,是根据握手阶段的信息完成被测电子设备对于协议的支持情况和优先级信息的检测,并未涉及协议识别阶段的信息,使得获取被测电子设备对于协议的支持情况和优先级信息的数据处理成本较低,可以提高数据处理效率。The above-mentioned examples in Figure 3 and Figure 4 are based on the information in the handshake phase to complete the detection of the electronic device under test's support for the protocol and the priority information, and do not involve the information in the protocol identification phase, so that the electronic device under test for the protocol can be obtained. Lower data processing costs for support and priority information can improve data processing efficiency.
根据本申请实施例的协议信息测试方法的另一个示例是协议优先级测试方法(或者称为协议识别、协议请求等),可以根据握手阶段的信息和协议识别阶段的信息完成被测电子设备对于协议的支持情况和优先级信息的检测。Another example of the protocol information testing method according to the embodiment of the present application is a protocol priority testing method (or called protocol identification, protocol request, etc.), which can complete the electronic equipment under test for the electronic device under test according to the information in the handshake phase and the information in the protocol identification phase Protocol support and detection of priority information.
图5示出根据本申请实施例的协议优先级测试方法的一种示例性工作流程。Fig. 5 shows an exemplary workflow of the protocol priority testing method according to the embodiment of the present application.
如图5所示,被测的电子设备可以是一个声明其支持协议A(例如UFCS规范)的电子设备,由于UFCS规范要求支持该协议的电子设备将其作为第一优先级,因此,理论上,被测的 电子设备上,第一优先级的快速充电协议是协议A(下文中第一充电协议的示例)。被测的电子设备确定测试仪的充电端口是专用充电端口DCP之后,被测的电子设备开始第一次发送信号到测试仪。在此情况下,有如下两种可能性:一是被测的电子设备确实以协议A作为第一优先级,第一次发送的确实是协议A握手信号;二是被测的电子设备并未以协议A作为第一优先级,第一次发送的是伪装成协议A握手信号的其他协议的握手信号或伪脉冲信号。信号通过D+、D-信号线传输,使得D+、D-信号线的电平产生变化。As shown in Figure 5, the electronic device under test can be an electronic device that declares that it supports protocol A (such as the UFCS specification). Since the UFCS specification requires electronic devices that support this protocol to take it as the first priority, theoretically, , on the electronic device under test, the fast charging protocol with the first priority is protocol A (hereinafter an example of the first charging protocol). After the electronic device under test determines that the charging port of the tester is the dedicated charging port DCP, the electronic device under test starts to send signals to the tester for the first time. In this case, there are two possibilities as follows: one is that the electronic device under test does take protocol A as the first priority, and the handshake signal of protocol A is indeed sent for the first time; the other is that the electronic device under test does not With protocol A as the first priority, what is sent for the first time is the handshake signal or pseudo-pulse signal of other protocols disguised as the handshake signal of protocol A. The signal is transmitted through the D+ and D- signal lines, so that the levels of the D+ and D- signal lines change.
在被测的电子设备确定测试仪的充电端口是专用充电端口DCP之后,可向测试仪第一次发送握手信号(下文中第一握手信号的示例),在测试仪中,协议信息测试装置第一次接收到信号时(例如电平由低变高时)开始记录D+/D-信号线的电平变化情况,得到对应于第一次接收到的信号的记录结果(下文中第一记录结果的示例)。记录结果的时长可以大于测试仪记录的至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长。协议信息测试装置可以将记录结果传输给微控制器单元,微控制器单元可以将电平变化信息与储存的各协议的握手信号的电平特征(下文中的至少一种充电协议的握手信号的脉冲信息的示例)进行对比。例如,可将记录结果与协议A的握手信号进行比对,如果对比确认记录结果与协议A的握手信号匹配,即记录结果中的电平变化情况符合协议A握手信号的电平变化情况,可以控制协议信息测试装置通过D+/D-信号线发送协议A握手响应信号(下文中的第一充电协议的握手响应信号的示例)。After the electronic device under test determines that the charging port of the tester is a dedicated charging port DCP, it can send a handshake signal to the tester for the first time (the example of the first handshake signal below), and in the tester, the protocol information testing device first When a signal is received once (for example, when the level changes from low to high), start recording the level change of the D+/D- signal line, and obtain the recording result corresponding to the first received signal (hereinafter the first recording result example). The duration of the recording result may be longer than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to the duration of the handshake signal of the charging protocol with the longest duration. The protocol information testing device can transmit the recording result to the microcontroller unit, and the microcontroller unit can compare the level change information with the level characteristics of the handshake signals of the stored protocols (the handshake signal of at least one charging protocol hereinafter) example of pulse information) for comparison. For example, the record result can be compared with the handshake signal of protocol A. If the comparison confirms that the record result matches the handshake signal of protocol A, that is, the level change in the record result conforms to the level change of the handshake signal of protocol A, you can The control protocol information testing device sends a protocol A handshake response signal (hereinafter an example of a handshake response signal of the first charging protocol) through the D+/D− signal line.
如果被测的电子设备接收到协议A握手响应信号之后,通过D+/D-信号线发送协议A Ping数据包(下文中第一充电协议的网际包探测器数据包的示例)到测试仪,测试仪接收到协议A Ping数据包,可以认为被测的电子设备支持协议A,并确实以协议A作为第一优先级。如果被测的电子设备接收到协议A握手响应信号之后,未发送协议A Ping数据包到测试仪,使得测试仪发出协议A握手响应信号之后,未接收到协议A Ping数据包,且接收到另一种握手信号(下文中第二握手信号的示例),可以认为被测的电子设备没有支持协议A,也未以协议A作为第一优先级。或者,被测的电子设备接收到协议A握手响应信号之后,发送协议A Ping数据包到测试仪,但是测试仪接收到协议A Ping数据包后未发送协议A ACK数据包到被测电子设备,可以认为被测的电子设备没有支持协议A,也未以协议A作为第一优先级。在仅需要确认协议A是否为第一优先级的应用场景下,测试可以结束。If the electronic device under test sends the protocol A Ping data packet (the example of the Internet packet detector data packet of the first charging protocol below) to the tester through the D+/D- signal line after receiving the protocol A handshake response signal, test If the instrument receives the Protocol A Ping data packet, it can be considered that the electronic device under test supports Protocol A, and indeed takes Protocol A as the first priority. If the electronic device under test does not send the protocol A Ping data packet to the tester after receiving the protocol A handshake response signal, so that after the tester sends the protocol A handshake response signal, it does not receive the protocol A Ping data packet and receives another A handshake signal (an example of the second handshake signal hereinafter), it can be considered that the electronic device under test does not support protocol A, and does not take protocol A as the first priority. Or, after the electronic device under test receives the protocol A handshake response signal, it sends the protocol A Ping data packet to the tester, but the tester does not send the protocol A ACK data packet to the electronic device under test after receiving the protocol A Ping data packet, It can be considered that the electronic device under test does not support protocol A, nor does it take protocol A as the first priority. In the application scenario where it is only necessary to confirm whether protocol A is the first priority, the test can end.
通过这种方式,可以确定被测电子设备是否支持特定的快速充电协议,以及被测的电子设备支持的特定的快速充电协议是否为第一优先级。本领域技术人员应理解,特定的快速充电协议可以是UFCS规范,也可以是除UFCS规范之外的其他规定必须作为第一优先级的快速充电协议,本申请实施例对于特定的快速充电协议的具体类型不作限制。并且,对于其他协议握手信号和伪脉冲信号组成特定协议握手信号,例如某协议的握手信号包括一个脉冲,某伪脉冲信号也包括一个脉冲,使用该协议的握手信号和该伪脉冲信号组合成为UFCS握手信号的情况,虽然协议信息测试装置可能将该组合后的信号误识别为UFCS握手信号并发出UFCS握手响应信号,但由于被测的电子设备实际并不支持UFCS规范,因此被测的电子设备无法发出协议UFCS Ping数据包到测试仪。测试仪未接收到协议UFCS Ping数据包,因此可以检测确认被测的电子设备并不是以UFCS协议作为第一优先级,从而得到更加准确的检测结果。In this way, it can be determined whether the electronic device under test supports a specific fast charging protocol, and whether the specific fast charging protocol supported by the electronic device under test is the first priority. Those skilled in the art should understand that the specific fast charging protocol may be the UFCS specification, or other regulations other than the UFCS specification must be the first priority fast charging protocol. The embodiment of the present application is specific to the specific fast charging protocol. The specific type is not limited. Moreover, for other protocol handshake signals and pseudo-pulse signals to form a specific protocol handshake signal, for example, the handshake signal of a certain protocol includes a pulse, and a certain pseudo-pulse signal also includes a pulse, and the handshake signal using the protocol and the pseudo-pulse signal are combined to form UFCS In the case of handshake signals, although the protocol information test device may misidentify the combined signal as a UFCS handshake signal and send a UFCS handshake response signal, since the electronic equipment under test does not actually support the UFCS specification, the electronic equipment under test Unable to send protocol UFCS ping packets to tester. The tester does not receive the protocol UFCS Ping data packet, so it can detect and confirm that the electronic device under test does not take the UFCS protocol as the first priority, so as to obtain more accurate test results.
图6示出根据本申请实施例的协议优先级测试方法的另一种示例性工作流程。Fig. 6 shows another exemplary workflow of the protocol priority testing method according to the embodiment of the present application.
如图6所示,在图5的工作流程的基础上,被测的电子设备第一次发送出的信号可以是 第一种信号(例如第一握手信号),在被测的电子设备接收到协议A握手响应信号之后,未发送协议A Ping数据包到测试仪后,被测的电子设备可以发送第二种信号(下文中第n握手信号的示例,n是大于1的整数,这里n=2)到测试仪。测试仪记录电平变化得到对应于第二种信号的记录结果(下文中第n记录结果的示例)。这里,记录结果的时长可以大于测试仪记录的至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长。测试仪识别确定记录结果与协议B(下文中第二充电协议的示例)握手信号匹配之后,可以发出协议B握手响应信号(下文中第二充电协议的握手响应信号的示例)到被测的电子设备。如果测试仪发出协议B握手响应信号之后接收到协议B Ping数据包(下文中第二充电协议的网际包探测器数据包的示例),可以认为被测的电子设备支持协议B,并以协议B作为第一优先级。As shown in Figure 6, on the basis of the work flow in Figure 5, the signal sent by the electronic device under test for the first time can be the first signal (such as the first handshake signal), and when the electronic device under test receives After the protocol A handshake response signal, after the protocol A Ping data packet is not sent to the tester, the electronic device under test can send the second signal (the example of the nth handshake signal below, n is an integer greater than 1, where n= 2) to the tester. The tester records the level change to obtain a record result corresponding to the second signal (an example of the nth record result hereinafter). Here, the duration of the recorded result may be longer than the duration of the handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to the duration of the handshake signal of the charging protocol with the longest duration. After the tester identifies and determines that the recorded result matches the handshake signal of protocol B (the example of the second charging protocol below), it can send a protocol B handshake response signal (the example of the handshake response signal of the second charging protocol below) to the electronic device under test. equipment. If the tester receives the protocol B Ping data packet (the example of the Internet packet detector data packet of the second charging protocol below) after sending the protocol B handshake response signal, it can be considered that the electronic device under test supports the protocol B, and uses the protocol B as first priority.
如果测试仪在一定时间内未接收到协议B Ping数据包,可以认为被测的电子设备未支持协议B。以此类推,直到测试仪响应于某一协议的握手信号(例如协议X)发出握手响应信号,并接收到该协议的Ping数据包(或者进一步地,又发出该协议的ACK数据包)时,可以认为被测的电子设备支持该协议,并以该协议X作为第一优先级。If the tester does not receive the protocol B Ping data packet within a certain period of time, it can be considered that the electronic device under test does not support protocol B. By analogy, until the tester sends a handshake response signal in response to a handshake signal of a certain protocol (for example, protocol X), and receives the Ping packet of the protocol (or further, sends the ACK packet of the protocol), It can be considered that the electronic device under test supports the protocol, and takes the protocol X as the first priority.
在一种可能的实现方式中,上述图5、图6的示例中,也可以为Ping数据包设置类似于握手信号的重试机制。例如,被测的电子设备接收到协议A握手响应信号之后,第一次发送第一预设比特率的协议A Ping数据包到测试仪,但未接收到协议A ACK数据包,被测的电子设备可以第二次发出该第一预设比特率的协议A Ping数据包。如仍未接收到协议A ACK数据包,被测的电子设备可以发出第二预设比特率的协议A Ping数据包,并等待接收协议A ACK数据包。如果被测的电子设备已经依次发出了其支持的全部预设比特率的协议A Ping数据包,但均未接收到协议A ACK数据包,再切换至其他协议,发出其他协议的握手信号。In a possible implementation manner, in the above examples of FIG. 5 and FIG. 6 , a retry mechanism similar to a handshake signal may also be set for the Ping data packet. For example, after the electronic device under test receives the protocol A handshake response signal, it sends the protocol A Ping data packet of the first preset bit rate to the tester for the first time, but does not receive the protocol A ACK data packet, and the electronic device under test The device can send out the protocol A Ping data packet of the first preset bit rate for the second time. If the protocol A ACK data packet has not been received yet, the electronic device under test can send a protocol A Ping data packet of the second preset bit rate, and wait for receiving the protocol A ACK data packet. If the electronic device under test has successively sent protocol A Ping data packets of all the preset bit rates it supports, but has not received the protocol A ACK data packet, then switch to other protocols and send out handshake signals of other protocols.
上述图5、图6的示例,是根据握手阶段的信息和协议识别阶段的信息,完成被测电子设备对于协议的支持情况和优先级信息的检测,使得获取被测电子设备对于协议的支持情况和优先级信息的准确率更高。The above-mentioned examples in Figure 5 and Figure 6 are based on the information in the handshake phase and the information in the protocol identification phase to complete the detection of the support status and priority information of the electronic device under test for the protocol, so that the support status of the protocol for the electronic device under test can be obtained and priority information is more accurate.
在一种可能的实现方式中,在图3或图4的流程完成之后,可以由测试仪发送复位信号给被测电子设备,使得被测电子设备再次确定测试仪的充电端口是专用充电端口DCP之后,第一次发送信号到测试仪的信号,然后执行图5、图6中的流程。在此情况下,相当于先进行了一次握手优先级测试,后进行了一次协议优先级测试。两次测试结果不同时,可以以协议优先级测试的结果为准。原因在于,在为被测的电子设备充电时,并非仅在握手阶段握手成功时直接开始进行充电参数配置和充电操作,而是在握手成功之后,进入协议识别阶段,在协议识别成功时才开始进行充电参数配置和充电操作。且由上文描述可知,握手优先级测试是根据握手阶段的信息完成被测电子设备对于协议的支持情况和优先级信息的检测,而协议优先级测试是根据握手阶段的信息和协议识别阶段的信息,完成被测电子设备对于协议的支持情况和优先级信息的检测。因此,相比握手优先级测试,协议优先级测试中使用的信息更全面,从而能够获得更加准确的检测结果。通过重复测试,可以进一步提高测试仪获取的被测电子设备对于协议的支持情况和优先级信息的准确率。In a possible implementation, after the process in Figure 3 or Figure 4 is completed, the tester may send a reset signal to the electronic device under test, so that the electronic device under test can determine again that the charging port of the tester is a dedicated charging port DCP After that, send the signal to the signal of the tester for the first time, and then execute the flow in Fig. 5 and Fig. 6 . In this case, it is equivalent to performing a handshake priority test first, followed by a protocol priority test. If the results of the two tests are different, the result of the protocol priority test may prevail. The reason is that when charging the electronic device under test, the charging parameter configuration and charging operation are not started directly only when the handshake is successful in the handshake phase, but after the handshake is successful, it enters the protocol identification phase and starts when the protocol identification is successful. Perform charging parameter configuration and charging operation. And it can be seen from the above description that the handshake priority test is based on the information in the handshake phase to complete the detection of the electronic device under test’s support for the protocol and the priority information, and the protocol priority test is based on the information in the handshake phase and the protocol identification phase. Information, to complete the detection of the electronic device under test's support for the protocol and the priority information. Therefore, compared with the handshake priority test, the information used in the protocol priority test is more comprehensive, so that more accurate detection results can be obtained. By repeating the test, the accuracy rate of the support status and priority information of the electronic device under test obtained by the tester for the protocol can be further improved.
以上以协议信息测试装置确认被测的电子设备是否以协议A作为第一优先级作为示例。在另一种可能的实现方式中,协议信息测试装置也可以完成更多的功能,例如可以存储各协议的握手信号的电平信息,完成上述示例中微控制器单元所完成的对比确认被测电子设备对 于协议的支持情况和优先级情况的功能,记录测试结果,整理和输出测试结果的功能等。只要被测的电子设备对于特定协议的支持情况以及特定协议的优先级信息的确认在测试仪之上完成即可,本申请实施例对于上述功能的具体执行单元不作限制。In the above, the protocol information testing device confirms whether the electronic device under test takes protocol A as the first priority as an example. In another possible implementation, the protocol information testing device can also perform more functions, for example, it can store the level information of the handshake signals of each protocol, and complete the comparison and confirmation of the microcontroller unit in the above example. The function of the electronic equipment for the protocol support and priority, the function of recording test results, sorting and outputting test results, etc. As long as the electronic device under test supports the specific protocol and the confirmation of the priority information of the specific protocol is completed on the tester, the embodiment of the present application does not limit the specific execution units of the above functions.
根据本申请实施例的协议信息测试方法,可以有效识别一些被测的电子设备声称支持特定协议但未遵守特定协议的规定的造假行为,确保被测的电子设备对于特定协议的遵从性,避免因使用其他协议导致安全问题而影响特定协议的口碑,促进融合快速充电生态发展。通过对优先级进行测试,可以为电子设备的设计者提供设计趋势参考,便于电子设备的设计向市场上优先级程度比较高的协议归一,不再兼容优先级低的协议,降低多协议支持成本和由此带来的设计风险。According to the protocol information testing method of the embodiment of the present application, it is possible to effectively identify some counterfeit behaviors in which the electronic equipment under test claims to support a specific protocol but does not comply with the provisions of the specific protocol, so as to ensure the compliance of the electronic equipment under test with respect to the specific protocol, and avoid The use of other protocols leads to security issues and affects the reputation of specific protocols, promoting the development of integrated fast charging ecology. By testing the priority, it can provide design trend reference for electronic equipment designers, which facilitates the design of electronic equipment to normalize the protocols with relatively high priority in the market, and is no longer compatible with low priority protocols, reducing multi-protocol support cost and the resulting design risk.
图7示出根据本申请实施例的协议信息测试方法的示例性流程示意图。Fig. 7 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
如图7所示,本申请的实施例提供了一种协议信息测试方法,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:As shown in FIG. 7 , an embodiment of the present application provides a method for testing protocol information. The method is applied to a tester, and the tester records pulse information of at least one handshake signal of a charging protocol. The at least one A charging protocol includes a first charging protocol, the method comprising:
步骤S1,接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;Step S1, receiving the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
步骤S2,记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;Step S2, recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the longest duration The duration of the handshake signal of the charging protocol;
步骤S3,在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。Step S3, when the first recording result matches the pulse information of the handshake signal of the first charging protocol, determine that the first charging protocol is the first priority in the electronic device under test.
其中,测试仪可以参照上文及图2、图3、图4的相关描述中的测试仪的示例,至少一种充电协议可以包括上文所述的UFCS规范、QC协议、VOOC协议等快速充电协议,本申请对于至少一种充电协议包括的各协议的具体类型及数量不作限制。至少一种充电协议的握手信号的脉冲信息,可以参见上文及图3、图4的相关描述中的协议A握手信号、协议X握手信号的示例。本申请对于至少一种充电协议的握手信号的脉冲信息的具体波形同样不作限制。第一充电协议可以参照上文及图2、图3、图4的相关描述中的协议A也即UFCS规范的示例。本申请对于第一充电协议的具体类型不作限制。Wherein, the tester can refer to the example of the tester in the above and the relevant descriptions of Fig. 2, Fig. 3, and Fig. 4, and at least one charging protocol can include the above-mentioned UFCS specification, QC protocol, VOOC protocol, etc. protocol, the present application does not limit the specific type and quantity of each protocol included in at least one charging protocol. For the pulse information of the handshake signal of at least one charging protocol, refer to the examples of the handshake signal of protocol A and the handshake signal of protocol X in the above and related descriptions of FIG. 3 and FIG. 4 . The present application also does not limit the specific waveform of the pulse information of the handshake signal of at least one charging protocol. For the first charging protocol, reference may be made to protocol A in the above and related descriptions of FIG. 2 , FIG. 3 , and FIG. 4 , that is, an example of the UFCS specification. The present application does not limit the specific type of the first charging protocol.
被测的电子设备可以参照上文及图2、图3、图4的相关描述中的被测的电子设备的示例,第一握手信号可以是被测的电子设备发出的第一种信号,第一握手信号可以参照上文及图3的相关描述中的第一次发送的信号以及图4的相关描述中的第一种信号的示例。The electronic equipment under test can refer to the example of the electronic equipment under test in the relevant descriptions of the above and FIG. 2, FIG. For a handshake signal, reference may be made to the example of the signal sent for the first time in the related description of FIG. 3 and the first signal in the related description of FIG. 4 .
本文所说的“第一次发送”,表示电子设备第一次发送某一种充电协议的握手信号(例如上文所说的第一握手信号,或第一种信号)。电子设备可能多次发出某一种充电协议的握手信号。第一记录结果可以参照上文及图3的相关描述中、对应于第一次接收到的信号的记录结果的示例,以及图4的相关描述中、对应于第一次接收到的第一种信号的记录结果的示例。The "first sending" mentioned in this article means that the electronic device sends a handshake signal of a charging protocol for the first time (for example, the first handshake signal mentioned above, or the first signal). An electronic device may send a handshake signal of a certain charging protocol multiple times. The first recording result can refer to the example of the recording result corresponding to the signal received for the first time in the related description of the above and FIG. 3 , and the first recording result corresponding to the first received signal in the related description of FIG. An example of the recorded result of a signal.
步骤S3中,第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配,可以参照上文及图3的相关描述中“情况1”的示例。In step S3, the first record result is matched with the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of "Case 1" in the above and related descriptions of FIG. 3 .
图7及相关描述中以测试仪基于第一次发送的第一握手信号得到第一记录结果作为示例。本领域技术人员应理解,在被测的电子设备设置有握手信号的重试机制时,测试仪也可以基于第二次、第三次等发送的第一握手信号重新得到第一记录结果。例如被测的电子设备第一 次发出第一握手信号,在测试仪上基于第一次发送的第一握手信号得到第一记录结果,被测的电子设备未接收到握手响应信号,可以第二次发出该第一握手信号,在测试仪上基于第二次发送的第一握手信号得到第一记录结果。测试仪可以设置为基于重新得到的第一记录结果再次执行步骤S3,以保证本申请实施例的协议信息测试方法的测试结果准确度,或者也可以设置为识别确定重新得到的第一记录结果中包括的脉冲信息与之前得到的第一记录结果相同时,不对该重新得到的第一记录结果作处理,以节省本申请实施例的协议信息测试方法的数据处理成本。本申请对于测试仪对重新得到的第一记录结果的处理方式不作限制。同理,在下文中图7的相关描述中,以测试仪基于第一次发送的第n握手信号得到第n记录结果作为示例,本领域技术人员应理解,测试仪也可以基于第二次、第三次等发送的第n握手信号重新得到第n记录结果,再对重新得到的第n记录结果进行与重新得到的第一记录结果相似的处理,本申请对于测试仪对重新得到的第n记录结果的处理方式不作限制。In FIG. 7 and related descriptions, it is taken as an example that the tester obtains the first record result based on the first handshake signal sent for the first time. Those skilled in the art should understand that when the electronic device under test is provided with a handshake signal retry mechanism, the tester can also re-obtain the first record result based on the first handshake signal sent for the second time or the third time. For example, the electronic device under test sends the first handshake signal for the first time, and the first record result is obtained on the tester based on the first handshake signal sent for the first time. If the electronic device under test does not receive the handshake response signal, the second The first handshake signal is sent for the first time, and the first recording result is obtained on the tester based on the first handshake signal sent for the second time. The tester can be set to execute step S3 again based on the newly obtained first record result, so as to ensure the accuracy of the test result of the protocol information test method in the embodiment of the present application, or it can also be set to identify and determine the first record result obtained again When the included pulse information is the same as the previously obtained first record result, the re-obtained first record result is not processed, so as to save the data processing cost of the protocol information testing method in the embodiment of the present application. The present application does not limit the manner in which the tester processes the retrieved first record result. Similarly, in the related description of FIG. 7 below, it is taken as an example that the tester obtains the nth record result based on the nth handshake signal sent for the first time. Those skilled in the art should understand that the tester can also be based on the second, the first The nth handshake signal sent three times waits to re-obtain the nth record result, and then perform similar processing on the re-obtained nth record result as the re-obtained first record result. The processing method of the results is not limited.
根据本申请实施例的协议信息测试方法,在电子设备确定测试仪的端口是专用充电端口之后,通过测试仪接收被测的电子设备第一次发送的第一握手信号,并记录下包括第一握手信号的第一记录结果。由于第一记录结果的时长大于至少一种充电协议中的任一充电协议的握手信号的时长或等于至少一种充电协议中时长最长的充电协议的握手信号的时长,且至少一种充电协议包括第一充电协议,因此,第一记录结果具备包括第一充电协议的握手信号的全部信息的能力。通过确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,可以确定第一握手信号确实是第一充电协议的握手信号,因此,可以确定第一充电协议在被测的电子设备中是第一优先级。本申请实施例的协议信息测试方法可以直接得到第一充电协议在被测的电子设备中的优先级情况,第一充电协议为特定的快速充电协议时,使得能够检测确定特定的快速充电协议在被测的电子设备支持的全部快速充电协议中的优先级情况。According to the protocol information testing method of the embodiment of the present application, after the electronic device determines that the port of the tester is a dedicated charging port, the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol. By determining that the first record result matches the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshaking signal is indeed the handshaking signal of the first charging protocol, and therefore, it can be determined that the first charging protocol is in the electronic device under test is the first priority. The protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test. When the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
测试仪仅接收一次信号并确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,即可确定被测的电子设备的第一优先级是特定的第一充电协议,而不需再确定第一记录结果和其他协议的握手信号的脉冲信息是否匹配,可以降低数据处理成本。The tester only receives the signal once and confirms that the first record result matches the pulse information of the handshake signal of the first charging protocol, so that it can be determined that the first priority of the electronic device under test is a specific first charging protocol, without further Determining whether the first record result matches the pulse information of handshake signals of other protocols can reduce data processing costs.
在一种可能的实现方式中,所述方法还包括:在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。In a possible implementation manner, the method further includes: when the first record result only includes the same pulse information as the pulse information of the handshake signal of the first charging protocol, determining that the first record result is the same as The pulse information of the handshake signal of the first charging protocol matches; when the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, determine that the first record result is different from the pulse information of the handshake signal of the first charging protocol. The pulse information of the handshake signal of the first charging protocol does not match.
其中,第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲,可以参照上文及图3的相关描述中的“情况1”的示例。第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲,可以参照上文及图3的相关描述中的“情况2”以及“情况3”的示例。Wherein, the first recording result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of “Case 1” in the above and related descriptions of FIG. 3 . The first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, and reference may be made to the examples of "case 2" and "case 3" in the above and related descriptions of FIG. 3 .
第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号确实是第一充电协议的握手信号,第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,而是其他协议的脉冲信号或者伪脉冲信号。通过这种方式,可以区分第一握手信号确实是第一充电协议的握手信号的情况以及非第一充电协议的握手信号的情况,从而在出现第一握手信号非第一充电协议的握手信号的情况时不会错误地确定被测的电子设备中第一优先级的是第一充电 协议,保证检测结果的准确度。When the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol When the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol. In this way, it is possible to distinguish between the case where the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be mistakenly determined that the first priority among the electronic devices under test is the first charging protocol, so as to ensure the accuracy of the test results.
在一种可能的实现方式中,所述方法还包括:在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配时,对比所述第一记录结果和至少一个充电协议中、除第一充电协议之外的其他充电协议的握手信号的脉冲信息;在所述第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。In a possible implementation manner, the method further includes: when the first recorded result does not match the pulse information of the handshake signal of the first charging protocol, comparing the first recorded result with at least one charging In the protocol, the pulse information of the handshake signal of other charging protocols except the first charging protocol; when the first record result matches the pulse information of the handshake signal of the second charging protocol in the other charging protocol, determine The second charging protocol is a first priority in the electronic device under test.
其中,第二充电协议可以参照上文以及图3、图4的相关描述中的协议X的示例,第二充电协议的握手信号的脉冲信息可以参照上文以及图3、图4的相关描述中的协议X的握手信号的示例。第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配,可以参照上文及图3的相关描述中的“情况3”的示例。Wherein, the second charging protocol can refer to the example of protocol X in the above and related descriptions of Fig. 3 and Fig. 4, and the pulse information of the handshake signal of the second charging protocol can refer to the above and related descriptions of Fig. Example of protocol X handshake signals. The first record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols, and reference may be made to the example of "Case 3" in the above and related descriptions of FIG. 3 .
第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,进一步地,第一记录结果仅包括与第二充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号是第二充电协议的握手信号。通过这种方式,可以进一步确定第二充电协议在被测的电子设备中是第一优先级,以根据第一记录结果获得被测的电子设备的更加全面的优先级信息。When the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol. Further, the first record result only includes pulse information related to the second charging protocol When the pulse information of the handshake signals is the same as the pulse, it can be considered that the first handshake signal is the handshake signal of the second charging protocol. In this way, it can be further determined that the second charging protocol is the first priority in the electronic device under test, so as to obtain more comprehensive priority information of the electronic device under test according to the first recording result.
在一种可能的实现方式中,所述测试仪被设置为不发送握手响应信号,所述方法还包括:接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息。In a possible implementation, the tester is set not to send a handshake response signal, and the method further includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1 ; Record the nth record result including the nth handshake signal, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the charging with the longest duration The duration of the handshake signal of the protocol; when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined charging protocol in the electronic device under test The priority information of the third charging protocol is used to determine the priority information of the third charging protocol in the electronic device under test.
其中,第n握手信号可以参照上文及图4的相关描述中的第二种信号、第三种信号的示例。第n记录结果可以参照上文及图4的相关描述中,对应于第一次接收到的第二种信号的记录结果、对应于第一次接收到的第三种信号的记录结果的示例。Wherein, for the nth handshake signal, reference may be made to the examples of the second signal and the third signal in the above and related descriptions of FIG. 4 . For the nth recording result, reference may be made to the examples of the recording result corresponding to the second signal received for the first time and the recording result corresponding to the third signal received for the first time in the above and related descriptions of FIG. 4 .
确定第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配的方式,可以参照确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配的方式的示例。The manner of determining that the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol can refer to the manner of determining that the first record result matches the pulse information of the handshake signal of the first charging protocol example of .
通过这种方式,使得测试仪不仅能够确定第一充电协议是否为被测电子设备的第一优先级,还可以在每次接收到的一种握手信号时,根据握手信号的顺序分别记录下对应的记录结果并根据记录结果得到更多的优先级信息,从而提升测试仪对于被测的电子设备的各协议优先级信息的测试能力。In this way, the tester can not only determine whether the first charging protocol is the first priority of the electronic device under test, but also record the corresponding Record the results and get more priority information according to the record results, thereby improving the tester's ability to test the priority information of each protocol of the electronic device under test.
在一种可能的实现方式中,在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息,包括:在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协议中在所述被测的电子设备中是第t+1优先级,t为正整数;在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级。In a possible implementation manner, when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined The priority information of the charging protocol, determining the priority information of the third charging protocol in the electronic device under test includes: when the t-th priority charging protocol of the electronic device under test has been determined, determining the In the third charging protocol, it is the t+1th priority in the electronic device under test, and t is a positive integer; when the charging protocol of the first priority of the electronic device under test is not determined, determine the third The charging protocol is the first priority in the electronic device under test.
其中,在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协 议中在所述被测的电子设备中是第t+1优先级,可以参照上文及图4的相关描述中,经对比确认被测的电子设备支持协议B(例如QC协议),且此前已经确认被测的电子设备支持其他协议并作为第一优先级(例如协议A或协议X),那么可以确认协议B作为第二优先级的示例。在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级,可以参照上文及图4的相关描述中,经对比确认被测的电子设备支持协议B,且此前尚未确认被测的电子设备的第一优先级的协议,那么可以确认协议B作为第一优先级的示例。Wherein, when the charging protocol of the tth priority of the electronic device under test has been determined, it is determined that the third charging protocol is the t+1th priority of the electronic device under test, which can be referred to above In the related description of FIG. 4, it is confirmed by comparison that the electronic equipment under test supports protocol B (such as the QC protocol), and it has been confirmed that the electronic equipment under test supports other protocols as the first priority (such as protocol A or protocol X). ), then protocol B can be identified as an example of the second priority. When the charging protocol of the first priority of the electronic device under test is not determined, it is determined that the third charging protocol is the first priority of the electronic device under test, and reference may be made to the relevant descriptions above and in FIG. 4 In the comparison, if it is confirmed that the electronic device under test supports protocol B, and the first priority protocol of the electronic device under test has not been confirmed before, then protocol B can be confirmed as an example of the first priority.
通过这种方式,可以根据记录下的多个记录结果,结合已经确定的优先级信息,依次确定被测的电子设备支持的各充电协议的优先级顺序。使得测试仪对于被测的电子设备所支持的各协议的优先级信息的测试结果更加具体。In this way, according to the multiple recording results recorded, combined with the determined priority information, the priority sequence of the charging protocols supported by the electronic device under test can be sequentially determined. The test result of the priority information of each protocol supported by the electronic equipment under test by the tester is made more specific.
图8示出根据本申请实施例的协议信息测试方法的示例性流程示意图。Fig. 8 shows an exemplary flowchart of a method for testing protocol information according to an embodiment of the present application.
如图8所示,本申请的实施例提供了一种协议信息测试方法,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:As shown in FIG. 8 , an embodiment of the present application provides a method for testing protocol information. The method is applied to a tester, and the tester records pulse information of at least one handshake signal of a charging protocol. The at least one A charging protocol includes a first charging protocol, the method comprising:
步骤S4,接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的第一种信号;Step S4, receiving the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is the first signal sent after the electronic device determines that the port of the tester is a dedicated charging port;
步骤S5,记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;Step S5, recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to the longest duration The duration of the handshake signal of the charging protocol;
步骤S6,在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,发送第一充电协议的握手响应信号到所述被测的电子设备;Step S6, when the first record result matches the pulse information of the handshake signal of the first charging protocol, sending a handshake response signal of the first charging protocol to the electronic device under test;
步骤S7,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息。Step S7, according to the data information received after sending the handshake response signal of the first charging protocol, determine the priority information of the first charging protocol in the electronic device under test.
其中,测试仪可以参照上文及图2、图5、图6的相关描述中的测试仪的示例,至少一种充电协议可以包括上文所述的UFCS规范、QC协议、VOOC协议等快速充电协议,本申请对于至少一种充电协议包括的各协议的具体类型及数量不作限制。至少一种充电协议的握手信号的脉冲信息,可以参见上文及图5、图6的相关描述中的协议A握手信号、协议X握手信号的示例。本申请对于至少一种充电协议的握手信号的脉冲信息的具体波形同样不作限制。第一充电协议可以参照上文及图2、图5、图6的相关描述中的协议A也即UFCS规范的示例。本申请对于第一充电协议的具体类型不作限制。Wherein, the tester can refer to the example of the tester in the above and the relevant descriptions of Figure 2, Figure 5, and Figure 6, and at least one charging protocol can include the above-mentioned UFCS specification, QC protocol, VOOC protocol, etc. protocol, the present application does not limit the specific type and quantity of each protocol included in at least one charging protocol. For the pulse information of the handshake signal of at least one charging protocol, refer to the examples of the handshake signal of protocol A and the handshake signal of protocol X in the above and related descriptions of FIG. 5 and FIG. 6 . The present application also does not limit the specific waveform of the pulse information of the handshake signal of at least one charging protocol. For the first charging protocol, reference may be made to protocol A in the above description and related descriptions of FIG. 2 , FIG. 5 , and FIG. 6 , that is, an example of the UFCS specification. The present application does not limit the specific type of the first charging protocol.
被测的电子设备可以参照上文及图2、图5、图6的相关描述中的被测的电子设备的示例,第一握手信号可以是被测的电子设备发出的第一种信号,第一握手信号可以参照上文及图5的相关描述中的第一次发送的信号以及图6的相关描述中的第一种信号的示例。The electronic equipment under test can refer to the example of the electronic equipment under test in the relevant descriptions of the above and FIG. 2, FIG. For a handshake signal, reference may be made to the example of the first signal sent above and in the related description of FIG. 5 and the first signal in the related description of FIG. 6 .
这里所说的“第一次发送”,表示电子设备第一次发送的某一种充电协议的握手信号(例如上文所说的第一握手信号,或第一种信号)。电子设备可能多次发出某一种充电协议的握手信号。第一记录结果可以参照上文及图5、图6的相关描述中、对应于第一次接收到的信号的记录结果的示例。The "first sending" mentioned here refers to the handshake signal of a certain charging protocol sent by the electronic device for the first time (for example, the first handshake signal mentioned above, or the first signal). An electronic device may send a handshake signal of a certain charging protocol multiple times. For the first recording result, reference may be made to the example of the recording result corresponding to the signal received for the first time in the above and related descriptions of FIG. 5 and FIG. 6 .
步骤S6中,第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配,可以参照上文及图3的相关描述中“情况1”的示例。In step S6, the first record result is matched with the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of "case 1" in the above and related descriptions of FIG. 3 .
发送第一充电协议的握手响应信号之后接收到的数据信息,可以参照上文及图5、图6的相关描述中协议A Ping数据包、第二种信号的示例。For the data information received after sending the handshake response signal of the first charging protocol, you can refer to the example of the protocol A Ping data packet and the second signal in the above and related descriptions of Fig. 5 and Fig. 6 .
图8及相关描述中以测试仪基于第一次发送的第一握手信号得到第一记录结果作为示例。本领域技术人员应理解,在被测的电子设备设置有握手信号的重试机制时,测试仪也可以基于第二次、第三次发送的第一握手信号重新得到第一记录结果。例如被测的电子设备第一次发出第一握手信号,在测试仪上基于第一次发送的第一握手信号得到第一记录结果,被测的电子设备未接收到握手响应信号,可以第二次发出该第一握手信号,在测试仪上基于第二次发送的第一握手信号得到第一记录结果。测试仪可以设置为基于重新得到的第一记录结果再次执行步骤S6,以保证本申请实施例的协议信息测试方法的测试结果准确度,或者也可以设置为识别确定重新得到的第一记录结果中包括的脉冲信息与之前得到的第一记录结果相同时,不对该重新得到的第一记录结果作处理,以节省本申请实施例的协议信息测试方法的数据处理成本。本申请对于测试仪对重新得到的第一记录结果的处理方式不作限制。同理,在下文中图8的相关描述中,以测试仪基于第一次发送的第n握手信号得到第n记录结果作为示例,本领域技术人员应理解,测试仪也可以基于第二次、第三次发送的第n握手信号重新得到第n记录结果,再对重新得到的第n记录结果进行与重新得到的第一记录结果相似的处理,本申请对于测试仪对重新得到的第n记录结果的处理方式不作限制。In FIG. 8 and related descriptions, the tester obtains the first record result based on the first handshake signal sent for the first time as an example. Those skilled in the art should understand that when the electronic device under test is provided with a retry mechanism for the handshake signal, the tester can also re-obtain the first record result based on the first handshake signal sent for the second and third times. For example, the electronic device under test sends the first handshake signal for the first time, and the first record result is obtained on the tester based on the first handshake signal sent for the first time. If the electronic device under test does not receive the handshake response signal, the second The first handshake signal is sent for the first time, and the first recording result is obtained on the tester based on the first handshake signal sent for the second time. The tester can be set to perform step S6 again based on the newly obtained first record result, so as to ensure the accuracy of the test result of the protocol information test method in the embodiment of the present application, or it can also be set to identify and determine the first record result obtained again When the included pulse information is the same as the previously obtained first record result, the re-obtained first record result is not processed, so as to save the data processing cost of the protocol information testing method in the embodiment of the present application. The present application does not limit the manner in which the tester processes the retrieved first record result. Similarly, in the related description of FIG. 8 below, the nth record result obtained by the tester based on the nth handshake signal sent for the first time is used as an example. Those skilled in the art should understand that the tester can also be based on the second, the first The nth handshake signal sent three times re-obtains the nth record result, and then performs similar processing to the re-obtained first nth record result on the re-obtained nth record result. The processing method is not limited.
根据本申请实施例的协议信息测试方法,在电子设备确定测试仪的端口是专用充电端口之后,通过测试仪接收被测的电子设备第一次发送的第一握手信号,并记录下包括第一握手信号的第一记录结果。由于第一记录结果的时长大于至少一种充电协议中的任一充电协议的握手信号的时长或等于至少一种充电协议中时长最长的充电协议的握手信号的时长,且至少一种充电协议包括第一充电协议,因此,第一记录结果具备包括第一充电协议的握手信号的全部信息的能力。通过确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,可以确定第一握手信号确实是第一充电协议的握手信号,发送第一充电协议的握手响应信号到被测的电子设备。测试仪再根据发送第一充电协议的握手响应信号之后接收到的数据信息,可以确定所述第一充电协议在被测的电子设备中的优先级信息。本申请实施例的协议信息测试方法可以直接得到第一充电协议在被测的电子设备中的优先级情况,第一充电协议为特定的快速充电协议时,使得能够检测确定特定的快速充电协议在被测的电子设备支持的全部快速充电协议中的优先级情况。According to the protocol information testing method of the embodiment of the present application, after the electronic device determines that the port of the tester is a dedicated charging port, the tester receives the first handshake signal sent by the electronic device under test for the first time, and records the first handshake signal including the first The result of the first record of the handshake signal. Since the duration of the first record result is longer than the duration of the handshake signal of any charging protocol in at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration in at least one charging protocol, and at least one charging protocol The first charging protocol is included, therefore, the first record result has the ability to include all information of the handshake signal of the first charging protocol. By determining that the first record result matches the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshaking signal is indeed the handshaking signal of the first charging protocol, and the handshaking response signal of the first charging protocol is sent to the electronic device under test . According to the data information received after sending the handshake response signal of the first charging protocol, the tester can determine the priority information of the first charging protocol in the electronic device under test. The protocol information testing method of the embodiment of the present application can directly obtain the priority of the first charging protocol in the electronic device under test. When the first charging protocol is a specific fast charging protocol, it can detect and determine the specific fast charging protocol in the The priority case among all fast charging protocols supported by the electronic device under test.
测试仪仅接收一次信号并确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配,在匹配时发送握手响应信号并接收相应的数据信息,即可确定被测的电子设备的第一优先级是特定的第一充电协议,测试仪不需再确定第一记录结果和其他协议的握手信号的脉冲信息是否匹配,也不需再发送其他协议的握手响应信号,可以降低数据处理成本。The tester only receives the signal once and determines that the first recorded result matches the pulse information of the handshake signal of the first charging protocol. When matching, the tester sends a handshake response signal and receives the corresponding data information to determine the first record of the electronic device under test. The priority is specific to the first charging protocol, and the tester does not need to determine whether the first record result matches the pulse information of the handshake signals of other protocols, nor does it need to send handshake response signals of other protocols, which can reduce data processing costs.
第一握手信号是握手阶段产生的信息,发送第一充电协议的握手响应信号之后接收到的数据信息可以包括协议识别阶段产生的信息,通过这种方式,使得能够结合协议识别阶段的信息和握手阶段的信息来确定第一充电协议在被测的电子设备中的优先级情况,使得得到的测试结果更加准确。The first handshake signal is the information generated in the handshake phase. The data information received after sending the handshake response signal of the first charging protocol may include the information generated in the protocol identification phase. In this way, the information in the protocol identification phase can be combined with the handshake. Phase information is used to determine the priority of the first charging protocol in the electronic device under test, so that the obtained test results are more accurate.
在一种可能的实现方式中,所述方法还包括:在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲 信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。In a possible implementation manner, the method further includes: when the first record result only includes the same pulse information as the pulse information of the handshake signal of the first charging protocol, determining that the first record result is the same as The pulse information of the handshake signal of the first charging protocol matches; when the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, determine that the first record result is different from the pulse information of the handshake signal of the first charging protocol. The pulse information of the handshake signal of the first charging protocol does not match.
其中,第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲,可以参照上文及图3的相关描述中的“情况1”的示例。第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲,可以参照上文及图3的相关描述中的“情况2”以及“情况3”的示例。Wherein, the first recording result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, and reference may be made to the example of “Case 1” in the above and related descriptions of FIG. 3 . The first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, and reference may be made to the examples of "case 2" and "case 3" in the above and related descriptions of FIG. 3 .
第一记录结果仅包括与第一充电协议的握手信号的脉冲信息相同的脉冲时,可以认为第一握手信号确实是第一充电协议的握手信号,第一记录结果包括与第一充电协议的握手信号的脉冲信息不同的脉冲时,可以认为第一握手信号并非第一充电协议的握手信号,而是其他协议的脉冲信号或者伪脉冲信号。通过这种方式,可以区分第一握手信号确实是第一充电协议的握手信号的情况以及非第一充电协议的握手信号的情况,从而在出现第一握手信号非第一充电协议的握手信号的情况时不会错误地确定第一充电协议在被测的电子设备中是第一优先级,保证检测结果的准确度。When the first record result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it can be considered that the first handshake signal is indeed the handshake signal of the first charging protocol, and the first record result includes the handshake with the first charging protocol When the pulse information of the signal is different, it can be considered that the first handshake signal is not the handshake signal of the first charging protocol, but a pulse signal or a pseudo pulse signal of another protocol. In this way, it is possible to distinguish between the case where the first handshake signal is indeed a handshake signal of the first charging protocol and the case of a handshake signal not of the first charging protocol, so that when the first handshake signal is not a handshake signal of the first charging protocol Under certain circumstances, it will not be wrongly determined that the first charging protocol is the first priority in the electronic device under test, ensuring the accuracy of the test result.
在一种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。In a possible implementation manner, according to the data information received after sending the handshake response signal of the first charging protocol, determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, when receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, it is determined that the first charging protocol in the electronic device under test is number one priority.
其中,第一充电协议的网际包探测器数据包可以参照上文及图5的相关描述中协议A Ping数据包的示例。在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包,可以参照上文及图5的相关描述中,测试仪发送协议A握手响应信号之后,接收到协议A Ping数据包的示例。Wherein, the Internet packet detector data packet of the first charging protocol can refer to the example of the protocol A Ping data packet in the above description and the related description of FIG. 5 . After sending the handshake response signal of the first charging protocol, receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, you can refer to the above and related descriptions in Figure 5, the tester sends protocol A Example of a Protocol A Ping packet received after the handshake response signal.
网际包探测器数据包是在协议识别阶段产生的信息,被测的电子设备若发出某一协议的网际包探测器数据包并接收到对应的确认数据包时即可基于该协议进行充电参数配置并接受供电,因此,若测试仪发出第一充电协议的握手响应信号之后接收到来自被测的电子设备的第一充电协议的网际包探测器数据包,说明被测的电子设备确实支持第一充电协议。通过接收到协议识别阶段的网际包探测器数据包来确定第一充电协议在被测的电子设备中是第一优先级,使得得到的测试结果与被测的电子设备的实际情况相符合。The Internet packet detector data packet is the information generated in the protocol identification stage. If the electronic device under test sends an Internet packet detector data packet of a certain protocol and receives the corresponding confirmation data packet, it can configure charging parameters based on the protocol. And accept power supply, therefore, if the tester receives the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, it means that the electronic device under test does support the first charging protocol. charging protocol. It is determined that the first charging protocol is the first priority in the electronic device under test by receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
在一种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号时,确定所述第一充电协议在所述被测的电子设备中不是第一优先级,所述第二握手信号不同与第一握手信号。In a possible implementation manner, according to the data information received after sending the handshake response signal of the first charging protocol, determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second handshake sent for the first time is received from the electronic device under test signal, it is determined that the first charging protocol is not the first priority in the electronic device under test, and the second handshake signal is different from the first handshake signal.
其中,第二握手信号可以是被测的电子设备发出的第二种信号。第一次发送的第二握手信号可以参照上文及图6的相关描述中第二种信号的示例。在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号,可以参照上文及图6的相关描述中,测试仪发送协议A握手响应信号之后,未接收到协议A Ping数据包、且接收到第二种信号的示例。Wherein, the second handshake signal may be a second signal sent by the electronic device under test. For the second handshake signal sent for the first time, reference may be made to the example of the second signal in the above and related descriptions of FIG. 6 . After the handshake response signal of the first charging protocol is sent, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second packet sent for the first time is received from the electronic device under test. For the handshake signal, you can refer to the above and the relevant description in Figure 6, after the tester sends the protocol A handshake response signal, it does not receive the protocol A Ping data packet and receives the second signal example.
被测的电子设备若接收到某一协议的握手响应信号但不支持该协议时,不会发出该协议的网际包探测器数据包,而是发出另外的握手信号,直到发出某一协议的网际包探测器数据 包并接收到对应的确认数据包时即可基于该协议进行充电参数配置并接受供电。因此,若测试仪发出第一充电协议的握手响应信号之后未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包,而是接收到第一次发送的第二握手信号,说明被测的电子设备并不支持第一充电协议。通过未接收到协议识别阶段的网际包探测器数据包来确定第一充电协议在被测的电子设备中不是第一优先级,使得得到的测试结果与被测的电子设备的实际情况相符合。If the electronic device under test receives a handshake response signal of a certain protocol but does not support the protocol, it will not send the Internet packet detector data packet of the protocol, but send another handshake signal until it sends out the Internet packet of a certain protocol. When the packet detector data packet is received and the corresponding confirmation data packet is received, the charging parameters can be configured based on this protocol and the power supply can be accepted. Therefore, if the tester does not receive the Internet packet detector data packet of the first charging protocol from the electronic device under test after sending the handshake response signal of the first charging protocol, but receives the second handshaking signal sent for the first time , indicating that the electronic device under test does not support the first charging protocol. It is determined that the first charging protocol is not the first priority in the electronic device under test by not receiving the Internet packet detector data packet in the protocol identification stage, so that the obtained test result is consistent with the actual situation of the electronic device under test.
在一种可能的实现方式中,所述方法还包括:接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;在未确定被测的电子设备中第一优先级的充电协议时,记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;在所述第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配时,发送所述第二充电协议的握手响应信号到所述被测的电子设备;在发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。In a possible implementation, the method further includes: receiving the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; In the charging protocol of the above-mentioned level, record the nth record result including the nth handshake signal, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or equal to The duration of the handshake signal of the charging protocol with the longest duration; when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol, send the handshake signal of the second charging protocol A handshake response signal is sent to the electronic device under test; after sending the handshake response signal of the second charging protocol, when receiving an Internet packet detector data packet of the second charging protocol from the electronic device under test, it is determined that the first The second charging protocol is the first priority in the electronic device under test.
其中,第n握手信号可以参照上文及图6的相关描述中的第二种信号的示例。第n记录结果可以参照上文及图6的相关描述中,对应于第二种信号的记录结果的示例。第二充电协议可以参照上文及图6的相关描述中协议B的示例。确定第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配的方式,可以参照确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配的方式的示例。Wherein, for the nth handshake signal, reference may be made to the example of the second signal in the above and related descriptions of FIG. 6 . For the nth recording result, reference may be made to the example of the recording result corresponding to the second type of signal in the above and related descriptions of FIG. 6 . For the second charging protocol, reference may be made to the example of protocol B in the above and related descriptions of FIG. 6 . The manner of determining that the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol can refer to the manner of determining that the first record result matches the pulse information of the handshake signal of the first charging protocol example of .
第二充电协议的握手响应信号可以参照上文及图6的相关描述中的协议B握手响应信号的示例。发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包,可以参照上文及图6的相关描述中,测试仪发送协议B握手响应信号之后,接收到协议B Ping数据包的示例。For the handshake response signal of the second charging protocol, reference may be made to the example of the protocol B handshake response signal in the above and related descriptions of FIG. 6 . After sending the handshake response signal of the second charging protocol, receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test, you can refer to the above and the related description in Figure 6, the tester sends the protocol B handshake Example of a Protocol B Ping packet received after a response signal.
通过这种方式,使得测试仪在确定被测电子设备不以第一充电协议作为第一优先级时,还能够确定被测电子设备的第一优先级的充电协议的具体类型,即第二充电协议,并确定被测电子设备上除第二充电协议外的充电协议均不是第一优先级,进一步提升测试仪对于被测的电子设备的充电协议的优先级信息的测试能力。In this way, when the tester determines that the electronic device under test does not use the first charging protocol as the first priority, it can also determine the specific type of the first priority charging protocol of the electronic device under test, that is, the second charging protocol. protocol, and determine that charging protocols other than the second charging protocol on the electronic device under test are not the first priority, further improving the tester's ability to test the priority information of the charging protocol of the electronic device under test.
本申请的实施例提供了一种协议信息测试装置,所述装置应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述装置包括:An embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol includes the first charging protocol, the device includes:
第一接收模块,用于接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;The first receiving module is configured to receive a first handshake signal sent by the electronic device under test for the first time, and the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
第一记录模块,用于记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;The first recording module is configured to record a first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
第一确定模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。A first determining module, configured to determine that the first charging protocol is the first priority among the electronic devices under test when the first recording result matches the pulse information of the handshake signal of the first charging protocol class.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
第二确定模块,用于在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲 信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;A second determining module, configured to determine the handshake between the first record result and the first charging protocol when the first record result only includes pulse information identical to the pulse information of the handshake signal of the first charging protocol The pulse information of the signal matches;
第三确定模块,用于在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。A third determination module, configured to determine the first record result and the handshake signal of the first charging protocol when the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol The pulse information does not match.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
第一对比模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配时,对比所述第一记录结果和至少一个充电协议中、除第一充电协议之外的其他充电协议的握手信号的脉冲信息;A first comparison module, configured to compare the first recorded result with at least one charging protocol except the first charging protocol when the first recorded result does not match the pulse information of the handshake signal of the first charging protocol The pulse information of the handshake signal of other charging protocols;
第四确定模块,用于在所述第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。A fourth determining module, configured to determine that the second charging protocol is in the electronic device under test when the first record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols. Medium is the first priority.
在一种可能的实现方式中,所述测试仪被设置为不发送握手响应信号,所述装置还包括:In a possible implementation manner, the tester is set not to send a handshake response signal, and the device further includes:
第二接收模块,用于接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;The second receiving module is used to receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
第二记录模块,用于记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;The second recording module is configured to record the nth recording result including the nth handshake signal, wherein the duration of the nth recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
第五确定模块,用于在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息。The fifth determination module is configured to, when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined charging protocol in the electronic device under test The priority information of the third charging protocol is used to determine the priority information of the third charging protocol in the electronic device under test.
在一种可能的实现方式中,在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息,包括:在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协议中在所述被测的电子设备中是第t+1优先级,t为正整数;在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级。In a possible implementation manner, when the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, according to the determined The priority information of the charging protocol, determining the priority information of the third charging protocol in the electronic device under test includes: when the t-th priority charging protocol of the electronic device under test has been determined, determining the In the third charging protocol, it is the t+1th priority in the electronic device under test, and t is a positive integer; when the charging protocol of the first priority of the electronic device under test is not determined, determine the third The charging protocol is the first priority in the electronic device under test.
本申请的实施例提供了一种协议信息测试装置,所述装置应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述装置包括:An embodiment of the present application provides a protocol information testing device, the device is applied to a tester, and the tester records the pulse information of the handshake signal of at least one charging protocol, and the at least one charging protocol includes the first charging protocol, the device includes:
第三接收模块,用于接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的第一种信号;The third receiving module is used to receive the first handshake signal sent by the electronic device under test for the first time, the first handshake signal is the first handshake signal sent after the electronic device determines that the port of the tester is a dedicated charging port a signal;
第三记录模块,用于记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;A third recording module, configured to record a first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol or Equal to the duration of the handshake signal of the charging protocol with the longest duration;
第一发送模块,用于在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,发送第一充电协议的握手响应信号到所述被测的电子设备;A first sending module, configured to send a handshake response signal of the first charging protocol to the electronic device under test when the first record result matches the pulse information of the handshake signal of the first charging protocol;
第六确定模块,用于根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息。The sixth determination module is configured to determine the priority information of the first charging protocol in the electronic device under test according to the data information received after sending the handshake response signal of the first charging protocol.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
第七确定模块,用于在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;A seventh determination module, configured to determine the handshake between the first record result and the first charging protocol when the first record result only includes pulse information identical to the pulse information of the handshake signal of the first charging protocol The pulse information of the signal matches;
第八确定模块,用于在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。An eighth determination module, configured to determine the first record result and the handshake signal of the first charging protocol when the first record result includes pulse information different from the pulse information of the handshake signal of the first charging protocol The pulse information does not match.
在一种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。In a possible implementation manner, according to the data information received after sending the handshake response signal of the first charging protocol, determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, when receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, it is determined that the first charging protocol in the electronic device under test is number one priority.
在一种可能的实现方式中,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号时,确定所述第一充电协议在所述被测的电子设备中不是第一优先级,所述第二握手信号不同与第一握手信号。In a possible implementation manner, according to the data information received after sending the handshake response signal of the first charging protocol, determining the priority information of the first charging protocol in the electronic device under test includes: After sending the handshake response signal of the first charging protocol, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second handshake sent for the first time is received from the electronic device under test signal, it is determined that the first charging protocol is not the first priority in the electronic device under test, and the second handshake signal is different from the first handshake signal.
在一种可能的实现方式中,所述装置还包括:In a possible implementation manner, the device further includes:
第四接收模块,用于接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;The fourth receiving module is used to receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
第四记录模块,用于在未确定被测的电子设备中第一优先级的充电协议时,记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长或等于时长最长的充电协议的握手信号的时长;The fourth recording module is configured to record the nth recording result including the nth handshake signal when the charging protocol of the first priority in the electronic device under test is not determined, wherein the duration of the nth recording result is longer than the The duration of the handshake signal of any charging protocol in the at least one charging protocol or the duration of the handshake signal of the charging protocol with the longest duration;
第二发送模块,用于在所述第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配时,发送所述第二充电协议的握手响应信号到所述被测的电子设备;The second sending module is configured to send the handshake response signal of the second charging protocol to the at least one charging protocol when the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol. Describe the electronic equipment under test;
第九确定模块,用于在发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。The ninth determination module is configured to determine that the second charging protocol is in the second charging protocol when receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test after sending the handshake response signal of the second charging protocol. The electronic equipment under test is the first priority.
图9示出根据本申请实施例的测试仪的示例性结构示意图。Fig. 9 shows an exemplary structural diagram of a tester according to an embodiment of the present application.
本申请的实施例提供了一种测试仪,包括:处理器以及用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述方法。An embodiment of the present application provides a tester, including: a processor and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions.
如图9所示,测试仪可以是一个单独的电子设备,或者作为一个装置集成在手机、可折叠电子设备、平板电脑、桌面型计算机、膝上型计算机、手持计算机、笔记本电脑、有屏音箱、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、人工智能(artificial intelligence,AI)设备、无人机、车载设备、智能家居设备、或智慧城市设备中的至少一种设备上。本申请实施例对该测试仪的具体设置方式及类型不作特殊限制。As shown in Figure 9, the tester can be a stand-alone electronic device, or integrated as a device in a mobile phone, foldable electronic device, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, speaker with screen , ultra-mobile personal computer (ultra-mobile personal computer, UMPC), netbook, augmented reality (augmented reality, AR) equipment, virtual reality (virtual reality, VR) equipment, artificial intelligence (artificial intelligence, AI) equipment, drone , on-board equipment, smart home equipment, or at least one of smart city equipment. The embodiment of the present application does not impose special restrictions on the specific setting method and type of the tester.
测试仪可以包括处理器110,内部存储器121,通信模块160等。通信模块160和处理器110可以对应于图3中的协议信息测试装置。The tester may include a processor 110, an internal memory 121, a communication module 160, and the like. The communication module 160 and the processor 110 may correspond to the protocol information testing device in FIG. 3 .
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。例如,处理器110可执行本申请实施例的协议信息测试方 法。The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. For example, the processor 110 may execute the protocol information testing method of the embodiment of the present application.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器可以为高速缓冲存储器。该存储器可以保存处理器110用过或使用频率较高的指令或数据,例如本申请实施例中的第一记录结果、第n记录结果、至少一种充电协议的握手信号的脉冲信息等。如果处理器110需要使用该指令或数据,可从该存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 may be a cache memory. The memory may store instructions or data used or frequently used by the processor 110 , such as the first record result, the nth record result, pulse information of handshake signals of at least one charging protocol in the embodiment of the present application, and the like. If the processor 110 needs to use the instruction or data, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,通用输入输出(general-purpose input/output,GPIO)接口等。处理器110可以通过以上至少一种接口连接通信模块等模块。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/transmitter, UART) interface, a general-purpose input/output (general-purpose input/output, GPIO) interface, and the like. The processor 110 may be connected to modules such as a communication module through at least one of the above interfaces.
存储器121可以用于存储计算机可执行程序代码,该可执行程序代码包括指令。存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如确定第一记录结果与第一充电协议的握手信号的脉冲信息匹配的应用程序等)等。存储数据区可存储测试仪的使用过程中所创建的数据(比如第一记录结果、第n记录结果、协议的优先级信息等)等。此外,存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行测试仪的各种功能方法或数据处理。The memory 121 may be used to store computer-executable program code including instructions. The memory 121 may include an area for storing programs and an area for storing data. Wherein, the storage program area can store an operating system, at least one application program required by a function (such as an application program that determines that the first record result matches the pulse information of the handshake signal of the first charging protocol, etc.) and the like. The storage data area can store data created during the use of the tester (such as the first record result, the nth record result, protocol priority information, etc.) and the like. In addition, the memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional methods or data processing of the tester by executing instructions stored in the memory 121 and/or instructions stored in the memory provided in the processor.
通信模块160可以用于通过有线通信的方式接收来自其他装置或设备(例如本申请实施例中的被测的电子设备)的数据,以及输出数据到其他装置或设备。例如测试仪可以通过通信模块160接收来自被测的电子设备的第一握手信号、第n握手信号、网际包探测器数据包等,以及发送握手响应信号到被测的电子设备。The communication module 160 can be used to receive data from other devices or devices (such as the electronic device under test in the embodiment of the present application) through wired communication, and output data to other devices or devices. For example, the tester can receive the first handshake signal, the nth handshake signal, the Internet packet detector data packet, etc. from the electronic device under test through the communication module 160, and send a handshake response signal to the electronic device under test.
可以理解的是,本申请实施例示意的结构并不构成对计算设备的具体限定。在本申请另一些实施例中,计算设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the computing device. In other embodiments of the present application, the computing device may include more or fewer components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components can be realized in hardware, software or a combination of software and hardware.
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。An embodiment of the present application provides a non-volatile computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the foregoing method is implemented.
本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。An embodiment of the present application provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium bearing computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。A computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. A computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of computer-readable storage media include: portable computer disk, hard disk, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), erasable Electrically Programmable Read-Only-Memory (EPROM or flash memory), Static Random-Access Memory (Static Random-Access Memory, SRAM), Portable Compression Disk Read-Only Memory (Compact Disc Read-Only Memory, CD -ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing .
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer readable program instructions or codes described herein may be downloaded from a computer readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, local area network, wide area network, and/or wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。Computer program instructions for performing the operations of the present application may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as the “C” language or similar programming languages. Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In cases involving a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computer such as use an Internet service provider to connect via the Internet). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or programmable logic arrays (Programmable Logic Array, PLA), the electronic circuit can execute computer-readable program instructions, thereby realizing various aspects of the present application.
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It should be understood that each block of the flowcharts and/or block diagrams, and combinations of blocks in the flowcharts and/or block diagrams, can be implemented by computer-readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。It is also possible to load computer-readable program instructions into a computer, other programmable data processing device, or other equipment, so that a series of operational steps are performed on the computer, other programmable data processing device, or other equipment to produce a computer-implemented process , so that instructions executed on computers, other programmable data processing devices, or other devices implement the functions/actions specified in one or more blocks in the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。The flowchart and block diagrams in the figures show the architecture, functions and operations of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in a flowchart or block diagram may represent a module, a portion of a program segment, or an instruction that includes one or more Executable instructions. In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。It should also be noted that each block in the block diagrams and/or flowcharts, and combinations of blocks in the block diagrams and/or flowcharts, can be implemented with hardware (such as circuits or ASIC (Application Specific Integrated Circuit, application-specific integrated circuit)), or it can be realized by a combination of hardware and software, such as firmware.
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。Although the present invention has been described in conjunction with various embodiments herein, in the process of implementing the claimed invention, those skilled in the art can understand and Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Having described various embodiments of the present application above, the foregoing description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and alterations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principle of each embodiment, practical application or improvement of technology in the market, or to enable other ordinary skilled in the art to understand each embodiment disclosed herein.

Claims (13)

  1. 一种协议信息测试方法,其特征在于,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:A method for testing protocol information, characterized in that the method is applied to a tester, and the tester records pulse information of a handshake signal of at least one charging protocol, and the at least one charging protocol includes a first charging protocol, The methods include:
    接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;receiving a first handshake signal sent by the electronic device under test for the first time, where the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
    记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长;Recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol, or equal to the longest charging The duration of the handshake signal of the protocol;
    在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。When the first record result matches the pulse information of the handshake signal of the first charging protocol, it is determined that the first charging protocol is the first priority in the electronic device under test.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising:
    在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;When the first recorded result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it is determined that the first recorded result matches the pulse information of the handshake signal of the first charging protocol;
    在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。When the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
  3. 根据权利要求1或2所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 2, characterized in that the method further comprises:
    在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配时,对比所述第一记录结果和至少一个充电协议中、除第一充电协议之外的其他充电协议的握手信号的脉冲信息;When the first record result does not match the pulse information of the handshake signal of the first charging protocol, compare the first record result with the charging protocol other than the first charging protocol in at least one charging protocol The pulse information of the handshake signal;
    在所述第一记录结果与所述其他充电协议中的第二充电协议的握手信号的脉冲信息匹配时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。When the first record result matches the pulse information of the handshake signal of the second charging protocol among the other charging protocols, it is determined that the second charging protocol is the first priority in the electronic device under test.
  4. 根据权利要求1-4中任一项所述的方法,其特征在于,所述测试仪被设置为不发送握手响应信号,所述方法还包括:The method according to any one of claims 1-4, wherein the tester is configured not to send a handshake response signal, and the method further comprises:
    接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;Receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
    记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长;Recording the nth record result including the nth handshake signal, wherein the duration of the nth record result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol, or equal to the longest charging The duration of the handshake signal of the protocol;
    在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协 议在被测的电子设备中的优先级信息。When the nth record result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, determine the determined priority information of the charging protocol in the electronic device under test. Priority information of the third charging protocol in the electronic device under test.
  5. 根据权利要求4所述的方法,其特征在于,在所述第n记录结果与所述至少一种充电协议中的第三充电协议的握手信号的脉冲信息匹配时,根据已经确定的被测的电子设备中的充电协议的优先级信息,确定所述第三充电协议在被测的电子设备中的优先级信息,包括:The method according to claim 4, wherein when the nth recorded result matches the pulse information of the handshake signal of the third charging protocol among the at least one charging protocol, according to the determined measured The priority information of the charging protocol in the electronic device determines the priority information of the third charging protocol in the electronic device under test, including:
    在已经确定了被测的电子设备的第t优先级的充电协议时,确定所述第三充电协议中在所述被测的电子设备中是第t+1优先级,t为正整数;When the charging protocol of the tth priority of the electronic device under test has been determined, it is determined that the third charging protocol is the t+1th priority of the electronic device under test, and t is a positive integer;
    在未确定被测的电子设备的第一优先级的充电协议时,确定所述第三充电协议在所述被测的电子设备中是第一优先级。When the charging protocol of the first priority of the electronic device under test is not determined, it is determined that the third charging protocol is the first priority of the electronic device under test.
  6. 一种协议信息测试方法,其特征在于,所述方法应用于测试仪,所述测试仪记录有至少一种充电协议的握手信号的脉冲信息,所述至少一种充电协议包括第一充电协议,所述方法包括:A method for testing protocol information, characterized in that the method is applied to a tester, and the tester records pulse information of a handshake signal of at least one charging protocol, and the at least one charging protocol includes a first charging protocol, The methods include:
    接收被测的电子设备第一次发送的第一握手信号,所述第一握手信号是在所述电子设备确定所述测试仪的端口是专用充电端口之后发送的;receiving a first handshake signal sent by the electronic device under test for the first time, where the first handshake signal is sent after the electronic device determines that the port of the tester is a dedicated charging port;
    记录包括所述第一握手信号的第一记录结果,其中所述第一记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长;Recording the first recording result including the first handshake signal, wherein the duration of the first recording result is longer than the duration of the handshake signal of any charging protocol in the at least one charging protocol, or equal to the longest charging The duration of the handshake signal of the protocol;
    在所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配时,发送第一充电协议的握手响应信号到所述被测的电子设备;When the first record result matches the pulse information of the handshake signal of the first charging protocol, sending a handshake response signal of the first charging protocol to the electronic device under test;
    根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息。According to the data information received after sending the handshake response signal of the first charging protocol, the priority information of the first charging protocol in the electronic device under test is determined.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, further comprising:
    在所述第一记录结果仅包括与所述第一充电协议的握手信号的脉冲信息相同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息匹配;When the first recorded result only includes the same pulse as the pulse information of the handshake signal of the first charging protocol, it is determined that the first recorded result matches the pulse information of the handshake signal of the first charging protocol;
    在所述第一记录结果包括与所述第一充电协议的握手信号的脉冲信息不同的脉冲时,确定所述第一记录结果与所述第一充电协议的握手信号的脉冲信息不匹配。When the first record result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, it is determined that the first record result does not match the pulse information of the handshake signal of the first charging protocol.
  8. 根据权利要求6或7所述的方法,其特征在于,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:The method according to claim 6 or 7, characterized in that, according to the data information received after sending the handshake response signal of the first charging protocol, the priority of the first charging protocol in the electronic device under test is determined level information, including:
    在发送第一充电协议的握手响应信号之后,接收到来自被测的电子设备的第一充电协议的网际包探测器数据包时,确定所述第一充电协议在所述被测的电子设备中是第一优先级。After sending the handshake response signal of the first charging protocol, when receiving the Internet packet detector data packet of the first charging protocol from the electronic device under test, it is determined that the first charging protocol is in the electronic device under test is the first priority.
  9. 根据权利要求6-8中任意一项所述的方法,其特征在于,根据发送第一充电协议的握手响应信号之后接收到的数据信息,确定所述第一充电协议在所述被测的电子设备中的优先级信息,包括:The method according to any one of claims 6-8, characterized in that, according to the data information received after sending the handshake response signal of the first charging protocol, it is determined that the first charging protocol is Priority information in the device, including:
    在发送第一充电协议的握手响应信号之后,未接收到来自被测的电子设备的第一充电协议的网际包探测器数据包、且从被测的电子设备处接收第一次发送的第二握手信号时,确定所述第一充电协议在所述被测的电子设备中不是第一优先级,所述第二握手信号不同与第一握手信号。After the handshake response signal of the first charging protocol is sent, the Internet packet detector data packet of the first charging protocol from the electronic device under test is not received, and the second packet sent for the first time is received from the electronic device under test. When handshaking signals, it is determined that the first charging protocol is not the first priority in the electronic device under test, and the second handshaking signal is different from the first handshaking signal.
  10. 根据权利要求6-9中任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 6-9, further comprising:
    接收被测的电子设备第一次发送的第n握手信号,n是大于1的整数;Receive the nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
    在未确定被测的电子设备中第一优先级的充电协议时,记录包括所述第n握手信号的第n记录结果,其中所述第n记录结果的时长大于所述至少一种充电协议中的任一充电协议的握手信号的时长、或等于时长最长的充电协议的握手信号的时长;When the charging protocol with the first priority in the electronic device under test is not determined, record the nth recording result including the nth handshake signal, wherein the duration of the nth recording result is longer than that in the at least one charging protocol The duration of the handshake signal of any charging protocol, or the duration of the handshake signal of the charging protocol with the longest duration;
    在所述第n记录结果与所述至少一种充电协议中的第二充电协议的握手信号的脉冲信息匹配时,发送所述第二充电协议的握手响应信号到所述被测的电子设备;When the nth record result matches the pulse information of the handshake signal of the second charging protocol in the at least one charging protocol, sending the handshake response signal of the second charging protocol to the electronic device under test;
    在发送第二充电协议的握手响应信号之后,接收到来自被测的电子设备的第二充电协议的网际包探测器数据包时,确定所述第二充电协议在所述被测的电子设备中是第一优先级。After sending the handshake response signal of the second charging protocol, when receiving the Internet packet detector data packet of the second charging protocol from the electronic device under test, it is determined that the second charging protocol is in the electronic device under test is the first priority.
  11. 一种测试仪,其特征在于,包括:A tester, characterized in that it comprises:
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为执行所述指令时实现权利要求1-5中任意一项所述的方法,或者实现权利要求6-10中任意一项所述的方法。Wherein, the processor is configured to implement the method in any one of claims 1-5, or implement the method in any one of claims 6-10 when executing the instructions.
  12. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1-5中任意一项所述的方法,或者,实现权利要求6-10中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, wherein the computer program instructions implement the method according to any one of claims 1-5 when executed by a processor, or , realizing the method described in any one of claims 6-10.
  13. 一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,其特征在于,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行权利要求1-5中任意一项所述的方法,或者执行权利要求6-10中任意一项所述的方法。A computer program product, comprising computer-readable codes, or a non-volatile computer-readable storage medium bearing computer-readable codes, characterized in that, when the computer-readable codes are run in an electronic device, the The processor in the electronic device executes the method described in any one of claims 1-5, or executes the method described in any one of claims 6-10.
PCT/CN2022/134115 2021-12-08 2022-11-24 Protocol information testing method, tester, storage medium, and program product WO2023103802A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111492413.2 2021-12-08
CN202111492413.2A CN116247755B (en) 2021-12-08 2021-12-08 Protocol information testing method, tester and storage medium

Publications (1)

Publication Number Publication Date
WO2023103802A1 true WO2023103802A1 (en) 2023-06-15

Family

ID=86633624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/134115 WO2023103802A1 (en) 2021-12-08 2022-11-24 Protocol information testing method, tester, storage medium, and program product

Country Status (2)

Country Link
CN (1) CN116247755B (en)
WO (1) WO2023103802A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117498508A (en) * 2023-12-29 2024-02-02 深圳市卓芯微科技有限公司 Quick charging method and device for mobile device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110016334A1 (en) * 2009-07-20 2011-01-20 Texas Instruments Incorporated Auto-Detect Polling for Correct Handshake to USB Client
CN106356918A (en) * 2016-08-30 2017-01-25 宇龙计算机通信科技(深圳)有限公司 Quick charge recognition method and terminal equipment
CN109066874A (en) * 2018-08-30 2018-12-21 北京小米移动软件有限公司 Fast charge method and device, electronic equipment, computer readable storage medium
CN112260366A (en) * 2020-11-06 2021-01-22 维沃移动通信有限公司 Charging method, charging device and charger
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106329625B (en) * 2016-08-31 2019-12-10 宇龙计算机通信科技(深圳)有限公司 charging method and device
CN110460557B (en) * 2018-05-07 2021-02-19 北汽福田汽车股份有限公司 Charging management method and device for electric vehicle, battery management system and electric vehicle
CN111817380B (en) * 2020-07-14 2023-02-21 维沃移动通信有限公司 Charger, data line, charging equipment and electronic equipment
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110016334A1 (en) * 2009-07-20 2011-01-20 Texas Instruments Incorporated Auto-Detect Polling for Correct Handshake to USB Client
CN106356918A (en) * 2016-08-30 2017-01-25 宇龙计算机通信科技(深圳)有限公司 Quick charge recognition method and terminal equipment
CN109066874A (en) * 2018-08-30 2018-12-21 北京小米移动软件有限公司 Fast charge method and device, electronic equipment, computer readable storage medium
CN112448435A (en) * 2019-09-03 2021-03-05 中兴通讯股份有限公司 Terminal equipment charging method and device and storage medium
CN112260366A (en) * 2020-11-06 2021-01-22 维沃移动通信有限公司 Charging method, charging device and charger

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117498508A (en) * 2023-12-29 2024-02-02 深圳市卓芯微科技有限公司 Quick charging method and device for mobile device, electronic device and storage medium

Also Published As

Publication number Publication date
CN116247755B (en) 2024-01-16
CN116247755A (en) 2023-06-09

Similar Documents

Publication Publication Date Title
JP5717005B2 (en) Method and terminal for selecting an internal circuit according to the status of a USB interface
CN1503132B (en) Apparatus for testing output and of mainboard of computer
TWI573368B (en) Portable electronic device and charging method therefor
WO2023103802A1 (en) Protocol information testing method, tester, storage medium, and program product
CN103699463B (en) Memory test method and system for server using Xeon processor
WO2012034524A1 (en) Method for identifying version type of windows operation system of host by usb device
US10304546B2 (en) External storage device and method of setting reference frequency for the same
US9780599B2 (en) Electronic device and method of detecting efficiency of charging
JPWO2013168289A1 (en) Electronic device and control method thereof
CN102622314A (en) Mobile device peripheral detection with independent state machines
WO2021239102A1 (en) Charging control method and apparatus
WO2011137843A2 (en) Method and device for obtaining equipment identification information
US20180367319A1 (en) Secure power over ethernet power distribution system
TW201725822A (en) Method of fast charging, mobile terminal, and adaptor
US10762029B2 (en) Electronic apparatus and detection method using the same
US9780783B1 (en) Voltage tolerant termination presence detection
WO2018032503A1 (en) Power adapter, terminal device, charging system, and charging method
JP2017224105A (en) Information processing device, information processing method and program
CN111481107A (en) Positioning method and device of charging seat of sweeper, computing equipment and storage medium
US11614484B2 (en) Method and system for testing time parameters of adaptor
CN117955206A (en) Protocol information testing method, tester, storage medium and program product
TW202247630A (en) Multiprotocol usb adaptive charging
CN114740825A (en) Data measurement calibration method and device, vehicle controller, vehicle and medium
CN104142839A (en) Method for avoiding initialization failure of audio frequency chip
CN106291383A (en) Battery detection method and battery check device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22903225

Country of ref document: EP

Kind code of ref document: A1