CN116247755B - Protocol information testing method, tester and storage medium - Google Patents

Protocol information testing method, tester and storage medium Download PDF

Info

Publication number
CN116247755B
CN116247755B CN202111492413.2A CN202111492413A CN116247755B CN 116247755 B CN116247755 B CN 116247755B CN 202111492413 A CN202111492413 A CN 202111492413A CN 116247755 B CN116247755 B CN 116247755B
Authority
CN
China
Prior art keywords
protocol
charging protocol
handshake
charging
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111492413.2A
Other languages
Chinese (zh)
Other versions
CN116247755A (en
Inventor
郑连生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111492413.2A priority Critical patent/CN116247755B/en
Priority to PCT/CN2022/134115 priority patent/WO2023103802A1/en
Publication of CN116247755A publication Critical patent/CN116247755A/en
Application granted granted Critical
Publication of CN116247755B publication Critical patent/CN116247755B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

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 the tester, the tester records pulse information of handshake signals of at least one charging protocol, the at least one charging protocol comprises a first charging protocol, the method comprises: receiving a first handshake signal sent by the tested electronic equipment for the first time; recording a first recording result comprising a first handshake signal; and when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, determining that the first charging protocol is the first priority in the tested electronic equipment. According to the protocol information testing method, the first charging protocol can be detected and determined as the priority of the specific quick charging protocol in all quick charging protocols supported by the tested electronic equipment, so that whether the tested electronic equipment violates the specific quick charging protocol rule or not is determined.

Description

Protocol information testing method, tester and storage medium
Technical Field
The present disclosure relates to the field of information detection, and in particular, to a protocol information testing method, a tester, a storage medium, and a program product.
Background
The functions of the electronic device are perfected along with the optimization of the hardware device and the software architecture of the electronic device, but the power consumption speed of the electronic device is higher, so that various quick charging protocols are proposed in the prior art, and the electronic device supporting the quick charging protocols can realize quick charging according to the mode specified by the protocols. For some specific fast charge protocols, it is specified that the electronic device must support the fast charge protocol while having the fast charge protocol as the first priority charge protocol. However, some electronic devices declare that they support the particular rapid charging protocol and take the particular rapid charging protocol as the charging protocol of the first priority, but their true support for the particular rapid charging protocol may be different from their declaration. Based on this, it is necessary to detect the fast charge protocol supported by the electronic device.
The prior art can only detect whether the tested electronic device supports one quick charge protocol or whether the tested electronic device supports multiple quick charge protocols, and cannot determine the priority of the detected quick charge protocol in all quick charge protocols supported by the electronic device.
Disclosure of Invention
In view of this, a protocol information testing method, a tester, a storage medium, and a program product are provided, and according to the protocol information testing method of the embodiments of the present application, it is possible to detect and determine the priority of a specific rapid charging protocol in all rapid charging protocols supported by a tested electronic device, so as to determine whether the tested electronic device violates the specific rapid charging protocol rule.
In a first aspect, embodiments of the present application provide a protocol information testing method, where the method is applied to a tester, where the tester records pulse information of handshake signals of at least one charging protocol, where the at least one charging protocol includes a first charging protocol, and the method includes: receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is sent after the electronic equipment determines that a port of the tester is a special charging port; recording a first recording result comprising the first handshake signal, wherein the duration of the first recording result is greater than the duration of the handshake signal of any one of the at least one charging protocol or equal to the duration of the handshake signal of the charging protocol with the longest duration; and when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, determining that the first charging protocol is of a first priority in the tested electronic equipment.
According to the protocol information testing method, after the electronic device determines that the port of the tester is the special charging port, the first handshake signal sent by the tested electronic device for the first time is received through the tester, and a first recording result comprising the first handshake signal is recorded. Because the time period of the first recording result is longer than the duration of the handshake signal of any one of the at least one charging protocol or is equal to the duration of the handshake signal of the charging protocol with the longest duration of the at least one charging protocol, and the at least one charging protocol comprises the first charging protocol, the first recording result has the capability of comprising all information of the handshake signals of the first charging protocol. By determining that the first recording result matches the pulse information of the handshake signal of the first charging protocol, it may be determined that the first handshake signal is indeed the handshake signal of the first charging protocol, and thus that the first charging protocol is of a first priority in the electronic device under test. The protocol information testing method of the embodiment of the invention can directly obtain the priority condition of the first charging protocol in the tested electronic equipment, and when the first charging protocol is a specific quick charging protocol, the priority condition of the specific quick charging protocol in all quick charging protocols supported by the tested electronic equipment can be detected and determined.
The tester only receives the signal once and determines that the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, the first priority of the tested electronic equipment can be determined to be the specific first charging protocol, whether the first recording result is matched with the pulse information of the handshake signals of other protocols is not required, and the data processing cost can be reduced.
In a first possible implementation manner of the protocol information testing method according to the first aspect, the method further includes: when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol; and when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
When the first recording result includes only the same pulse as the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be the handshake signal of the first charging protocol, and when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol but a pulse signal or a dummy pulse signal of another protocol. In this way, the situation that the first handshake signal is actually the handshake signal of the first charging protocol and the situation that the first handshake signal is not the handshake signal of the first charging protocol can be distinguished, so that the first priority in the tested electronic device is not erroneously determined to be the first charging protocol when the situation that the first handshake signal is not the handshake signal of the first charging protocol occurs, and the accuracy of the detection result is ensured.
In a second possible implementation manner of the protocol information testing method according to the first aspect or the first possible implementation manner of the first aspect, the method further includes: when the first recording result is not matched with the pulse information of the handshake signals of the first charging protocol, comparing the first recording result with the pulse information of handshake signals of other charging protocols except the first charging protocol in at least one charging protocol; and when the first recording result is matched with pulse information of handshake signals of a second charging protocol in the other charging protocols, determining that the second charging protocol is of a first priority in the tested electronic equipment.
When the first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol, and further when the first recording result includes only pulses identical to the pulse information of the handshake signal of the second charging protocol, the first handshake signal may be considered to be the handshake signal of the second charging protocol. In this way, it may 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.
In a third possible implementation manner of the protocol information testing method according to the first aspect and any one of the possible implementation manners of the first aspect, the tester is configured to not send a handshake response signal, the method further includes: receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1; recording an nth record result comprising the nth handshake signals, wherein the duration of the nth record result is greater than the duration of the handshake signals of any one of the at least one charging protocol or equal to the duration of the handshake signals of the charging protocol with the longest duration; and when the nth recording result is matched with the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, determining the priority information of the third charging protocol in the tested electronic equipment according to the determined priority information of the charging protocol in the tested electronic equipment.
By the method, the tester can determine whether the first charging protocol is the first priority of the tested electronic equipment, and can record corresponding recording results according to the sequence of the handshaking signals and obtain more priority information according to the recording results when receiving one handshaking signal each time, so that the testing capability of the tester on the priority information of each protocol of the tested electronic equipment is improved.
According to a third possible implementation manner of the first aspect, in a fourth possible implementation manner of the protocol information testing method, when the nth recording result matches with pulse information of a handshake signal of a third charging protocol in the at least one charging protocol, determining priority information of the third charging protocol in the tested electronic device according to the determined priority information of the charging protocol in the tested electronic device includes: when a charging protocol of the t priority of the tested electronic equipment is determined, determining that the third charging protocol is the t+1 priority in the tested electronic equipment, wherein t is a positive integer; and when the charging protocol of the first priority of the tested electronic equipment is not determined, determining that the third charging protocol is the first priority in the tested electronic equipment.
In this way, the priority order of the charging protocols supported by the tested electronic device can be sequentially determined according to the recorded multiple recording results and combined with the determined priority information. The test result of the tester for the priority information of each protocol supported by the tested electronic equipment is more specific.
In a second aspect, embodiments of the present application provide a protocol information testing method, where the method is applied to a tester, where the tester records pulse information of handshake signals of at least one charging protocol, where the at least one charging protocol includes a first charging protocol, and the method includes: receiving a first handshake signal sent by tested electronic equipment for the first time, wherein the first handshake signal is a first signal sent after the electronic equipment determines that a port of the tester is a special charging port; recording a first recording result comprising the first handshake signal, wherein the duration of the first recording result is greater than the duration of the handshake signal of any one of 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 first recording result is matched with the pulse information of the handshake signal of the first charging protocol, sending a handshake response signal of the first charging protocol to the tested electronic equipment; and determining priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent.
According to the protocol information testing method, after the electronic device determines that the port of the tester is the special charging port, the first handshake signal sent by the tested electronic device for the first time is received through the tester, and a first recording result comprising the first handshake signal is recorded. Because the time period of the first recording result is longer than the duration of the handshake signal of any one of the at least one charging protocol or is equal to the duration of the handshake signal of the charging protocol with the longest duration of the at least one charging protocol, and the at least one charging protocol comprises the first charging protocol, the first recording result has the capability of comprising all information of the handshake signals of the first charging protocol. By determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshake signal is indeed the handshake signal of the first charging protocol, and the handshake response signal of the first charging protocol is sent to the tested electronic device. And the tester can determine the priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent. The protocol information testing method of the embodiment of the invention can directly obtain the priority condition of the first charging protocol in the tested electronic equipment, and when the first charging protocol is a specific quick charging protocol, the priority condition of the specific quick charging protocol in all quick charging protocols supported by the tested electronic equipment can be detected and determined.
The tester only receives the signal once and determines that the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, and when the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, the tester can determine that the first priority of the tested electronic equipment is a specific first charging protocol by sending the handshake response signals and receiving corresponding data information, and the tester does not need to determine whether the first recording result is matched with the pulse information of the handshake signals of other protocols or not, and does not need to send the handshake response signals of other protocols, so that the data processing cost can be reduced.
The first handshake signal is information generated in a handshake stage, the data information received after the handshake response signal of the first charging protocol is sent can comprise information generated in a protocol identification stage, and in this way, the priority condition of the first charging protocol in the tested electronic device can be determined by combining the information of the protocol identification stage and the information of the handshake stage, so that the obtained test result is more accurate.
In a first possible implementation manner of the protocol information testing method according to the second aspect, the method further includes: when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol; and when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
When the first recording result includes only the same pulse as the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be the handshake signal of the first charging protocol, and when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol but a pulse signal or a dummy pulse signal of another protocol. In this way, the situation that the first handshake signal is actually the handshake signal of the first charging protocol and the situation that the first handshake signal is not the handshake signal of the first charging protocol can be distinguished, so that the first charging protocol is not erroneously determined to be the first priority in the tested electronic device when the situation that the first handshake signal is not the handshake signal of the first charging protocol occurs, and the accuracy of the detection result is ensured.
In a second possible implementation manner of the second aspect or the first possible implementation manner of the second aspect, determining, according to data information received after sending a handshake response signal of a first charging protocol, priority information of the first charging protocol in the tested electronic device includes: after sending the handshake response signal of the first charging protocol, when receiving an internet packet probe data packet of the first charging protocol from the tested electronic device, determining that the first charging protocol is a first priority in the tested electronic device.
The internet packet detector data packet is information generated in the protocol identification stage, and the tested electronic device can carry out charging parameter configuration and receive power supply based on a certain protocol if the tested electronic device sends out the internet packet detector data packet of the certain protocol and receives a corresponding confirmation data packet, so that if the tester sends out a handshake response signal of a first charging protocol and receives the internet packet detector data packet of the first charging protocol from the tested electronic device, the tested electronic device really supports the first charging protocol. And determining that the first charging protocol is of a first priority in the tested electronic equipment through 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 tested electronic equipment.
In a third possible implementation manner of the protocol information testing method according to the second aspect and any one of the possible implementation manners of the second aspect, determining, according to data information received after sending a handshake response signal of a first charging protocol, priority information of the first charging protocol in the tested electronic device includes: after sending the handshake response signal of the first charging protocol, when the internet packet probe data packet of the first charging protocol from the tested electronic device is not received and a second handshake signal sent for the first time is received from the tested electronic device, determining that the first charging protocol is not of a first priority in the tested electronic device, wherein the second handshake signal is different from the first handshake signal.
If the detected electronic equipment receives a handshake response signal of a certain protocol but does not support the protocol, the detected electronic equipment does not send out an internet packet detector data packet of the protocol, but sends out another handshake signal, and the detected electronic equipment can carry out charging parameter configuration and receive power supply based on the protocol until the detected electronic equipment sends out the internet packet detector data packet of the certain protocol and receives a corresponding confirmation data packet. Therefore, if the internet packet detector data packet of the first charging protocol from the tested electronic device is not received after the tester sends the handshake response signal of the first charging protocol, but the second handshake signal sent for the first time is received, it is indicated that the tested electronic device does not support the first charging protocol. And determining that the first charging protocol is not the first priority in the tested electronic equipment through the internet packet detector data packet in the non-received protocol identification stage, so that the obtained test result accords with the actual condition of the tested electronic equipment.
In a fourth possible implementation manner of the protocol information testing method according to the second aspect and any one of the possible implementation manners of the second aspect, the method further includes: receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1; when the charging protocol of the first priority in the tested electronic equipment is not determined, recording an nth recording result comprising 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 is equal to the duration of the handshake signal of the charging protocol with the longest duration; when the nth recording result is matched with pulse information of a handshake signal of a second charging protocol in the at least one charging protocol, sending a handshake response signal of the second charging protocol to the tested electronic equipment; after sending the handshake response signal of the second charging protocol, when receiving an internet packet probe data packet of the second charging protocol from the tested electronic device, determining that the second charging protocol is of a first priority in the tested electronic device.
By the method, when the tested electronic equipment is determined not to take the first charging protocol as the first priority, the tester can also determine the specific type of the charging protocol of the first priority of the tested electronic equipment, namely the second charging protocol, and determine that the charging protocols on the tested electronic equipment except the second charging protocol are not the first priority, so that the testing capability of the tester on the priority information of the charging protocol of the tested electronic equipment is further improved.
In a third aspect, embodiments of the present application provide a protocol information testing apparatus, the apparatus being applied to a tester, the tester recording pulse information of handshake signals of at least one charging protocol, the at least one charging protocol including a first charging protocol, the apparatus comprising: the first receiving module is used for receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is sent after the electronic equipment determines that the port of the tester is a special charging port; a first recording module, configured to record a first recording result including the first handshake signal, where a duration of the first recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration; and the first determining module is used for determining that the first charging protocol is of a first priority in the tested electronic equipment when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol.
According to a third aspect, in a first possible implementation manner of the protocol information testing apparatus, the apparatus further includes: a second determining module, configured to determine that the first recording result matches pulse information of a handshake signal of the first charging protocol when the first recording result only includes the same pulse as pulse information of the handshake signal of the first charging protocol; and a third determining module, configured to determine that the first recording result does not match with the pulse information of the handshake signal of the first charging protocol when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol.
In a second possible implementation manner of the protocol information testing apparatus according to the third aspect or the first possible implementation manner of the third aspect, the apparatus further includes: the first comparison module is used for comparing the first recording result with the pulse information of the handshake signals of the other charging protocols except the first charging protocol in at least one charging protocol when the first recording result is not matched with the pulse information of the handshake signals of the first charging protocol; and the fourth determining module is used for determining that the second charging protocol is of a first priority in the tested electronic equipment when the first recording result is matched with pulse information of handshake signals of the second charging protocol in the other charging protocols.
In a third possible implementation manner of the protocol information testing apparatus according to the third aspect and any one of the possible implementation manners of the above third aspect, the tester is configured to not send a handshake response signal, and the apparatus further includes: the second receiving module is used for receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer larger than 1; a second recording module, configured to record an nth recording result including the nth handshake signal, where a duration of the nth recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration; and a fifth determining module, configured to determine, when the nth recording result matches with pulse information of a handshake signal of a third charging protocol in the at least one charging protocol, priority information of the third charging protocol in the tested electronic device according to the determined priority information of the charging protocol in the tested electronic device.
According to a third possible implementation manner of the third aspect, in a fourth possible implementation manner of the protocol information testing apparatus, when the nth recording result matches with pulse information of handshake signals of a third charging protocol in the at least one charging protocol, determining priority information of the third charging protocol in the tested electronic device according to determined priority information of the charging protocol in the tested electronic device includes: when a charging protocol of the t priority of the tested electronic equipment is determined, determining that the third charging protocol is the t+1 priority in the tested electronic equipment, wherein t is a positive integer; and when the charging protocol of the first priority of the tested electronic equipment is not determined, determining that the third charging protocol is the first priority in the tested electronic equipment.
In a fourth aspect, embodiments of the present application provide a protocol information testing apparatus, the apparatus being applied to a tester, the tester recording pulse information of handshake signals of at least one charging protocol, the at least one charging protocol including a first charging protocol, the apparatus comprising: the third receiving module is used for receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is a first signal sent after the electronic equipment determines that the port of the tester is a special charging port; a third recording module, configured to record a first recording result including the first handshake signal, where a duration of the first recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration; the first sending module is used for sending a handshake response signal of a first charging protocol to the tested electronic equipment when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol; and the sixth determining module is used for determining the priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent.
In a first possible implementation manner of the protocol information testing apparatus according to the fourth aspect, the apparatus further includes: a seventh determining module, configured to determine that the first recording result matches pulse information of a handshake signal of the first charging protocol when the first recording result only includes the same pulse as pulse information of the handshake signal of the first charging protocol; an eighth determining module is configured to determine that the first recording result does not match pulse information of the handshake signal of the first charging protocol when the first recording result includes pulses different from pulse information of the handshake signal of the first charging protocol.
In a second possible implementation manner of the protocol information testing apparatus according to the fourth aspect or the first possible implementation manner of the fourth aspect, determining priority information of the first charging protocol in the tested electronic device according to data information received after sending a handshake response signal of the first charging protocol includes: after sending the handshake response signal of the first charging protocol, when receiving an internet packet probe data packet of the first charging protocol from the tested electronic device, determining that the first charging protocol is a first priority in the tested electronic device.
In a third possible implementation manner of the protocol information testing apparatus according to the fourth aspect and any one of the possible implementation manners of the fourth aspect, determining, according to data information received after sending a handshake response signal of a first charging protocol, priority information of the first charging protocol in the tested electronic device includes: after sending the handshake response signal of the first charging protocol, when the internet packet probe data packet of the first charging protocol from the tested electronic device is not received and a second handshake signal sent for the first time is received from the tested electronic device, determining that the first charging protocol is not of a first priority in the tested electronic device, wherein the second handshake signal is different from the first handshake signal.
In a fourth possible implementation manner of the protocol information testing apparatus according to the fourth aspect and any one of the possible implementation manners of the fourth aspect, the apparatus further includes: a fourth receiving module, configured to receive an nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1; a fourth recording module, configured to record an nth recording result including the nth handshake signal when a charging protocol of a first priority in the tested electronic device is not determined, where a duration of the nth recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol with a longest duration; the second sending module is used for sending a handshake response signal of a second charging protocol to the tested electronic equipment when the nth recording result is matched with pulse information of the handshake signal of the second charging protocol in the at least one charging protocol; and the ninth determining module is used for determining that the second charging protocol is the first priority in the tested electronic equipment when the internet packet detector data packet of the second charging protocol from the tested electronic equipment is received after the handshake response signal of the second charging protocol is sent.
In a fifth aspect, embodiments of the present application provide a tester, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the protocol information testing method of the first aspect or one or more of the plurality of possible implementations of the first aspect or implement the protocol information testing method of the second aspect or one or more of the plurality of possible implementations of the second aspect when executing the instructions.
In a sixth aspect, embodiments of the present application provide a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the protocol information testing method of the first aspect or one or more of the possible implementations of the first aspect, or implement the protocol information testing method of the second aspect or one or more of the possible implementations of the second aspect.
In a seventh aspect, embodiments of the present application provide a computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying computer readable code, which when run in an electronic device, a processor in the electronic device performs the protocol information testing method of the first aspect or one or more of the possible implementations of the first aspect, or implements the protocol information testing method of the second aspect or one or more of the possible implementations of the second aspect.
These and other aspects of the application will be apparent from and elucidated with reference to the embodiment(s) described hereinafter.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features and aspects of the present application and together with the description, serve to explain the principles of the present application.
Fig. 1 shows an example of signals transmitted on the D +, D-signal lines when the handshake is successful and the protocol identification is successful in the prior art.
Fig. 2 illustrates an exemplary application scenario of a protocol information testing method according to an embodiment of the present application.
Fig. 3 illustrates an exemplary workflow of a handshake priority test method according to an embodiment of the present application.
Fig. 4 illustrates another exemplary workflow of a handshake priority test method according to an embodiment of the present application.
Fig. 5 illustrates an exemplary workflow of a protocol priority testing method according to an embodiment of the present application.
Fig. 6 illustrates another exemplary workflow of a protocol priority testing method according to an embodiment of the present application.
Fig. 7 shows an exemplary flow diagram of a protocol information testing method according to an embodiment of the present application.
Fig. 8 shows an exemplary flow diagram of a protocol information testing method according to an embodiment of the present application.
Fig. 9 shows an exemplary structural schematic of a tester according to an embodiment of the present application.
Detailed Description
Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Although various aspects of the embodiments are illustrated in the accompanying drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
In addition, numerous specific details are set forth in the following detailed description in order to provide a better understanding of the present application. It will be understood by those skilled in the art that the present application may be practiced without some of these specific details. In some instances, methods, means, elements, and circuits have not been described in detail as not to unnecessarily obscure the present application.
The following describes a fast charge protocol detection method in the prior art.
In the prior art, the detection modes of the rapid charging protocol are generally divided into two types, and the first detection mode is that a tester only tests a single protocol and is not used for testing whether the tested electronic equipment supports other protocols or not. The detection method is only aimed at a protocol such as a USB power transmission protocol (USB power delivery, USB PD) which has certain requirements on a charging interface of the electronic equipment, for example, the USB PD protocol requires the electronic equipment to use a USB Type-C interface, and currently, the interface cannot use other non-USB protocols to carry out charging power negotiation. Therefore, if a certain electronic device supports the USB PD protocol, it is unnecessary to consider whether the electronic device supports a protocol other than the USB PD protocol or not, and it is unnecessary to detect priority information of the USB PD protocol for a tester that detects whether the electronic device to be tested supports the USB PD protocol.
When testing, after the tester is connected with the tested electronic equipment, the tester firstly sends an expansion message (Source Capabilities) to the tested electronic equipment, and if a Request message (Request message) replied by the tested electronic equipment is not received, the tester determines that the tested electronic equipment does not support the USB PD protocol.
Alternatively, the tester may test different types of rapid charging protocols. This detection scheme is generally directed to more general fast charge protocols, such as apple2.4, DCP, QC2.0, QC3.0, AFC, FCP, etc. When in testing, after the tester is connected with the tested electronic equipment, the tester actively switches different protocol signals and port voltages through an internal micro controller unit (microcontroller unit, MCU), records the response conditions of the tested electronic equipment to the different protocol signals and port voltages, and determines the rapid charging protocol supported by the tested electronic equipment according to the recorded response conditions. In general, the rapid charging protocols supported by the tested electronic device are presented in a list form, the sequence of each protocol in the list is random, and the detection mode 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 the power information of the protocol, and cannot provide effective information for determining the priority of the rapid charging protocol supported by the mobile phone.
The rapid charging protocol detection mode in the prior art is only used for rapid charging capability evaluation, only needs to determine which rapid charging protocols are supported by the tested electronic equipment, and does not need to determine the priority condition of the rapid charging protocols on the tested electronic equipment. Since some specific rapid charging protocols, such as the mobile terminal, merge with the rapid charging technical specification (universal fast charging specification, UFCS), require that an electronic device supporting the protocol preferentially select the protocol (i.e., take the specific rapid charging protocol as the first priority) during charging, it is obvious that the rapid charging protocol detection method in the prior art cannot determine the priority of the rapid charging protocol supported by the tested electronic device, i.e., cannot determine whether the tested electronic device complies with the specific rapid charging protocol while supporting the specific rapid charging protocol, and takes the specific rapid charging protocol as the protocol of the first priority.
The UFCS fast charging mode defined by the UFCS specification is as follows: the charged device and the charger or power supply device are connected using a standard cable (USB cable, including D +, D-signal line), where the charged device supports the UFCS specification. After connection, the charged device and the charger or power supply device communicate based on battery charging specification revision 1.2 (battery charging specification revision 1.2, bc1.2), BC1.2 communication being used to determine the charging port type of the charger or power supply device. Implementation of the UFCS specification occurs after determining that the charging port type of the charger or power supply device is a dedicated charging port (dedicated charging port, DCP), and the implementation of the UFCS specification can be seen as going through four phases in sequence: a handshake phase, a protocol identification phase, a parameter adjustment phase and a charging phase.
In the first phase (handshaking phase), the charged device will send a UFCS handshaking signal to the charger or power unit via the d+, D-signal line, and the charger or power unit receives the signal transmitted on the D-signal line and recognizes whether it is a UFCS handshaking signal. If the signal is not the UFCS handshake signal, the charger or the power supply equipment does not respond to the UFCS handshake signal, the charged equipment does not receive the UFCS handshake response signal, and if the charged equipment retries to send the UFCS handshake signal for three times, the charged equipment still does not receive the UFCS handshake response signal, and the handshake failure is indicated; if the charger or the power supply equipment recognizes that the UFCS handshake signal is detected, the charger or the power supply equipment responds to the UFCS handshake signal to send a UFCS handshake response signal to the charged equipment, and the charged equipment receives the UFCS handshake response signal to indicate that the handshake is successful. After the handshake is successful, entering a 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) data packet, sending handshake signals of other protocols to the charger or the power supply device, and indicating that the protocol identification fails; if the charged device generates a UFCS Ping data packet with a certain preset baud rate and transmits the UFCS Ping data packet to the charger or the power supply device through the D-signal line, the charger or the power supply device generates a UFCS Acknowledgement (ACK) data packet and transmits the UFCS Acknowledgement (ACK) data packet to the charged device through the d+ signal line after receiving the UFCS Ping data packet, or the charged device sends out UFCS Ping data packets with other preset baud rates, which also enables the charger or the power supply device to respond to the UFCS ACK data packet, so that the protocol identification is successful. Fig. 1 shows an example of signals transmitted on the D +, D-signal lines when the handshake is successful and the protocol identification is successful in the prior art. After the protocol identification is successful, a third stage (parameter adjustment stage) is entered, the charger or the power supply device communicates with the charged device to adjust the charging parameters (such as rated power, rated voltage, rated current, etc.), and then a fourth stage (charging stage) is entered, the charger or the power supply device charges the charged device with the adjusted charging parameters.
The manner in which the tester tests the support of the UFCS specifications by the electronic device (charged device) based on the UFCS specifications is described below in conjunction with fig. 1. The test is realized by the following steps:
step one, connecting a tester with tested electronic equipment by using a standard cable;
step two, the tester performs BC1.2 communication with the tested electronic equipment, and after the tested electronic equipment determines that the type of a charging port of the tester is a special charging port, the tester detects whether a first signal from the tested electronic equipment is a UFCS handshake signal or not;
step three, when the UFCS handshake signal is detected, the tester performs handshake with the tested electronic equipment;
and repeating the steps two to three for a plurality of times through hardware reset and/or software reset after the handshake is finished, and determining that the electronic equipment supports the UFCS standard when the first signal from the tested electronic equipment is the UFCS handshake signal in the detection result obtained by executing the step two each time.
As can be seen from fig. 1 and the related description, the detection manner is to detect and determine that the electronic device supports the UFCS specification by identifying the UFCS handshake signal, where the level of the UFCS handshake signal may be as shown in fig. 1 (for example, including 2 pulses). In the prior art, when identifying the UFCS handshake signal, only the acknowledgement signal includes the same pulse as the UFCS handshake signal, and the UFCS handshake signal is identified. Assuming that a part of handshake signals of another rapid charging protocol different from the UFCS specification is the same as the level condition of the UFCS handshake signals (for example, including 4 pulses), or a pseudo pulse signal of handshake signals of a non-rapid charging protocol is set, so that a part of the pseudo pulse signals is the same as the level condition of the UFCS handshake signals, and after determining that the charging port type of the tester is a special charging port, the tested electronic device first sends out handshake signals or pseudo pulse signals of another rapid charging protocol, then in the second step, the tester can easily identify the handshake signals or pseudo pulse signals of the other rapid charging protocol as UFCS handshake signals when detecting, thereby obtaining an erroneous test result that the tested electronic device supports the UFCS specification.
In view of this, a protocol information testing method, a tester, a storage medium, and a program product are provided, and according to the protocol information testing method of the embodiments of the present application, it is possible to detect and determine a priority condition of a specific rapid charging protocol in a tested electronic device, so as to determine whether the tested electronic device violates a specific rapid charging protocol rule.
Fig. 2 illustrates an exemplary application scenario of a protocol information testing method according to an embodiment of the present application.
As shown in fig. 2, the protocol information testing method according to the embodiment of the present application may be applied to a tester, which may include a protocol information testing device, a microcontroller unit MCU, and a power supply, wherein the microcontroller unit MCU and the power supply are connected through a general purpose interface bus (general purpose interface bus, GPIB), 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 apparatus may be implemented by a programmable logic unit (field programmable gate array, FPGA) or another microcontroller unit, and the protocol information testing apparatus may be configured to receive handshake signals (e.g., a first handshake signal, a second handshake signal, an nth handshake signal, hereinafter), send out handshake response signals (e.g., a handshake response signal of a first charging protocol, hereinafter), receive Ping packets (e.g., an internet packet probe packet of the first charging protocol, an internet packet probe packet of the second charging protocol, hereinafter), send out ACK packets, etc. The tester and the tested electronic equipment are connected through USB cables (including VBUS signal lines, D+ signal lines, D-signal lines, ground GND and the like).
The electronic device to be tested may be, for example, the charged device above, and may 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 tested electronic device may include a battery, a charge management circuit, a system-on-a-chip (SOC), and a protocol information processing apparatus, where the charge management circuit is connected to the protocol information processing apparatus and the system-on-chip respectively through an integrated circuit bus, and the protocol information processing apparatus may be a single chip or a programmable logic unit integrated into the charge management circuit, and the protocol information processing apparatus may be used to send a handshake signal, receive a handshake response signal, send a Ping packet, receive an ACK packet, and the like. The electronic device under test may be implemented by prior art techniques.
The power supply of the tester can be connected with the charging management circuit of the tested electronic equipment through the VBUS signal wire of the USB cable, and the protocol information testing device can be connected with the protocol information processing device of the tested electronic equipment through the D+ and D-signal wire of the USB cable. The tester may power the electronic device under test via the VBUS signal line, in which case the tester and the electronic device under test may first communicate BC1.2, an exemplary implementation of which may be found in the description above in relation to step two.
When the BC1.2 communication determines that the charging port of the tester is a dedicated charging port DCP, the electronic device under test begins to output signals to the tester via the d+, D-signal line. For all fast charging protocols (such as UFCS specification, QC protocol, VOOC protocol, etc.) supported by the tested electronic device, the tested electronic device may send out handshake signals corresponding to the protocols. The electronic device under test may also emit a dummy pulse signal for disguising the handshake signal of a particular fast charge protocol (e.g., UFCS specifications).
The tester may have the capability of identifying handshake signals of various protocols (e.g., UFCS specification, QC protocol, VOOC protocol, etc.), and may identify signals transmitted through the d+, D-signal line, and determine, according to the transceiving conditions of the signals, the supporting conditions of the tested electronic device for a specific fast charging protocol (e.g., UFCS specification), and whether the specific fast charging protocol supported by the tested electronic device is the first priority. Optionally, the tester may also determine, according to the signal receiving condition of the signal from the tested electronic device, a priority order of part or all of all charging protocols (for example, UFCS specification, QC protocol, VOOC protocol, etc.) supported by the tested electronic device. The microcontroller unit may further sort and output the determined test results to other units, such as a memory (not shown), for storage for later use in a display or the like.
An example of a protocol information testing method according to an embodiment of the present application is a handshake priority testing method (alternatively referred to as handshake identification, handshake request, etc.), where the detection of the support condition of the tested electronic device for the protocol and the priority information can be completed according to the information of the handshake phase.
Fig. 3 illustrates an exemplary workflow of a handshake priority test method according to an embodiment of the present application.
As shown in fig. 3, the electronic device under test may be an electronic device that declares that it supports protocol a (e.g., UFCS specification), and since UFCS specification requires an electronic device that supports this protocol to be of a first priority, in theory, the fast charging protocol of the first priority is protocol a (hereinafter, an example of the first charging protocol) on the electronic device under test. After the tested electronic device determines that the charging port of the tester is the dedicated charging port DCP, the tested electronic device starts to send handshake signals to the tester for the first time. In this case, there are two possibilities: firstly, the tested electronic equipment takes the protocol A as a first priority, and the first transmission is the protocol A handshake signal; the second is that the electronic device under test does not take the protocol a as the first priority, and the first transmission is a handshake signal (e.g., a protocol X handshake signal) or a dummy pulse signal of another protocol that is disguised as a protocol a handshake signal. The signal is transmitted through the D +, D-signal line such that the level of the D +, D-signal line changes.
After the electronic device under test determines that the charging port of the tester is the dedicated charging port DCP, a handshake signal (hereinafter, an example of a first handshake signal) may be transmitted to the tester for the first time, in which the protocol information testing apparatus starts recording the level change condition of the d+/D-signal line when the signal is received for the first time (for example, when the level is changed from low to high) until level change information having a duration equal to a preset period is recorded as a recording result (hereinafter, an example of a first recording result) corresponding to the signal received for the first time. The preset time period may be greater than a duration of a handshake signal of any one of the at least one charging protocol recorded by the tester, or equal to a duration of a handshake signal of a charging protocol having a longest duration. Since the electronic device under test uses other protocol handshaking signals or dummy pulse signals to disguise the handshaking signals of protocol a, the first few pulses of other protocol handshaking signals or dummy pulse signals may be the same as the pulses of protocol a handshaking signals. Thus, the preset time period may, for example, be selected to be a time period greater than or equal to the duration of the protocol a handshake signal, thereby excluding interference of other protocol handshake signals or pseudo-pulse signals with the test results. For example, when the duration of the protocol a handshake signal is 20ms, the duration of the preset time period may be 25ms-2s (2 s is taken as an example in fig. 3).
The protocol information testing device may transmit the recorded results to the microcontroller unit, which may compare the level change information with stored level characteristics of handshaking signals of the respective protocols (hereinafter examples of pulse information of handshaking signals of at least one charging protocol). For example, the recording result may be compared with the handshake signal of the protocol a, and if the comparison confirms that the recording result is matched with the handshake signal of the protocol a, that is, the level change condition in the recording result accords with the level change condition of the handshake signal of the protocol a, and no other pulse exists except for the pulse corresponding to the level change condition of the handshake signal of the protocol a, that is, when the handshake signal of the protocol a includes 2 pulses, the recording result also includes only 2 pulses and accords with the handshake signal of the protocol a as shown in the case 1 in fig. 3, the signal received by the protocol information testing device for the first time is truly the handshake signal of the protocol a, that is, the signal transmitted by the tested electronic device for the first time is truly the handshake signal of the protocol a. Thus, the microcontroller unit may determine that the electronic device under test supports protocol a, and that the electronic device under test does have protocol a as the first priority. In an application scenario where it is only necessary to confirm whether protocol a is of the first priority, the test may end.
If the comparison confirms that the recording result does not match with the handshake signal of the protocol a, i.e. that the recording result includes other pulses different from the pulses corresponding to the level change condition of the handshake signal of the protocol a, for example, as shown in case 2 and case 3 in fig. 3, the handshake signal of the protocol a includes 2 pulses, the recording result includes 3 or 4 pulses, and 2 pulses are identical to the handshake signal of the protocol a, and the other pulses are different from the handshake signal of the protocol a, it may be considered that the signal received by the protocol information testing apparatus for the first time is a handshake signal or a dummy pulse signal of the other protocol camouflaged to the handshake signal of the protocol a, i.e. the electronic device to be tested transmits for the first time a handshake signal or a dummy pulse signal of the other protocol camouflaged to the handshake signal of the protocol a. Therefore, the electronic device under test does not use the handshake signal of protocol a as the first signal transmitted, i.e. does not use protocol a as the first priority, nor does it support protocol a. For the first time that the tested electronic device sends a pseudo pulse signal that is disguised as a handshake signal of protocol a, that is, as shown in case 2 in fig. 3, the handshake signal of protocol a includes 2 pulses, the recording result includes 3 pulses, and 2 pulses are consistent with the handshake signal of protocol a, and the specific type of the protocol of the first priority of the tested electronic device cannot be determined by the tester when the level of the handshake signal including only 3 pulses is not stored in the tester. For the first time that the electronic device under test sends a handshake signal of another protocol (e.g. a handshake signal of protocol X), i.e. as shown in case 3 in fig. 3, the protocol a handshake signal comprises 2 pulses, the protocol X (hereinafter an example of a second charging protocol) handshake signal comprises 4 pulses, the recording result comprises 4 pulses and coincides with the protocol X handshake signal, the microcontroller unit may further determine that the electronic device under test supports protocol X, and that the electronic device under test takes protocol X as the first priority. In a scenario where the recording result is only required to be recorded once and comparison is performed to determine the priority information of the tested electronic device, the test can be ended.
In this way, it may be determined whether the electronic device under test supports a particular fast charge protocol and whether the particular fast charge protocol supported by the electronic device under test is of a first priority. Those skilled in the art will appreciate that the specific fast charge protocol may be the UFCS specification, or may be a fast charge protocol that must be the first priority in addition to the UFCS specification, and the embodiments of the present application are not limited to a specific type of specific fast charge protocol.
Fig. 4 illustrates another exemplary workflow of a handshake priority test method according to an embodiment of the present application.
Referring to the related description of the UFCS fast charging manner defined in the UFCS specification, in the prior art, after the charged device sends out the UFCS handshake signal, for example, after retrying to send out the same signal three times, the charged device still does not receive the corresponding UFCS handshake response signal, that is, after the handshake fails, the charged device will switch to the fast charging manner of the other protocol, and send out the handshake signal of the other protocol. Based on this, as shown in fig. 4, on the basis of the workflow of fig. 3, in the tester, it may be set that the protocol information testing apparatus does not send out a handshake response signal after receiving a signal each time, so that the tested electronic device cannot receive the handshake response signal of the signal within a period of time after sending a signal each time. According to the above description, the electronic device under test will consider the handshake to be failed. The electronic device under test will switch to other protocols and continue to send signals. In this case, the electronic device to be tested may send out handshake signals of all the protocols supported by the electronic device to be tested successively, and the tester may receive each handshake signal in sequence, and may identify and determine the protocol type and priority corresponding to each handshake signal received, so as to determine the type of all the protocols supported by the electronic device to be tested and the priority sequence of each protocol.
For example, after the electronic device under test sends the first signal (for example, the first handshake signal) for the first time, in the tester, when the protocol information testing apparatus receives the first signal for the first time, a recording result (hereinafter, an example of the first recording result) corresponding to the first signal received for the first time may be recorded. The recording result corresponding to the first signal received for the first time can be identified by the microcontroller unit to determine the type and priority information of the fast charging protocol of the electronic device to be tested for the first time. The determined information may include a type of first priority protocol of the electronic device under test. Exemplary implementations of which may be found in the related description of fig. 3 above.
Since the tester does not send out handshake response signals during handshake priority test, the tested electronic device switches to other protocols when the handshake response signals are not received after the first signal is sent out and the number of retries of the first signal is reached, and the second signal is sent out for the first time (hereinafter, n is an integer greater than 1, where n=2). In the tester, the protocol information testing apparatus starts recording the level change condition of the d+/D-signal line when the second signal is received for the first time until level change information having a duration equal to a preset period is recorded as a recording result (hereinafter, an example of an n-th recording result) corresponding to the second signal received for the first time. Here, the preset time period may be greater than a duration of the handshake signal of any one of the at least one charging protocol recorded by the tester or equal to a duration of the handshake signal of the charging protocol having the longest duration. The recording result corresponding to the first received second signal may be recognized by the micro-controller unit to determine the type priority information of the fast charge protocol of the electronic device to be tested at one time. The determined information may include a type of a first priority protocol or a type of a second priority protocol of the electronic device under test. Exemplary implementations of which may be referred to in the description above with respect to fig. 3, the microcontroller unit identifies an exemplary implementation of determining the type and priority information of the fast charge protocol of the electronic device under test based on the first received signal.
For example, the protocol information testing device may transmit the recorded result to the microcontroller unit, and the microcontroller unit may compare the level change information (i.e. the nth recorded result) with the stored level characteristics of the handshake signals of the respective protocols (i.e. the pulse information of the handshake signals of the at least one charging protocol). If the compared validation record matches the handshake signal of protocol B, it may be considered that the electronic device under test supports protocol B (e.g., QC protocol), and that the electronic device under test has previously been validated as supporting other protocols and as a first priority (e.g., protocol a or protocol X), then protocol B (hereinafter an example of a third charging protocol) may be validated as a second priority. If the comparison confirms that the tested electronic device supports protocol B and that the protocol of the first priority of the tested electronic device has not been confirmed before, then protocol B may be confirmed as the first priority.
Because the tester does not send out handshake response signals in the handshake priority testing process, the tested electronic equipment switches to other protocols when the handshake response signals are not received after the second signal is sent out for the first time and the retry times of the second signal are reached, and the third signal is sent out for the first time. The tester can record the recording result corresponding to the first received third signal and continuously identify the type and the priority information of the rapid charging protocol of the tested electronic equipment according to the recording result. The determined information may include a type of a first priority protocol or a type of a second priority protocol or a type of a third priority protocol of the electronic device under test. Similarly, for a protocol supported by the electronic device under test, when the level characteristics of the handshaking signals of some or all of the protocols are stored in the microcontroller unit, the microcontroller unit may derive some or all of the priority order of the protocol supported by the electronic device under test. For example, in the example of fig. 4, all the protocols supported by the electronic device under test include protocol a, protocol B, and protocol C, and the priority order of the protocols on the electronic device under test is protocol a > protocol B > protocol C. According to the above exemplary operation manner of the protocol information testing apparatus, the electronic device to be tested may sequentially send, according to the sequence of the protocol a, the protocol B, and the protocol C, the first signal sent for the first time may be a 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 may be a protocol a > a protocol B > a protocol C in a first-to-second order by comparing the priority orders of all protocols supported by the confirmed electronic device under test.
In this way, the priority order of the protocols supported by the electronic device under test can be determined. Compared with the scheme that whether the tested electronic equipment takes the specific rapid charging protocol as the first priority is only confirmed, the support condition and the priority information of the tested electronic equipment for the protocol can be confirmed to be more comprehensive, and the use experience of a user on the tester can be improved.
The examples of fig. 3 and fig. 4 are that the detection of the support condition and the priority information of the tested electronic device for the protocol is completed according to the information of the handshake stage, and the information of the protocol identification stage is not involved, so that the data processing cost for obtaining the support condition and the priority information of the tested electronic device for the protocol is lower, and the data processing efficiency can be improved.
Another example of the protocol information testing method according to the embodiment of the present application is a protocol priority testing method (otherwise referred to as protocol identification, protocol request, etc.), and the detection of the support condition of the tested electronic device for the protocol and the priority information can be completed according to the information of the handshake phase and the information of the protocol identification phase.
Fig. 5 illustrates an exemplary workflow of a protocol priority testing method according to an embodiment of the present application.
As shown in fig. 5, the electronic device under test may be an electronic device that declares that it supports protocol a (e.g., UFCS specification), and since UFCS specification requires an electronic device that supports this protocol to be of a first priority, in theory, the fast charging protocol of the first priority is protocol a (hereinafter, an example of the first charging protocol) on the electronic device under test. After the tested electronic device determines that the charging port of the tester is the dedicated charging port DCP, the tested electronic device starts to send a signal to the tester for the first time. In this case, there are two possibilities: firstly, the tested electronic equipment takes the protocol A as a first priority, and the first transmission is the protocol A handshake signal; and secondly, the tested electronic equipment does not take the protocol A as the first priority, and the first transmission is the handshake signal or the pseudo pulse signal of other protocols which are disguised as the handshake signal of the protocol A. The signal is transmitted through the D +, D-signal line such that the level of the D +, D-signal line changes.
After the electronic device under test determines that the charging port of the tester is the dedicated charging port DCP, a handshake signal (hereinafter, an example of a first handshake signal) may be sent to the tester for the first time, in which the protocol information testing apparatus starts recording the level change condition of the d+/D-signal line when the signal is received for the first time (for example, when the level is changed from low to high), resulting in a recording result (hereinafter, an example of a first recording result) corresponding to the signal received for the first time. The duration of the recording of the result may be greater than the duration of the handshaking signal of any of the at least one charging protocol recorded by the tester or equal to the duration of the handshaking signal of the charging protocol having the longest duration. The protocol information testing device may transmit the recorded results to the microcontroller unit, which may compare the level change information with stored level characteristics of handshaking signals of the respective protocols (hereinafter examples of pulse information of handshaking signals of at least one charging protocol). For example, the recording result may be compared with the handshake signal of the protocol a, and if the comparison confirms that the recording result matches the handshake signal of the protocol a, that is, the level change condition in the recording result matches the level change condition of the handshake signal of the protocol a, the protocol information testing apparatus may be controlled to transmit a handshake response signal of the protocol a (hereinafter, an example of a handshake response signal of the first charging protocol) through the d+/D-signal line.
If the tested electronic device receives the protocol a handshake response signal, then sends a protocol a Ping packet (hereinafter, an example of an internet packet probe packet of the first charging protocol) to the tester via the d+/D-signal line, and the tester receives the protocol a Ping packet, it can be considered that the tested electronic device supports the protocol a and does take the protocol a as the first priority. If the electronic device under test receives the protocol a handshake response signal, then no protocol a Ping packet is sent to the tester, so that after the tester sends the protocol a handshake response signal, no protocol a Ping packet is received, and another handshake signal (hereinafter, an example of a second handshake signal) is received, it may 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 receiving the handshake response signal of the protocol a, the tested electronic device sends the protocol a Ping data packet to the tester, but the tester does not send the protocol a ACK data packet to the tested electronic device after receiving the protocol a Ping data packet, which can be considered that the tested electronic device does not support the protocol a and takes the protocol a as the first priority. In an application scenario where it is only necessary to confirm whether protocol a is of the first priority, the test may end.
In this way, it may be determined whether the electronic device under test supports a particular fast charge protocol and whether the particular fast charge protocol supported by the electronic device under test is of a first priority. Those skilled in the art will appreciate that the specific fast charge protocol may be the UFCS specification, or may be a fast charge protocol that must be the first priority in addition to the UFCS specification, and the embodiments of the present application are not limited to a specific type of specific fast charge protocol. In addition, for other protocol handshake signals and pseudo pulse signals forming a specific protocol handshake signal, for example, the handshake signal of a certain protocol includes a pulse, the pseudo pulse signal also includes a pulse, and the handshake signal of the certain protocol and the pseudo pulse signal are combined to form a UFCS handshake signal, although the protocol information testing device may misidentify the combined signal as the UFCS handshake signal and send out a UFCS handshake response signal, because the tested electronic device does not actually support the UFCS specification, the tested electronic device cannot send out a protocol UFCS Ping data packet to the tester. The tester does not receive the protocol UFCS Ping data packet, so that the tested electronic equipment can be detected and confirmed not to take the UFCS protocol as the first priority, and a more accurate detection result is obtained.
Fig. 6 illustrates another exemplary workflow of a protocol priority testing method according to an embodiment of the present application.
As shown in fig. 6, on the basis of the workflow of fig. 5, the signal sent by the tested electronic device for the first time may be a first signal (for example, a first handshake signal), and after the tested electronic device receives the protocol a handshake response signal, and after the tested electronic device does not send the protocol a Ping packet to the tester, the tested electronic device may send a second signal (hereinafter, an n-th handshake signal is an example, where n=2) to the tester. The tester recording level change gives a recording result (hereinafter, an example of an n-th recording result) corresponding to the second signal. Here, the duration of recording the result 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 having the longest duration. After the tester recognizes that the recording result matches the protocol B (hereinafter, an example of the second charging protocol) handshake signal, a protocol B handshake response signal (hereinafter, an example of the handshake response signal of the second charging protocol) may be issued to the tested electronic device. If a protocol B Ping packet (hereinafter an example of an internet packet probe packet of a second charging protocol) is received after the tester issues a protocol B handshake response signal, the electronic device under test may be considered to support protocol B and take protocol B as the first priority.
If the tester does not receive the protocol B Ping data packet within a certain time, the tested electronic device can be considered to not support the protocol B. And so on, until the tester responds to a handshake signal of a certain protocol (for example, protocol X) to send out a handshake response signal, and receives a Ping data packet of the protocol (or further, sends out an ACK data packet of the protocol), the tested electronic device can be considered to support the protocol, and takes the protocol X as a first priority.
In one possible implementation, in the examples of fig. 5 and 6, a retry mechanism similar to handshake signals may also be provided for Ping packets. For example, after receiving the protocol a handshake response signal, the tested electronic device sends the protocol a Ping packet with the first preset bit rate to the tester for the first time, but does not receive the protocol a ACK packet, and the tested electronic device may send the protocol a Ping packet with the first preset bit rate for the second time. If the protocol A ACK data packet is not received yet, the tested electronic device can send out the protocol A Ping data packet with the second preset bit rate and wait for receiving the protocol A ACK data packet. If the tested electronic equipment has sequentially sent out all protocol A Ping data packets with preset bit rate supported by the tested electronic equipment, but all the electronic equipment does not receive the protocol A ACK data packet, switching to other protocols, and sending out handshake signals of the other protocols.
The examples of fig. 5 and fig. 6 are that the detection of the support condition and the priority information of the tested electronic device for the protocol is completed according to the information of the handshake stage and the information of the protocol identification stage, so that the accuracy of acquiring the support condition and the priority information of the tested electronic device for the protocol is higher.
In one possible implementation, after the process of fig. 3 or fig. 4 is completed, a reset signal may be sent to the tested electronic device by the tester, so that after the tested electronic device determines that the charging port of the tester is the dedicated charging port DCP again, a signal is sent to the tester for the first time, and then the process of fig. 5 and fig. 6 is performed. In this case, the first handshake priority test is performed, and the second protocol priority test is performed. When the two test results are different, the result of the protocol priority test can be used as the reference. The reason is that when the electronic device to be tested is charged, the charging parameter configuration and the charging operation are not directly started only when handshake is successful in the handshake stage, but are started after handshake is successful, the protocol identification stage is started, and the charging parameter configuration and the charging operation are started when the protocol identification is successful. It can be seen from the above description that the handshake priority test completes the detection of the support condition and the priority information of the tested electronic device for the protocol according to the information of the handshake stage, and the protocol priority test completes the detection of the support condition and the priority information of the tested electronic device for the protocol according to the information of the handshake stage and the information of the protocol identification stage. Therefore, compared with the handshake priority test, the information used in the protocol priority test is more comprehensive, so that a more accurate detection result can be obtained. Through repeated testing, the accuracy of the protocol supporting condition and the priority information of the tested electronic equipment obtained by the tester can be further improved.
The protocol information testing apparatus is used above to confirm whether the tested electronic device takes the protocol a as the first priority as an example. In another possible implementation manner, the protocol information testing apparatus may also perform more functions, for example, may store level information of handshake signals of each protocol, perform the function of comparing and confirming the support condition and the priority condition of the tested electronic device for the protocol, which is performed by the micro controller unit in the above example, record the test result, sort and output the test result, and so on. As long as the support of the tested electronic device for the specific protocol and the confirmation of the priority information of the specific protocol are completed on the tester, the embodiment of the application is not limited to the specific execution unit of the above functions.
According to the protocol information testing method, fake behaviors of some tested electronic devices which claim to support the specific protocol and do not accord with the regulations of the specific protocol can be effectively identified, compliance of the tested electronic devices to the specific protocol is ensured, public praise of the specific protocol is prevented from being influenced due to the fact that other protocols are used to cause safety problems, and fusion rapid charging ecological development is promoted. By testing the priority, design trend reference can be provided for a designer of the electronic equipment, the design of the electronic equipment is convenient to return to a protocol with higher priority degree on the market, the protocol with low priority is not compatible, and the multi-protocol support cost and the design risk brought by the multi-protocol support cost are reduced.
Fig. 7 shows an exemplary flow diagram of a protocol information testing method according to an embodiment of the present application.
As shown in fig. 7, an embodiment of the present application provides a protocol information testing method, where the method is applied to a tester, where the tester records pulse information of handshake signals of at least one charging protocol, where the at least one charging protocol includes a first charging protocol, and the method includes:
step S1, a first handshake signal sent by tested electronic equipment for the first time is received, wherein the first handshake signal is sent after the electronic equipment determines that a port of the tester is a special charging port;
step S2, recording a first recording result comprising the first handshake signals, wherein the duration of the first recording result is longer than the duration of the handshake signals of any one of the at least one charging protocol or equal to the duration of the handshake signals of the charging protocol with the longest duration;
step S3, when the first recording result matches with the pulse information of the handshake signal of the first charging protocol, determining that the first charging protocol is a first priority in the tested electronic device.
The test apparatus may refer to the examples of the test apparatus in the foregoing description and related descriptions of fig. 2, 3 and 4, and the at least one charging protocol may include the foregoing fast charging protocols such as UFCS specification, QC protocol, VOOC protocol, etc., and the specific type and number of each protocol included in the at least one charging protocol are not limited in this application. For the pulse information of the handshake signals of at least one charging protocol, reference can be made to the examples of protocol a handshake signals, protocol X handshake signals in the above and in the related description of fig. 3, 4. The present application is likewise not limited with respect to the particular waveform of the pulse information of the handshaking signals of the at least one charging protocol. The first charging protocol may refer to protocol a, i.e. an example of the UFCS specification, in the description above and related to fig. 2, 3, 4. The present application is not limited to a particular type of first charging protocol.
The electronic device under test may refer to the example of the electronic device under test in the related descriptions of fig. 2, 3 and 4, the first handshake signal may be a first signal sent by the electronic device under test, and the first handshake signal may refer to the example of the first signal sent in the related description of fig. 3 and the first signal in the related description of fig. 4.
The term "first transmission" as used herein means that the electronic device transmits a handshake signal (e.g., the first handshake signal described above, or the first signal) of a certain charging protocol for the first time. The electronic device may issue handshaking signals for a certain charging protocol multiple times. The first recording result may refer to the example of the recording result corresponding to the first received signal in the above and related description of fig. 3, and the example of the recording result corresponding to the first received signal in the related description of fig. 4.
In step S3, the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, which may be referred to as "case 1" in the above and related description of fig. 3.
Fig. 7 and the related description take as an example that the tester obtains the first recording result based on the first handshake signal sent for the first time. It will be appreciated by those skilled in the art that when the electronic device under test is provided with a retry mechanism for the handshake signals, the tester may also retrieve the first recorded result based on the first handshake signals sent a second time, a third time, etc. For example, the tested electronic device sends out a first handshake signal for the first time, a first recording result is obtained on the tester based on the first handshake signal sent for the first time, the tested electronic device does not receive the handshake response signal, the first handshake signal can be sent out for the second time, and a first recording result is obtained on the tester based on the first handshake signal sent for the second time. The tester may be configured to execute step S3 again based on the retrieved first recording result to ensure accuracy of the test result of the protocol information testing method according to the embodiment of the present application, or may be configured to identify that pulse information included in the retrieved first recording result is identical to the previously obtained first recording result, without processing the retrieved first recording result, so as to save data processing cost of the protocol information testing method according to the embodiment of the present application. The processing mode of the first recorded result obtained by the tester is not limited. Similarly, in the following description of fig. 7, taking the test apparatus to obtain the nth recording result based on the nth handshake signal sent by the first time as an example, it should be understood by those skilled in the art that the test apparatus may also retrieve the nth recording result based on the nth handshake signal sent by the second time, the third time, etc., and then perform a similar process to the retrieved first recording result on the retrieved nth recording result.
According to the protocol information testing method, after the electronic device determines that the port of the tester is the special charging port, the first handshake signal sent by the tested electronic device for the first time is received through the tester, and a first recording result comprising the first handshake signal is recorded. Because the time period of the first recording result is longer than the duration of the handshake signal of any one of the at least one charging protocol or is equal to the duration of the handshake signal of the charging protocol with the longest duration of the at least one charging protocol, and the at least one charging protocol comprises the first charging protocol, the first recording result has the capability of comprising all information of the handshake signals of the first charging protocol. By determining that the first recording result matches the pulse information of the handshake signal of the first charging protocol, it may be determined that the first handshake signal is indeed the handshake signal of the first charging protocol, and thus that the first charging protocol is of a first priority in the electronic device under test. The protocol information testing method of the embodiment of the invention can directly obtain the priority condition of the first charging protocol in the tested electronic equipment, and when the first charging protocol is a specific quick charging protocol, the priority condition of the specific quick charging protocol in all quick charging protocols supported by the tested electronic equipment can be detected and determined.
The tester only receives the signal once and determines that the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, the first priority of the tested electronic equipment can be determined to be the specific first charging protocol, whether the first recording result is matched with the pulse information of the handshake signals of other protocols is not required, and the data processing cost can be reduced.
In one possible implementation, the method further includes: when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol; and when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
Wherein the first recording result only comprises the same pulses as the pulse information of the handshake signal of the first charging protocol, reference may be made to the example of "case 1" above and in the related description 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 examples of "case 2" and "case 3" in the above and related description of fig. 3.
When the first recording result includes only the same pulse as the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be the handshake signal of the first charging protocol, and when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol but a pulse signal or a dummy pulse signal of another protocol. In this way, the situation that the first handshake signal is actually the handshake signal of the first charging protocol and the situation that the first handshake signal is not the handshake signal of the first charging protocol can be distinguished, so that the first priority in the tested electronic device is not erroneously determined to be the first charging protocol when the situation that the first handshake signal is not the handshake signal of the first charging protocol occurs, and the accuracy of the detection result is ensured.
In one possible implementation, the method further includes: when the first recording result is not matched with the pulse information of the handshake signals of the first charging protocol, comparing the first recording result with the pulse information of handshake signals of other charging protocols except the first charging protocol in at least one charging protocol; and when the first recording result is matched with pulse information of handshake signals of a second charging protocol in the other charging protocols, determining that the second charging protocol is of a first priority in the tested electronic equipment.
The second charging protocol may refer to the example of the protocol X in the description related to fig. 3 and 4, and the pulse information of the handshake signal of the second charging protocol may refer to the example of the handshake signal of the protocol X in the description related to fig. 3 and 4. The first recording result matches the pulse information of the handshake signal of the second of the other charging protocols, see example "case 3" above and in the related description of fig. 3.
When the first recording result includes pulses different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol, and further when the first recording result includes only pulses identical to the pulse information of the handshake signal of the second charging protocol, the first handshake signal may be considered to be the handshake signal of the second charging protocol. In this way, it may 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.
In one possible implementation, the tester is configured to not send a handshake response signal, the method further comprising: receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1; recording an nth record result comprising the nth handshake signals, wherein the duration of the nth record result is greater than the duration of the handshake signals of any one of the at least one charging protocol or equal to the duration of the handshake signals of the charging protocol with the longest duration; and when the nth recording result is matched with the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, determining the priority information of the third charging protocol in the tested electronic equipment according to the determined priority information of the charging protocol in the tested electronic equipment.
The nth handshake signal may refer to examples of the second signal and the third signal in the above description and related descriptions of fig. 4. The nth recording result may refer to the example 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 description and the related description of fig. 4.
The manner in which the nth recording result is determined to match the pulse information of the handshake signal of the third charging protocol of the at least one charging protocol may be referred to as an example of the manner in which the first recording result is determined to match the pulse information of the handshake signal of the first charging protocol.
By the method, the tester can determine whether the first charging protocol is the first priority of the tested electronic equipment, and can record corresponding recording results according to the sequence of the handshaking signals and obtain more priority information according to the recording results when receiving one handshaking signal each time, so that the testing capability of the tester on the priority information of each protocol of the tested electronic equipment is improved.
In one possible implementation manner, when the nth recording result matches with pulse information of a handshake signal of a third charging protocol in the at least one charging protocol, determining priority information of the third charging protocol in the tested electronic device according to the determined priority information of the charging protocol in the tested electronic device includes: when a charging protocol of the t priority of the tested electronic equipment is determined, determining that the third charging protocol is the t+1 priority in the tested electronic equipment, wherein t is a positive integer; and when the charging protocol of the first priority of the tested electronic equipment is not determined, determining that the third charging protocol is the first priority in the tested electronic equipment.
Where the t+1th priority in the third charging protocol is determined in the electronic device under test when the charging protocol of the t priority of the electronic device under test has been determined, reference may be made to the above and the related description of fig. 4, where it is determined that the electronic device under test supports the protocol B (e.g. QC protocol) by comparison, and that the electronic device under test has previously been determined to support other protocols and be the first priority (e.g. protocol a or protocol X), then it may be determined that the protocol B is an example of the second priority. When the charging protocol of the first priority of the electronic device under test is not determined, the third charging protocol is determined to be the first priority in the electronic device under test, and the electronic device under test may be compared to confirm that the electronic device under test supports the protocol B, and that the first priority of the electronic device under test has not been confirmed before, as an example of the first priority, as described above and in the related description of fig. 4.
In this way, the priority order of the charging protocols supported by the tested electronic device can be sequentially determined according to the recorded multiple recording results and combined with the determined priority information. The test result of the tester for the priority information of each protocol supported by the tested electronic equipment is more specific.
Fig. 8 shows an exemplary flow diagram of a protocol information testing method according to an embodiment of the present application.
As shown in fig. 8, an embodiment of the present application provides a protocol information testing method, where the method is applied to a tester, where the tester records pulse information of handshake signals of at least one charging protocol, where the at least one charging protocol includes a first charging protocol, and the method includes:
step S4, receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is a first signal sent after the electronic equipment determines that a port of the tester is a special charging port;
step S5, recording a first recording result comprising the first handshake signals, wherein the duration of the first recording result is longer than the duration of the handshake signals of any one of the at least one charging protocol or equal to the duration of the handshake signals of the charging protocol with the longest duration;
step S6, when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, a handshake response signal of the first charging protocol is sent to the tested electronic equipment;
step S7, determining the priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent.
The test apparatus may refer to the examples of the test apparatus in the foregoing description and related descriptions of fig. 2, fig. 5, and fig. 6, and the at least one charging protocol may include the foregoing fast charging protocols such as UFCS specification, QC protocol, and VOOC protocol, and the specific types and numbers of each protocol included in the at least one charging protocol are not limited in this application. For the pulse information of the handshake signals of at least one charging protocol, reference can be made to the examples of protocol a handshake signals, protocol X handshake signals in the above and in the related description of fig. 5, 6. The present application is likewise not limited with respect to the particular waveform of the pulse information of the handshaking signals of the at least one charging protocol. The first charging protocol may refer to protocol a, i.e. an example of the UFCS specification, in the description above and related to fig. 2, 5, 6. The present application is not limited to a particular type of first charging protocol.
The electronic device under test may refer to the example of the electronic device under test in the related descriptions of fig. 2, 5 and 6, and the first handshake signal may be a first signal sent by the electronic device under test, and the first handshake signal may refer to the example of the first signal sent by the electronic device under test in the related description of fig. 5 and the first signal in the related description of fig. 6.
The term "first transmission" as used herein refers to a handshake signal (e.g., the first handshake signal described above, or the first signal) of a charging protocol that is transmitted by the electronic device for the first time. The electronic device may issue handshaking signals for a certain charging protocol multiple times. The first recording result may refer to examples of recording results corresponding to the first received signal in the above and related descriptions of fig. 5 and 6.
In step S6, the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, which may be referred to as "case 1" in the above and related description of fig. 3.
The data information received after the handshake response signal of the first charging protocol is transmitted may refer to the protocol a Ping packet, an example of the second signal, as described above and in the related description of fig. 5 and 6.
Fig. 8 and the related description take as an example that the tester obtains the first recording result based on the first handshake signal sent for the first time. It will be appreciated by those skilled in the art that when the electronic device under test is provided with a retry mechanism for the handshake signals, the tester may also retrieve the first recorded result based on the first handshake signals sent for the second and third times. For example, the tested electronic device sends out a first handshake signal for the first time, a first recording result is obtained on the tester based on the first handshake signal sent for the first time, the tested electronic device does not receive the handshake response signal, the first handshake signal can be sent out for the second time, and a first recording result is obtained on the tester based on the first handshake signal sent for the second time. The tester may be configured to execute step S6 again based on the retrieved first recording result to ensure accuracy of the test result of the protocol information testing method according to the embodiment of the present application, or may be configured to identify that pulse information included in the retrieved first recording result is identical to the previously obtained first recording result, without processing the retrieved first recording result, so as to save data processing cost of the protocol information testing method according to the embodiment of the present application. The processing mode of the first recorded result obtained by the tester is not limited. Similarly, in the following description of fig. 8, taking the test apparatus to obtain the nth recording result based on the nth handshake signal sent for the first time as an example, it should be understood by those skilled in the art that the test apparatus may also retrieve the nth recording result based on the nth handshake signal sent for the second time and the third time, and then perform a similar process to the retrieved first recording result on the retrieved nth recording result.
According to the protocol information testing method, after the electronic device determines that the port of the tester is the special charging port, the first handshake signal sent by the tested electronic device for the first time is received through the tester, and a first recording result comprising the first handshake signal is recorded. Because the time period of the first recording result is longer than the duration of the handshake signal of any one of the at least one charging protocol or is equal to the duration of the handshake signal of the charging protocol with the longest duration of the at least one charging protocol, and the at least one charging protocol comprises the first charging protocol, the first recording result has the capability of comprising all information of the handshake signals of the first charging protocol. By determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, it can be determined that the first handshake signal is indeed the handshake signal of the first charging protocol, and the handshake response signal of the first charging protocol is sent to the tested electronic device. And the tester can determine the priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent. The protocol information testing method of the embodiment of the invention can directly obtain the priority condition of the first charging protocol in the tested electronic equipment, and when the first charging protocol is a specific quick charging protocol, the priority condition of the specific quick charging protocol in all quick charging protocols supported by the tested electronic equipment can be detected and determined.
The tester only receives the signal once and determines that the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, and when the first recording result is matched with the pulse information of the handshake signals of the first charging protocol, the tester can determine that the first priority of the tested electronic equipment is a specific first charging protocol by sending the handshake response signals and receiving corresponding data information, and the tester does not need to determine whether the first recording result is matched with the pulse information of the handshake signals of other protocols or not, and does not need to send the handshake response signals of other protocols, so that the data processing cost can be reduced.
The first handshake signal is information generated in a handshake stage, the data information received after the handshake response signal of the first charging protocol is sent can comprise information generated in a protocol identification stage, and in this way, the priority condition of the first charging protocol in the tested electronic device can be determined by combining the information of the protocol identification stage and the information of the handshake stage, so that the obtained test result is more accurate.
In one possible implementation, the method further includes: when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol; and when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
Wherein the first recording result only comprises the same pulses as the pulse information of the handshake signal of the first charging protocol, reference may be made to the example of "case 1" above and in the related description 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 examples of "case 2" and "case 3" in the above and related description of fig. 3.
When the first recording result includes only the same pulse as the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be the handshake signal of the first charging protocol, and when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol, the first handshake signal may be considered to be not the handshake signal of the first charging protocol but a pulse signal or a dummy pulse signal of another protocol. In this way, the situation that the first handshake signal is actually the handshake signal of the first charging protocol and the situation that the first handshake signal is not the handshake signal of the first charging protocol can be distinguished, so that the first charging protocol is not erroneously determined to be the first priority in the tested electronic device when the situation that the first handshake signal is not the handshake signal of the first charging protocol occurs, and the accuracy of the detection result is ensured.
In one possible implementation manner, determining priority information of the first charging protocol in the tested electronic device according to data information received after sending a handshake response signal of the first charging protocol includes: after sending the handshake response signal of the first charging protocol, when receiving an internet packet probe data packet of the first charging protocol from the tested electronic device, determining that the first charging protocol is a first priority in the tested electronic device.
The internet packet probe packet of the first charging protocol may refer to the example of the protocol a Ping packet described above and in the related description of fig. 5. After sending the handshake response signal of the first charging protocol, the internet packet probe packet of the first charging protocol from the tested electronic device is received, which may be referred to above and in the related description of fig. 5, the test meter receives the protocol a Ping packet after sending the handshake response signal of the protocol a.
The internet packet detector data packet is information generated in the protocol identification stage, and the tested electronic device can carry out charging parameter configuration and receive power supply based on a certain protocol if the tested electronic device sends out the internet packet detector data packet of the certain protocol and receives a corresponding confirmation data packet, so that if the tester sends out a handshake response signal of a first charging protocol and receives the internet packet detector data packet of the first charging protocol from the tested electronic device, the tested electronic device really supports the first charging protocol. And determining that the first charging protocol is of a first priority in the tested electronic equipment through 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 tested electronic equipment.
In one possible implementation manner, determining priority information of the first charging protocol in the tested electronic device according to data information received after sending a handshake response signal of the first charging protocol includes: after sending the handshake response signal of the first charging protocol, when the internet packet probe data packet of the first charging protocol from the tested electronic device is not received and a second handshake signal sent for the first time is received from the tested electronic device, determining that the first charging protocol is not of a first priority in the tested electronic device, wherein the second handshake signal is different from the first handshake signal.
The second handshake signal may be a second signal sent by the tested electronic device. The first transmitted second handshake signal may be referred to above and in the related description of fig. 6 as an example of the second signal. After sending the handshake response signal of the first charging protocol, the internet packet probe packet of the first charging protocol from the electronic device under test is not received, and the first sent second handshake signal is received from the electronic device under test, as described above and in the related description of fig. 6, an example of the tester sending the handshake response signal of protocol a, after which the internet packet probe packet of the first charging protocol is not received, and the second signal is received.
If the detected electronic equipment receives a handshake response signal of a certain protocol but does not support the protocol, the detected electronic equipment does not send out an internet packet detector data packet of the protocol, but sends out another handshake signal, and the detected electronic equipment can carry out charging parameter configuration and receive power supply based on the protocol until the detected electronic equipment sends out the internet packet detector data packet of the certain protocol and receives a corresponding confirmation data packet. Therefore, if the internet packet detector data packet of the first charging protocol from the tested electronic device is not received after the tester sends the handshake response signal of the first charging protocol, but the second handshake signal sent for the first time is received, it is indicated that the tested electronic device does not support the first charging protocol. And determining that the first charging protocol is not the first priority in the tested electronic equipment through the internet packet detector data packet in the non-received protocol identification stage, so that the obtained test result accords with the actual condition of the tested electronic equipment.
In one possible implementation, the method further includes: receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1; when the charging protocol of the first priority in the tested electronic equipment is not determined, recording an nth recording result comprising 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 is equal to the duration of the handshake signal of the charging protocol with the longest duration; when the nth recording result is matched with pulse information of a handshake signal of a second charging protocol in the at least one charging protocol, sending a handshake response signal of the second charging protocol to the tested electronic equipment; after sending the handshake response signal of the second charging protocol, when receiving an internet packet probe data packet of the second charging protocol from the tested electronic device, determining that the second charging protocol is of a first priority in the tested electronic device.
The nth handshake signal may refer to the second signal example described above and in the related description of fig. 6. The nth recording result may be referred to above and in the related description of fig. 6, corresponding to an example of the recording result of the second signal. The second charging protocol may be referred to above and in the relevant description of fig. 6 for an example of protocol B. The way of determining that the nth recording result matches the pulse information of the handshaking signal of the second charging protocol of the at least one charging protocol may be referred to as an example of the way of determining that the first recording result matches the pulse information of the handshaking signal of the first charging protocol.
The handshake response signals of the second charging protocol may refer to the examples of protocol B handshake response signals described above and in the related description of fig. 6. After sending the handshake response signal of the second charging protocol, the internet packet probe packet of the second charging protocol from the tested electronic device is received, which may be referred to above and related description of fig. 6, and the example of receiving the protocol B Ping packet after the tester sends the handshake response signal of the protocol B.
By the method, when the tested electronic equipment is determined not to take the first charging protocol as the first priority, the tester can also determine the specific type of the charging protocol of the first priority of the tested electronic equipment, namely the second charging protocol, and determine that the charging protocols on the tested electronic equipment except the second charging protocol are not the first priority, so that the testing capability of the tester on the priority information of the charging protocol of the tested electronic equipment is further improved.
The embodiment of the application provides a protocol information testing device, the device is applied to the tester, the tester records the pulse information of handshake signals of at least one charging protocol, the at least one charging protocol comprises a first charging protocol, and the device comprises:
the first receiving module is used for receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is sent after the electronic equipment determines that the port of the tester is a special charging port;
a first recording module, configured to record a first recording result including the first handshake signal, where a duration of the first recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration;
and the first determining module is used for determining that the first charging protocol is of a first priority in the tested electronic equipment when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol.
In one possible implementation, the apparatus further includes:
a second determining module, configured to determine that the first recording result matches pulse information of a handshake signal of the first charging protocol when the first recording result only includes the same pulse as pulse information of the handshake signal of the first charging protocol;
And a third determining module, configured to determine that the first recording result does not match with the pulse information of the handshake signal of the first charging protocol when the first recording result includes a pulse different from the pulse information of the handshake signal of the first charging protocol.
In one possible implementation, the apparatus further includes:
the first comparison module is used for comparing the first recording result with the pulse information of the handshake signals of the other charging protocols except the first charging protocol in at least one charging protocol when the first recording result is not matched with the pulse information of the handshake signals of the first charging protocol;
and the fourth determining module is used for determining that the second charging protocol is of a first priority in the tested electronic equipment when the first recording result is matched with pulse information of handshake signals of the second charging protocol in the other charging protocols.
In a possible implementation, the tester is configured to not send a handshake response signal, the apparatus further comprising:
the second receiving module is used for receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer larger than 1;
A second recording module, configured to record an nth recording result including the nth handshake signal, where a duration of the nth recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration;
and a fifth determining module, configured to determine, when the nth recording result matches with pulse information of a handshake signal of a third charging protocol in the at least one charging protocol, priority information of the third charging protocol in the tested electronic device according to the determined priority information of the charging protocol in the tested electronic device.
In one possible implementation manner, when the nth recording result matches with pulse information of a handshake signal of a third charging protocol in the at least one charging protocol, determining priority information of the third charging protocol in the tested electronic device according to the determined priority information of the charging protocol in the tested electronic device includes: when a charging protocol of the t priority of the tested electronic equipment is determined, determining that the third charging protocol is the t+1 priority in the tested electronic equipment, wherein t is a positive integer; and when the charging protocol of the first priority of the tested electronic equipment is not determined, determining that the third charging protocol is the first priority in the tested electronic equipment.
The embodiment of the application provides a protocol information testing device, the device is applied to the tester, the tester records the pulse information of handshake signals of at least one charging protocol, the at least one charging protocol comprises a first charging protocol, and the device comprises:
the third receiving module is used for receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is a first signal sent after the electronic equipment determines that the port of the tester is a special charging port;
a third recording module, configured to record a first recording result including the first handshake signal, where a duration of the first recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol having a longest duration;
the first sending module is used for sending a handshake response signal of a first charging protocol to the tested electronic equipment when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol;
and the sixth determining module is used for determining the priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent.
In one possible implementation, the apparatus further includes:
a seventh determining module, configured to determine that the first recording result matches pulse information of a handshake signal of the first charging protocol when the first recording result only includes the same pulse as pulse information of the handshake signal of the first charging protocol;
an eighth determining module is configured to determine that the first recording result does not match pulse information of the handshake signal of the first charging protocol when the first recording result includes pulses different from pulse information of the handshake signal of the first charging protocol.
In one possible implementation manner, determining priority information of the first charging protocol in the tested electronic device according to data information received after sending a handshake response signal of the first charging protocol includes: after sending the handshake response signal of the first charging protocol, when receiving an internet packet probe data packet of the first charging protocol from the tested electronic device, determining that the first charging protocol is a first priority in the tested electronic device.
In one possible implementation manner, determining priority information of the first charging protocol in the tested electronic device according to data information received after sending a handshake response signal of the first charging protocol includes: after sending the handshake response signal of the first charging protocol, when the internet packet probe data packet of the first charging protocol from the tested electronic device is not received and a second handshake signal sent for the first time is received from the tested electronic device, determining that the first charging protocol is not of a first priority in the tested electronic device, wherein the second handshake signal is different from the first handshake signal.
In one possible implementation, the apparatus further includes:
a fourth receiving module, configured to receive an nth handshake signal sent by the electronic device under test for the first time, where n is an integer greater than 1;
a fourth recording module, configured to record an nth recording result including the nth handshake signal when a charging protocol of a first priority in the tested electronic device is not determined, where a duration of the nth recording result is greater than a duration of a handshake signal of any one of the at least one charging protocol or equal to a duration of a handshake signal of a charging protocol with a longest duration;
the second sending module is used for sending a handshake response signal of a second charging protocol to the tested electronic equipment when the nth recording result is matched with pulse information of the handshake signal of the second charging protocol in the at least one charging protocol;
and the ninth determining module is used for determining that the second charging protocol is the first priority in the tested electronic equipment when the internet packet detector data packet of the second charging protocol from the tested electronic equipment is received after the handshake response signal of the second charging protocol is sent.
Fig. 9 shows an exemplary structural schematic of a tester according to an embodiment of the present application.
Embodiments of the present application provide a tester, comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above-described method when executing the instructions.
As shown in fig. 9, the tester may be a separate electronic device or integrated as a device on at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a screened speaker, an ultra-mobile personal computer (UMPC), a netbook, an augmented reality (augmented reality, AR) device, a Virtual Reality (VR) device, an artificial intelligence (artificial intelligence, AI) device, a drone, a vehicle-mounted device, a smart home device, or a smart city device. The specific setting mode and type of the tester are not particularly limited in the embodiment of the application.
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 apparatus in fig. 3.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors. For example, the processor 110 may perform the protocol information testing method of the embodiments of the present application.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. The memory may store instructions or data that are used or used by the processor 110 at a higher frequency, such as a first record result, an nth record result, pulse information of handshake signals of at least one charging protocol, etc. in the embodiments of the present application. If the processor 110 needs to use the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces 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 (GPIO) interface, and the like. The processor 110 may be connected to a communication module or the like through at least one of the above interfaces.
Memory 121 may be used to store computer-executable program code that includes instructions. The memory 121 may include a stored program area and a stored data area. The storage program area may store an application program (such as an application program for determining that the first recording result matches pulse information of a handshake signal of the first charging protocol) required by at least one function of the operating system, and the like. The storage data area may store data created during use of the tester (e.g., first record result, nth record result, priority information of the protocol, etc.), and the like. In addition, the memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional methods or data processing of the tester by executing instructions stored in the memory 121 and/or instructions stored in a memory provided in the processor.
The communication module 160 may be configured to receive data from other devices or apparatuses (e.g., the tested electronic device in the embodiments of the present application) and output the data to the other devices or apparatuses through wired communication. For example, the tester may receive a first handshake signal, an nth handshake signal, an internet packet probe packet, etc. from the electronic device under test via the communication module 160 and send a handshake response signal to the electronic device under test.
It should be understood that the architecture illustrated by embodiments of the present application are not intended to constitute a particular limitation on computing devices. In other embodiments of the present application, a computing device may include more or fewer components than shown, or may combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Embodiments of the present application provide a non-transitory computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
Embodiments of the present application provide a computer program product comprising a computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, performs the above method.
The computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic 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 (a non-exhaustive list) of the computer-readable storage medium would include the following: portable computer disk, hard disk, random Access Memory (Random Access Memory, RAM), read Only Memory (ROM), erasable programmable Read Only Memory (Electrically Programmable Read-Only-Memory, EPROM or flash Memory), static Random Access Memory (SRAM), portable compact disk Read Only Memory (Compact Disc Read-Only Memory, CD-ROM), digital versatile disk (Digital Video Disc, DVD), memory stick, floppy disk, mechanical coding devices, punch cards or in-groove protrusion structures having instructions stored thereon, and any suitable combination of the foregoing.
The computer readable program instructions or code described herein may be downloaded from a computer readable storage medium to a respective computing/processing device or to an external computer or external storage device over a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmissions, wireless transmissions, routers, firewalls, switches, gateway computers and/or edge servers. The network interface card or 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 the respective computing/processing device.
Computer program instructions for carrying out operations of the present application may be assembly instructions, instruction set architecture (Instruction Set Architecture, ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, c++ or the like and conventional procedural programming languages, such as the "C" language or similar programming languages. The computer readable program instructions may be executed 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. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN) or a wide area network (Wide Area Network, WAN), or it may be connected to an external computer (e.g., through the internet using an internet service provider). In some embodiments, aspects of the present application are implemented by personalizing electronic circuitry, such as programmable logic circuitry, field programmable gate arrays (Field-Programmable Gate Array, FPGA), or programmable logic arrays (Programmable Logic Array, PLA), with state information of computer readable program instructions.
Various 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 will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations 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 the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable medium having the instructions stored therein includes an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by hardware (e.g., circuits or ASICs (Application Specific Integrated Circuit, application specific integrated circuits)) which perform the corresponding functions or acts, or combinations of hardware and software, such as firmware, etc.
Although the invention is described herein in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a study of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the "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 a combination of these measures cannot be used to advantage.
The embodiments of the present application have been described above, the foregoing description is exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the various embodiments described. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or the improvement of technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (12)

1. A protocol information testing method, wherein the method is applied to a tester, the tester records pulse information of handshake signals of at least one charging protocol, the at least one charging protocol includes a first charging protocol, the method includes:
receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is sent after the electronic equipment determines that a port of the tester is a special charging port;
recording a first recording result comprising the first handshake signal, wherein the duration of the first recording result is greater than the duration of the handshake signal of any one of the at least one charging protocol or equal to the duration of the handshake signal of the longest charging protocol;
and when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, determining that the first charging protocol is of a first priority in the tested electronic equipment.
2. The method according to claim 1, wherein the method further comprises:
when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol;
And when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the first recording result is not matched with the pulse information of the handshake signals of the first charging protocol, comparing the first recording result with the pulse information of handshake signals of other charging protocols except the first charging protocol in at least one charging protocol;
and when the first recording result is matched with pulse information of handshake signals of a second charging protocol in the other charging protocols, determining that the second charging protocol is of a first priority in the tested electronic equipment.
4. The method of claim 1, wherein the tester is configured to not send a handshake response signal, the method further comprising:
receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1;
recording an nth record result comprising the nth handshake signals, wherein the duration of the nth record result is greater than the duration of the handshake signals of any one of the at least one charging protocol or equal to the duration of the handshake signals of the charging protocol with the longest duration;
And when the nth recording result is matched with the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, determining the priority information of the third charging protocol in the tested electronic equipment according to the determined priority information of the charging protocol in the tested electronic equipment.
5. The method of claim 4, wherein determining the priority information of a third charging protocol in the electronic device under test based on the determined priority information of the charging protocol in the electronic device under test when the nth recording result matches the pulse information of the handshake signal of the third charging protocol in the at least one charging protocol, comprises:
when a charging protocol of the t priority of the tested electronic equipment is determined, determining that the third charging protocol is the t+1 priority in the tested electronic equipment, wherein t is a positive integer;
and when the charging protocol of the first priority of the tested electronic equipment is not determined, determining that the third charging protocol is the first priority in the tested electronic equipment.
6. A protocol information testing method, wherein the method is applied to a tester, the tester records pulse information of handshake signals of at least one charging protocol, the at least one charging protocol includes a first charging protocol, the method includes:
Receiving a first handshake signal sent by the tested electronic equipment for the first time, wherein the first handshake signal is sent after the electronic equipment determines that a port of the tester is a special charging port;
recording a first recording result comprising the first handshake signal, wherein the duration of the first recording result is greater than the duration of the handshake signal of any one of the at least one charging protocol or equal to the duration of the handshake signal of the longest charging protocol;
when the first recording result is matched with the pulse information of the handshake signal of the first charging protocol, sending a handshake response signal of the first charging protocol to the tested electronic equipment;
and determining priority information of the first charging protocol in the tested electronic equipment according to the data information received after the handshake response signal of the first charging protocol is sent.
7. The method of claim 6, wherein the method further comprises:
when the first recording result only comprises the same pulse as the pulse information of the handshake signal of the first charging protocol, determining that the first recording result is matched with the pulse information of the handshake signal of the first charging protocol;
And when the first recording result comprises pulses different from the pulse information of the handshaking signals of the first charging protocol, determining that the first recording result is not matched with the pulse information of the handshaking signals of the first charging protocol.
8. The method according to claim 6 or 7, wherein determining priority information of the first charging protocol in the tested electronic device based on data information received after sending handshake response signals of the first charging protocol comprises:
after sending the handshake response signal of the first charging protocol, when receiving an internet packet probe data packet of the first charging protocol from the tested electronic device, determining that the first charging protocol is a first priority in the tested electronic device.
9. The method of claim 6, wherein determining priority information of the first charging protocol in the electronic device under test based on data information received after sending a handshake response signal of the first charging protocol comprises:
after sending the handshake response signal of the first charging protocol, when the internet packet probe data packet of the first charging protocol from the tested electronic device is not received and a second handshake signal sent for the first time is received from the tested electronic device, determining that the first charging protocol is not of a first priority in the tested electronic device, wherein the second handshake signal is different from the first handshake signal.
10. The method of claim 6, wherein the method further comprises:
receiving an nth handshake signal sent by the tested electronic equipment for the first time, wherein n is an integer greater than 1;
when the charging protocol of the first priority in the tested electronic equipment is not determined, recording an nth recording result comprising 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 is equal to the duration of the handshake signal of the charging protocol with the longest duration;
when the nth recording result is matched with pulse information of a handshake signal of a second charging protocol in the at least one charging protocol, sending a handshake response signal of the second charging protocol to the tested electronic equipment;
after sending the handshake response signal of the second charging protocol, when receiving an internet packet probe data packet of the second charging protocol from the tested electronic device, determining that the second charging protocol is of a first priority in the tested electronic device.
11. A tester, comprising:
a processor;
a memory for storing processor-executable instructions;
Wherein the processor is configured to implement the method of any of claims 1-5 or the method of any of claims 6-10 when executing the instructions.
12. A non-transitory computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of claims 1-5 or the method of any of claims 6-10.
CN202111492413.2A 2021-12-08 2021-12-08 Protocol information testing method, tester and storage medium Active CN116247755B (en)

Priority Applications (2)

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

Applications Claiming Priority (1)

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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311841110.6A Division CN117955206A (en) 2021-12-08 Protocol information testing method, tester, storage medium and program product

Publications (2)

Publication Number Publication Date
CN116247755A CN116247755A (en) 2023-06-09
CN116247755B true CN116247755B (en) 2024-01-16

Family

ID=86633624

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (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
WO2018040175A1 (en) * 2016-08-31 2018-03-08 宇龙计算机通信科技(深圳)有限公司 Charging method and apparatus
CN110460557A (en) * 2018-05-07 2019-11-15 北汽福田汽车股份有限公司 Charging management method, device, battery management system and the electric vehicle of electric vehicle
CN111817380A (en) * 2020-07-14 2020-10-23 维沃移动通信有限公司 Charger, data line, charging equipment and electronic equipment
CN112260366A (en) * 2020-11-06 2021-01-22 维沃移动通信有限公司 Charging method, charging device and charger
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8880909B2 (en) * 2009-07-20 2014-11-04 Texas Instruments Incorporated Auto-detect polling for correct handshake to USB client
CN106356918B (en) * 2016-08-30 2019-10-11 宇龙计算机通信科技(深圳)有限公司 A kind of quick charge recognition methods and terminal device
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018040175A1 (en) * 2016-08-31 2018-03-08 宇龙计算机通信科技(深圳)有限公司 Charging method and apparatus
CN110460557A (en) * 2018-05-07 2019-11-15 北汽福田汽车股份有限公司 Charging management method, device, battery management system and the electric vehicle of electric vehicle
CN111817380A (en) * 2020-07-14 2020-10-23 维沃移动通信有限公司 Charger, data line, charging equipment and electronic equipment
CN112260366A (en) * 2020-11-06 2021-01-22 维沃移动通信有限公司 Charging method, charging device and charger
CN113690981A (en) * 2021-08-25 2021-11-23 Oppo广东移动通信有限公司 Charging protocol determination method and device, electronic equipment and readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Charge-based low priority congestion control;chi wang et al.;《2008 11th IEEE International Conference on Communication Technology》;第550-553页 *
USB3.0兼容性与电源分配方案;芦艳芳等;《计算机工程应用技术》;第6卷(第27期);第7649-7650页 *

Also Published As

Publication number Publication date
WO2023103802A1 (en) 2023-06-15
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
CN111201689B (en) Electronic equipment and charging control method
CN110399267B (en) PCIE (peripheral component interface express) equipment monitoring method, system and equipment of server and readable storage medium
US10304546B2 (en) External storage device and method of setting reference frequency for the same
KR101848741B1 (en) Input/output delay testing for devices utilizing on-chip delay generation
US9547573B2 (en) Serial communication over communication control pin
CN116247755B (en) Protocol information testing method, tester and storage medium
CN103455397A (en) System self-test method, equipment and system
CN112579509A (en) Single-wire communication method, device, electronic equipment and readable storage medium
US20140149815A1 (en) System and method for programming chips on circuit board through boundary scan technology
US8509738B2 (en) Secure device identification protocol with autonomous determination of specific class and capabilities of an electronic device cradle connected to an electronic device
CN106557308A (en) A kind of software continuous integrated approach and device
CN110514925A (en) Test method and system and storage medium
CN109254210A (en) Electronic device port type detection method, apparatus, detection circuit and electronic equipment
EP2911064B1 (en) Memory initializing method and electronic device supporting the same
CN105323748B (en) Test error uploading method and device
CN117955206A (en) Protocol information testing method, tester, storage medium and program product
CN111481107B (en) Positioning method and device of charging seat of sweeper, computing equipment and storage medium
CN112448449B (en) Charging control method and device, electronic equipment and storage medium
CN109507507A (en) Adapter detection method, device, storage medium, test board and detection system
CN109151160B (en) Communication method, communication device, mobile terminal and storage medium
CN103581936A (en) Method, device and equipment for determining network state in mobile terminal
CN114489661A (en) Asset and fingerprint identification method based on feedback mechanism and related equipment
CN106291383A (en) Battery detection method and battery check device
CN106648007B (en) Universal slot position implementation method and device and communication equipment

Legal Events

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