CN112333327B - Equipment detection method, device, storage medium, electronic equipment, external equipment and system - Google Patents

Equipment detection method, device, storage medium, electronic equipment, external equipment and system Download PDF

Info

Publication number
CN112333327B
CN112333327B CN202011311199.1A CN202011311199A CN112333327B CN 112333327 B CN112333327 B CN 112333327B CN 202011311199 A CN202011311199 A CN 202011311199A CN 112333327 B CN112333327 B CN 112333327B
Authority
CN
China
Prior art keywords
configuration channel
interface
type
channel pin
pull
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011311199.1A
Other languages
Chinese (zh)
Other versions
CN112333327A (en
Inventor
许彬
邓方东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011311199.1A priority Critical patent/CN112333327B/en
Publication of CN112333327A publication Critical patent/CN112333327A/en
Application granted granted Critical
Publication of CN112333327B publication Critical patent/CN112333327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Power Sources (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a device detection method, a device, a storage medium, an electronic device, an external device and a system. The method can be applied to electronic equipment, a first Type-C interface connected with a second Type-C interface on external equipment is arranged on the electronic equipment, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, when the external equipment is in a sleep mode, the configuration channel pin of a video transmission chip in the external equipment is in a suspended state, the electronic equipment provides detection voltage for the configuration channel pin of the first Type-C interface and detects the voltage on the configuration channel pin, and when the voltage on the electronic equipment is pulled down by the pull-down resistor, the external equipment which detects the sleep mode is connected to the electronic equipment. In the embodiment of the application, even if the external device is in the sleep mode, the pull-down resistor can pull down the voltage of the configuration channel pin on the first Type-C interface of the electronic device, so that the electronic device can still detect the connection of the external device under the condition that the external device is in the sleep mode.

Description

Equipment detection method, device, storage medium, electronic equipment, external equipment and system
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a device detection method, apparatus, storage medium system, electronic device, external device, and system.
Background
With the development of terminal technology, more and more external devices can be connected to the mobile phone for use. When these external devices are connected to the mobile phone, the power supply inside the mobile phone supplies power as a slave device of the mobile phone. Some external devices are provided with sleep modes, and the sleep modes of the external devices are started, so that energy consumption can be saved when the external devices are not used temporarily.
However, when the external device and the mobile phone are connected through the bidirectional Type-C cable, if the external device enters the sleep mode, the state of the configuration channel pin in the Type-C interface of the external device end may be changed, so that the mobile phone cannot detect the connection of the external device.
Disclosure of Invention
The embodiment of the application provides a device detection method, a device, a storage medium system, an electronic device, an external device and a system, which can detect the connection of the external device under the condition that the external device is dormant.
The embodiment of the application provides an equipment detection method, wherein the equipment detection method is applied to electronic equipment, a first Type-C interface is arranged on the electronic equipment, the first Type-C interface is connected with a second Type-C interface on external equipment, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external equipment comprises a video transmission chip, when the external equipment is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state, and the equipment detection method comprises the following steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
The embodiment of the present application further provides an equipment detection device, wherein, equipment detection device is applied to electronic equipment, is provided with first Type-C interface on the electronic equipment, first Type-C interface links to each other with the second Type-C interface on the external equipment, the configuration channel pin of second Type-C interface keeps electric with pull-down resistance and is connected, contain the video transmission chip in the external equipment when the external equipment is in dormant mode, the configuration channel pin of video transmission chip is unsettled state, and equipment detection device includes:
the voltage supply module is used for providing detection voltage for the configuration channel pin of the first Type-C interface;
the detection module is used for detecting the voltage on the configuration channel pin of the first Type-C interface based on the detection voltage;
and the judging module is used for judging that the external equipment which detects the sleep mode is connected into the electronic equipment when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor.
The embodiment of the present application further provides a storage medium, where the storage medium stores a computer program, and when the computer program runs on a computer, the computer is caused to execute the steps in any one of the device detection methods provided in the embodiments of the present application.
The embodiment of the present application further provides an electronic device, where the electronic device includes a processor and a memory, the memory stores a computer program, and the processor calls the computer program stored in the memory to execute the steps in any device detection method provided in the embodiment of the present application.
An embodiment of the present application further provides an external device, where the external device includes:
the configuration channel pin of the second Type-C interface is electrically connected with the pull-down resistor, and the second Type-C interface is connected with the first Type-C interface of the electronic equipment;
and the configuration channel pin of the video transmission chip is in a suspended state when the external equipment is in a sleep mode.
An embodiment of the present application further provides an apparatus detection system, where the apparatus detection system includes:
the external device is provided with a second Type-C interface, a configuration channel pin of the second Type-C interface is electrically connected with the pull-down resistor, the external device comprises a video transmission chip, and when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state;
the electronic equipment is provided with a first Type-C interface, the first Type-C interface is connected with a second Type-C interface on the external equipment, and the electronic equipment executes the following steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
In the embodiment of the application, a first Type-C interface is arranged on an electronic device, the first Type-C interface is connected with a second Type-C interface on an external device, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external device comprises a video transmission chip, when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspension state, the electronic device provides detection voltage for the configuration channel pin of the first Type-C interface, based on the detection voltage, the voltage on the configuration channel pin of the first Type-C interface is detected, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, it is determined that the external device in the sleep mode is detected to be connected to the electronic device. In the embodiment of the application, the pull-down resistor is electrically connected with the configuration channel pin of the second Type-C interface of the external device, and even if the external device is in a sleep mode, the pull-down resistor can be connected with the electronic device through the external device to pull down the voltage of the configuration channel pin on the first Type-C interface of the electronic device, so that the electronic device can still detect the connection of the external device under the condition that the external device is in sleep.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic view of a first scenario of an apparatus detection method according to an embodiment of the present application.
Fig. 2 is a pin arrangement diagram of a Type-C interface provided in an embodiment of the present application.
Fig. 3 is a schematic view of a second scenario of the device detection method according to the embodiment of the present application.
Fig. 4 is a first schematic diagram of device connection provided in an embodiment of the present application.
Fig. 5 is a second schematic diagram of device connection provided in the embodiment of the present application.
Fig. 6 is a third schematic diagram of device connection provided in the embodiment of the present application.
Fig. 7 is a fourth schematic diagram of device connection provided in the embodiment of the present application.
Fig. 8 is a schematic flowchart of a first method for detecting a device according to an embodiment of the present disclosure.
Fig. 9 is a schematic flowchart of a second method for detecting a device according to an embodiment of the present application.
Fig. 10 is a fifth schematic diagram of device connection provided in the embodiment of the present application.
Fig. 11 is a schematic structural diagram of a first apparatus detecting device according to an embodiment of the present application.
Fig. 12 is a schematic structural diagram of a second structure of an apparatus detection device according to an embodiment of the present application.
Fig. 13 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All embodiments obtained by a person skilled in the art based on the embodiments in the present application without any inventive step are within the scope of protection of the present application.
The terms "first," "second," "third," and the like in the description and in the claims of the present application and in the above-described drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the objects so described are interchangeable under appropriate circumstances. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, or apparatus, electronic device, system comprising a list of steps is not necessarily limited to those steps or modules or elements expressly listed, may include other steps or modules or elements not expressly listed, and may include other steps or modules or elements inherent to such process, method, apparatus, electronic device, or system.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a schematic view of a first scenario of a device detection method according to an embodiment of the present application, including an electronic device using a Type-C interface and an external device using a Type-C interface, where the electronic device using the Type-C interface and the external device using the Type-C interface are connected through a bidirectional Type-C interface cable.
The electronic device serves as a master device in data transmission with an external device, supports standard Type-C and DP (display port) video transmission, and may be a smart phone, a tablet computer, an automobile, a notebook, a desktop computing device, and the like. The external device is used as a slave device in data transmission with the electronic device, supports standard Type-C and DP video transmission, and can be a wearable device capable of displaying video pictures, such as glasses and a helmet.
Currently, the USB interfaces used on many electronic devices are Type-C interfaces. The highlight of the Type-C interface is the slimmer design, faster transmission speed (up to 10Gbps), and more aggressive power transmission. And, Type-C interface supports and all can insert "positive and negative to insert" function from positive and negative both sides.
Referring to fig. 2, fig. 2 is a pin arrangement diagram of a Type-C interface according to an embodiment of the present disclosure. The Type-C interface shown in fig. 2 is a standard Type-C interface, and can be used in the electronic device and the external device provided in the embodiment of the present application. Among them, TX1+, TX1-, RX1+, RX1-, TX2+, TX2-, and RX2+ and RX 2-are four pairs of differential signal pins, and video and audio transmission, such as video screen projection, can be implemented through the differential signal pins. D + and D-are differential signal pins compatible with USB2.0 standard, VBUS is a power supply pin, CC1 and CC2 are configuration channel pins (also called CC pins), and identification of equipment, role distinction of master and slave equipment, insertion identification of front and back sides and the like can be carried out through the configuration channel pins. SBUs 1 and 2 are bus pins through which auxiliary management can be performed.
If the Type-C interface of the external device is a standard Type-C interface, A1, B1, A12 and B12 are all Ground (GND) pins. In this case, when the Type-C interface of the external device is connected to the Type-C interface of the electronic device through the Type-C cable, the electronic device may generate a trigger signal and provide a detection voltage to the CC pin in the Type-C interface thereof according to the trigger signal.
Referring to fig. 3, fig. 3 is a schematic view of a second scenario of the apparatus detection method according to the embodiment of the present disclosure. In one embodiment, a first switch is disposed on the electronic device. The first switch is a virtual switch implemented by means of software. When the first switch is turned on by a user, it can be determined that an instruction for instructing detection of the external device is received from the user, so that the electronic device can generate a trigger signal and provide a detection voltage for the CC pin in the Type-C interface according to the trigger signal.
After providing the detection voltage, if the voltage of the CC pin of the Type-C interface is detected to be pulled down, the electronic equipment can determine the access of the external equipment with the Type-C interface. The electronic device can then identify what device the external device is based on the voltage change at the CC pin. For example, through the voltage change of the CC pin, the electronic device detects that the external device may specifically be AR glasses using a Type-C interface.
Referring to fig. 4, fig. 4 is a first schematic diagram of device connection according to an embodiment of the present disclosure. The mobile phone terminal comprises a Type-C interface, a DP (display Port, digital video interface standard) chip, a processor and a screen, wherein the electronic equipment is used as a mobile phone, the external equipment is AR glasses, the mobile phone terminal comprises the Type-C interface, and the AR glasses terminal comprises the Type-C interface, the DP chip, the processor and the screen, and the DP chip comprises a Sleep pin.
When the AR glasses are not dormant, the mobile phone end can detect the access of the AR glasses through the CC pins, so that power supply is carried out on the AR glasses through the VBUS pins, the generally provided power is 5V direct current, and the DP signals transmitted from the mobile phone end are received by the AR glasses end from the differential signal pins.
When the AR glasses are in SLEEP, the processor of the AR glasses inputs a low level to the SLEEP pin, and the DP chip enters a SLEEP mode (namely a low power consumption mode), so that the power saving effect is achieved. The pull-down resistor is originally connected to the CC pin of the DP chip, but when the chip enters the sleep mode, the connection state between the CC pin (CC1, CC2) of the DP chip and the pull-down resistor changes. Correspondingly, the CC foot of the Type-C interface in the AR glasses receives the influence of the CC foot of the DP chip connected with the Type-C interface, and the original pull-down state is changed into a suspension state. And because the CC pin of the Type-C interface of AR glasses becomes unsettled state, can't pull down the voltage on the CC foot of Type-C interface in the electronic equipment, therefore, electronic equipment can't detect AR glasses through the connection of CC foot, and electronic equipment's VBUS pin can stop the power supply to AR glasses, leads to whole AR glasses system to fall down for AR glasses system work is unusual.
To solve the above problem, the methods shown in fig. 5 and fig. 6 may be adopted. Referring to fig. 5 and 6 together, fig. 5 and 6 are a second schematic diagram and a third schematic diagram of the device connection provided in the embodiment of the present application.
In the method shown in fig. 5, a PD (Power Delivery) protocol chip is added to the AR glasses. The CC pin in the Type-C interface of the AR glasses end is not connected to the CC pin of the DP chip any more, but is connected to the CC pin of the PD protocol chip; an SBU pin in a Type-C interface of an AR glasses end is not connected to an SBU pin of a DP chip any more, but is connected to an SBU pin of a PD protocol chip; the GND pin in the Type-C interface of the AR glasses end is not connected to the GND pin of the DP chip any more, but is connected to the GND pin of the PD protocol chip.
When the AR glasses enter the SLEEP mode, the processor inputs a low level to the SLEEP pin of the DP chip, the DP chip can enter the SLEEP mode, but at the moment, because the CC pin in the Type-C interface of the AR glasses end is connected to the PD protocol chip, therefore, the state of the CC pin in the Type-C interface of the AR glasses end remains unchanged, the mobile phone end detects that the AR glasses end is still accessed, so the VBUS pin of the electronic equipment can not stop the power supply to the AR glasses, the AR glasses system maintains a normal standby state, and therefore the purpose of low power consumption and power saving is achieved.
In the method shown in fig. 6, a USB-MUX switch chip is added to the AR glasses. The CC pin in the Type-C interface at the AR glasses end is not connected to the CC pin of the DP chip any more, but is connected to the CC pin of the USB-MUX switch chip; an SBU pin in a Type-C interface at the AR glasses end is not connected to an SBU pin of the DP chip any more, but is connected to an SBU pin of the USB-MUX switch chip; the differential signal pin in the Type-C interface at the AR glasses end is not connected to the differential signal pin of the DP chip any more, but is connected to the differential signal pin of the USB-MUX switch chip; and the GND pin in the Type-C interface at the AR lens end is not connected to the GND pin of the DP chip any more, but is connected to the GND pin of the USB-MUX switch chip.
When the AR glasses enter the SLEEP mode, the processor inputs a low level to the SLEEP pin of the DP chip, the DP chip can enter the SLEEP mode, but at the moment, because the CC pin in the Type-C interface of the AR glasses end is connected to the USB-MUX switch chip, the state of the CC pin in the Type-C interface of the AR glasses end is kept unchanged, the mobile phone end detects that the AR glasses end is still connected, so the VBUS pin of the electronic equipment can not stop the power supply to the AR glasses, the AR glasses system keeps a normal standby state, and therefore the purpose of low power consumption and power saving is achieved.
With continuing reference to fig. 7, fig. 7 is a fourth schematic diagram of the device connection provided by the embodiment of the present application. In the method shown in fig. 7, a chip is not added to the AR glasses end, but at the same time, the CC pin in the Type-C interface of the AR glasses end is not connected to the CC pin of the DP chip, but is connected to the pull-down resistor separately, and the connected pull-down resistor is not located inside the chip, but is a pull-down resistor set separately. Besides the CC pin, the SBU pin in the Type-C interface of the AR glasses end is still connected to the SBU pin of the DP chip, the differential signal pin in the Type-C interface of the AR glasses end is still connected to the differential signal pin of the DP chip, and the GND pin in the Type-C interface of the AR glasses end is still connected to the GND pin of the DP chip.
When the AR glasses get into SLEEP mode, the processor inputs low level to DP chip SLEEP pin, the DP chip can get into SLEEP mode, but this moment because the CC pin in the Type-C interface of AR glasses end keeps being connected with drop-down resistance electricity all the time, do not receive DP chip SLEEP mode's influence, therefore the CC pin state in the Type-C interface of AR glasses end remains unchanged, the cell-phone end detects that AR glasses end is still inserting, so electronic equipment's VBUS pin can not stop the power supply to the AR glasses, AR glasses system keeps normal standby state, thereby realize the purpose of low-power consumption power saving.
Compared with the former two methods, the method shown in fig. 7 does not increase the area of the PCB board at the end of the AR glasses because no new chip is added, which is helpful to reduce the volume of the AR glasses, so that the manufactured AR glasses are lighter. Meanwhile, the cost of the pull-down resistor is much lower than that of the chip, so that the manufacturing cost of the AR glasses can be greatly saved.
In addition, in fig. 6, the DP signal passes through the USB-MUX switch chip, which introduces insertion loss of the signal and affects the integrity of the DP signal. Compared with the scheme of newly adding the USB-MUX switch chip in fig. 6, in the scheme of fig. 7, the DP signal directly reaches the DP chip, no insertion loss of the signal is introduced, and the DP signal can be completely retained.
The functions of the leads in fig. 4 to 7 are described in the structure of the lead in fig. 2, and are not described again here.
The embodiment of the present application provides that the connection mode between the electronic device and the external device is the connection mode in fig. 7. Referring to fig. 8, fig. 8 is a schematic flow chart illustrating a device detection method according to an embodiment of the present disclosure. The device detection method can be applied to electronic devices. The electronic equipment is provided with a first Type-C interface, the first Type-C interface is connected with a second Type-C interface on the external equipment, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external equipment comprises a video transmission chip, and when the external equipment is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state. Wherein, the video transmission chip is the DP chip. The pin suspension state means that the pin is not connected with any signal, is not connected with a high level, is not connected with a low level, and is easily interfered.
The flow of the device detection method provided by this embodiment may include:
101, providing detection voltage for a configuration channel pin of a first Type-C interface;
it should be noted that the Type-C interface has three roles, which are a downlink interface, an uplink interface, and a dual role interface, respectively, where when the Type-C interface of the electronic device is used as the downlink interface, the electronic device is used as a master device, and can supply power to an accessed external device, send data to the external device, read data from the external device, and so on; when the Type-C interface of the electronic equipment is used as an uplink interface, the electronic equipment is used as slave equipment, and can be used for removing power from the accessed external equipment to provide data and the like for the external equipment; when the Type-C interface of the electronic equipment is used as a dual role interface, the electronic equipment can be dynamically switched between the master equipment and the slave equipment. An introduction of the pin structure of the Type-C interface is shown in fig. 2 and the related description of fig. 2.
In the embodiment of the application, the detection voltage is provided for the configuration channel pin of the Type-C interface, so that the access detection of the external Type-C device is realized based on the configuration channel pin.
The detection voltage can be a pulse width modulation voltage, the voltage range can be 2.4V to 3.4V, the period range can be 50ms to 100ms, and the duty ratio range can be 30% to 70%.
For example, when the electronic device detects that an external object is stored in the Type-C interface, a detection voltage with a voltage value of 3.4V, a period of 50ms, and a duty cycle of 70% is provided to the configuration channel pin of the Type-C interface.
102, detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
after the detection voltage is provided for the first Type-C interface, voltage detection is carried out on the configuration channel pin of the first Type-C interface, and the current voltage of the configuration channel pin of the first Type-C interface is obtained.
103, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, it is determined that the external device detecting the sleep mode is connected to the electronic device.
It can be understood that, in the present application, the configuration channel pin of the second Type-C interface is electrically connected to the pull-down resistor, and even when the external device enters the sleep mode, the pull-down resistor is not electrically connected to the configuration channel pin of the second Type-C interface, and there is still data transmission. When the external equipment is connected with the electronic equipment, the second Type-C interface is connected with the first Type-C interface, the configuration channel pin of the second Type-C interface is connected with the configuration channel pin of the first Type-C interface, and even if the external equipment enters a sleep mode, the configuration channel pin of the first Type-C interface of the electronic equipment is still connected with the pull-down resistor. Therefore, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode can be judged to be connected to the electronic device.
In an embodiment, after the current voltage on the configuration channel pin of the first Type-C interface is detected, it may be directly determined whether the voltage on the configuration channel pin of the first Type-C interface is pulled down to be lower than a preset voltage, and when the voltage on the configuration channel pin of the first Type-C interface is pulled down to be lower than the preset voltage, it may be considered that the pull-down resistor in the first Type-C interface and the pull-down resistor in the second Type-C interface are electrically connected, so that the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, and it is determined that the external device in the hibernation mode is detected to access the electronic device.
Wherein, preset voltage can be preset according to the resistance of pull-down resistor, and the preset voltage that sets up satisfies: when the external device is connected to the electronic device, the voltage on the configuration channel pin of the first Type-C interface of the electronic device is pulled down to be lower than the preset voltage.
For example, when the preset voltage is 3V, if the electronic device obtains that the current voltage of the pin of the configuration channel is 2.5V, it may be determined that the external device is detected to be connected to the electronic device; if the electronic device obtains that the current voltage of the configuration channel pin of the electronic device is 3.5V, it can be determined that the external device which does not detect the sleep mode is connected to the electronic device.
In addition, for external devices with different functions (such as earphones and a U disk adopting a Type-C interface), the resistance values of pull-down resistors connected to configuration channel pins of the external devices are different, and correspondingly, when the external devices with different functions are connected to the electronic device, the pull-down degrees of the voltages of the configuration channel pins of the electronic device are different.
Therefore, after the current voltage on the configuration channel pin of the first Type-C interface is detected, the voltage difference between the detected voltage and the current voltage can be calculated, and the calculated voltage difference is used as the voltage change value of the configuration channel pin. According to the magnitude of the voltage change value, it can also be identified what kind of external device is connected, for example, the step of determining that the external device detecting the sleep mode is connected to the electronic device may include: and when the voltage change value is within a preset voltage interval, judging that the preset external equipment is detected to be connected into the electronic equipment.
The preset external device may be the external device provided in the embodiments of the present application. The external equipment comprises a second Type-C interface and a video transmission chip. Wherein the configuration channel pin of second Type-C interface keeps electric with pull-down resistance and is connected, and the second Type-C interface links to each other with electronic equipment's first Type-C interface. When the external device is in the sleep mode, the configuration channel pin of the video transmission chip is in a suspended state. The external device may be, for example, a split AR glasses device.
For example, the preset voltage interval may be set to [ Vmin, Vmax ], Vmin is a minimum voltage value of a configuration channel pin of the electronic device when the external device is connected to the electronic device, and Vmax is a maximum voltage value of the configuration channel pin of the electronic device when the external device is connected to the electronic device. The values of Vmin and Vmax may be determined in advance through experiments, for example, if the determined Vmin is 1.5V and the determined Vmax is 3V, the preset voltage interval [1.5V, 3V ] may be obtained.
When judging whether the preset external equipment is accessed according to the voltage change value, the electronic equipment can judge whether the obtained voltage change value is within a preset voltage interval; if the voltage change value is within the preset voltage interval, the electronic equipment determines that the access of preset external equipment is detected; if the voltage variation value is outside the preset voltage interval, the electronic device determines that the access of the preset external device is not detected.
For example, when the preset voltage interval is [1.5V, 3V ], if the voltage variation value of the pin of the configuration channel obtained by the electronic device is 2V, it may be determined that the access of the preset external device is detected; if the electronic device obtains that the voltage variation value of the configuration channel pin is 0.2V, it can be determined that the access of the preset external device is not detected. For example, the resistance value of the pull-down resistor at the external device end may be 5 kilohms, and the voltage of the CC pin of the electronic device is pulled down by the pull-down resistor of 5 kilohms, so that the voltage variation value of the CC pin is located between preset voltage intervals, and thus, the electronic device determines that the access of the AR glasses in the sleep mode is detected.
Referring to fig. 9, fig. 9 is a second flowchart illustrating an apparatus detection method according to an embodiment of the present disclosure. The device detection method can be applied to electronic devices. The electronic equipment is provided with a first Type-C interface, the first Type-C interface is connected with a second Type-C interface on the external equipment, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external equipment comprises a video transmission chip, and when the external equipment is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state.
The flow of the device detection method provided by this embodiment may include:
201. providing detection voltage for a configuration channel pin of a first Type-C interface;
in the embodiment of the application, the detection voltage is provided for the configuration channel pin of the Type-C interface, so that the access detection of the external Type-C device is realized based on the configuration channel pin.
The detection voltage can be a pulse width modulation voltage, the voltage range can be 2.4V to 3.4V, the period range can be 50ms to 100ms, and the duty ratio range can be 30% to 70%.
Referring to fig. 3, in an embodiment, a first switch is disposed on the electronic device. The first switch is a virtual switch implemented by means of software. When the first switch is turned on by a user, it can be determined that an instruction for instructing detection of the external device is received from the user, so that the electronic device can generate a trigger signal and provide a detection voltage for the CC pin in the Type-C interface according to the trigger signal.
In some embodiments, in addition to the first switch being configured to trigger the electronic device to perform the external device access detection, the electronic device may trigger the electronic device to perform the external device access detection as follows.
In one embodiment, before providing the detection voltage for the configuration channel pin of the first Type-C interface, the method may include:
when the display screen in the information screen state receives touch operation of a preset track, the electronic equipment provides detection voltage for the configuration channel pin of the first Type-C interface.
For example, the predetermined trajectory is an "o" shape. Then, if the display screen is in a screen resting state, and the user draws an "o" shaped track on the display screen, the electronic device may receive a touch operation of a preset track, and at this time, the electronic device may determine that an instruction for instructing to perform external device detection is received from the user, and provide a detection voltage for the configuration channel pin of the first Type-C interface.
In another embodiment, before providing the detection voltage for the configuration channel pin of the first Type-C interface, the method may include:
when a voice command with preset content is received, the electronic equipment determines that a command for indicating external equipment detection is received from a user, and provides detection voltage for a configuration channel pin of the first Type-C interface.
For example, the voice command of the preset content is "xiaohu, and the external device is recognized through the Type-C interface". Then, when the user issues a voice command of 'Xiao Euro, external device is identified through the Type-C interface' to the electronic device, the electronic device provides a detection voltage for the configuration channel pin of the first Type-C interface.
202. Detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
after the detection voltage is provided for the first Type-C interface, voltage detection is carried out on the configuration channel pin of the first Type-C interface, and the current voltage of the configuration channel pin of the first Type-C interface is obtained.
203. Judging whether the voltage on a configuration channel pin of the first Type-C interface is lower than a preset voltage or not; if yes, the process proceeds to step 204, and if no, the process proceeds to step 205.
204. And judging that the external equipment which detects the sleep mode accesses the electronic equipment.
205. And judging that the external equipment which does not detect the sleep mode accesses the electronic equipment.
Referring to fig. 10, fig. 10 is a fifth schematic diagram of the device connection according to the embodiment of the present disclosure. It should be understood that, for convenience of description, the structural arrangement of the electronic device side and the external device side is simplified in fig. 10, only the connection situation related to the configuration channel pins is shown, and a part of the structure not shown may refer to the foregoing description related to fig. 4 to fig. 7.
In the first Type-C interface, the configuration channel pins include a first configuration channel pin A5CC1 and a second configuration channel pin B5CC1, and in the second Type-C interface, the configuration channel pins include a third configuration channel pin A5CC1 and a fourth configuration channel pin B5CC 1. When the first Type-C interface is connected with the second Type-C interface, the first configuration channel pin is connected with the third configuration channel pin, and the second configuration channel pin is connected with the fourth configuration channel pin.
Referring to fig. 10, in the present application, the second Type-C interface has 2 configuration channel pins, which are electrically connected to 2 pull-down resistors, respectively. The 2 pull-down resistors comprise a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected with the first pull-down resistor, and the fourth configuration channel pin is electrically connected with the second pull-down resistor.
Even when the external device enters the sleep mode, the pull-down resistor is not electrically connected with the configuration channel pin of the second Type-C interface, and data transmission is still performed. When the external equipment is connected with the electronic equipment, the second Type-C interface is connected with the first Type-C interface, the configuration channel pin of the second Type-C interface is connected with the configuration channel pin of the first Type-C interface, and even if the external equipment enters a sleep mode, the configuration channel pin of the first Type-C interface of the electronic equipment is still connected with the pull-down resistor. Therefore, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode can be judged to be connected to the electronic device.
In one embodiment, when the voltage on the configuration channel pin of the first Type-C interface is lower than a preset voltage, determining that the external device detecting the sleep mode accesses the electronic device includes:
when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor, determining that the external device in the sleep mode is detected to be connected to the electronic device. That is, when the pins on the first configuration channel and the pins on the second configuration channel on the first Type-C interface are both pulled down to be lower than a preset voltage, it is determined that the external device detecting the sleep mode is connected to the electronic device.
If the voltage on the configuration channel pin of the first Type-C interface is not pulled down to be lower than the preset voltage, it is determined that the external device is not detected. For example, the external device may come loose from its connection to the Type-C interface of the electronic device.
In an embodiment, when at least one of the voltages on the 2 configuration channel pins of the first Type-C interface is not lower than a preset voltage, it is determined that the external device is detected not to be connected to the electronic device.
206. Judging whether the external equipment is slave equipment of the electronic equipment or not; if yes, go to step 207, otherwise, go to step 208.
It should be noted that the Type-C interface has three roles, which are a downlink interface, an uplink interface, and a dual role interface, respectively, where when the Type-C interface of the electronic device is used as the downlink interface, the electronic device is used as a master device, and can supply power to an accessed external device, send data to the external device, read data from the external device, and so on; when the Type-C interface of the electronic equipment is used as an uplink interface, the electronic equipment is used as slave equipment, and can be used for removing power from the accessed external equipment to provide data and the like for the external equipment; when the Type-C interface of the electronic equipment is used as a dual role interface, the electronic equipment can be dynamically switched between the master equipment and the slave equipment. An introduction of the pin structure of the Type-C interface is shown in fig. 2 and the related description of fig. 2.
Through the data transmission of the first Type-C interface and the second Type-C interface, the master-slave equipment identification of the electronic equipment and the external equipment can be completed.
207. And supplying power to the external equipment.
When the first Type-C interface is configured as a downlink interface, that is, the electronic device serves as a master device, and the second Type-C interface is configured as an uplink interface, that is, the external device serves as a slave device, the electronic device supplies power to the external device through the VBUS pin, for example, when the AR glasses are connected to a mobile phone, the mobile phone serves as a master device, and 5V direct-current voltage can be provided to the AR glasses.
208. No power is supplied to the external device.
When the first Type-C interface is configured to be an uplink interface, namely the electronic device serves as a slave device, and the second Type-C interface is configured to be a downlink interface, namely the external device serves as a master device, the electronic device does not supply power to the external device.
The device detection apparatus provided by the embodiment of the application is applied to an electronic device, wherein a first Type-C interface is arranged on the electronic device, the first Type-C interface is connected with a second Type-C interface on an external device, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external device comprises a video transmission chip, when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspension state, the electronic device provides detection voltage for the configuration channel pin of the first Type-C interface, based on the detection voltage, the voltage on the configuration channel pin of the first Type-C interface is detected, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, it is determined that the external device which detects the sleep mode accesses the electronic device. In the embodiment of the application, the pull-down resistor is electrically connected with the configuration channel pin of the second Type-C interface of the external device, and even if the external device is in a sleep mode, the pull-down resistor can be connected with the electronic device through the external device to pull down the voltage of the configuration channel pin on the first Type-C interface of the electronic device, so that the electronic device can still detect the connection of the external device under the condition that the external device is in sleep.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an apparatus detection device according to an embodiment of the present disclosure. The device detection apparatus can be applied to electronic devices. The electronic device is provided with a first Type-C interface, the first Type-C interface is connected to a second Type-C interface on the external device, a configuration channel pin of the second Type-C interface is electrically connected to the pull-down resistor, the external device includes a video transmission chip, when the external device is in the sleep mode, the configuration channel pin of the video transmission chip is in a suspension state, and the device detection apparatus 300 may include:
a voltage supply module 301, configured to provide a detection voltage for a configuration channel pin of the first Type-C interface;
a detecting module 302, configured to detect, based on the detection voltage, a voltage on a configuration channel pin of the first Type-C interface;
a determining module 303, configured to determine that the external device in the sleep mode is detected to be connected to the electronic device when a voltage on a configuration channel pin of the first Type-C interface is pulled low by the pull-down resistor.
In one embodiment, the determining module 303 is configured to:
and when the voltage on the configuration channel pin of the first Type-C interface is lower than a preset voltage, judging that the external equipment in the sleep mode is detected to be connected into the electronic equipment.
In an embodiment, the configuration channel pin of the first Type-C interface includes a first configuration channel pin and a second configuration channel pin, the configuration channel pin of the second Type-C interface includes a third configuration channel pin and a fourth configuration channel pin, when the first Type-C interface is connected to the second Type-C interface, the first configuration channel pin is connected to the third configuration channel pin, the second configuration channel pin is connected to the fourth configuration channel pin, the pull-down resistor includes a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected to the first pull-down resistor, and the fourth configuration channel pin is electrically connected to the second pull-down resistor.
In an embodiment, when it is determined that the external device in the sleep mode is detected to be connected to the electronic device when the voltage on the configuration channel pin of the first Type-C interface is lower than a preset voltage, the determining module 303 is configured to:
when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor, determining that the external device in the sleep mode is detected to be connected to the electronic device.
In an embodiment, before the external device enters the sleep mode, the configuration channel pin of the video transmission chip is in a pull-down state, and when the video transmission chip enters the sleep mode, the configuration channel pin of the video transmission chip is changed from the pull-down state to the floating state.
Referring to fig. 12, fig. 12 is a schematic diagram illustrating a second structure of an apparatus detection device 300 according to an embodiment of the present disclosure. In one embodiment, the device detection module 300 further comprises a determination module 304 and a power module 305, the power module is configured to:
a determining module 304, configured to determine whether the external device is a slave device of the electronic device;
a power supply module 305, configured to supply power to the external device if the external device is a slave device of the electronic device.
The device detection apparatus provided by the embodiment of the application is applied to an electronic device, wherein a first Type-C interface is arranged on the electronic device, the first Type-C interface is connected with a second Type-C interface on an external device, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external device comprises a video transmission chip, when the external device is in the sleep mode, the configuration channel pin of the video transmission chip is in a floating state, the voltage supply module 301 provides a detection voltage for the configuration channel pin of the first Type-C interface, the detection module 302 detects the voltage on the configuration channel pin of the first Type-C interface based on the detection voltage, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the judging module judges that the external equipment in the sleep mode is detected to be connected to the electronic equipment. In the embodiment of the application, the pull-down resistor is electrically connected with the configuration channel pin of the second Type-C interface of the external device, and even if the external device is in a sleep mode, the pull-down resistor can be connected with the electronic device through the external device to pull down the voltage of the configuration channel pin on the first Type-C interface of the electronic device, so that the electronic device can still detect the connection of the external device under the condition that the external device is in sleep.
The embodiment of the application also provides the electronic equipment. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a vehicle peripheral obstacle detection apparatus, an audio playback apparatus, a video playback apparatus, a notebook, a desktop computing device, a wearable device such as a watch, glasses, a helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
Referring to fig. 13, fig. 13 is a schematic view of a first structure of an electronic device 400 according to an embodiment of the present application. The electronic device 400 may include a Type-C interface 401, memory 402, a processor 403, and the like.
The memory stores a computer program, and the processor executes the steps of any image noise reduction method provided by the embodiment of the application by calling the computer program stored in the memory. The processor 403 is electrically connected to the memory 402.
Those skilled in the art will appreciate that the electronic device configuration shown in fig. 13 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
In this embodiment, the electronic device is connected to a Type-C interface of the external device through the Type-C interface, a configuration channel pin of the Type-C interface of the external device is electrically connected to the pull-down resistor, the external device includes a video transmission chip, when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a floating state, the processor 403 in the electronic device loads an executable code corresponding to a process of one or more application programs into the memory 402 according to the following instruction, and the processor 403 runs the application program stored in the memory 402, thereby implementing the steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
Referring to fig. 14, fig. 14 is a schematic view of a second structure of an electronic device 400 according to an embodiment of the present disclosure. Wherein the electronic device 400 further comprises: display 404, control circuit 405, input unit 406, sensor 407, and power supply 408. The processor 403 is electrically connected to the display 404, the control circuit 405, the input unit 406, the sensor 407, and the power source 408.
The display screen 404 may be used to display information entered by or provided to the user as well as various graphical user interfaces of the electronic device, which may be comprised of images, text, icons, video, and any combination thereof.
The control circuit 405 is electrically connected to the display screen 404, and is configured to control the display screen 404 to display information.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. For example, the input unit 406 may include a touch sensing module.
The sensor 407 is used to collect information of the electronic device itself or information of the user or external environment information. For example, the sensor 406 may include a plurality of sensors such as a distance sensor, a magnetic field sensor, a light sensor, an acceleration sensor, a fingerprint sensor, a hall sensor, a position sensor, a gyroscope, an inertial sensor, an attitude sensor, a barometer, a heart rate sensor, and the like.
Power supply 408 is used to power the various components of electronic device 400. In some embodiments, power supply 408 may be logically coupled to processor 403 via a power management system, such that functions to manage charging, discharging, and power consumption management are performed via the power management system.
In some embodiments, when an external device with a Type-C interface is connected as a slave device to an electronic device with a Type-C interface, the power supply 408 can also supply power to the external device through a bidirectional Type-C cable connected between the external device and the electronic device.
Although not shown in fig. 13 and 14, the electronic device 400 may further include a camera, a bluetooth module, and the like, which are not described herein again.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device.
The input unit 404 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 405 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The display 406 may be used to display information such as images and text.
In this embodiment, the electronic device is connected to a Type-C interface of the external device through the Type-C interface, a configuration channel pin of the Type-C interface of the external device is electrically connected to the pull-down resistor, the external device includes a video transmission chip, when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a floating state, the processor 403 in the electronic device loads an executable code corresponding to a process of one or more application programs into the memory 402 according to the following instruction, and the processor 403 runs the application program stored in the memory 402, thereby implementing the steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
In this embodiment, the electronic device is connected to a Type-C interface of the external device through the Type-C interface, a configuration channel pin of the Type-C interface of the external device is electrically connected to the pull-down resistor, the external device includes a video transmission chip, when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a floating state, the processor 403 in the electronic device loads an executable code corresponding to a process of one or more application programs into the memory 402 according to the following instruction, and the processor 403 runs the application program stored in the memory 402, thereby implementing the steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
In one embodiment, when determining that the external device in the sleep mode is detected to be connected to the electronic device when the voltage on the configuration channel pin of the first Type-C interface is pulled low by the pull-down resistor, the processor 403 is configured to:
and when the voltage on the configuration channel pin of the first Type-C interface is lower than a preset voltage, judging that the external equipment in the sleep mode is detected to be connected into the electronic equipment.
In an embodiment, the configuration channel pin of the first Type-C interface includes a first configuration channel pin and a second configuration channel pin, the configuration channel pin of the second Type-C interface includes a third configuration channel pin and a fourth configuration channel pin, when the first Type-C interface is connected to the second Type-C interface, the first configuration channel pin is connected to the third configuration channel pin, the second configuration channel pin is connected to the fourth configuration channel pin, the pull-down resistor includes a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected to the first pull-down resistor, and the fourth configuration channel pin is electrically connected to the second pull-down resistor.
In one embodiment, when it is determined that the external device in the sleep mode is detected to be connected to the electronic device when the voltage on the configuration channel pin of the first Type-C interface is lower than a preset voltage, the processor 403 is configured to:
when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor, determining that the external device in the sleep mode is detected to be connected to the electronic device.
In an embodiment, before the external device enters the sleep mode, the configuration channel pin of the video transmission chip is in a pull-down state, and when the video transmission chip enters the sleep mode, the configuration channel pin of the video transmission chip is changed from the pull-down state to the floating state.
In one embodiment, after determining that the external device in the sleep mode is detected to access the electronic device, the processor 403 is configured to:
judging whether the external equipment is slave equipment of the electronic equipment or not;
and if the external equipment is the slave equipment of the electronic equipment, supplying power to the external equipment.
The electronic equipment provided by the embodiment of the application is provided with a first Type-C interface, the first Type-C interface is connected with a second Type-C interface on the external equipment, a configuration channel pin of the second Type-C interface is electrically connected with a pull-down resistor, the external equipment comprises a video transmission chip, when the external equipment is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspension state, the electronic equipment provides detection voltage for the configuration channel pin of the first Type-C interface, based on the detection voltage, the voltage on the configuration channel pin of the first Type-C interface is detected, when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external equipment which detects the sleep mode is judged to be connected to the electronic equipment. In the embodiment of the application, the pull-down resistor is electrically connected with the configuration channel pin of the second Type-C interface of the external device, and even if the external device is in a sleep mode, the pull-down resistor can be connected with the electronic device through the external device to pull down the voltage of the configuration channel pin on the first Type-C interface of the electronic device, so that the electronic device can still detect the connection of the external device under the condition that the external device is in sleep.
An embodiment of the present application further provides an external device, where the external device may be connected to the electronic device provided in the foregoing embodiment through a Type-C interface, and is powered by the electronic device as a slave device of the electronic device, where the external device includes:
the configuration channel pin of the second Type-C interface is electrically connected with the pull-down resistor, and the second Type-C interface is connected with the first Type-C interface of the electronic equipment;
and the configuration channel pin of the video transmission chip is in a suspended state when the external equipment is in a sleep mode.
An embodiment of the present application further provides an apparatus detection system, including:
the external device is provided with a second Type-C interface, a configuration channel pin of the second Type-C interface is electrically connected with the pull-down resistor, the external device comprises a video transmission chip, and when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state;
electronic equipment, be provided with first Type-C interface on the electronic equipment, first Type-C interface with second Type-C interface on the external equipment links to each other, electronic equipment can realize the step:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the configuration channel pin of the first Type-C interface is pulled down by the pull-down resistor, the external device which detects the sleep mode is judged to be connected to the electronic device.
In the above embodiments, the descriptions of the embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the device detection method, and are not described herein again.
The device detection apparatus, the system, the electronic device, and the external device provided in the embodiment of the present application belong to the same concept as the device detection method in the above embodiments, and any method provided in the device detection method embodiment may be run on the device detection apparatus, and a processor on the electronic device may run any method provided in the device detection method embodiment by calling a computer program stored in a memory, and a specific implementation process thereof is described in the device detection method embodiment in detail, and is not described herein again.
It should be noted that, for the device detection method described in the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process for implementing the device detection method described in the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the device detection method can be included as the process of the embodiment of the device detection method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
For the device detection apparatus in the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, or the like.
The above detailed description is provided for a device detection method, apparatus, storage medium system, electronic device, external device and system provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principle and implementation manner of the present invention, and the description of the above embodiments is only used to help understanding the method and core idea of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A device detection method is applied to an electronic device and is characterized in that a first Type-C interface is arranged on the electronic device, the first Type-C interface is connected with a second Type-C interface on an external device, configuration channel pins of the first Type-C interface comprise a first configuration channel pin and a second configuration channel pin, configuration channel pins of the second Type-C interface comprise a third configuration channel pin and a fourth configuration channel pin, the configuration channel pins of the second Type-C interface are electrically connected with a pull-down resistor, when the first Type-C interface is connected with the second Type-C interface, the first configuration channel pin is connected with the third configuration channel pin, the second configuration channel pin is connected with the fourth configuration channel pin, the pull-down resistor comprises a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected with the first pull-down resistor in a storage mode, the fourth configuration channel pin is electrically connected with the second pull-down resistor in a maintenance mode, the external device comprises a video transmission chip, and when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state, and the device detection method comprises the following steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor, determining that the external device in the sleep mode is detected to be connected to the electronic device.
2. The device detection method of claim 1, wherein the configuration channel pin of the video transmission chip is in a pull-down state before the external device enters the sleep mode, and the configuration channel pin of the video transmission chip is changed from the pull-down state to the floating state when the video transmission chip enters the sleep mode.
3. The device detection method according to claim 1, wherein after determining that the external device in the sleep mode is detected to access the electronic device, the method further comprises:
judging whether the external equipment is slave equipment of the electronic equipment or not;
and if the external equipment is the slave equipment of the electronic equipment, supplying power to the external equipment.
4. The device detection method according to claim 1, wherein the pull-down resistor has a resistance of 5.1 kilo-ohms.
5. A device detection device is applied to an electronic device and is characterized in that a first Type-C interface is arranged on the electronic device, the first Type-C interface is connected with a second Type-C interface on an external device, configuration channel pins of the first Type-C interface comprise a first configuration channel pin and a second configuration channel pin, configuration channel pins of the second Type-C interface comprise a third configuration channel pin and a fourth configuration channel pin, the configuration channel pins of the second Type-C interface are electrically connected with a pull-down resistor, when the first Type-C interface is connected with the second Type-C interface, the first configuration channel pin is connected with the third configuration channel pin, the second configuration channel pin is connected with the fourth configuration channel pin, the pull-down resistor comprises a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected to the first pull-down resistor, the fourth configuration channel pin is electrically connected to the second pull-down resistor, the external device includes a video transmission chip, and when the external device is in a sleep mode, the configuration channel pin of the video transmission chip is in a suspended state, and the device detection apparatus includes:
the voltage supply module is used for providing detection voltage for the configuration channel pin of the first Type-C interface;
the detection module is used for detecting the voltage on the configuration channel pin of the first Type-C interface based on the detection voltage;
the judging module is used for judging that the external equipment which detects the sleep mode is connected into the electronic equipment when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor.
6. A storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the steps in the device detection method according to any one of claims 1 to 4.
7. An electronic device, wherein the electronic device comprises a processor and a memory, the memory having a computer program stored therein, the processor performing the steps in the device detection method according to any one of claims 1 to 4 by calling the computer program stored in the memory.
8. An external device, comprising:
a second Type-C interface, the configuration channel pins of the second Type-C interface including a third configuration channel pin and a fourth configuration channel pin, the configuration channel pins of the second Type-C interface being electrically connected to a pull-down resistor, the second Type-C interface being connected to a first Type-C interface of an electronic device, the configuration channel pins of the first Type-C interface including a first configuration channel pin and a second configuration channel pin, the first configuration channel pin being connected to the third configuration channel pin when the first Type-C interface is connected to the second Type-C interface, the second configuration channel pin being connected to the fourth configuration channel pin, the pull-down resistor including a first pull-down resistor and a second pull-down resistor, the third configuration channel pin being electrically connected to the first pull-down resistor, the fourth configuration channel pin is electrically connected with the second pull-down resistor, the electronic device provides a detection voltage for the configuration channel pin of the first Type-C interface, the voltage on the configuration channel pin of the first Type-C interface is detected based on the detection voltage, and when the voltage on the first configuration channel pin is pulled down by the first pull-down resistor to be lower than a preset voltage and the voltage on the second configuration channel pin is pulled down by the second pull-down resistor to be lower than the preset voltage, it is determined that the external device in the sleep mode is detected to be connected to the electronic device;
and the configuration channel pin of the video transmission chip is in a suspended state when the external equipment is in a sleep mode.
9. A device detection system, comprising:
the external device is provided with a second Type-C interface, configuration channel pins of the second Type-C interface comprise a third configuration channel pin and a fourth configuration channel pin, the configuration channel pins of the second Type-C interface are electrically connected with a pull-down resistor, the external device comprises a video transmission chip, and when the external device is in a sleep mode, the configuration channel pins of the video transmission chip are in a suspended state;
the electronic equipment is provided with a first Type-C interface, the first Type-C interface is connected with a second Type-C interface on the external equipment, configuration channel pins of the first Type-C interface comprise a first configuration channel pin and a second configuration channel pin, when the first Type-C interface is connected with the second Type-C interface, the first configuration channel pin is connected with a third configuration channel pin, the second configuration channel pin is connected with a fourth configuration channel pin, the pull-down resistor comprises a first pull-down resistor and a second pull-down resistor, the third configuration channel pin is electrically connected with the first pull-down resistor, and the fourth configuration channel pin is electrically connected with the second pull-down resistor, and the electronic equipment executes the following steps:
providing detection voltage for a configuration channel pin of the first Type-C interface;
detecting the voltage on a configuration channel pin of the first Type-C interface based on the detection voltage;
when the voltage on the first configuration channel pin is pulled down to be lower than a preset voltage by the first pull-down resistor and the voltage on the second configuration channel pin is pulled down to be lower than the preset voltage by the second pull-down resistor, determining that the external device in the sleep mode is detected to be connected to the electronic device.
CN202011311199.1A 2020-11-20 2020-11-20 Equipment detection method, device, storage medium, electronic equipment, external equipment and system Active CN112333327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011311199.1A CN112333327B (en) 2020-11-20 2020-11-20 Equipment detection method, device, storage medium, electronic equipment, external equipment and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011311199.1A CN112333327B (en) 2020-11-20 2020-11-20 Equipment detection method, device, storage medium, electronic equipment, external equipment and system

Publications (2)

Publication Number Publication Date
CN112333327A CN112333327A (en) 2021-02-05
CN112333327B true CN112333327B (en) 2022-01-07

Family

ID=74322024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011311199.1A Active CN112333327B (en) 2020-11-20 2020-11-20 Equipment detection method, device, storage medium, electronic equipment, external equipment and system

Country Status (1)

Country Link
CN (1) CN112333327B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108628713A (en) * 2018-05-17 2018-10-09 Oppo广东移动通信有限公司 Equipment detection method, device, storage medium and electronic equipment
CN108631377A (en) * 2017-03-22 2018-10-09 台达电子工业股份有限公司 Electrifying control circuit and apply its portable power source device
CN108664430A (en) * 2018-05-21 2018-10-16 Oppo广东移动通信有限公司 Recognition methods, device, storage medium and the electronic equipment of equipment
CN108920397A (en) * 2018-07-02 2018-11-30 Oppo(重庆)智能科技有限公司 device identification method, device, storage medium and electronic equipment
CN208257029U (en) * 2018-06-04 2018-12-18 敏华家具制造(惠州)有限公司 A kind of USB socket
US10673251B2 (en) * 2017-05-30 2020-06-02 Canon Kabushiki Kaisha Electronic apparatus and control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108631377A (en) * 2017-03-22 2018-10-09 台达电子工业股份有限公司 Electrifying control circuit and apply its portable power source device
US10673251B2 (en) * 2017-05-30 2020-06-02 Canon Kabushiki Kaisha Electronic apparatus and control method thereof
CN108628713A (en) * 2018-05-17 2018-10-09 Oppo广东移动通信有限公司 Equipment detection method, device, storage medium and electronic equipment
CN108664430A (en) * 2018-05-21 2018-10-16 Oppo广东移动通信有限公司 Recognition methods, device, storage medium and the electronic equipment of equipment
CN208257029U (en) * 2018-06-04 2018-12-18 敏华家具制造(惠州)有限公司 A kind of USB socket
CN108920397A (en) * 2018-07-02 2018-11-30 Oppo(重庆)智能科技有限公司 device identification method, device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN112333327A (en) 2021-02-05

Similar Documents

Publication Publication Date Title
US20230205290A1 (en) Electronic device, method of controlling charging by electronic device, and method of supplying power by power supply device
US10095352B2 (en) Pen/touch tablet computer having multiple operation modes and method for switching operation modes
CN105912091B (en) Electronic device and method for reducing power consumption thereof
CN108920397B (en) Device identification method and device, storage medium and electronic device
US9304544B2 (en) System and display control method for external device
KR102275040B1 (en) Electronic apparatus and current consumption control method thereof
US8976111B2 (en) Electronic device and method for operating electronic device
CN108628713B (en) Device detection method and device, storage medium and electronic device
CN104142728A (en) Electronic device
US20190114133A1 (en) Electronic device having plurality of displays and control method
US11243594B2 (en) Electronic device supporting connection with external device and power consumption reducing method when using electronic device in connection with external device
KR20210032204A (en) Method for displaying charging situation at start of charging, the electronic device and storage medium therefor
KR20200100404A (en) Electronic device for adaptive power management
CN108681514B (en) Device detection method and device, storage medium and electronic device
CN112799985B (en) USB interface control method, USB control circuit and intelligent networking equipment mainboard
CN108664430B (en) Equipment identification method and device, storage medium and electronic equipment
US9208048B2 (en) Determination method for determining installation direction of electronic device and electronic system
CN112333327B (en) Equipment detection method, device, storage medium, electronic equipment, external equipment and system
US20120194416A1 (en) Electronic apparatus and method of controlling electronic apparatus
CN104978173B (en) Sense digital independent device and its read method
CN214540750U (en) USB control circuit, intelligent networking equipment mainboard and electronic equipment
CN107589819B (en) Mobile terminal, current setting method thereof, and computer-readable storage medium
CN112367701B (en) Mobile terminal control method, device, storage medium and mobile terminal
KR20210129527A (en) An electronic device including connector and a method detecting disconnection
CN107589820B (en) Mobile terminal, current setting method thereof, and computer-readable storage medium

Legal Events

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