Equipment function detection method and related equipment

By establishing a USB interface communication connection between the test equipment and the equipment to be tested, automatic detection of various equipment functions is solved, and the problem of long-term detection of equipment function and cumbersome operation in the prior art is solved, and the detection efficiency is improved.

CN119583700APending Publication Date: 2025-03-07HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311125545.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing equipment function detection methods are time-consuming, cumbersome, and low-efficiency, so they cannot quickly, conveniently and efficiently perform equipment function detection.

Method used

The communication connection is established through the USB interface between the test device and the tested device, and the functions of automatic detection of various equipment are realized without the need for testers to manually switch the detection items, and it supports parallel detection of multiple tested devices.

Benefits of technology

Simplify operations, save labor costs, shorten detection time, and improve detection efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583700A_ABST
    Figure CN119583700A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment function detection method and related equipment, and test equipment can establish communication connection with tested equipment. The test device can perform detection of multiple functions (such as analog earphone signal detection, digital earphone signal detection, OTG positive and negative function detection, high-voltage direct-current quick charging function detection, low-voltage direct-current quick charging function detection, PD quick charging function detection and the like) on the tested device in sequence. According to the technical scheme, the testing device can automatically detect the next function, a tester does not need to manually switch detection items, operation can be simplified, labor cost can be saved, the time of the whole detection process can be shortened, in addition, the testing device can also support parallel function detection of a plurality of tested devices, and therefore the detection efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and in particular to a device function detection method and related equipment. Background Art

[0002] With the development of science and technology, electronic devices have gradually become one of the indispensable tools in people's lives. When users use electronic devices, if the electronic devices often have malfunction problems, it will bring poor experience to users. Therefore, it is particularly important to conduct comprehensive and effective device function testing on electronic devices before they are put on the market.

[0003] At present, the device function test is usually carried out by manual testing. With this manual testing method, the entire device function test process is time-consuming, cumbersome and inefficient. Therefore, how to quickly, conveniently and efficiently carry out device function test is an urgent problem to be solved. Summary of the invention

[0004] The present application provides a device function detection method and related equipment. After the test equipment completes the detection of one device function of the tested device, the test equipment can automatically perform the detection of the next device function without the need for the tester to manually switch the detection items, thereby simplifying the operation, saving labor costs, and shortening the time of the entire detection process. In addition, the test equipment can also support parallel device function detection of multiple tested devices, thereby improving detection efficiency.

[0005] In a first aspect, the present application provides a device function detection method, which is applied to a first electronic device, the method comprising: the first electronic device establishes a first communication connection with a second electronic device through a USB interface of the second electronic device; the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, and the multiple device functions of the second electronic device are device functions provided by the second electronic device based on the USB interface of the second electronic device; wherein, after one device function is detected, another device function is started to be detected; the condition for starting to detect another device function of the second electronic device is that the detection of one device function is completed.

[0006] The first electronic device may be the electronic device 100 (ie, the testing device), the second electronic device may be the electronic device 200 (ie, the tested device, such as a mobile phone), and the first communication connection may be Figure 2 Communication connections shown.

[0007] By implementing the method provided in the first aspect, the first electronic device can automatically perform multi-functional detection on the second electronic device without the need for the tester to manually switch the detection items, thereby simplifying the operation, saving labor costs, shortening the time of the entire detection process, and improving detection efficiency.

[0008] In combination with the first aspect, in some embodiments, multiple device functions include: audio input and output functions; the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, specifically including: the first electronic device simulates the audio signal received by the USB interface, and transmits the audio signal to the second electronic device through the USB interface of the second electronic device; the second electronic device records the audio signal and returns the recorded audio signal to the first electronic device; the first electronic device compares whether the recorded audio signal is consistent with the audio signal received by the USB interface simulated by the first electronic device, and if so, the audio input and output functions are normal.

[0009] The audio signal received by the USB interface can be Figure 2 In this case, the recorded audio signal can be Figure 2 The audio signal 1 shown; or, the audio signal received by the USB interface may be Figure 2 In this case, the recorded audio signal may be Figure 2 The audio signal 2 is shown.

[0010] In this way, the first electronic device can perform audio input and output function detection on the second electronic device based on the first communication connection. The first electronic device can compare whether the audio signal recorded by the second electronic device is consistent with the audio signal received by the USB interface simulated by the first electronic device, thereby automatically identifying whether the second electronic device has an audio input and output function failure. There is no need for testers to subjectively judge whether the audio signal is normal, nor is there a need for testers to manually identify audio input and output function failures, thereby improving the accuracy and efficiency of the test.

[0011] In combination with the first aspect, in some embodiments, multiple device functions include: an OTG device insertion direction identification function; the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, specifically including: the first electronic device outputs an OTG device insertion signal that can be detected by the USB interface; the second electronic device outputs an OTG device insertion direction identification result based on the OTG device insertion signal, and returns the OTG device insertion direction identification result to the first electronic device; the first electronic device compares the OTG device insertion direction identification result and the OTG device insertion signal to see if they match, and if so, the OTG device insertion direction identification function is normal.

[0012] Among them, the OTG device insertion signal that can be detected by the above USB interface can be Figure 2 The OTG positive detection signal shown, in this case, the above OTG device insertion direction identification result can be Figure 2 The OTG positive signal detection result shown; or, the OTG device insertion signal that the above USB interface can detect can be Figure 2 The OTG reverse detection signal shown in FIG. 1 is a reverse detection signal of the OTG device. In this case, the OTG device insertion direction identification result can be Figure 2 The OTG reverse signal detection result is shown.

[0013] In this way, the first electronic device can perform OTG device insertion direction identification function detection on the second electronic device based on the first communication connection. The first electronic device can compare whether the OTG device insertion signal output by the first electronic device and the OTG device insertion direction identification result output by the second electronic device based on the OTG device insertion signal are consistent, thereby automatically identifying whether the second electronic device has an OTG device insertion direction identification function failure, thereby improving the efficiency of the test.

[0014] In combination with the first aspect, in some embodiments, the first electronic device outputs an OTG device insertion signal that can be detected by the USB interface, specifically including: the first electronic device simulates the OTG device insertion signal that can be detected by the USB interface, and transmits the OTG device insertion signal to the second electronic device through the USB interface of the second electronic device.

[0015] In this way, the first electronic device can simulate an OTG device insertion signal that can be detected by the USB interface and transmit the OTG device insertion signal to the second electronic device for subsequent OTG device insertion direction identification function detection. There is no need to manually generate an OTG device insertion signal by inserting an OTG device, which simplifies the operation and is convenient and quick.

[0016] In combination with the first aspect, in some embodiments, the first electronic device includes an OTG interface, an OTG device is inserted into the OTG interface, and the first electronic device outputs an OTG device insertion signal that can be detected by the USB interface, specifically including: the first electronic device inserts the OTG device into the OTG interface, and the OTG device insertion signal generated is transmitted to the second electronic device through the USB interface of the second electronic device.

[0017] In this way, the first electronic device can transmit the OTG device insertion signal generated when the OTG device is inserted into the OTG interface to the second electronic device, so as to be used for subsequent OTG device insertion direction identification function detection.

[0018] In combination with the first aspect, in some embodiments, the OTG device insertion signal output by the first electronic device is an OTG device forward insertion signal, and the OTG device insertion direction identification result consistent with the OTG device forward insertion signal includes indication information that the insertion direction of the OTG device is forward; or, the OTG device insertion signal output by the first electronic device is an OTG device reverse insertion signal, and the OTG device insertion direction identification result consistent with the OTG device reverse insertion signal includes indication information that the insertion direction of the OTG device is reverse.

[0019] In this way, the OTG device insertion signal can be matched with the OTG device insertion direction identification result according to whether the OTG device insertion signal is a forward insertion signal or a reverse insertion signal, thereby determining whether the OTG device insertion direction identification function of the second electronic device is normal.

[0020] In combination with the first aspect, in some embodiments, multiple device functions include: a charging type identification function; the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, specifically including: the first electronic device outputs a power supply signal that can be detected by the USB interface; the second electronic device outputs a charging type identification result based on the power supply signal, and returns the charging type identification result to the first electronic device; the first electronic device compares whether the charging type identification result and the power supply signal are consistent, and if so, the charging type identification function is normal.

[0021] The power supply signal that the USB interface can detect may include but is not limited to Figure 2 The high voltage charging detection signal, low voltage charging detection signal, and PD charging detection signal shown, the above charging type identification results may include but are not limited to Figure 2 The high-voltage charging signal detection results, low-voltage charging signal detection results, and PD charging signal detection results are shown.

[0022] In this way, the first electronic device can perform charging type identification function detection on the second electronic device based on the first communication connection. The first electronic device can compare whether the power supply signal output by the first electronic device and the charging type identification result output by the second electronic device based on the power supply signal are consistent, thereby automatically identifying whether there is a charging type identification function failure in the second electronic device, thereby improving the efficiency of the test.

[0023] In combination with the first aspect, in some embodiments, the first electronic device outputs a power supply signal that can be detected by the USB interface, specifically including: the first electronic device simulates the power supply signal that can be detected by the USB interface, and transmits the power supply signal to the second electronic device through the USB interface of the second electronic device.

[0024] In this way, the first electronic device can simulate a power supply signal that can be detected by the USB interface and transmit the power supply signal to the second electronic device for subsequent charging type identification function detection. There is no need to manually generate a power supply signal by plugging in a power source, which simplifies the operation and makes it convenient and quick.

[0025] In combination with the first aspect, in some embodiments, the first electronic device includes a power interface, the power interface is connected to a power source, and the first electronic device outputs a power signal that can be detected by the USB interface, specifically including: the first electronic device inserts the power source into the power interface, and the power signal generated is transmitted to the second electronic device through the USB interface of the second electronic device.

[0026] In this way, the first electronic device can transmit the power supply signal generated by the power supply being inserted into the power interface to the second electronic device, so as to be used for subsequent charging type identification function detection.

[0027] In combination with the first aspect, in some embodiments, the power supply signal output by the first electronic device is a high-voltage power supply signal, and the charging type identification result consistent with the high-voltage power supply signal is: the charging type is high-voltage fast charging; or, the power supply signal output by the first electronic device is a low-voltage power supply signal, and the charging type identification result consistent with the low-voltage power supply signal is: the charging type is low-voltage fast charging.

[0028] In this way, the power supply signal can be matched with the charging type identification result according to the type of the power supply signal, so as to determine whether the charging type identification function of the second electronic device is normal.

[0029] In combination with the first aspect, in some embodiments, the method also includes: the first electronic device also establishes a second communication connection with the third electronic device through the USB interface of the third electronic device; the first electronic device detects multiple device functions of the third electronic device based on the second communication connection, and the multiple device functions of the third electronic device are device functions provided by the third electronic device based on the USB interface of the third electronic device; wherein, after one device function of the third electronic device is detected, another device function is started to be detected; the condition for starting to detect another device function provided by the third electronic device is that the detection of one device function is completed.

[0030] The third electronic device may be a tested device (eg, a mobile phone) other than the second electronic device, and the tested device may establish another communication connection (eg, the second communication connection) with the first electronic device.

[0031] In this way, the first electronic device (ie, the testing device) can support parallel device function testing of multiple devices under test (eg, the second electronic device, the third electronic device, etc.), thereby improving the testing efficiency.

[0032] In combination with the first aspect, in some embodiments, the method further includes: when the first electronic device detects the first device function of the second electronic device based on the first communication connection, the first electronic device detects the second device function of the third electronic device based on the second communication connection.

[0033] Among them, the first device function may be an audio input and output function / OTG device insertion direction identification function / charging type identification function, and the second device function may be a function other than the first device function.

[0034] In some embodiments, when there are multiple detection items corresponding to the first device function, the second electronic device and the third electronic device can also perform the first device function detection at the same time, but the detection items need to be different, so as to avoid the conflict of detection items of two different tested devices. For example, assuming that the first device function is an audio input and output function, the audio input and output function includes two detection items: analog headphone signal detection and digital headphone signal detection. Then, when the analog headphone signal detection is performed on the second electronic device, the digital headphone signal detection can be performed on the third electronic device.

[0035] In this way, after the first electronic device completes the detection of the first device function on the second electronic device, the first electronic device can detect the first device function on the third electronic device and detect the second device function on the second electronic device, and so on.

[0036] In combination with the first aspect, in some embodiments, the method also includes: the first electronic device sends a first message to the second electronic device, the first message is used to indicate that the detection of a device function is completed; the second electronic device sends a second message to the first electronic device, the second message is used to indicate that the second electronic device has entered a state where detection of another device function has begun.

[0037] Among them, the first message can be a message sent by the first electronic device to the second electronic device after completing a device function test (or when each device function includes multiple test items, each time a test item is completed), and the second message can be a message sent by the second electronic device to the first electronic device after receiving the above-mentioned first message.

[0038] In this way, each time the detection of one function is completed, the first electronic device can automatically proceed to the detection of the next function without the need for the tester to manually switch the detection items, thereby simplifying the operation, saving labor costs, shortening the time of the entire detection process, and improving detection efficiency.

[0039] In combination with the first aspect, in some embodiments, another device function is an audio input and output function, and the method also includes: the first electronic device sends a first detection instruction to the second electronic device, and the first detection instruction is used to trigger the second electronic device to enter an audio recording state; the first electronic device receives a third message sent by the second electronic device, and the third message is used to indicate that the second electronic device has entered an audio recording state.

[0040] The first detection instruction may be Figure 2 The analog headset signal detection instruction shown, in this case, the third message can be Figure 2 Message 2 shown; or, the first detection instruction may be Figure 2 The digital headphone signal detection instruction shown, the third message may be message 4.

[0041] In this way, when the first electronic device starts to detect the audio input and output function, it sends a first detection instruction to the second electronic device. If the second electronic device enters the audio recording state, the second electronic device can send a third message to the first electronic device so that the first electronic device can start to detect the audio input and output function of the second electronic device after knowing that the second electronic device enters the audio recording state.

[0042] In combination with the first aspect, in some embodiments, another device function is an OTG device insertion direction identification function, and the method also includes: the first electronic device sends a second detection instruction to the second electronic device, and the second detection instruction is used to trigger the second electronic device to enter the OTG device insertion direction identification state; the first electronic device receives a fourth message sent by the second electronic device, and the fourth message is used to indicate that the second electronic device has entered the OTG device insertion direction identification state.

[0043] The second detection instruction may be Figure 2 The OTG positive signal detection instruction shown, in this case, the fourth message can be Figure 2 Message 6 shown; or, the second detection instruction may be Figure 2 The OTG reverse signal detection instruction shown, in this case, the fourth message can be Figure 2 Message 7 is shown.

[0044] In this way, when the first electronic device starts to detect the OTG device insertion direction identification function, it sends a second detection instruction to the second electronic device. If the second electronic device enters the OTG device insertion direction identification state, the second electronic device can send a fourth message to the first electronic device, so that the first electronic device can start to detect the OTG device insertion direction identification function of the second electronic device after knowing that the second electronic device enters the OTG device insertion direction identification state.

[0045] In combination with the first aspect, in some embodiments, another device function is a charging type identification function, and the method also includes: the first electronic device sends a third detection instruction to the second electronic device, and the third detection instruction is used to trigger the second electronic device to enter a charging type identification state; the first electronic device receives a fifth message sent by the second electronic device, and the fifth message is used to indicate that the second electronic device has entered a charging type identification state.

[0046] The third detection instruction may be Figure 2 The high voltage charging signal detection instruction shown, in this case, the fifth message can be Figure 2 Message 8 shown; or, the third detection instruction may be Figure 2 The low voltage charging signal detection instruction shown, in this case, the fifth message can be Figure 2 Message 9 shown; or, the third detection instruction may be Figure 2 In this case, the fifth message may be Figure 2 Message 10 is shown.

[0047] In this way, when the first electronic device starts to detect the charging type identification function, it sends a third detection instruction to the second electronic device. If the second electronic device enters the charging type identification state, the second electronic device can send a fifth message to the first electronic device so that the first electronic device can start to detect the charging type identification function of the second electronic device after knowing that the second electronic device enters the charging type identification state.

[0048] In combination with the first aspect, in some embodiments, before the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, the method also includes: the first electronic device sends a detected state feedback instruction to the second electronic device; the first electronic device receives a sixth message sent by the second electronic device, and the sixth message is used to indicate that the second electronic device has entered the detected state.

[0049] Among them, the sixth message can be Figure 2 Message 1 is shown.

[0050] In this way, after the first electronic device establishes the first communication connection with the second electronic device, if the first electronic device is already in place (i.e., enters the normal detection state), the first electronic device can send a detected state feedback instruction to the second electronic device. After the second electronic device receives the instruction, if the second electronic device has entered the detected state, the second electronic device can send a sixth message to the first electronic device, so that the first electronic device can start to perform device function detection on the second electronic device after learning that the second electronic device has entered the detected state.

[0051] In combination with the first aspect, in some embodiments, the USB interface is a Type-C interface.

[0052] In a second aspect, the present application provides an electronic device, comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes any method described in the first aspect above.

[0053] In a third aspect, the present application provides a computer storage medium storing a computer program, wherein the computer program includes program instructions. When the program instructions are executed on an electronic device, the electronic device executes any method described in the first aspect.

[0054] In a fourth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a computer, the computer executes any method described in the first aspect.

[0055] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a memory, wherein the memory is used to store computer programs or computer instructions, and the processor is used to execute the computer programs or computer instructions stored in the memory, so that the chip executes any method described in the first aspect above.

[0056] The solutions provided in the second to fifth aspects are used to implement or cooperate with the corresponding methods provided in the first aspect, and therefore can achieve the same or corresponding beneficial effects as the corresponding methods in the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1A is a schematic diagram of a test device provided in an embodiment of the present application;

[0058] Figure 1B is a schematic diagram of a communication system provided in an embodiment of the present application;

[0059] Figure 2 It is a flow chart of a device function detection method provided in an embodiment of the present application;

[0060] Figure 3 is a structural diagram of an electronic device 100 provided in an embodiment of the present application;

[0061] Figure 4 It is a schematic diagram of the principle of an analog headphone signal detection circuit provided in an embodiment of the present application;

[0062] Figure 5 It is a principle schematic diagram of a digital headphone signal detection circuit provided in an embodiment of the present application;

[0063] Figure 6 It is a structural diagram of an electronic device 200 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0065] It should be understood that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0066] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.

[0067] Before electronic devices are put on the market, device manufacturers usually conduct device function tests on each electronic device, for example, the man-machine interface (MMI) function test related to the universal serial bus (USB) interface of the electronic device. Among them, the USB interface can include Type-A interface, Type-B interface, and Type-C interface. Taking the Type-C interface as an example, at present, the MMI function test related to the Type-C interface of electronic devices (such as mobile phones) usually includes analog headphone signal detection, digital headphone signal detection, OTG (on-the-go) positive and negative function detection, high-voltage DC fast charging function detection, low-voltage DC fast charging function detection, and power delivery (PD) fast charging function detection.

[0068] However, currently, the above functions are usually tested manually. Figure 1A , Figure 1A A test device (also referred to as a detection device) provided in an embodiment of the present application is exemplarily shown, and the test device needs to perform device function detection on the device under test (also referred to as the device under test) by manual detection. The test device may include multiple interfaces (e.g., interface 110, interface 111, interface 112, interface 113, interface 114, interface 115, interface 116, interface 117, interface 118), multiple buttons (e.g., button 119, button 120, button 121, button 122, button 123, button 124, button 125, button 126, button 127). Among them, the six interfaces from interface 110 to interface 115 can be connected to headphones and chargers, and can be used for headphone signal detection and charging signal detection, interface 116 and interface 117 can be connected to data storage devices (e.g., USB flash drives, etc.), and can be used for OTG signal detection, and interface 118 can be connected to the device under test (e.g., mobile phones, etc.). Among them, the above-mentioned multiple buttons can be used to start / stop corresponding detection items (such as headphone signal detection, charging signal detection, OTG signal detection and other detection items) and control the switch of the test equipment.

[0069] Taking the above-mentioned MMI function detection related to the Type-C interface of the electronic device as an example, at present, the entire test operation process of using the above-mentioned test equipment to perform device function detection on the device under test is usually as follows: First, the tester needs to place the device under test (such as a mobile phone) under the test equipment, and use the Type-C data cable to connect the test equipment to the device under test. After the connection is completed, the tester can start the device function detection. Exemplarily, the tester can click the analog signal headset detection button, and then manually press the headset line control position pause button, manually record the voice, and after the voice is recorded, it is necessary to press the headset line control position pause button again, play the recorded voice, listen to whether the played sound is consistent with the recorded sound, and judge whether there are noises and other problems. Exemplarily, the tester can also click the digital signal headset detection button, and then manually press the headset line control position pause button, manually record the voice, and after the voice is recorded, it is necessary to press the headset line control position pause button again, play the recorded voice, listen to whether the played sound is consistent with the recorded sound, and judge whether there are noises and other problems. Exemplarily, the tester can also click the high-voltage DC fast charge detection button, and after observing that the test is passed on the device under test, the next test can be performed. Exemplarily, the tester can also click the low-voltage DC fast charge detection button, and after observing that the test is passed on the device under test, the next test can be performed. Exemplarily, the tester can also click the PD fast charge detection button, and after observing that the test is passed on the device under test, the next test can be performed. Exemplarily, the tester can also click the OTG front detection button, and after observing that the test is passed on the device under test, the next test can be performed. Exemplarily, the tester can also click the OTG back detection button, and after observing that the test is passed on the device under test, the next test can be performed. The test ends when all detection items are completed.

[0070] It can be seen that the entire test process described above has the following shortcomings: 1. Testers need to manually switch test items, and need to manually input and play voice when performing headphone signal detection. The operation is cumbersome and it takes a long time to perform a complete test. 2. The test equipment can usually only detect one device at a time and does not support functional testing of multiple tested devices in parallel, resulting in low detection efficiency. 3. Testers need to manually judge the strength of the voice signal when performing headphone signal detection. This subjective performance detection method easily leads to low accuracy of the test results.

[0071] Based on the above problems, an embodiment of the present application provides a device function detection method, in which the test device can establish a communication connection with the device being tested. Based on the communication connection, the test device can perform multiple function detections on the device being tested in sequence (for example, analog headphone signal detection, digital headphone signal detection, OTG positive and negative function detection, high-voltage DC fast charging function detection, low-voltage DC fast charging function detection, PD fast charging function detection, etc.). After completing the detection of each function, the test device can automatically proceed to the detection of the next function without the need for the tester to manually switch the detection items, thereby simplifying the operation, saving labor costs, and shortening the time of the entire detection process. In addition, the test device can also support functional detection of multiple devices being tested in parallel, thereby improving detection efficiency.

[0072] A communication system provided by an embodiment of the present application is introduced below.

[0073] Figure 1B A communication system provided by an embodiment of the present application is exemplified.

[0074] like Figure 1B As shown, the communication system may include: an electronic device 100 (testing device), and one or more electronic devices 200 (tested devices).

[0075] Among them, the electronic device 100 (also known as a detection device) can be used to perform device function detection on one or more electronic devices 200 (also known as detected devices), such as analog headphone signal detection, digital headphone signal detection, OTG positive and negative function detection, high-voltage DC fast charging function detection, low-voltage DC fast charging function detection, PD fast charging function detection, etc.

[0076] Different from the above Figure 1A The test equipment shown in the figure performs a function test on the device under test by manual detection. Figure 1B The electronic device 100 shown can automatically perform device function detection on the device under test without the need for the tester to manually switch the detection items. In addition, it can also support functional detection of multiple devices under test in parallel.

[0077] The electronic device 200 may be any type of intelligent terminal device, and the embodiment of the present application does not limit the specific type of the electronic device 200. For example, the electronic device 200 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, etc. The embodiment of the present application does not limit the number of the electronic devices 200.

[0078] In the embodiment of the present application, the device function detection method provided by the present application is described by taking the electronic device 200 as a terminal device with a Type-C interface as an example, which should not constitute a limitation on the present application. In some other embodiments of the present application, the electronic device 200 may also be a terminal device with other types of interfaces.

[0079] In an embodiment of the present application, before the electronic device 100 performs a device function detection on the electronic device 200, a communication connection can be established between the electronic device 100 and the electronic device 200, and based on the communication connection, the electronic device 100 can perform a device function detection on the electronic device 200. Among them, the communication connection established between the electronic device 100 and the electronic device 200 may include but is not limited to: a wired connection (for example, a wired connection established by a data cable connected via a Type-C interface), a wireless connection such as a Bluetooth (BT) connection and a wireless fidelity (WiFi) connection, etc. In addition, the electronic device 100 and the electronic device 200 in the communication system can also be connected and communicated in combination with any of the above-mentioned methods, and the embodiment of the present application does not limit this. That is to say, the electronic device 100 and the electronic device 200 in the communication system can form a network (i.e., networking) according to a certain communication protocol and networking strategy, so that the electronic device 100 and the electronic device 200 can communicate with each other.

[0080] Figure 2 The specific process of a device function detection method provided in an embodiment of the present application is exemplified.

[0081] like Figure 2 As shown, the method can be applied to a communication system including an electronic device 100 (i.e., a test device) and an electronic device 200 (i.e., a device under test). In the embodiment of the present application, the electronic device 200 is a terminal device (e.g., a mobile phone) having a Type-C interface. The specific steps of the method may include: Figure 2 The specific steps of the method are described in detail below:

[0082] Phase 1: Initialization phase

[0083] S201 : The electronic device 100 establishes a communication connection with the electronic device 200 .

[0084] Specifically, before the device function detection, the electronic device 100 can be initialized, and a communication connection can be established between the electronic device 100 and the electronic device 200. In this way, the electronic device 100 and the electronic device 200 can exchange data based on the communication connection during the device function detection process (for example, in the subsequent steps, during the analog headphone signal detection stage, the electronic device 100 sends an audio playback instruction 1 to the electronic device 200, and the electronic device 200 sends an audio signal 1 to the electronic device 100; etc.).

[0085] The communication connection may be a communication connection established between the electronic device 100 and the electronic device 200 by wired connection and / or wireless connection. The wired connection may be, for example, a wired connection established by a data cable connected via a Type-C interface, and the wireless connection may be, for example, one or more of a Bluetooth connection and a WiFi connection.

[0086] S202-S203, the electronic device 100 sends a detected state feedback instruction to the electronic device 200, and then the electronic device 200 sends a message 1 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter a normal detected state.

[0087] Specifically, after the electronic device 100 establishes a communication connection with the electronic device 200, since the electronic device 100 can establish a communication connection with multiple electronic devices 200 at the same time so that device function detection can be performed on multiple electronic devices 200 in parallel, before executing the above step S202, the method also includes: the electronic device 100 obtains and identifies the port information of each electronic device 200 based on the above communication connection, and numbers each electronic device 200 in turn for easy distinction.

[0088] After the electronic device 100 establishes a communication connection with the electronic device 200, if the electronic device 100 is already in place (i.e., has entered a normal detection state), then the electronic device 100 can send a detection state feedback instruction to the electronic device 200, which can be used to notify the electronic device 200 that the electronic device 100 is in place, and can also be used to instruct the electronic device 200 to send relevant information to the electronic device 100 regarding whether the electronic device 200 has entered a normal detection state.

[0089] In some embodiments, the above step S202 is optional.

[0090] After the electronic device 100 establishes a communication connection with the electronic device 200, if the electronic device 200 enters a normal detected state (also referred to as an initial state), the electronic device 200 may send a message 1 to the electronic device 100, which may be used to indicate that the electronic device 200 enters a normal detected state, so that the electronic device 100 may start performing device function detection on the electronic device 200 after knowing that the electronic device 200 enters a normal detected state.

[0091] In some embodiments, if the electronic device 200 has not entered the normal detected state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the normal detected state, so that the electronic device 100 can promptly know the status of the electronic device 200 and determine whether it can start device function detection on the electronic device 200.

[0092] In some embodiments, the above step S203 is optional.

[0093] In some embodiments, before executing the above step S203, the method also includes: after the electronic device 100 establishes a communication connection with the electronic device 200, the electronic device 200 can determine whether it has entered a normal detected state (that is, whether it meets the initial state). If not, the electronic device 200 can display relevant prompt information (also known as error information) to prompt the tester that the electronic device 200 has not entered a normal detected state, so that the tester can correct the state of the electronic device 200 in time.

[0094] In some embodiments, after the state of the electronic device 200 is corrected by the tester, the electronic device 200 can re-establish the communication connection with the electronic device 100. For example, the tester can re-plug and unplug the data cable connected to the Type-C interface of the electronic device 200 to re-establish the communication connection.

[0095] After completing the above-mentioned stage 1, the electronic device 100 can start to perform device function detection on the electronic device 200. Among them, the detection items of the device function detection may include one or more items. In the case of multiple detection items, the detection time sequence of the detection items may be default or manually set in advance. The embodiment of the present application does not limit the detection time sequence of the detection items.

[0096] In the embodiment of the present application, taking the electronic device 100 performing multiple detection items on the electronic device 200 as an example, these multiple detection items may include but are not limited to: analog headphone signal detection, digital headphone signal detection, OTG front signal detection, OTG back signal detection, high-voltage charging signal detection, low-voltage charging signal detection, and PD charging signal detection.

[0097] It is easy to understand that the detection time sequence of the above multiple detection items can be arbitrary. Figure 2 The detection time sequence shown is for illustration only and should not be construed as limiting the present application.

[0098] It is easy to understand that the embodiments of the present application are only Figure 2 The multiple detection items shown in the figure are used as examples for illustration. In some embodiments, the number of detection items may be greater than Figure 2 The number of test items shown may be fewer or greater.

[0099] Below Figure 2 The sequence of stage 2 to stage 8 shown is used as an example to illustrate the detection items of analog headphone signal detection, digital headphone signal detection, OTG front signal detection, OTG back signal detection, high-voltage charging signal detection, low-voltage charging signal detection, and PD charging signal detection.

[0100] Phase 2: Analog headphone signal detection phase

[0101] S204-S205, the electronic device 100 sends an analog headphone signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 2 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter a voice recording state.

[0102] In some embodiments, before executing the above step S204, the method further includes: the electronic device 200 sends information about the detection item of analog headphone signal detection (such as the name of the detection item of analog headphone signal detection, etc.) to the electronic device 100. After receiving the information, the electronic device 100 can send an analog headphone signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the voice recording state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the detection item of analog headphone signal detection sent by the electronic device 200.

[0103] After the electronic device 200 receives the analog headphone signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the voice recording state, then the electronic device 200 can send a message 2 to the electronic device 100, which can be used to indicate that the electronic device 200 enters the voice recording state, so that the electronic device 100 can start to perform analog headphone signal detection on the electronic device 200 after knowing that the electronic device 200 enters the voice recording state.

[0104] In some embodiments, after the electronic device 200 receives the analog headphone signal detection instruction sent by the electronic device 100, if the electronic device 200 has not entered the voice recording state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the voice recording state, so that the electronic device 100 can timely know the state of the electronic device 200 and determine whether to start analog headphone signal detection for the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the voice recording state, the electronic device 100 may resend the analog headphone signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the voice recording state.

[0105] In some embodiments, the above-mentioned analog headphone signal detection instruction may include information about the detection item of analog headphone signal detection (such as the name of the detection item of analog headphone signal detection, etc.), and the above-mentioned message 2 may include information for indicating whether the information of the detection item of analog headphone signal detection is correct. If it is correct, the electronic device 100 can continue to execute subsequent steps. If it is incorrect, the electronic device 100 can re-send the analog headphone signal detection instruction to the electronic device 200.

[0106] S206-S208, the electronic device 100 sends a voice simulation signal to the electronic device 200, and then the electronic device 200 records the voice simulation signal. After the recording is completed, the electronic device 200 sends a message 3 to the electronic device 100, which is used to indicate that the electronic device 200 has completed the recording of the voice simulation signal.

[0107] The above-mentioned voice analog signal (also referred to as analog headphone signal) may be a voice signal used for analog headphone signal detection.

[0108] In some embodiments, the analog headphone signal detection instruction in the above step S204 may include information about the detection item of analog headphone signal detection (such as the name of the detection item of analog headphone signal detection, etc.). Before executing the above step S206, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information of the detection item of analog headphone signal detection is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the analog headphone signal detection instruction to the electronic device 200.

[0109] S209 - S210 , the electronic device 100 sends an audio play instruction 1 to the electronic device 200 , and then the electronic device 200 sends an audio signal 1 to the electronic device 100 .

[0110] The audio signal 1 may be generated by the electronic device 200 based on the voice analog signal sent by the electronic device 100 .

[0111] S211-S212, the electronic device 100 determines whether the voice simulation signal is consistent with the audio signal 1, if so, executes the steps in the next stage, if not, records the detection result 1, and after the recording is completed, executes the steps in the next stage.

[0112] Specifically, after receiving the audio signal 1 sent by the electronic device 200, the electronic device 100 can determine whether the voice simulation signal is consistent with the audio signal 1. If so, it means that the electronic device 200 passes the analog headphone signal detection, and the function of the electronic device 200 to record and output the analog headphone signal is normal. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the electronic device 200 fails the analog headphone signal detection, and the function of the electronic device 200 to record and / or output the analog headphone signal is abnormal. Further, the electronic device 100 can record the detection result 1, which may include information indicating that the electronic device 200 fails the analog headphone signal detection. Further, after the detection result 1 is recorded, the electronic device 100 can execute the steps in the next stage.

[0113] The specific process of "the electronic device 100 determining whether the voice simulation signal is consistent with the audio signal 1" will be described in detail in subsequent embodiments and will not be expanded here.

[0114] In some embodiments, when the electronic device 200 is detected by analog headphone signal, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 is detected by analog headphone signal.

[0115] In some embodiments, before the electronic device 100 executes the steps in the next stage, the electronic device 100 may also notify the electronic device 200 whether the electronic device 200 passes the analog headphone signal detection. After receiving the notification, the electronic device 200 may output a detection result indicating whether the electronic device 200 passes the analog headphone signal detection.

[0116] In some embodiments, the above-mentioned stage two is optional.

[0117] In some embodiments, after executing all the steps of the above-mentioned analog headphone signal detection stage, the electronic device 100 may also send a message to the electronic device 200 indicating that the detection of the analog headphone signal is completed, so as to carry out the detection of the next detection item. After receiving the above-mentioned message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0118] Phase 3: Digital headphone signal detection phase

[0119] S213-S214, the electronic device 100 sends a digital headphone signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 4 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter a voice recording state.

[0120] In some embodiments, before executing the above step S213, the method further includes: the electronic device 200 sends information about the detection item of digital headphone signal detection (such as the name of the detection item of digital headphone signal detection, etc.) to the electronic device 100. After receiving the information, the electronic device 100 can send a digital headphone signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the voice recording state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the detection item of digital headphone signal detection sent by the electronic device 200.

[0121] After the electronic device 200 receives the digital headphone signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the voice recording state, then the electronic device 200 can send a message 4 to the electronic device 100, which can be used to indicate that the electronic device 200 enters the voice recording state, so that the electronic device 100 can start to perform digital headphone signal detection on the electronic device 200 after knowing that the electronic device 200 enters the voice recording state.

[0122] In some embodiments, after the electronic device 200 receives the digital headphone signal detection instruction sent by the electronic device 100, if the electronic device 200 has not entered the voice recording state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the voice recording state, so that the electronic device 100 can timely know the state of the electronic device 200 and determine whether to start digital headphone signal detection for the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the voice recording state, the electronic device 100 may resend the digital headphone signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the voice recording state.

[0123] In some embodiments, the above-mentioned digital headphone signal detection instruction may include information about the digital headphone signal detection detection item (such as the name of the digital headphone signal detection detection item, etc.), and the above-mentioned message 4 may include information used to indicate whether the information of the digital headphone signal detection detection item is correct. If it is correct, the electronic device 100 can continue to execute subsequent steps. If it is incorrect, the electronic device 100 can re-send the digital headphone signal detection instruction to the electronic device 200.

[0124] S215-S217, the electronic device 100 sends a voice digital signal to the electronic device 200, and then the electronic device 200 records the voice digital signal. After the recording is completed, the electronic device 200 sends a message 5 to the electronic device 100, which is used to indicate that the electronic device 200 has completed the recording of the voice digital signal.

[0125] The above-mentioned voice digital signal (also referred to as a digital headphone signal) may be a voice signal used for digital headphone signal detection.

[0126] In some embodiments, the digital headphone signal detection instruction in the above step S213 may include information about the digital headphone signal detection detection item (such as the name of the digital headphone signal detection detection item and other information). Before executing the above step S215, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the digital headphone signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the digital headphone signal detection instruction to the electronic device 200.

[0127] S218 - S219 , the electronic device 100 sends an audio play instruction 2 to the electronic device 200 , and then the electronic device 200 sends an audio signal 2 to the electronic device 100 .

[0128] The audio signal 2 may be generated by the electronic device 200 based on the voice digital signal sent by the electronic device 100 .

[0129] S220-S221, the electronic device 100 determines whether the voice digital signal is consistent with the audio signal 2. If so, it executes the steps in the next stage. If not, it records the detection result 2. After the recording is completed, it executes the steps in the next stage.

[0130] Specifically, after receiving the audio signal 2 sent by the electronic device 200, the electronic device 100 can determine whether the voice digital signal is consistent with the audio signal 2. If so, it means that the electronic device 200 passes the digital headphone signal detection, and the function of the electronic device 200 to record and output the digital headphone signal is normal. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the electronic device 200 fails the digital headphone signal detection, and the function of the electronic device 200 to record and / or output the digital headphone signal is abnormal. Further, the electronic device 100 can record the detection result 2, which may include information indicating that the electronic device 200 fails the digital headphone signal detection. Further, after the detection result 2 is recorded, the electronic device 100 can execute the steps in the next stage.

[0131] The specific process of "the electronic device 100 determining whether the voice digital signal is consistent with the audio signal 2" will be described in detail in subsequent embodiments and will not be expanded here.

[0132] In some embodiments, when the electronic device 200 passes the digital headphone signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the digital headphone signal detection.

[0133] In some embodiments, before the electronic device 100 executes the steps in the next stage, the electronic device 100 may also notify the electronic device 200 whether the electronic device 200 passes the digital headphone signal detection. After receiving the notification, the electronic device 200 may output a detection result indicating whether the electronic device 200 passes the digital headphone signal detection.

[0134] In some embodiments, stage three described above is optional.

[0135] In some embodiments, after executing all the steps of the digital headphone signal detection phase, the electronic device 100 may also send a message to the electronic device 200 indicating that the detection of the digital headphone signal is completed, so as to carry out the detection of the next detection item. After receiving the above message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0136] It can be seen that the device function of the electronic device 200 detected in the above-mentioned stage 2 (analog headphone signal detection stage) and stage 3 (digital headphone signal detection stage) is the audio input and output function. The electronic device 100 can compare whether the audio signal recorded by the electronic device 200 is consistent with the audio signal received from the electronic device 100 by the USB interface of the electronic device 200. If so, it means that the audio input and output function of the electronic device 200 is normal.

[0137] Phase 4: OTG positive signal detection phase (also known as OTG positive function detection phase)

[0138] S222-S223, the electronic device 100 sends an OTG front signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 6 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter the OTG front signal detection state.

[0139] In some embodiments, before executing the above step S222, the method further includes: the electronic device 200 sends information about the OTG positive signal detection detection item (such as the name of the OTG positive signal detection detection item and other information) to the electronic device 100. After receiving the information, the electronic device 100 can send an OTG positive signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the OTG positive signal detection state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the OTG positive signal detection detection item sent by the electronic device 200.

[0140] After the electronic device 200 receives the OTG front signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the OTG front signal detection state, then the electronic device 200 can send a message 6 to the electronic device 100, which can be used to indicate that the electronic device 200 enters the OTG front signal detection state, so that the electronic device 100 can start to perform OTG front signal detection on the electronic device 200 after knowing that the electronic device 200 enters the OTG front signal detection state.

[0141] In some embodiments, after the electronic device 200 receives the OTG front signal detection instruction sent by the electronic device 100, if the electronic device 200 has not entered the OTG front signal detection state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the OTG front signal detection state, so that the electronic device 100 can promptly know the state of the electronic device 200 and determine whether to start OTG front signal detection on the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the OTG front signal detection state, the electronic device 100 may resend the OTG front signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the OTG front signal detection state.

[0142] In some embodiments, the above-mentioned OTG front signal detection instruction may include information about the OTG front signal detection detection item (such as the name of the OTG front signal detection detection item and other information), and the above-mentioned message 6 may include information for indicating whether the information about the OTG front signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the OTG front signal detection instruction to the electronic device 200.

[0143] S224-S227, the electronic device 100 sends an OTG positive detection signal to the electronic device 200, and then the electronic device 200 sends an OTG positive signal detection result to the electronic device 100. After that, the electronic device 100 determines whether the OTG positive signal detection result is passed, and if so, executes the steps in the next stage, and if not, records the detection result 3, and after the recording is completed, executes the steps in the next stage.

[0144] Among them, after receiving the OTG front detection signal sent by the electronic device 100, the electronic device 200 can automatically perform OTG front signal detection based on the OTG front detection signal. After the detection is completed, an OTG front signal detection result can be generated. The OTG front signal detection result may include information used to indicate whether the electronic device 200 passes the OTG front signal detection. Further, the electronic device 200 can send the OTG front signal detection result to the electronic device 100. After the electronic device 100 receives the OTG front signal detection result sent by the electronic device 200, it can determine whether the OTG front signal detection result is passed. If so, it means that the OTG front function of the electronic device 200 is normal. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the OTG front function of the electronic device 200 is abnormal. Further, the electronic device 100 can record the detection result 3, and the detection result 3 may include information used to indicate that the electronic device 200 did not pass the OTG front signal detection. Further, after the detection result 3 is recorded, the electronic device 100 can execute the steps in the next stage.

[0145] In some embodiments, the OTG front signal detection instruction in the above step S222 may include information about the OTG front signal detection detection item (such as the name of the OTG front signal detection detection item and other information). Before executing the above step S224, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the OTG front signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the OTG front signal detection instruction to the electronic device 200.

[0146] In some embodiments, when the electronic device 200 passes the OTG front signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the OTG front signal detection.

[0147] In some embodiments, the electronic device 100 may also directly save the OTG front signal detection result sent by the electronic device 200. In this case, the electronic device 100 may not execute the above steps S226-S227.

[0148] In some embodiments, stage four described above is optional.

[0149] In some embodiments, after executing all the steps of the above-mentioned OTG front signal detection phase, the electronic device 100 may also send a message to the electronic device 200 indicating that the OTG front signal detection is completed, so as to carry out the detection of the next detection item. After receiving the above-mentioned message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0150] Phase 5: OTG reverse signal detection phase (also known as OTG reverse function detection phase)

[0151] S228-S229, the electronic device 100 sends an OTG reverse signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 7 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter the OTG reverse signal detection state.

[0152] In some embodiments, before executing the above step S228, the method further includes: the electronic device 200 sends information of the OTG reverse signal detection detection item (such as the name of the OTG reverse signal detection detection item and other information) to the electronic device 100. After receiving the information, the electronic device 100 can send an OTG reverse signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the OTG reverse signal detection state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information of the OTG reverse signal detection detection item sent by the electronic device 200.

[0153] After the electronic device 200 receives the OTG reverse signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the OTG reverse signal detection state, then the electronic device 200 can send a message 7 to the electronic device 100, which can be used to instruct the electronic device 200 to enter the OTG reverse signal detection state, so that the electronic device 100 can start to perform OTG reverse signal detection on the electronic device 200 after knowing that the electronic device 200 enters the OTG reverse signal detection state.

[0154] In some embodiments, after the electronic device 200 receives the OTG reverse signal detection instruction sent by the electronic device 100, if the electronic device 200 has not entered the OTG reverse signal detection state, then the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the OTG reverse signal detection state, so that the electronic device 100 can promptly know the state of the electronic device 200 and determine whether to start OTG reverse signal detection on the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the OTG reverse signal detection state, the electronic device 100 may resend the OTG reverse signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the OTG reverse signal detection state.

[0155] In some embodiments, the above-mentioned OTG reverse signal detection instruction may include information of the OTG reverse signal detection detection item (such as the name of the OTG reverse signal detection detection item and other information), and the above-mentioned message 7 may include information for indicating whether the information of the OTG reverse signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the OTG reverse signal detection instruction to the electronic device 200.

[0156] S230-S233, the electronic device 100 sends an OTG reverse detection signal to the electronic device 200, and then the electronic device 200 sends an OTG reverse signal detection result to the electronic device 100. After that, the electronic device 100 determines whether the OTG reverse signal detection result is passed, and if so, executes the steps in the next stage, and if not, records the detection result 4, and after the recording is completed, executes the steps in the next stage.

[0157] Among them, after receiving the OTG reverse side detection signal sent by the electronic device 100, the electronic device 200 can automatically perform OTG reverse side signal detection based on the OTG reverse side detection signal. After the detection is completed, an OTG reverse side signal detection result can be generated, and the OTG reverse side signal detection result can include information used to indicate whether the electronic device 200 passes the OTG reverse side signal detection. Further, the electronic device 200 can send the OTG reverse side signal detection result to the electronic device 100. After the electronic device 100 receives the OTG reverse side signal detection result sent by the electronic device 200, it can determine whether the OTG reverse side signal detection result is passed. If so, it means that the OTG reverse side function of the electronic device 200 is normal. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the OTG reverse side function of the electronic device 200 is abnormal. Further, the electronic device 100 can record the detection result 4, and the detection result 4 can include information used to indicate that the electronic device 200 did not pass the OTG reverse side signal detection. Further, after the detection result 4 is recorded, the electronic device 100 can execute the steps in the next stage.

[0158] In some embodiments, the OTG reverse signal detection instruction in the above step S228 may include information about the OTG reverse signal detection detection item (such as the name of the OTG reverse signal detection detection item and other information). Before executing the above step S230, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the OTG reverse signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the OTG reverse signal detection instruction to the electronic device 200.

[0159] In some embodiments, when the electronic device 200 passes the OTG reverse signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the OTG reverse signal detection.

[0160] In some embodiments, the electronic device 100 may also directly save the OTG reverse signal detection result sent by the electronic device 200. In this case, the electronic device 100 may not execute the above steps S232 to S233.

[0161] In some embodiments, stage five described above is optional.

[0162] In some embodiments, after executing all the steps of the above-mentioned OTG reverse signal detection phase, the electronic device 100 may also send a message to the electronic device 200 indicating that the OTG reverse signal detection is completed, so as to carry out the detection of the next detection item. After receiving the above-mentioned message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0163] The OTG function mentioned in the embodiment of the present application is an extended function of wireless communication devices and mobile devices, which can be used to connect different electronic devices to each other, exchange data, etc.

[0164] In some embodiments, the OTG front detection signal and the OTG back detection signal sent by the aforementioned electronic device 100 to the electronic device 200 may both refer to OTG device insertion signals, wherein the OTG front detection signal is the OTG device forward insertion signal, and the OTG back detection signal is the OTG device reverse insertion signal. The USB interface of the electronic device 200 may include a CC1 pin and a CC2 pin, wherein CC1 and CC2 may be two pins constituting a configuration channel (Configuration Channel, CC) of the electronic device 200. After the electronic device 200 detects the OTG device insertion signal sent by the aforementioned electronic device 100, the CC1 pin and the CC2 pin of the electronic device 200 may output different voltage values, and the OTG forward and reverse function detection may be performed by comparing these two different voltage values.

[0165] In one possible implementation, if the voltage value of the CC1 pin of the electronic device 200 is higher than the voltage value of the CC2 pin, it means that the electronic device 200 determines that the OTG device is inserted from the front (i.e., the insertion direction of the OTG device is forward); if the voltage value of the CC1 pin of the electronic device 200 is lower than the voltage value of the CC2 pin, it means that the electronic device 200 determines that the OTG device is inserted from the back (i.e., the insertion direction of the OTG device is reverse).

[0166] In another possible implementation, if the voltage value of the CC1 pin of the electronic device 200 is lower than the voltage value of the CC2 pin, it means that the electronic device 200 determines that the OTG device is inserted from the front (that is, the insertion direction of the OTG device is forward); if the voltage value of the CC1 pin of the electronic device 200 is higher than the voltage value of the CC2 pin, it means that the electronic device 200 determines that the OTG device is inserted from the back (that is, the insertion direction of the OTG device is reverse).

[0167] In some embodiments, the OTG front signal detection result or OTG back signal detection result sent by the aforementioned electronic device 200 to the electronic device 100 may include but is not limited to the following information: indication information on whether the OTG device has been inserted, and indication information on whether the OTG device is inserted frontally or backside.

[0168] It can be seen that the device functions of the electronic device 200 detected in the above-mentioned stage four (OTG front signal detection stage) and stage five (OTG back signal detection stage) are the OTG front function and the OTG back function, wherein the OTG front function and the OTG back function can also be referred to as the OTG device insertion direction identification function. The aforementioned electronic device 100 determines whether the OTG front signal detection result / OTG back signal detection result is passed, specifically, it can be: the electronic device 100 compares whether the OTG device insertion direction identification result and the OTG device insertion signal are consistent. If so, it means that the OTG device insertion direction identification function of the electronic device 200 is normal. It is easy to understand that if the OTG device insertion direction identification result is the aforementioned OTG front signal detection result, then the OTG device insertion signal is the aforementioned OTG front detection signal, and if the OTG device insertion direction identification result is the aforementioned OTG back signal detection result, then the OTG device insertion signal is the aforementioned OTG back detection signal.

[0169] Among them, the OTG device insertion direction identification result is consistent with the OTG device insertion signal, specifically: when the OTG device insertion signal is a forward insertion signal of the OTG device, the OTG device insertion direction identification result may include indication information that the insertion direction of the OTG device is forward; when the OTG device insertion signal is a reverse insertion signal of the OTG device, the OTG device insertion direction identification result may include indication information that the insertion direction of the OTG device is reverse.

[0170] Stage 6: High-voltage charging signal detection stage (also known as high-voltage DC fast charging function detection stage)

[0171] S234-S235, the electronic device 100 sends a high-voltage charging signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 8 to the electronic device 100, which is used to instruct the electronic device 200 to enter a high-voltage charging signal detection state.

[0172] In some embodiments, before executing the above step S234, the method further includes: the electronic device 200 sends information about the detection item of high-voltage charging signal detection to the electronic device 100 (for example, information such as the name of the detection item of high-voltage charging signal detection). After receiving the information, the electronic device 100 can send a high-voltage charging signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the high-voltage charging signal detection state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the detection item of high-voltage charging signal detection sent by the electronic device 200.

[0173] After the electronic device 200 receives the high-voltage charging signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the high-voltage charging signal detection state, then the electronic device 200 can send a message 8 to the electronic device 100, which can be used to indicate that the electronic device 200 enters the high-voltage charging signal detection state, so that the electronic device 100 can start high-voltage charging signal detection on the electronic device 200 after knowing that the electronic device 200 enters the high-voltage charging signal detection state.

[0174] In some embodiments, after the electronic device 200 receives the high-voltage charging signal detection instruction sent by the electronic device 100, if the electronic device 200 does not enter the high-voltage charging signal detection state, then the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the high-voltage charging signal detection state, so that the electronic device 100 can timely know the state of the electronic device 200 and determine whether to start high-voltage charging signal detection for the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the high-voltage charging signal detection state, the electronic device 100 may resend the high-voltage charging signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the high-voltage charging signal detection state.

[0175] In some embodiments, the above-mentioned high-voltage charging signal detection instruction may include information about the high-voltage charging signal detection detection item (such as the name of the high-voltage charging signal detection detection item, etc.), and the above-mentioned message 8 may include information for indicating whether the information about the high-voltage charging signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the high-voltage charging signal detection instruction to the electronic device 200.

[0176] S236-S239, the electronic device 100 sends a high-voltage charging detection signal to the electronic device 200, and then the electronic device 200 sends a high-voltage charging signal detection result to the electronic device 100. After that, the electronic device 100 determines whether the high-voltage charging signal detection result passes, and if so, executes the steps in the next stage, and if not, records the detection result 5, and after recording is completed, executes the steps in the next stage.

[0177] Among them, after receiving the high-voltage charging detection signal sent by the electronic device 100, the electronic device 200 can automatically perform high-voltage charging signal detection based on the high-voltage charging detection signal. After the detection is completed, a high-voltage charging signal detection result can be generated, and the high-voltage charging signal detection result can include information used to indicate whether the electronic device 200 passes the high-voltage charging signal detection. Further, the electronic device 200 can send the high-voltage charging signal detection result to the electronic device 100. After the electronic device 100 receives the high-voltage charging signal detection result sent by the electronic device 200, it can determine whether the high-voltage charging signal detection result is passed. If so, it means that the high-voltage charging identification function of the electronic device 200 is normal and can support high-voltage charging. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the high-voltage charging identification function of the electronic device 200 is abnormal. Further, the electronic device 100 can record the detection result 5, and the detection result 5 may include information used to indicate that the electronic device 200 did not pass the high-voltage charging signal detection. Further, after the detection result 5 is recorded, the electronic device 100 can execute the steps in the next stage.

[0178] In some embodiments, the high-voltage charging signal detection instruction in the above step S234 may include information about the high-voltage charging signal detection detection item (such as the name of the high-voltage charging signal detection detection item and other information). Before executing the above step S236, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the high-voltage charging signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the high-voltage charging signal detection instruction to the electronic device 200.

[0179] In some embodiments, when the electronic device 200 passes the high-voltage charging signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the high-voltage charging signal detection.

[0180] In some embodiments, the electronic device 100 may also directly save the high-voltage charging signal detection result sent by the electronic device 200. In this case, the electronic device 100 may not execute the above steps S238-S239.

[0181] In some embodiments, stage six described above is optional.

[0182] In some embodiments, after executing all the steps of the high-voltage charging signal detection phase, the electronic device 100 may also send a message to the electronic device 200 indicating that the high-voltage charging signal detection is completed, so as to carry out the detection of the next detection item. After receiving the above message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0183] Stage 7: Low-voltage charging signal detection stage (also known as low-voltage DC fast charging function detection stage)

[0184] S240-S241, the electronic device 100 sends a low-voltage charging signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 9 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter a low-voltage charging signal detection state.

[0185] In some embodiments, before executing the above step S240, the method further includes: the electronic device 200 sends information about the low-voltage charging signal detection detection item (such as the name of the low-voltage charging signal detection detection item and other information) to the electronic device 100. After receiving the information, the electronic device 100 can send a low-voltage charging signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the low-voltage charging signal detection state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the low-voltage charging signal detection detection item sent by the electronic device 200.

[0186] After the electronic device 200 receives the low-voltage charging signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the low-voltage charging signal detection state, then the electronic device 200 can send a message 9 to the electronic device 100, which can be used to indicate that the electronic device 200 enters the low-voltage charging signal detection state, so that the electronic device 100 can start low-voltage charging signal detection on the electronic device 200 after knowing that the electronic device 200 enters the low-voltage charging signal detection state.

[0187] In some embodiments, after the electronic device 200 receives the low-voltage charging signal detection instruction sent by the electronic device 100, if the electronic device 200 does not enter the low-voltage charging signal detection state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the low-voltage charging signal detection state, so that the electronic device 100 can timely know the state of the electronic device 200 and determine whether to start low-voltage charging signal detection for the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the low-voltage charging signal detection state, the electronic device 100 may resend the low-voltage charging signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the low-voltage charging signal detection state.

[0188] In some embodiments, the above-mentioned low-voltage charging signal detection instruction may include information about the low-voltage charging signal detection detection item (such as the name of the low-voltage charging signal detection detection item, etc.), and the above-mentioned message 9 may include information for indicating whether the information about the low-voltage charging signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the low-voltage charging signal detection instruction to the electronic device 200.

[0189] S242-S245, the electronic device 100 sends a low-voltage charging detection signal to the electronic device 200, and then the electronic device 200 sends a low-voltage charging signal detection result to the electronic device 100. After that, the electronic device 100 determines whether the low-voltage charging signal detection result passes, and if so, executes the steps in the next stage, and if not, records the detection result 6, and after recording is completed, executes the steps in the next stage.

[0190] Among them, after receiving the low-voltage charging detection signal sent by the electronic device 100, the electronic device 200 can automatically perform low-voltage charging signal detection based on the low-voltage charging detection signal. After the detection is completed, a low-voltage charging signal detection result can be generated, and the low-voltage charging signal detection result can include information used to indicate whether the electronic device 200 passes the low-voltage charging signal detection. Further, the electronic device 200 can send the low-voltage charging signal detection result to the electronic device 100. After the electronic device 100 receives the low-voltage charging signal detection result sent by the electronic device 200, it can determine whether the low-voltage charging signal detection result is passed. If so, it means that the low-voltage charging identification function of the electronic device 200 is normal and can support low-voltage charging. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the low-voltage charging identification function of the electronic device 200 is abnormal. Further, the electronic device 100 can record the detection result 6, and the detection result 6 may include information used to indicate that the electronic device 200 did not pass the low-voltage charging signal detection. Further, after the detection result 6 is recorded, the electronic device 100 can execute the steps in the next stage.

[0191] In some embodiments, the low-voltage charging signal detection instruction in the above step S240 may include information about the low-voltage charging signal detection detection item (such as the name of the low-voltage charging signal detection detection item and other information). Before executing the above step S242, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the low-voltage charging signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the low-voltage charging signal detection instruction to the electronic device 200.

[0192] In some embodiments, when the electronic device 200 passes the low-voltage charging signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the low-voltage charging signal detection.

[0193] In some embodiments, the electronic device 100 may also directly save the low voltage charging signal detection result sent by the electronic device 200. In this case, the electronic device 100 may not execute the above steps S244 to S245.

[0194] In some embodiments, stage seven described above is optional.

[0195] In some embodiments, after executing all the steps of the above-mentioned low-voltage charging signal detection stage, the electronic device 100 may also send a message to the electronic device 200 indicating that the low-voltage charging signal detection is completed, so as to carry out the detection of the next detection item. After receiving the above-mentioned message, the electronic device 200 may also send a message to the electronic device 100 indicating that it has entered the state of the next detection item to be detected.

[0196] Phase 8: PD charging signal detection phase (also known as PD fast charging function detection phase)

[0197] The PD fast charging mentioned in the embodiment of the present application is a fast charging standard developed by the American Electronics Industry Association and is one of the mainstream fast charging protocols.

[0198] S246-S247, the electronic device 100 sends a PD charging signal detection instruction to the electronic device 200, and then the electronic device 200 sends a message 10 to the electronic device 100, where the message is used to instruct the electronic device 200 to enter a PD charging signal detection state.

[0199] In some embodiments, before executing the above step S246, the method further includes: the electronic device 200 sends information about the detection item of PD charging signal detection (such as the name of the detection item of PD charging signal detection, etc.) to the electronic device 100. After receiving the information, the electronic device 100 can send a PD charging signal detection instruction to the electronic device 200 based on the information, and the instruction can be used to trigger the electronic device 200 to enter the PD charging signal detection state, and the instruction can also be used to notify the electronic device 200 that the electronic device 100 has received the information about the detection item of PD charging signal detection sent by the electronic device 200.

[0200] After the electronic device 200 receives the PD charging signal detection instruction sent by the electronic device 100, if the electronic device 200 enters the PD charging signal detection state, then the electronic device 200 can send a message 10 to the electronic device 100, which can be used to instruct the electronic device 200 to enter the PD charging signal detection state, so that the electronic device 100 can start to perform PD charging signal detection on the electronic device 200 after knowing that the electronic device 200 enters the PD charging signal detection state.

[0201] In some embodiments, after the electronic device 200 receives the PD charging signal detection instruction sent by the electronic device 100, if the electronic device 200 does not enter the PD charging signal detection state, the electronic device 200 may also send a message to the electronic device 100 indicating that the electronic device 200 has not entered the PD charging signal detection state, so that the electronic device 100 can timely know the state of the electronic device 200 and determine whether to start PD charging signal detection for the electronic device 200. After the electronic device 100 receives the message sent by the electronic device 200 indicating that the electronic device 200 has not entered the PD charging signal detection state, the electronic device 100 may resend the PD charging signal detection instruction to the electronic device 200 to trigger the electronic device 200 to enter the PD charging signal detection state.

[0202] In some embodiments, the above-mentioned PD charging signal detection instruction may include information about the PD charging signal detection detection item (such as the name of the PD charging signal detection detection item and other information), and the above-mentioned message 10 may include information for indicating whether the information about the PD charging signal detection detection item is correct. If correct, the electronic device 100 may continue to execute subsequent steps. If incorrect, the electronic device 100 may re-send the PD charging signal detection instruction to the electronic device 200.

[0203] S248-S251, the electronic device 100 sends a PD charging detection signal to the electronic device 200, and then the electronic device 200 sends a PD charging signal detection result to the electronic device 100. After that, the electronic device 100 determines whether the PD charging signal detection result passes, and if so, executes the steps in the next stage, and if not, records the detection result 7, and after recording is completed, executes the steps in the next stage.

[0204] Among them, after receiving the PD charging detection signal sent by the electronic device 100, the electronic device 200 can automatically perform PD charging signal detection based on the PD charging detection signal. After the detection is completed, a PD charging signal detection result can be generated, and the PD charging signal detection result can include information used to indicate whether the electronic device 200 passes the PD charging signal detection. Further, the electronic device 200 can send the PD charging signal detection result to the electronic device 100. After the electronic device 100 receives the PD charging signal detection result sent by the electronic device 200, it can determine whether the PD charging signal detection result is passed. If so, it means that the PD charging identification function of the electronic device 200 is normal and can support PD charging. Further, the electronic device 100 can execute the steps in the next stage; if not, it means that the PD charging identification function of the electronic device 200 is abnormal. Further, the electronic device 100 can record the detection result 7, and the detection result 7 may include information used to indicate that the electronic device 200 did not pass the PD charging signal detection. Further, after the detection result 7 is recorded, the electronic device 100 can execute the steps in the next stage.

[0205] In some embodiments, the PD charging signal detection instruction in the above step S246 may include information about the PD charging signal detection detection item (such as the name of the PD charging signal detection detection item and other information). Before executing the above step S248, the method also includes: the electronic device 200 sends information to the electronic device 100 to indicate whether the information about the PD charging signal detection detection item is correct. If correct, the electronic device 100 can continue to execute subsequent steps. If incorrect, the electronic device 100 can re-send the PD charging signal detection instruction to the electronic device 200.

[0206] In some embodiments, when the electronic device 200 passes the PD charging signal detection, the electronic device 100 may also record the detection result, which may include information indicating that the electronic device 200 passes the PD charging signal detection.

[0207] In some embodiments, the electronic device 100 may also directly save the PD charging signal detection result sent by the electronic device 200. In this case, the electronic device 100 may not perform the above steps S250 to S251.

[0208] In some embodiments, stage eight described above is optional.

[0209] In some embodiments, after executing all the steps of the above low-voltage charging signal detection phase, the electronic device 100 may also send a message to the electronic device 200 that the PD charging signal detection is completed, so as to carry out the detection of the next detection item. After receiving the above message, the electronic device 200 may also send a message to the electronic device 100 that it has entered the state of the next detection item to be detected.

[0210] It can be seen that the device function of the electronic device 200 detected in the above stage 6 (high voltage charging signal detection stage), stage 7 (low voltage charging signal detection stage), and stage 8 (PD charging signal detection stage) is a charging type identification function. Among them, the charging type may include but is not limited to high voltage DC fast charging, low voltage DC fast charging, and PD fast charging.

[0211] The electronic device 100 can compare whether the charging type identification result and the power supply signal are consistent. If so, it means that the charging type identification function of the electronic device 200 is normal. The charging type identification result can be, for example, the aforementioned high-voltage charging signal detection result, or, the low-voltage charging signal detection result, or, the PD charging signal detection result; the power supply signal can be, for example, the aforementioned high-voltage charging detection signal (or high-voltage power supply signal), or, the low-voltage charging detection signal (or low-voltage power supply signal), or, the PD charging detection signal.

[0212] Exemplarily, assuming that the power supply signal is the aforementioned high-voltage charging detection signal, then the corresponding charging type identification result may include information indicating that the charging type is high-voltage fast charging (or high-voltage DC fast charging).

[0213] Exemplarily, assuming that the power supply signal is the aforementioned low-voltage charging detection signal, then the corresponding charging type identification result may include information indicating that the charging type is low-voltage fast charging (or low-voltage DC fast charging).

[0214] Exemplarily, assuming that the power supply signal is the aforementioned PD charging detection signal, then the corresponding charging type identification result may include information indicating that the charging type is PD fast charging.

[0215] In some embodiments, after each test item is completed, the electronic device 200 can display relevant information indicating whether the test item has passed, so that the tester can know whether the test item has passed in a timely manner.

[0216] In some embodiments, after completing the PD charging signal detection on the electronic device 200, if the electronic device 100 has completed all the detection items on the electronic device 200, the electronic device 200 may display relevant information indicating that all the detection items have been completed / ended, so that the tester can promptly know whether the electronic device 100 has completed the device function detection work on the electronic device 200.

[0217] In an embodiment of the present application, the electronic device 100 can support parallel device function detection of multiple electronic devices 200. For example, after the electronic device 100 completes the detection of the first detection item on the first electronic device 200, the electronic device 100 can then perform the detection of the first detection item on the second electronic device 200, and at the same time perform the detection of the second detection item on the first electronic device 200. After the electronic device 100 completes the detection of the first detection item on the second electronic device 200 and completes the detection of the second detection item on the first electronic device 200, the electronic device 100 can then perform the detection of the first detection item on the third electronic device 200, and at the same time perform the detection of the second detection item on the second electronic device 200, and perform the detection of the third detection item on the first electronic device 100, and so on. For example, after the electronic device 100 completes the above-mentioned analog headphone signal detection on the first electronic device 200, the electronic device 100 can then perform the analog headphone signal detection on the second electronic device 200, and at the same time perform the digital headphone signal detection on the first electronic device 200.

[0218] An exemplary electronic device 100 provided in an embodiment of the present application is introduced below.

[0219] Figure 3 It is a structural diagram of an electronic device 100 provided in an embodiment of the present application.

[0220] like Figure 3 As shown, the electronic device 100 may include: a switch module 301, a control module 302, a signal simulation module 303, a power module 304, etc. The signal simulation module 303 (also referred to as a test module or a detection module) may include an analog earphone signal module 303A, a digital earphone signal module 303B, an OTG front test module 303C, an OTG back test module 303D, a high-voltage DC fast charging module 303E, a low-voltage DC fast charging module 303F, a PD fast charging module 303G, etc.

[0221] The switch module 301 can be used to receive an audio signal sent by the electronic device 200 (for example, the aforementioned Figure 2The audio signal 1 shown in FIG. 1 ) When the audio signal is an analog signal, the switch module 301 can send the audio signal to the analog earphone signal module 303A; when the audio signal is a digital signal, the switch module 301 can send the audio signal to the digital earphone signal module 303B.

[0222] The switch module 301 can also be used to receive signals sent by the signal simulation module 303, for example, the voice analog signal sent by the analog headphone signal module 303A, the voice digital signal sent by the digital headphone signal module 303B, the OTG front detection signal sent by the OTG front test module 303C, the OTG back detection signal sent by the OTG back test module 303D, the high-voltage charging detection signal sent by the high-voltage DC fast charging module 303E, the low-voltage charging detection signal sent by the low-voltage DC fast charging module 303F, the PD charging detection signal sent by the PD fast charging module 303G, etc.; it can also be used to send the signals sent by the above-mentioned signal simulation module 303 to the electronic device 200.

[0223] The switch module 301 may also be used to communicate with the control module 302 , for example, to receive a signal output selection instruction sent by the control module 302 , so that the switch module 301 may determine which module in the signal simulation module 303 to interact with based on the instruction.

[0224] In a possible implementation, the switch module 301 may communicate with the electronic device 200 via wired communication (eg, communication via a data line connected via a Type-C interface).

[0225] The control module 302 can be used to communicate with the electronic device 200 via wired communication (e.g., communication via a data line connected to a Type-C interface) or wireless communication (e.g., WiFi, Bluetooth, etc.). Figure 2 In the initialization phase shown, the control module 302 can send a detected status feedback instruction to the electronic device 200, and can also receive a message 1 sent by the electronic device 200; for example, at the beginning of each stage of device function detection, the control module 302 can send instructions to the electronic device 200 (such as analog / digital headphone signal detection instructions, audio playback instructions, OTG front / back signal detection instructions, high voltage / low voltage / PD charging signal detection instructions, etc.), and can also receive detection results sent by the electronic device 200 (such as OTG front / back signal detection results, high voltage / low voltage / PD charging signal detection results, etc.); and so on.

[0226] In a possible implementation, the control module 302 may include a programmable microcontroller unit (MCU), which is a microcontroller, which is a processor that can control the main components of the device. It contains a kernel that can execute an operating system, some memory, and interfaces for some external devices. Its function is to achieve the purpose of controlling the entire system by controlling external devices. The MCU can collect and process information from external devices and send this information to external devices, thereby achieving control and operation of the entire system. The technical principle of MCU is mainly to integrate a microprocessor, peripherals, memory and other special circuits together, and can design and develop microcontroller applications through programming languages ​​such as C / C++, Java, Python, Assembly and other programming languages ​​to achieve control, calculation and information transmission and reception functions. It can add a variety of peripherals as needed, such as analog input and output, digital input and output, interrupt controller, timer, comparator, serial bus controller, etc., to achieve specific functions.

[0227] The control module 302 may also be used to communicate with the switch module 301. For example, the control module 302 may send a selection signal output instruction to the switch module 301, so as to inform the switch module 301 which module in the signal simulation module 303 to interact with.

[0228] In a possible implementation, the control module 302 may communicate with the switch module 301 via serial port communication.

[0229] The control module 302 may also be used to communicate with the signal simulation module 303. For example, the control module 302 may send a control signal to the signal simulation module 303 to instruct the signal simulation module 303 to start the device function detection work; the control module 302 may also be used to receive a signal sent by the signal simulation module 303 (such as a feedback signal for starting the device function detection work, etc.).

[0230] In a possible implementation, the control module 302 may communicate with the signal simulation module 303 via a controller area network (CAN).

[0231] The control module 302 can also be used to determine whether the test result sent by the electronic device 200 is passed; it can also be used to record the above test result.

[0232] The signal simulation module 303 can be used to communicate with the switch module 301. For example, it can send signals (such as voice simulation signals, voice digital signals, OTG front / back detection signals, high voltage / low voltage / PD charging detection signals, etc.) to the switch module 301; or receive signals (such as audio signals, etc.) sent by the switch module 301.

[0233] In a possible implementation, the OTG front / rear detection signal and the high voltage / low voltage / PD charging detection signal may be sent by the signal simulation module 303 to the switch module 301 via the control module 302 .

[0234] The signal simulation module 303 can also be used to communicate with the control module 302. For example, receiving a control signal sent by the control module 302 so that the signal simulation module 303 can start the device function detection work based on the control signal; for another example, sending a signal to the control module 302 (such as a feedback signal for starting the device function detection work, etc.); and so on.

[0235] The analog headphone signal module 303A can be used to send a voice analog signal (also called an analog headphone signal) to the electronic device 200 through the switch module 301; it can also be used to receive an audio signal sent by the electronic device 200 through the switch module 301; it can also be used to determine whether the voice analog signal is consistent with the audio signal and generate a detection result; it can also be used to send the above detection result to the control module 302; and so on.

[0236] The analog headphone signal module 303A may include an analog headphone signal detection circuit. The principle of the analog headphone signal detection circuit will be described in detail in subsequent embodiments and will not be expanded here.

[0237] The digital headphone signal module 303B can be used to send a voice digital signal (also called a digital headphone signal) to the electronic device 200 through the switch module 301; it can also be used to receive an audio signal sent by the electronic device 200 through the switch module 301; it can also be used to determine whether the voice digital signal is consistent with the audio signal and generate a detection result; it can also be used to send the above detection result to the control module 302; and so on.

[0238] The digital headphone signal module 303B may include a digital headphone signal detection circuit. The principle of the digital headphone signal detection circuit will be described in detail in subsequent embodiments and will not be expanded here.

[0239] In a possible implementation, the above-mentioned voice digital signal may be generated by the digital earphone signal module 303B converting the voice analog signal through an analog-to-digital conversion chip. The above-mentioned voice analog signal may be generated by the analog earphone signal module 303A and sent to the digital earphone signal module 303B.

[0240] The OTG positive test module 303C can be used to communicate with the switch module 301 , for example, to send an OTG positive detection signal to the switch module 301 ; it can also be used to communicate with the control module 302 .

[0241] The OTG reverse side test module 303D can be used to communicate with the switch module 301 , for example, to send an OTG reverse side detection signal to the switch module 301 ; it can also be used to communicate with the control module 302 .

[0242] The high-voltage DC fast charging module 303E can be used to communicate with the switch module 301 , for example, to send a high-voltage charging detection signal to the switch module 301 ; it can also be used to communicate with the control module 302 .

[0243] The low-voltage DC fast charging module 303F can be used to communicate with the switch module 301 , for example, to send a low-voltage charging detection signal to the switch module 301 ; it can also be used to communicate with the control module 302 .

[0244] The PD fast charging module 303G can be used to communicate with the switch module 301 , for example, to send a PD charging detection signal to the switch module 301 ; it can also be used to communicate with the control module 302 .

[0245] Among them, the above-mentioned OTG front test module 303C and OTG back test module 303D can be collectively referred to as OTG modules or OTG signal modules; the above-mentioned high-voltage DC fast charging module 303E, low-voltage DC fast charging module 303F and PD fast charging module 303G can be collectively referred to as power signal modules or charging modules.

[0246] In a possible implementation, the structure of the above-mentioned OTG signal module can reuse the structure of the U disk and the adapter circuit. The electronic device 100 may include an OTG interface, and the OTG interface can be inserted into an OTG device (such as a U disk, etc.), and the OTG device can generate an OTG device insertion signal (such as the aforementioned OTG front / rear detection signal), and the electronic device 100 can insert the OTG device into the OTG interface. The OTG device insertion signal generated by the OTG device is transmitted to the electronic device 200 through the USB interface of the electronic device 200. Among them, the signal source of the above-mentioned OTG signal module (such as the signal source of the aforementioned OTG front / rear detection signal) can be, for example, a U disk directly plugged into the electronic device 100. In another possible implementation, the electronic device 100 can also simulate the above-mentioned OTG device insertion signal (such as the aforementioned OTG front / rear detection signal), and transmit the OTG device insertion signal to the electronic device 200 through the USB interface of the electronic device 200.

[0247] In one possible implementation, the circuit structure of the power signal module can reuse the circuit structure supported by the high-voltage / low-voltage DC fast charging protocol (for example, 9V / 2A, 11V / 6A, 20V / 5A, etc. high-voltage / low-voltage DC fast charging protocol), PD fast charging protocol, etc. The electronic device 100 may include a power interface (or charging interface), through which the power supply can be connected, the power supply can generate a power supply signal, and the electronic device 100 can transmit the power supply signal generated by the power supply being inserted into the power interface to the electronic device 200 through the USB interface of the electronic device 200. Among them, the signal source of the power signal module (for example, the signal source of the aforementioned high-voltage / low-voltage / PD charging detection signal, etc.) can be, for example, a power supply connected to a charger directly plugged into the electronic device 100. In another possible implementation, the electronic device 100 can also simulate the aforementioned power supply signal, such as the aforementioned high-voltage / low-voltage / PD charging detection signal, and transmit the power supply signal to the electronic device 200 through the USB interface of the electronic device 200.

[0248] It is easy to understand that the above-mentioned power signal module may include but is not limited to a high-voltage DC fast charging module 303E, a low-voltage DC fast charging module 303F and a PD fast charging module 303G.

[0249] The power module 304 can be used to supply power to the switch module 301 , the control module 302 and the signal simulation module 303 .

[0250] For more details about the functions of the various internal modules of the electronic device 100, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0251] Understandably, Figure 3The illustrated structure does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may have a Figure 3 More or less components shown in the figure may be combined with two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0252] The following is a schematic diagram of the principle of an analog headphone signal detection circuit provided in an embodiment of the present application.

[0253] Figure 4 The principle of an analog headphone signal detection circuit provided in an embodiment of the present application is exemplified.

[0254] like Figure 4 As shown, the analog headphone signal detection circuit may include: a storage module 401 , a micro control unit 402 , a digital-to-analog conversion module 403 , a power amplification module 404 , a switch module 405 , a voltage detection module 406 , and a digital-to-analog conversion module 407 .

[0255] Among them, the storage module 401 can be connected to the micro control unit 402, the micro control unit 402 can be connected to the digital-to-analog conversion module 403 and the digital-to-analog conversion module 407, the digital-to-analog conversion module 403 can be connected to the power amplifier module 404, the power amplifier module 404 can be connected to the switch module 405, the switch module 405 can be connected to the voltage detection module 406, and the voltage detection module 406 can be connected to the digital-to-analog conversion module 407.

[0256] The switch module 405 may be, for example, the aforementioned Figure 3 The switch module 301 is shown.

[0257] The process of analog headphone signal detection is exemplarily described below in conjunction with the above analog headphone signal detection circuit.

[0258] First, the storage module 401 can store an audio file, the microcontroller unit 402 can read the audio file, and generate a voice digital signal based on the audio file. Further, the microcontroller unit 402 can convert the voice digital signal into a voice analog signal through the digital-to-analog conversion module 403, and can send the voice analog signal to the switch module 405 after power amplification through the power amplifier module 404. Further, the switch module 405 can send the voice analog signal after power amplification to the device under test (for example, the electronic device 200). Further, the device under test can record the voice analog signal to generate an audio signal (for example, the aforementioned Figure 2The audio signal 1 shown in the figure can be sent to the switch module 405. Further, the switch module 405 can send the audio signal to the voltage detection module 406. Further, the voltage detection module 406 can compare the voltage value of the audio signal (for example, the effective value of the voltage of the audio signal) with a preset voltage value (also referred to as a normal voltage value, that is, the voltage value corresponding to the audio signal when the analog headphone signal recording function and the output function of the tested device are normal). If the voltage value of the audio signal is lower than the preset voltage value, it indicates that the test has not passed and the tested device may have a fault, for example, the impedance may increase due to port corrosion; for example, the internal circuit of the tested device may be open circuited; and so on. Furthermore, in the case that the above-mentioned audio signal is a digital signal, the voltage detection module 406 can also convert the above-mentioned audio signal into an analog signal through the digital-to-analog conversion module 407, and send the analog signal to the microcontroller unit 402. Further, the microcontroller unit 402 can determine whether the frequency of the analog signal is consistent with the frequency of the above-mentioned voice analog signal sent to the device under test. If not (that is, the frequency has changed), it means that the test has failed and the device under test may have a fault. For example, the lines for recording and / or outputting the analog headphone signal in the device under test are damaged; for example, there are interference signals in the analog headphone signal recording process; and so on.

[0259] In a possible implementation, the voltage detection module 406 may also be connected to the micro control unit 402. In this case, if the audio signal is an analog signal, the voltage detection module 406 may directly send the audio signal to the micro control unit 402.

[0260] It is easy to understand that through the above-mentioned analog headphone signal detection circuit, the electronic device 100 can simulate an audio signal of a voice simulation signal, and can transmit the audio signal to the electronic device 200 through the USB interface (such as the Type-C interface) of the electronic device 200.

[0261] It should be noted that the embodiments of the present application do not limit the frequency and waveform of the above-mentioned voice simulation signal. For example, the frequency of the above-mentioned voice simulation signal can be one or more; for another example, the waveform of the above-mentioned voice simulation signal can be a sine wave, a cosine wave, etc. For example, the above-mentioned voice simulation signal can be a sine wave of three frequency bands: 100Hz, 1000Hz, and 10000Hz.

[0262] It should be noted that the embodiment of the present application does not limit the audio content of the above audio file. For example, the audio content of the above audio file may be "1, 2, 3, 4, 5, 6, 7, 8, 9, 10".

[0263] It can be seen that through the above-mentioned analog headphone signal detection circuit, the test equipment (such as electronic device 100) can determine whether the analog headphone signal is a normal voice signal, so as to automatically identify whether the tested device has a fault. There is no need for the tester to subjectively determine whether the analog headphone signal is a normal voice signal, nor is there a need for the tester to manually identify the fault, thereby improving the accuracy and efficiency of the test.

[0264] It is understandable that the above Figure 4 The structure and principle of the analog headphone signal detection circuit shown are merely exemplary and should not be construed as limiting the present application. In other embodiments of the present application, the circuit used in the analog headphone signal detection process may also be of other structures.

[0265] The following is a schematic diagram of the principle of a digital headphone signal detection circuit provided in an embodiment of the present application.

[0266] Figure 5 The principle of a digital headphone signal detection circuit provided by an embodiment of the present application is exemplified.

[0267] like Figure 5 As shown, the digital headphone signal detection circuit may include: a storage module 501 , a micro control unit 502 , a power amplification module 503 , a switch module 504 , and a voltage detection module 505 .

[0268] The storage module 501 may be connected to the micro control unit 502 , the micro control unit 502 may be connected to the power amplifier module 503 and the voltage detection module 505 , the power amplifier module 503 may be connected to the switch module 504 , and the switch module 504 may be connected to the voltage detection module 505 .

[0269] The switch module 504 may be, for example, the aforementioned Figure 3 The switch module 301 is shown.

[0270] The process of digital headphone signal detection is exemplarily described below in conjunction with the above-mentioned digital headphone signal detection circuit.

[0271] First, the storage module 501 can store an audio file, the micro control unit 502 can read the audio file, and generate a voice digital signal based on the audio file. Further, the micro control unit 502 can amplify the voice digital signal through the power amplifier module 503 and then send it to the switch module 504. Further, the switch module 504 can send the voice digital signal after power amplification to the device under test (for example, the electronic device 200). Further, the device under test can record the voice digital signal to generate an audio signal (for example, the aforementioned Figure 2The audio signal 2 shown in the figure can be sent to the switch module 504. Further, the switch module 504 can send the audio signal to the voltage detection module 505. Further, the voltage detection module 505 can compare the voltage value of the audio signal (for example, the effective value of the voltage of the audio signal) with a preset voltage value (also referred to as a normal voltage value, that is, the voltage value corresponding to the audio signal when the digital headphone signal recording function and the output function of the tested device are normal). If the voltage value of the audio signal is lower than the preset voltage value, it indicates that the test has not passed and the tested device may have a fault, for example, the impedance may increase due to port corrosion; for example, there may be a short circuit in the internal circuit of the tested device; and so on. Furthermore, the voltage detection module 505 can also send the audio signal to the micro control unit 502. Further, the micro control unit 502 can determine whether the audio signal is consistent with the voice digital signal sent to the device under test. If not (that is, the signal has changed), it means that the test has not passed and the device under test may have a fault. For example, the circuits for recording and / or outputting the digital headphone signal in the device under test are damaged; for example, there are interference signals in the digital headphone signal recording process; and so on.

[0272] It is easy to understand that through the above-mentioned digital headphone signal detection circuit, the electronic device 100 can simulate an audio signal of a voice digital signal, and can transmit the audio signal to the electronic device 200 through the USB interface (such as the Type-C interface) of the electronic device 200.

[0273] It should be noted that the embodiment of the present application does not limit the audio content of the above audio file. For example, the audio content of the above audio file may be "1, 2, 3, 4, 5, 6, 7, 8, 9, 10".

[0274] It can be seen that through the above-mentioned digital headphone signal detection circuit, the test equipment (such as electronic device 100) can determine whether the digital headphone signal is a normal voice signal, so as to automatically identify whether the tested device has a fault. There is no need for the tester to subjectively determine whether the digital headphone signal is a normal voice signal, nor is there a need for the tester to manually identify the fault, thereby improving the accuracy and efficiency of the test.

[0275] It is understandable that the above Figure 5 The structure and principle of the digital headphone signal detection circuit shown are merely exemplary and should not be construed as limiting the present application. In other embodiments of the present application, the circuit used in the digital headphone signal detection process may also be of other structures.

[0276] The following is a schematic diagram of the structure of an electronic device 200 provided in an embodiment of the present application.

[0277] Figure 6 The structure of an electronic device 200 provided in an embodiment of the present application is exemplarily shown.

[0278] like Figure 6 As shown, the electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a camera 293, a display screen 294, etc. The sensor module 280 may include a pressure sensor 280A, a touch sensor 280B, etc.

[0279] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0280] The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0281] The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

[0282] The USB interface 230 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the electronic device 200, and can also be used to transmit data between the electronic device 200 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other terminal devices.

[0283] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0284] The charging management module 240 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0285] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240 to power the processor 210, the internal memory 221, the external memory 220, the display screen 294, the camera 293, etc.

[0286] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode or an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.

[0287] The camera 293 is used to capture still images or videos. The electronic device 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.

[0288] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 200 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0289] The video codec is used to compress or decompress digital video. The electronic device 200 may support one or more video codecs. In this way, the electronic device 200 may play or record videos in multiple coding formats.

[0290] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0291] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0292] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. The program storage area may store an operating system, applications required for at least one function (such as face recognition function, fingerprint recognition function, mobile payment function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as face information template data, fingerprint information template, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0293] The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.

[0294] The audio module 270 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be arranged in the processor 210, or some functional modules of the audio module 270 can be arranged in the processor 210.

[0295] The speaker 270A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 200 can listen to music or listen to a hands-free call through the speaker 270A.

[0296] The receiver 270B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 200 receives a call or voice message, the voice can be received by placing the receiver 270B close to the human ear.

[0297] Microphone 270C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0298] The earphone interface 270D is used to connect a wired earphone and can be a USB interface 230, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0299] The pressure sensor 280A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 280A can be set on the display screen 294. There are many types of pressure sensors 280A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 280A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 294, the electronic device 200 detects the intensity of the touch operation according to the pressure sensor 280A. The electronic device 200 can also calculate the touch position based on the detection signal of the pressure sensor 280A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.

[0300] The touch sensor 280B is also called a "touch panel". The touch sensor 280B can be arranged on the display screen 294, and the touch sensor 280B and the display screen 294 form a touch screen, also called a "touch screen". The touch sensor 280B is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 294. In other embodiments, the touch sensor 280B can also be arranged on the surface of the electronic device 200, which is different from the position of the display screen 294.

[0301] It should be understood that Figure 6 The electronic device 200 shown is only an example, and the electronic device 200 may have more Figure 6 More or fewer components may be shown, two or more components may be combined, or there may be a different configuration of components. Figure 6 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0302] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0303] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0304] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0305] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A device function detection method, applied to a first electronic device, characterized in that: The method comprises: The first electronic device establishes a first communication connection with the second electronic device through the USB interface of the second electronic device; the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, and the multiple device functions of the second electronic device are device functions provided by the second electronic device based on the USB interface of the second electronic device; wherein, after one of the device functions is detected, another of the device functions is started to be detected; and the condition for starting to detect the other device function of the second electronic device is that the detection of the one device function is completed.

2. The method according to claim 1, characterized in that The multiple device functions include: audio input and output functions; the first electronic device detects the multiple device functions of the second electronic device based on the first communication connection, specifically including: The first electronic device simulates the audio signal received by the USB interface, and transmits the audio signal to the second electronic device through the USB interface of the second electronic device; The second electronic device records the audio signal and returns the recorded audio signal to the first electronic device; The first electronic device compares the recorded audio signal with the audio signal received by the USB interface simulated by the first electronic device to see if they are consistent. If so, the audio input and output function is normal.

3. The method according to claim 1, characterized in that The multiple device functions include: an OTG device insertion direction identification function; the first electronic device detects the multiple device functions of the second electronic device based on the first communication connection, specifically including: The first electronic device outputs an OTG device insertion signal that can be detected by the USB interface; The second electronic device outputs an OTG device insertion direction identification result based on the OTG device insertion signal, and returns the OTG device insertion direction identification result to the first electronic device; The first electronic device compares the OTG device insertion direction identification result with the OTG device insertion signal to see whether they are consistent. If so, the OTG device insertion direction identification function is normal.

4. The method according to claim 3, characterized in that The first electronic device outputting an OTG device insertion signal that can be detected by the USB interface specifically includes: The first electronic device simulates an OTG device insertion signal that can be detected by the USB interface, and transmits the OTG device insertion signal to the second electronic device through the USB interface of the second electronic device.

5. The method according to claim 3, characterized in that: The first electronic device includes an OTG interface, an OTG device is inserted into the OTG interface, and the first electronic device outputs an OTG device insertion signal that can be detected by the USB interface, specifically including: The first electronic device inserts the OTG device into the OTG interface and generates an OTG device insertion signal which is transmitted to the second electronic device through the USB interface of the second electronic device.

6. The method according to any one of claims 3 to 5, characterized in that: The OTG device insertion signal output by the first electronic device is an OTG device forward insertion signal, and the OTG device insertion direction identification result consistent with the OTG device forward insertion signal includes indication information that the insertion direction of the OTG device is forward; or, The OTG device insertion signal output by the first electronic device is an OTG device reverse insertion signal, and the OTG device insertion direction identification result consistent with the OTG device reverse insertion signal includes indication information that the insertion direction of the OTG device is reverse.

7. The method according to claim 1, characterized in that The multiple device functions include: a charging type identification function; the first electronic device detects the multiple device functions of the second electronic device based on the first communication connection, specifically including: The first electronic device outputs a power supply signal that can be detected by the USB interface; The second electronic device outputs a charging type identification result based on the power supply signal, and returns the charging type identification result to the first electronic device; The first electronic device compares the charging type identification result with the power supply signal to see whether they match. If so, the charging type identification function is normal.

8. The method according to claim 7, characterized in that The first electronic device outputting a power supply signal detectable by the USB interface specifically includes: The first electronic device simulates a power supply signal that can be detected by the USB interface, and transmits the power supply signal to the second electronic device through the USB interface of the second electronic device.

9. The method according to claim 7, characterized in that: The first electronic device includes a power interface, the power interface is connected to a power source, and the first electronic device outputs a power supply signal that can be detected by the USB interface, specifically including: The first electronic device inserts the power supply into the power interface and generates a power supply signal which is transmitted to the second electronic device through the USB interface of the second electronic device.

10. The method according to any one of claims 7 to 9, characterized in that: The power supply signal output by the first electronic device is a high voltage power supply signal, and the charging type identification result consistent with the high voltage power supply signal is: the charging type is high voltage fast charging; or, The power supply signal output by the first electronic device is a low-voltage power supply signal, and the charging type identification result consistent with the low-voltage power supply signal is: the charging type is low-voltage fast charging.

11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: The first electronic device also establishes a second communication connection with the third electronic device through the USB interface of the third electronic device; The first electronic device detects multiple device functions of the third electronic device based on the second communication connection, and the multiple device functions of the third electronic device are device functions provided by the third electronic device based on the USB interface of the third electronic device; wherein, after one device function of the third electronic device is detected, another device function begins to be detected; and the condition for starting to detect the other device function provided by the third electronic device is that the detection of the one device function is completed.

12. The method according to claim 11, characterized in that The method further comprises: When the first electronic device detects the first device function of the second electronic device based on the first communication connection, the first electronic device detects the second device function of the third electronic device based on the second communication connection.

13. The method according to any one of claims 1 to 12, characterized in that: The method further comprises: The first electronic device sends a first message to the second electronic device, where the first message is used to indicate that a function detection of the device is completed; The second electronic device sends a second message to the first electronic device, where the second message is used to indicate that the second electronic device has entered a state where the function of the other device is started to be detected.

14. The method according to claim 13, characterized in that The another device function is an audio input and output function, and the method further includes: The first electronic device sends a first detection instruction to the second electronic device, where the first detection instruction is used to trigger the second electronic device to enter an audio recording state; The first electronic device receives a third message sent by the second electronic device, where the third message is used to indicate that the second electronic device has entered the audio recording state.

15. The method according to claim 13, characterized in that The another device function is an OTG device insertion direction identification function, and the method further includes: The first electronic device sends a second detection instruction to the second electronic device, where the second detection instruction is used to trigger the second electronic device to enter a state of identifying the insertion direction of the OTG device; The first electronic device receives a fourth message sent by the second electronic device, where the fourth message is used to indicate that the second electronic device has entered a state of identifying the insertion direction of the OTG device.

16. The method according to claim 13, characterized in that The another device function is a charging type identification function, and the method further includes: The first electronic device sends a third detection instruction to the second electronic device, where the third detection instruction is used to trigger the second electronic device to enter the charging type identification state; The first electronic device receives a fifth message sent by the second electronic device, where the fifth message is used to indicate that the second electronic device has entered the charging type identification state.

17. The method according to any one of claims 1 to 16, characterized in that: Before the first electronic device detects multiple device functions of the second electronic device based on the first communication connection, the method further includes: The first electronic device sends a detected state feedback instruction to the second electronic device; The first electronic device receives a sixth message sent by the second electronic device, where the sixth message is used to indicate that the second electronic device has entered a detected state.

18. The method according to any one of claims 1 to 17, characterized in that: The USB interface is a Type-C interface.

19. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions, and when the one or more processors execute the computer instructions, the electronic device executes the method as described in any one of claims 1-18.

20. A computer storage medium, characterized in that The computer storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 18.

21. A chip, characterized in that: The chip includes a processor and a memory, wherein the memory is used to store a computer program or computer instructions, and the processor is used to execute the computer program or the computer instructions stored in the memory, so that the chip executes the method as described in any one of claims 1-18.