Ethernet interface detection method, device, storage medium and electronic device
By using the pins of the microcontroller in the detection circuit to determine the Ethernet interface type and select the relay with the highest output power level, the problem of low detection accuracy of Ethernet interfaces is solved, and high-precision interface type identification and equipment security are achieved.
Patent Information
- Application Number
- CN202310476157.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2043-04-27
AI Technical Summary
In the prior art, the detection accuracy of Ethernet interfaces is low, and the status (or type) of Ethernet interface cannot be accurately identified, resulting in the device burning or the source of the problem cannot be determined.
By connecting the Ethernet interface to be detected to the detection circuit, the signal information is obtained by using the first pin of the microcontroller to determine whether it is a non-standard type. If not, the relay with the highest output power level is selected from the multiple candidate relays, and the signal information is obtained by the second pin to determine the interface protocol type.
Improve the accuracy of Ethernet interface detection, avoid equipment burning, and ensure detection accuracy and efficiency.
Smart Images

Figure CN116668329B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Ethernet power supply, and in particular to an Ethernet interface detection method, device, storage medium and electronic device. Background Art
[0002] In related technologies, Ethernet power supply interfaces are typically tested by directly connecting them to a power supply device. However, some Ethernet interfaces use non-standard designs and lack corresponding chip isolation. Directly connecting them to a power supply device can damage the device. Furthermore, if the power supply device fails to function properly after connecting the Ethernet interface, it's impossible to determine whether the problem lies with the Ethernet interface or the power supply device, or whether the Ethernet interface's output power doesn't meet the power supply device's requirements.
[0003] That is, the above method has the defect of being unable to accurately identify and detect the state (or type) of the Ethernet interface, which leads to the problem of low accuracy of Ethernet interface detection in the related art. Summary of the Invention
[0004] The embodiments of the present application provide an Ethernet interface detection method, device, storage medium, and electronic device to at least solve the technical problem of low Ethernet interface detection accuracy in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for detecting an Ethernet interface is provided, comprising: connecting an Ethernet interface to be detected to a detection circuit, wherein the detection circuit comprises a single-chip microcomputer and multiple candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin; obtaining first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type; when the first signal information indicates that the Ethernet interface is not of the non-standard type, determining a first relay with the highest output power level from the multiple candidate relays; when the first relay is in a startup state, obtaining second signal information associated with the second pin, wherein the second signal information is used to indicate whether the Ethernet interface is of a first protocol type associated with the first relay.
[0006] According to another aspect of an embodiment of the present application, an Ethernet interface detection device is also provided, including: a connection unit, used to connect the Ethernet interface to be detected to a detection circuit, wherein the above-mentioned detection circuit includes a single-chip microcomputer and multiple candidate relays, and the above-mentioned single-chip microcomputer is provided with a first pin and a second pin; a first acquisition unit, used to obtain first signal information associated with the above-mentioned first pin, wherein the above-mentioned first signal information is used to indicate whether the above-mentioned Ethernet interface belongs to the above-mentioned non-standard type; a determination unit, used to determine the first relay with the highest output power level from the above-mentioned multiple candidate relays when the above-mentioned first signal information indicates that the above-mentioned Ethernet interface does not belong to the above-mentioned non-standard type; a second acquisition unit, used to obtain second signal information associated with the above-mentioned second pin when the above-mentioned first relay is in a started state, wherein the above-mentioned second signal information is used to indicate whether the above-mentioned Ethernet interface belongs to the first protocol type associated with the above-mentioned first relay.
[0007] As an optional solution, the above-mentioned device also includes: a first determination module, which is used to determine that the above-mentioned Ethernet interface belongs to the above-mentioned first protocol type after the second signal information associated with the above-mentioned second pin is obtained, and when the above-mentioned second signal information indicates that there is a voltage or current signal on the above-mentioned second pin; a second determination module, which is used to determine that the above-mentioned Ethernet does not belong to the above-mentioned first protocol type after the above-mentioned second signal information associated with the above-mentioned second pin is obtained, and when the above-mentioned second signal information indicates that there is no voltage or current signal on the above-mentioned second pin.
[0008] As an optional solution, the above-mentioned device also includes: a third determination module, which is used to determine the second relay with the highest output power level from multiple candidate relays excluding the above-mentioned first relay after it is determined that the above-mentioned Ethernet does not belong to the above-mentioned first protocol type; an acquisition module, which is used to obtain the third signal information associated with the above-mentioned second pin after it is determined that the above-mentioned Ethernet does not belong to the above-mentioned first protocol type and when the above-mentioned second relay is in the startup state, wherein the above-mentioned third signal information is used to indicate whether the above-mentioned Ethernet interface belongs to the second protocol type associated with the above-mentioned second relay.
[0009] As an optional solution, the above-mentioned first determination module includes: a first acquisition submodule, used to obtain detection information associated with the detection resistor through the header of the powered device associated with the above-mentioned Ethernet interface, wherein the above-mentioned header is connected between the above-mentioned detection resistor and the above-mentioned first relay; a second acquisition submodule, used to obtain the graded current emitted by the above-mentioned header when the above-mentioned detection information indicates a pass, wherein the above-mentioned graded current is used to request to close the target switch at the tail of the above-mentioned powered device, wherein the above-mentioned tail is connected between the above-mentioned first relay and the above-mentioned second pin; the first determination submodule is used to determine that the above-mentioned second pin obtains the above-mentioned second signal information indicating the presence of a voltage or current signal when the above-mentioned graded current successfully closes the above-mentioned target switch.
[0010] As an optional solution, the above-mentioned device also includes: a third acquisition sub-module, which is used to obtain the current circuit information of the above-mentioned detection circuit using the above-mentioned detection resistor before obtaining the graded current sent by the above-mentioned header when the above-mentioned detection information indicates a pass, wherein the above-mentioned current circuit information is used to indicate whether there is a handshake chip on the above-mentioned Ethernet interface; a judgment sub-module, which is used to determine whether the handshake protocol associated with the above-mentioned handshake chip matches the above-mentioned first protocol type when the above-mentioned current circuit information indicates that the above-mentioned Ethernet interface exists before obtaining the graded current sent by the above-mentioned header when the above-mentioned detection information indicates a pass; a second determination sub-module, which is used to confirm that the above-mentioned detection information has passed when the above-mentioned handshake protocol matches the above-mentioned first protocol type before obtaining the graded current sent by the above-mentioned header when the above-mentioned detection information indicates a pass.
[0011] As an optional solution, the above-mentioned device also includes: a fourth determination module, which is used to determine that the above-mentioned Ethernet interface belongs to the above-mentioned non-standard type after the first signal information associated with the first pin is obtained, and when the above-mentioned first signal information indicates that there is a voltage or current signal on the above-mentioned first pin; a fifth determination module, which is used to determine that the above-mentioned Ethernet does not belong to the above-mentioned non-standard type after the above-mentioned first signal information associated with the first pin is obtained, and when the above-mentioned first signal information indicates that there is no voltage or current signal on the above-mentioned first pin.
[0012] As an optional solution, the above-mentioned device further includes: a display module, which is used to display the above-mentioned interface type information on a display screen connected to the above-mentioned single-chip microcomputer when the interface type information of the above-mentioned Ethernet interface is determined.
[0013] According to another aspect of the embodiments of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the Ethernet interface detection method described above.
[0014] According to another aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the Ethernet interface detection method through the computer program.
[0015] In an embodiment of the present application, the Ethernet interface to be detected is connected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and multiple candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin; first signal information associated with the first pin is obtained, wherein the first signal information is used to indicate whether the Ethernet interface belongs to a non-standard type; when the first signal information indicates that the Ethernet interface does not belong to the non-standard type, the first relay with the highest output power level is determined from the multiple candidate relays; when the first relay is in a startup state, second signal information associated with the second pin is obtained, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
[0016] Using the above method, the first pin on the single-chip microcomputer is first used to obtain and determine whether the Ethernet interface is a non-standard type. Further, if the Ethernet interface is not a non-standard type, the second pin on the single-chip microcomputer is used to obtain and determine whether the Ethernet interface is the protocol type corresponding to the relay with the highest current output power level, in sequence according to the output power level. By determining that the Ethernet interface is not a non-standard type and then matching the power levels from high to low to obtain the interface protocol type of the Ethernet interface, not only does this prevent equipment from burning due to non-standard Ethernet direct power supply or excessive Ethernet interface output power, but it also achieves the purpose of improving the accuracy of determining the Ethernet interface type, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface and solving the problem of low Ethernet interface detection accuracy in related systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 1 is a schematic diagram of a hardware environment for an Ethernet interface detection method according to an embodiment of the present application;
[0020] Figure 2 This is a schematic diagram of a process of an optional Ethernet interface detection method according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an optional Ethernet interface detection method according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0026] Figure 8 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0027] Figure 9 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0028] Figure 10 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0029] Figure 11 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0030] Figure 12 is a schematic diagram of another optional Ethernet interface detection method according to an embodiment of the present application;
[0031] Figure 13is a schematic diagram of an optional information processing device according to an embodiment of the present invention;
[0032] Figure 14 is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0036] According to one aspect of the embodiment of the present application, an Ethernet interface detection method is provided. Optionally, as an optional implementation, the Ethernet interface detection method can be applied to, but is not limited to, Figure 1 In the environment shown, the system may include, but is not limited to, a user device 102 and a server 112 . The user device may include, but is not limited to, a display 104 , a processor 106 , and a memory 108 . The server 112 includes a database 114 and a processing engine 116 .
[0037] The specific process can be as follows:
[0038] Step S102: The user equipment 102 obtains an Ethernet interface detection request triggered by a user, wherein the Ethernet interface detection request is used to request detection of a protocol type to which the Ethernet interface belongs;
[0039] Steps S104-S106, sending the triggered interface detection request to the server 112 via the network 110;
[0040] Step S108 , the server 112 connects the Ethernet interface to be detected to the detection circuit in response to the circuit overcurrent detection request;
[0041] Step S110: The server 112 obtains first signal information of a first pin of the detection circuit, and determines whether the Ethernet interface is of a non-standard type based on the first signal information;
[0042] Step S112: when the Ethernet interface is not of a non-standard type, the server 112 determines a target relay with the highest output power level from a plurality of candidate relays included in the detection circuit and starts the target relay;
[0043] Step S114: the server 112 obtains second signal information associated with the second pin of the detection circuit, and determines whether the Ethernet interface belongs to the target protocol associated with the target relay based on the second signal information;
[0044] In steps S116-S118, the interface detection result is sent to the user device 102 via the network 110. The user device 102 uses the interface detection result through the processor 106 to initiate a corresponding state control instruction for the circuit, and displays the interface detection result on the display 104, and stores the interface detection result in the memory 108.
[0045] remove Figure 1 In addition to the examples shown, the above steps can be completed independently by the client or the server, or by the client and the server working together. For example, the user device 102 performs the above steps S108 to S114, thereby reducing the processing pressure on the server 112. The user device 102 includes but is not limited to a handheld device, an in-vehicle device, etc., and this application does not limit the specific implementation of the user device 102.
[0046] Alternatively, as an optional implementation, as Figure 2 As shown, the Ethernet interface detection method includes:
[0047] S202, connecting the Ethernet interface to be detected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin;
[0048] S204, obtaining first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type;
[0049] S206, when the first signal information indicates that the Ethernet interface is not of a non-standard type, determining a first relay having a highest output power level from a plurality of candidate relays;
[0050] S208 : When the first relay is in the start-up state, obtain second signal information associated with the second pin, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
[0051] Optionally, in this embodiment, the Ethernet interface detection method described above can be applied to, but is not limited to, wired Ethernet interface detection scenarios. In this scenario, a PSE chip can be used to detect and classify wired Ethernet devices before providing power. However, some wired Ethernet products use non-standard designs, lack PSE chip isolation, and do not perform power supply after detection and classification. This can lead to device burnout after connecting PDs. Furthermore, some PDs connected to POE interfaces may not function properly, making it difficult to determine whether the problem lies with the PSE or the PD, or whether the PSE output power does not meet the PD's requirements.
[0052] That is, the above-mentioned method of detecting and grading wired Ethernet using a PSE chip has the defect of being unable to accurately identify and detect the status (or type) of the Ethernet interface, which leads to the problem of low Ethernet interface detection accuracy in related technologies.
[0053] In order to solve the problem of low accuracy of Ethernet interface detection, this embodiment is used Figure 2 The Ethernet interface detection method shown in the figure first uses the first pin of the single-chip microcomputer to obtain and determine whether the Ethernet interface is a non-standard type. Further, if the Ethernet interface is not a non-standard type, the second pin of the single-chip microcomputer is used to obtain and determine whether the Ethernet interface is of the protocol type corresponding to the current relay according to the output power level. By determining that the Ethernet interface is not a non-standard type and then matching the power level from high to low to obtain the interface protocol type of the Ethernet interface, not only does it prevent equipment burnout due to non-standard Ethernet direct power supply or excessive Ethernet interface output power, but it also achieves the goal of improving the accuracy of Ethernet interface type determination, thereby achieving the technical effect of improving the detection accuracy of Ethernet interfaces and solving the problem of low Ethernet interface detection accuracy in related systems.
[0054] Optionally, in this embodiment, the detection circuit may include, but is not limited to, a single-chip microcomputer and multiple candidate relays, wherein the single-chip microcomputer may be, but is not limited to, provided with a first pin, a second pin, and multiple candidate relay pins, the first pin may be, but is not limited to, used to obtain first signal information indicating whether the Ethernet interface is of a non-standard type, the second pin may be, but is not limited to, used to obtain second signal information indicating whether the Ethernet interface belongs to a target protocol type associated with the target relay, and the multiple candidate relay pins may be, but is not limited to, used to connect multiple candidate relays and control the start or shutdown status of multiple candidate relays.
[0055] Optionally, in this embodiment, the detection circuit may include, but is not limited to, a rectifier bridge device, wherein the rectifier bridge device may be, but is not limited to, used to convert an input AC signal into a DC signal.
[0056] Optionally, in this embodiment, the first detection sub-circuit corresponding to the rectifier bridge device in the detection circuit is associated with the first pin of the single-chip microcomputer.
[0057] Optionally, in this embodiment, the detection circuit may include, but is not limited to, a detection resistor including a handshake protocol, wherein, if the voltage or current signal in the detection circuit does not have handshake information, the voltage or current signal cannot pass through the detection resistor.
[0058] Optionally, in this embodiment, the non-standard Ethernet interface does not have a handshake chip inside, and the voltage or current signal generated in the detection circuit of the non-standard Ethernet interface cannot pass through the detection resistor included in the detection circuit.
[0059] Optionally, in this embodiment, the second detection sub-circuit corresponding to the detection resistor in the detection circuit is associated with the second pin of the single chip microcomputer.
[0060] It should be noted that when the Ethernet interface to be detected is of a non-standard type, the voltage or current signal output by the rectifier bridge device cannot pass through the second detection sub-circuit, and there is no voltage or current signal on the second pin of the microcontroller, but can pass through the first detection sub-circuit, and there is a voltage or current signal on the first pin of the microcontroller.
[0061] It should be noted that, when the Ethernet interface to be detected is not of a non-standard type, the (standard) protocol type of the Ethernet interface is further determined.
[0062] Optionally, in this embodiment, the protocol type may include but is not limited to a BT protocol type, an AT protocol type, an AF protocol type, etc., wherein each protocol type corresponds to an output power type. For example, the output power of the BT protocol type is greater than the output power of the AT protocol type, and the output power of the AT protocol type is greater than the AF protocol type.
[0063] Optionally, in this embodiment, each relay may be, but is not limited to, associated with a protocol type, wherein the relay may be, but is not limited to, including a relay switch and a relay resistor, and different relay resistors correspond to different protocol types and different output power types.
[0064] To further illustrate, Figure 3 As shown, the first relay 302 is associated with the AF protocol type, and the first relay resistor 304 in the first relay 302 is an AF protocol voltage divider resistor, which can be but is not limited to 21 ohms; the second relay 306 is associated with the AT protocol type, and the second relay resistor 308 in the second relay 306 is an AT protocol voltage divider resistor, which can be but is not limited to 20 ohms; the third relay 310 is associated with the BT protocol type, and the third relay resistor 312 in the third relay 310 is a BT protocol voltage divider resistor, which can be but is not limited to 19 ohms.
[0065] It should be noted that the specific resistance values of the voltage divider resistors for different protocols may be, but are not limited to, determined according to different PD chip specifications.
[0066] It should be noted that the first relay resistor 304 is greater than the second relay resistor 308, and the second relay resistor 308 is greater than the third relay resistor 312; the output power of the BT protocol associated with the first relay 302 is greater than the output power of the AT protocol associated with the second relay 306, and the output power of the AT protocol associated with the second relay 306 is greater than the output power of the AF protocol associated with the third relay 310.
[0067] Optionally, in this embodiment, when the Ethernet interface is of a non-standard type, a first relay having the highest output power level is determined from a plurality of relays.
[0068] Optionally, in this embodiment, when the Ethernet interface belongs to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device can pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates the presence of a voltage or current signal.
[0069] Optionally, in this embodiment, when the Ethernet interface does not belong to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device cannot pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates that there is no voltage or current signal.
[0070] It should be noted that, when the Ethernet interface does not belong to the first protocol type, it is determined that the output power level corresponding to the protocol type of the Ethernet interface is less than the highest output power level corresponding to the first protocol type, and further the second relay with the highest output power level is determined from multiple candidate relays excluding the first relay, and it is judged whether the Ethernet protocol type matches the second protocol type corresponding to the second relay.
[0071] It should be noted that using the above method, detection always starts from the highest output power level and then conducts in-depth detection in a step-by-step manner. This can ensure that there is no risk of burning out the detection circuit, and the accuracy is gradually improved, which can take into account the detection accuracy and efficiency of the Ethernet interface.
[0072] Through the embodiment provided by the present application, the Ethernet interface to be detected is connected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and multiple candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin; obtain first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type; when the first signal information indicates that the Ethernet interface is not of a non-standard type, determine the first relay with the highest output power level from multiple candidate relays; when the first relay is in a startup state, obtain second signal information associated with the second pin, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay. First, use the first pin on the single-chip microcomputer to obtain and determine whether the Ethernet interface is of a non-standard type. Further, when the Ethernet interface is not of a non-standard type, use the second pin on the single-chip microcomputer in sequence according to the output power level to obtain and determine whether the Ethernet interface is the protocol type corresponding to the current relay. By detecting that the Ethernet interface is not a non-standard type and matching the power levels from high to low to obtain the interface protocol type of the Ethernet interface, not only can the equipment be burned out due to direct power supply of non-standard Ethernet or excessive output power of the Ethernet interface be prevented, but the accuracy of determining the Ethernet interface type can also be improved, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface and solving the problem of low detection accuracy of the Ethernet interface in related systems.
[0073] As an optional solution, after obtaining the second signal information associated with the second pin, the method further includes:
[0074] S1, determining that the Ethernet interface belongs to the first protocol type when the second signal information indicates that a voltage or current signal exists on the second pin;
[0075] S2: When the second signal information indicates that there is no voltage or current signal on the second pin, determine that the Ethernet interface does not belong to the first protocol type.
[0076] Optionally, in this embodiment, when the Ethernet interface belongs to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device can pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates the presence of a voltage or current signal.
[0077] Optionally, in this embodiment, when the Ethernet interface does not belong to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device cannot pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates that there is no voltage or current signal.
[0078] It should be noted that when the second signal indicates that there is a voltage or current signal on the second pin, it is determined that the Ethernet interface belongs to the first protocol type; when the second signal information indicates that there is no voltage or current signal on the second pin, it is determined that the Ethernet interface does not belong to the first protocol type.
[0079] It should be noted that the second signal indicates whether a voltage or current signal exists at the second pin, which can be determined based on, but not limited to, a voltage or current signal detection result within a preset time threshold.
[0080] Through the embodiments provided herein, when the second signal information indicates the presence of a voltage or current signal on the second pin, the Ethernet interface is determined to belong to the first protocol type; and when the second signal information indicates the absence of a voltage or current signal on the second pin, the Ethernet interface is determined not to belong to the first protocol type. By determining the protocol type of the Ethernet interface based on whether a voltage or current signal is detected on the second pin of the microcontroller, the accuracy of determining the Ethernet interface type is improved, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface.
[0081] As an optional solution, after determining that the Ethernet interface does not belong to the first protocol type, the method further includes:
[0082] S1, determining a second relay with the highest output power level from a plurality of candidate relays excluding the first relay;
[0083] S2: When the second relay is in the start-up state, obtain third signal information associated with the second pin, wherein the third signal information is used to indicate whether the Ethernet interface belongs to the second protocol type associated with the second relay.
[0084] Optionally, in this embodiment, when the Ethernet interface is of a non-standard type, a first relay having the highest output power level is determined from a plurality of relays.
[0085] Optionally, in this embodiment, when the Ethernet interface belongs to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device can pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates the presence of a voltage or current signal.
[0086] Optionally, in this embodiment, when the Ethernet interface does not belong to the first protocol type associated with the first relay, the voltage or current signal output by the rectifier bridge device cannot pass through the second detection sub-circuit corresponding to the detection resistor, and the second signal information associated with the second pin of the microcontroller indicates that there is no voltage or current signal.
[0087] It should be noted that, when the Ethernet interface does not belong to the first protocol type, it is determined that the output power level corresponding to the protocol type of the Ethernet interface is less than the highest output power level corresponding to the first protocol type, and further the second relay with the highest output power level is determined from multiple candidate relays excluding the first relay, and it is judged whether the Ethernet protocol type matches the second protocol type corresponding to the second relay.
[0088] Through the embodiments provided by the present application, a second relay with the highest output power level is determined from a plurality of candidate relays excluding the first relay; when the second relay is in an activated state, third signal information associated with the second pin is obtained, wherein the third signal information is used to indicate whether the Ethernet interface belongs to the second protocol type associated with the second relay. By determining that the Ethernet interface is not a non-standard type and then determining the interface protocol type of the Ethernet interface based on a high-to-low power level match, not only does this prevent equipment burnout due to non-standard Ethernet direct power supply or excessive Ethernet interface output power, but it also improves the accuracy of determining the Ethernet interface type, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface.
[0089] As an optional solution, when the second signal information indicates that a voltage or current signal exists on the second pin, determining that the Ethernet interface belongs to the first protocol type includes:
[0090] S1, obtaining detection information associated with a detection resistor through a header of a powered device associated with an Ethernet interface, wherein the header is connected between the detection resistor and a first relay;
[0091] S2, when the detection information indicates a pass, obtaining a graded current emitted by the head, wherein the graded current is used to request to turn off a target switch of a tail of the powered device, wherein the tail is connected between the first relay and the first pin;
[0092] S3: When the graded current successfully turns off the target switch, determine whether the second pin obtains second signal information indicating the presence of a voltage or current signal.
[0093] Optionally, in this embodiment, the head of the powered device associated with the Ethernet interface may include, but is not limited to, at least two pins, wherein the first PD pin is connected to the detection resistor, and the user obtains detection information associated with the detection resistor, and the second PD pin is connected to multiple relays for outputting graded current.
[0094] Optionally, in this embodiment, the tail portion of the powered device may include, but is not limited to, a target switch, wherein the target switch is connected between the relay and the first pin of the single chip microcomputer.
[0095] It should be noted that the target switch is controlled by the powered device.
[0096] It should be noted that when the interface type information of the Ethernet interface matches the type information associated with the current relay, the powered device can, but is not limited to, control the target switch to switch from the default on state to the off state by issuing a graded current, and then connect the line from the detection resistor to the head of the powered device to the relay to the tail of the powered device to the second pin of the microcontroller, and the second signal information associated with the second pin indicates the presence of a voltage or current signal.
[0097] It should be noted that the matching of the interface type information of the Ethernet interface and the type information associated with the current relay can be, but is not limited to, obtaining the current circuit information of the detection circuit by using a detection resistor, wherein the current circuit information is used to indicate whether there is a handshake chip on the Ethernet interface; when the current circuit information indicates that there is a handshake chip on the Ethernet interface, it is determined whether the handshake protocol associated with the handshake chip matches the first protocol type; when the handshake protocol matches the first protocol type, the interface type information of the Ethernet interface matches the type information associated with the current relay.
[0098] Through the embodiments provided by the present application, detection information associated with the detection resistor is obtained through the header of the powered device associated with the Ethernet interface, wherein the header is connected between the detection resistor and the first relay; when the detection information indicates a pass, a graded current emitted by the header is obtained, wherein the graded current is used to request to turn off the target switch at the tail of the photodiode chip, wherein the tail is connected between the first relay and the first pin; when the graded current successfully turns off the target switch, it is determined that the second pin obtains second signal information indicating the presence of a voltage or current signal, thereby achieving the purpose of improving the accuracy of determining the interface type of the Ethernet, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface.
[0099] As an optional solution, before obtaining the graded current sent by the header when the detection information indicates a pass, the method further includes:
[0100] S1, using a detection resistor to obtain current circuit information of the detection circuit, wherein the current circuit information is used to indicate whether the Ethernet interface has a handshake chip;
[0101] S2, when the current circuit information indicates that the Ethernet interface has a handshake chip, determining whether the handshake protocol associated with the handshake chip matches the first protocol type;
[0102] S3: If the handshake protocol matches the first protocol type, confirm that the detection information is passed.
[0103] Optionally, in this embodiment, the detection resistor can be used, but is not limited to, to detect whether there is a handshake chip in the current Ethernet interface. It can also be used, but is not limited to, to determine whether the handshake protocol of the handshake chip matches the type protocol associated with the relay when there is a handshake chip in the current Ethernet interface.
[0104] Optionally, in this embodiment, the detection resistor may also be, but is not limited to, a dummy load, which may be, but is not limited to, ensuring that no overcurrent occurs under the minimum output power type protocol.
[0105] It should be noted that the detection resistor can also be used, but is not limited to, to screen non-standard Ethernet interfaces. Non-standard Ethernet interfaces do not have handshake chips and their corresponding circuit information does not have a handshake protocol. The current in the circuit corresponding to the non-standard Ethernet interface cannot pass through the detection resistor.
[0106] Through the embodiments provided by the present application, a detection resistor is used to obtain current circuit information of a detection circuit, wherein the current circuit information is used to indicate whether a handshake chip exists in the Ethernet interface; when the current circuit information indicates that a handshake chip exists in the Ethernet interface, it is determined whether the handshake protocol associated with the handshake chip matches a first protocol type; when the handshake protocol matches the first protocol type, it is confirmed that the detection information has passed. By using the detection resistor and the handshake result to determine whether the current Ethernet interface type is a non-standard type, it is also possible to further determine the protocol type of the current Ethernet interface type, thereby achieving the purpose of improving the accuracy of determining the Ethernet interface type, thereby achieving the technical effect of improving the detection accuracy of the Ethernet interface.
[0107] As an optional solution, after obtaining the first signal information associated with the first pin, the method further includes:
[0108] S1, determining that the Ethernet interface is of a non-standard type when the first signal information indicates that a voltage or current signal exists on the first pin;
[0109] S2: When the first signal information indicates that there is no voltage or current signal on the first pin, determine that the Ethernet is not a non-standard type.
[0110] Optionally, in this embodiment, if the Ethernet interface is of a non-standard type, the voltage or current signal output by the rectifier bridge device can pass through the first detection sub-circuit corresponding to the detection resistor, and the first signal information associated with the first pin of the single-chip microcomputer indicates the presence of the voltage or current signal. Optionally, in this embodiment, if the Ethernet interface is not of a non-standard type, the voltage or current signal output by the rectifier bridge device cannot pass through the first detection sub-circuit corresponding to the detection resistor, and the first signal information associated with the first pin of the single-chip microcomputer indicates the absence of the voltage or current signal.
[0111] Through the embodiments provided in the present application, when the first signal information indicates that there is a voltage or current signal on the first pin, it is determined that the Ethernet interface is of a non-standard type; when the first signal information indicates that there is no voltage or current signal on the first pin, it is determined that the Ethernet is not of a non-standard type, thereby achieving the purpose of distinguishing the standard type of the Ethernet interface, thereby realizing the technical effect of ensuring the safety of the detection circuit and equipment.
[0112] As an optional solution, the method further comprises:
[0113] S1, when the interface type information of the Ethernet interface is determined, the interface type information is displayed on a display screen connected to the single chip computer.
[0114] Optionally, in this embodiment, the display screen can be, but is not limited to, directly connected to the single chip microcomputer.
[0115] Optionally, when the interface type information of the Ethernet interface is determined, corresponding prompt information is displayed on the display screen.
[0116] For example, when it is determined that the Ethernet interface is not a non-standard type, the display screen may, but is not limited to, display the message "This Ethernet interface is not a non-standard type, please further check whether it is a BT type"; or when it is determined that the Ethernet interface is not a non-standard type and is not a BT type, the display screen may, but is not limited to, display the message "This Ethernet is not a BT type, please further check whether it is an AT type".
[0117] The embodiment provided by this application, as an optional solution, displays the interface type information of the Ethernet interface on a display screen connected to the single-chip microcomputer after the interface type information of the Ethernet interface is determined. By providing timely feedback of the current detection results, the speed and richness of the information feedback of Ethernet interface detection are improved, thereby achieving the technical effect of improving the accuracy and efficiency of Ethernet interface detection.
[0118] As an optional solution, the Ethernet interface detection method is applied to a portable PSE power supply mode automatic detection system, such as Figure 4 As shown, the system includes an RJ45 interface 1, a rectifier bridge 2, a voltage divider resistor 3, a voltage divider resistor 4, a voltage regulator diode 5, a relay 6, a relay 7, a relay 8, a PSE access detection resistor 9, a PD chip 10, a high-precision current sensor 11, a power resistor 12, a single-chip microcomputer 13, an LCD screen 14, a lithium battery 15, a power module 16, a voltage follower 17, a BT grading resistor 19, an AT grading resistor 20, and an AF grading resistor 21.
[0119] Among them, the PD chip 10 includes a switch 18 inside, which is controlled by the PD chip 10. The switch 18 connects pin 2 of the PD chip 10 and pin 4 of the PD chip. Pin 1 of the PD chip is the POE protocol detection pin, and pin 3 of the PD chip is the POE protocol classification pin.
[0120] RJ45 port 1 is connected to the AC input of bridge rectifier 2. The DC output of bridge rectifier 2 is connected to the cathode of voltage regulator 5, the PSE is connected to one end of detection resistor 9, and finally, through high-precision current sensor 11, is connected to one end of power resistor 12. The other end of power resistor 12 is connected to pin 4 of PD chip 10.
[0121] The anode of the voltage regulator 5 is connected to one end of the voltage divider resistor 4, and the other end of the resistor 4 is connected to one end of the voltage divider resistor 3 and the input port of the voltage follower 17. The other end of the resistor 3 is connected to the DC input end of the rectifier bridge 2 and pin 2 of the PD chip.
[0122] Pin 3 of PD chip 10 is connected to the inputs of relays 6, 7, and 8. The normally-open output of relay 6 is connected to one end of AF grading resistor 21, the other end of which is connected to the DC input of rectifier bridge 2 and pin 2 of PD chip 10. The normally-open output of relay 7 is connected to one end of AT grading resistor 20, the other end of which is connected to the DC input of rectifier bridge 2 and pin 2 of PD chip 10. The normally-open output of relay 8 is connected to one end of BT grading resistor 19, the other end of which is connected to the DC input of rectifier bridge 2 and pin 2 of PD chip 10.
[0123] Among them, the control pins of relay 6 are respectively connected to pin 5 of the single-chip microcomputer 13 , the control pins of relay 7 are respectively connected to pin 4 of the single-chip microcomputer 13 , and the control pins of relay 8 are respectively connected to pin 3 of the single-chip microcomputer 13 .
[0124] The signal output of high-precision current sensor 11 is connected to pin 2 of microcontroller 13, and the output of voltage follower 17 is connected to pin 1 of microcontroller 13. Microcontroller 13 and LCD screen 14 are connected via a flat cable. Lithium battery 15 is connected to the input of power module 16, and the output of power module 16 is connected to microcontroller 13.
[0125] When the system is working, connect the lithium battery 115 to the system to ensure normal operation of the system. Connect the POE interface (i.e., Ethernet interface, the same below) to be tested to the RJ45 interface 1 through a network cable to ensure that all devices in the system are connected normally.
[0126] Furthermore, in the case where the POE interface to be tested is a non-standard POE interface, the current flow direction of the above portable PSE power supply automatic detection system is shown as follows: Figure 5 shown.
[0127] Specifically, after rectification by the rectifier bridge 2, a high voltage is generated at the DC output and DC input ends of the rectifier bridge 2, causing the voltage regulator 5 to be turned on. The current flows from the DC output end into the cathode of the voltage regulator 5, flows out from the anode of the voltage regulator 5, passes through the voltage divider resistor 4, and then flows back to the DC input end of the rectifier bridge 2 after the voltage divider resistor 3. The voltage divider value between the voltage divider resistors 3 and 4 is collected by pin 2 of the single-chip microcomputer 13 through the voltage follower 17. At this time, the PD chip 10 has not received the handshake chip of the POE, does not control the internal switch 18 to be closed, no current flows through the power resistor 12, and the high-precision current sensor 11 has no detection signal transmitted to pin 2 of the single-chip microcomputer 13. There is no signal at pin 2 of the single-chip microcomputer, but there is a signal at pin 1. It is judged that the POE port is non-standard POE, and "non-standard POE" is displayed on the LCD screen 14.
[0128] based on Figure 4 The portable PSE power supply mode automatic detection system shown enters the BT interface detection when the single chip microcomputer 13 determines that the access interface is not a non-standard POE interface.
[0129] Specifically, the current flow diagram during BT protocol detection is as follows: Figure 6As shown, pin 3 of microcontroller 13 controls relay 8 to close, connecting PD chip 10's classification detection pin 3 to BT detection resistor 19. The POE detection signal at the DC output of rectifier bridge 2 is first detected by detection resistor 9. After a successful handshake, PD chip 10's control pin 3 sends a classification current. The classification current passes through relay 8, BT classification resistor 19, and the DC input of rectifier bridge 2, and finally flows back to the PSE through RJ45 port 1.
[0130] Furthermore, when the POE interface to be tested is not a non-standard POE interface but a BT protocol type interface, the current flow direction of the above portable PSE power supply automatic detection system is shown as follows: Figure 7 As shown in the figure, the internal MOS of the PSE device (device under test) at the other end is closed, and the PD chip 10 controls the switch 18 to close, turning on the power resistor 12. The current passes through the high-precision current sensor 11, generating a sensing signal that is sent to pin 2 of the microcontroller 13. The microcontroller then controls the LCD screen 14 to display "BT device connected."
[0131] based on Figure 4 The portable PSE power supply mode automatic detection system shown enters the AT interface detection when the single chip microcomputer 13 determines that the access interface is not a BT interface.
[0132] Specifically, the current flow diagram during AT protocol detection is as follows: Figure 8 As shown, pin 3 of microcontroller 13 controls relay 8 to open, while pin 4 of microcontroller 13 controls relay 7 to close, connecting the PD's classification detection pin 3 to the AT detection resistor 20. The POE detection signal at the DC output of rectifier bridge 2 is first detected by detection resistor 9. After a successful handshake, control pin 3 of PD chip 10 generates a classification current. The shunt classification current passes through relay 7, AT classification resistor 20, and the DC input of rectifier bridge 2, and finally flows back to the PSE through RJ45 port 1.
[0133] Furthermore, in the case where the POE interface to be tested is not a BT interface but an AT protocol type interface, the current flow direction of the above portable PSE power supply automatic detection system is shown as follows: Figure 9 shown.
[0134] The internal MOS of the PSE device (device under test) at the other end is closed, and the PD chip controls switch 18 to close, turning on power resistor 12. The current passes through high-precision current sensor 11, generating an induction signal that is sent to pin 2 of microcontroller 13. The microcontroller then controls LCD screen 14 to display "AT device connected."
[0135] based on Figure 4The portable PSE power supply mode automatic detection system shown enters the AF interface detection when the single chip microcomputer 13 determines that the access interface is not the AT interface.
[0136] Specifically, the current flow diagram during AF protocol detection is as follows: Figure 10 As shown, pin 4 of microcontroller 13 controls relay 7 to open, while pin 5 of microcontroller 13 controls relay 6 to close, connecting the PD's classification detection pin 3 to af detection resistor 21. The POE detection signal at the DC output of rectifier bridge 2 is first detected by detection resistor 9. After a successful handshake, control pin 3 of PD chip 10 generates a classification current. The shunt classification current passes through relay 6, af classification resistor 21, and the DC input of rectifier bridge 2, and finally flows back to the PSE through RJ45 port 1.
[0137] Furthermore, when the POE interface to be tested is not an AT interface but an AF protocol type interface, the current flow direction of the above portable PSE power supply automatic detection system is shown as follows: Figure 11 As shown in the figure, the internal MOS of the PSE device (device under test) at the other end is closed, the PD chip controls switch 18 to close, power resistor 12 is turned on, and the induction signal generated by the current passing through high-precision current sensor 11 is sent to pin 2 of microcontroller 13. The microcontroller then controls LCD screen 14 to display "AF device connected."
[0138] It should be noted that the PD chip 10 depends on the model.
[0139] It should be noted that the single chip microcomputer 13 depends on the model.
[0140] It should be noted that the power resistor 9 is a dummy load, and can be about 200Ω, which can ensure that no overcurrent occurs under the AF protocol.
[0141] It should be noted that the resistance of voltage divider resistors 3 and 4 is at the K level to prevent the resistance from being too low and affecting the POE handshake protocol. Here, 10K is selected.
[0142] It should be noted that the voltage specification of the Zener diode is less than 42V to prevent the resistance from being too low and affecting the POE handshake protocol. 40V can be selected, but is not limited to it.
[0143] It should be noted that the BT grading resistor can be but is not limited to 19 ohms; the AT grading resistor can be but is not limited to 20 ohms; the AF grading resistor can be but is not limited to 21 ohms; the specific resistance value depends on the specifications of different PD chips.
[0144] It should be noted that the LCD screen 14 depends on the video interface of the single chip microcomputer 13 and can be an LCD screen, an OLED screen, etc.
[0145] It should be noted that the output voltage of the power module 12 depends on the voltage required by the single chip computer 13 and can be 5V or 3.3V.
[0146] As an optional solution, Figure 4 The portable PSE power supply mode automatic detection system shown is an optional Ethernet interface test method, such as Figure 12 As shown, the specific steps include:
[0147] Step S1202: When the device is working, connect the lithium battery 15 to the device to ensure normal operation of the device. Connect the POE interface to be tested to the RJ45 interface 1 through the network cable to ensure normal connection of the device.
[0148] In step S1204 , pins 3 , 4 , and 5 of the single chip microcomputer 13 control the relays 6 , 7 , and 8 to be disconnected respectively.
[0149] Step S1206, the single chip microcomputer 13 detects whether there is a signal on pin 1;
[0150] Step S1208: If there is a signal on pin 1, the MCU 13 controls the LCD screen 14 to display "non-POE device" and returns to step S1204;
[0151] Step S1210: If there is no signal at pin 1, it indicates that no POE device is connected or a standard POE device is connected, and further detection is required. The microcontroller 13 controls pin 5 to close the relay 8.
[0152] Step S1212, the single chip computer 13 detects whether there is a signal on pin 2;
[0153] Step S1214: If there is a signal on pin 2, the MCU 13 controls the LCD screen 14 to display "BT protocol POE device" and returns to step S1204;
[0154] Step S1216: If there is no signal on pin 2, it means that no POE device is connected or the connected device is an AT / AF protocol POE device, and further detection is required. The microcontroller 13 controls pin 5 to disconnect relay 8 and pin 4 to close relay 7.
[0155] Step S1218, the single chip computer 13 detects whether there is a signal on pin 2;
[0156] Step S1220: If there is a signal on pin 2, the MCU 13 controls the LCD screen 14 to display "AT protocol POE device" and returns to step S1204;
[0157] Step S1222: If there is no signal on pin 2, it indicates that no POE device is connected or the connected device is an AF protocol POE device, and further detection is required. The microcontroller 13 controls pin 4 to disconnect the relay 7 and pin 3 to close the relay 6.
[0158] Step S1224, the single chip microcomputer 13 detects whether there is a signal on pin 2;
[0159] Step S1226: If there is a signal on pin 2, the MCU 13 controls the LCD screen 14 to display "af protocol POE device" and returns to step S1204;
[0160] Step S1228: If there is no signal on pin 2, the MCU 13 controls the LCD screen 14 to display "No POE device connected" and returns to step S1204.
[0161] The above method greatly shortens the debugging time of equipment debugging personnel. The existing technology requires searching the equipment manual to determine the relevant information of the POE interface, which is inefficient. The above method can automatically identify the POE interface, saving time and effort.
[0162] The above method effectively reduces equipment damage and accidents. Non-standard POE can not only damage non-PD devices but can even cause fires and endanger lives. The above method can identify non-standard POE and reduce the failure and accident rates of non-PD devices.
[0163] The above method is easy to use. Simply plug in the network cable and you can view POE-related information on the screen, freeing up productivity. Even non-professionals can operate it.
[0164] By utilizing the above method and supplying power through a lithium battery, the device can be conveniently carried at any time, thereby improving work efficiency.
[0165] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0166] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0167] According to another aspect of the embodiment of the present application, there is also provided an Ethernet interface detection device for implementing the above Ethernet interface detection method. Figure 13 As shown, the device includes:
[0168] A connecting unit 1302 is configured to connect the Ethernet interface to be detected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin;
[0169] A first acquiring unit 1304 is configured to acquire first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type;
[0170] A determining unit 1306 is configured to determine a first relay having a highest output power level from a plurality of candidate relays when the first signal information indicates that the Ethernet interface is not of a non-standard type;
[0171] The second acquiring unit 1308 is configured to acquire second signal information associated with the second pin when the first relay is in the started state, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
[0172] As an optional solution, the above device also includes:
[0173] a first determining module, configured to, after acquiring second signal information associated with the second pin, determine that the Ethernet interface belongs to the first protocol type if the second signal information indicates that a voltage or current signal exists on the second pin;
[0174] The second determining module is configured to, after acquiring second signal information associated with the second pin, determine that the Ethernet interface does not belong to the first protocol type if the second signal information indicates that no voltage or current signal exists on the second pin.
[0175] As an optional solution, the above device also includes:
[0176] a third determining module, configured to, after determining that the Ethernet interface does not belong to the first protocol type, determine a second relay having the highest output power level from a plurality of candidate relays excluding the first relay;
[0177] An acquisition module is used to, after determining that the Ethernet interface does not belong to the first protocol type, obtain third signal information associated with the second pin when the second relay is in an activated state, wherein the third signal information is used to indicate whether the Ethernet interface belongs to the second protocol type associated with the second relay.
[0178] As an optional solution, the first determining module includes:
[0179] a first acquisition submodule, configured to acquire detection information associated with the detection resistor via a header of the powered device associated with the Ethernet interface, wherein the header is connected between the detection resistor and the first relay;
[0180] a second acquisition submodule, configured to acquire, when the detection information indicates a pass, a graded current emitted by the head, wherein the graded current is used to request closing a target switch of a tail of the powered device, wherein the tail is connected between the first relay and the first pin;
[0181] The first determining submodule is configured to determine whether the second pin obtains second signal information indicating the presence of a voltage or current signal when the graded current successfully turns off the target switch.
[0182] As an optional solution, the above device also includes:
[0183] A third acquisition submodule is configured to, when the detection information indicates a pass, obtain current circuit information of the detection circuit using a detection resistor before obtaining the classification current sent by the header, wherein the current circuit information is used to indicate whether a handshake chip exists in the Ethernet interface;
[0184] a judgment submodule, configured to, when the detection information indicates a pass, determine whether a handshake protocol associated with the handshake chip matches the first protocol type before obtaining the hierarchical current sent by the header and when the current circuit information indicates that the Ethernet interface has a handshake chip;
[0185] The second determining submodule is configured to, when the detection information indicates a pass, confirm that the detection information has passed before acquiring the graded current sent by the header and when the handshake protocol matches the first protocol type.
[0186] As an optional solution, the above device also includes:
[0187] a fourth determining module, configured to, after acquiring first signal information associated with the first pin, determine that the Ethernet interface is of a non-standard type if the first signal information indicates that a voltage or current signal exists on the first pin;
[0188] The fifth determining module is configured to, after acquiring the first signal information associated with the first pin, determine that the Ethernet is not a non-standard type if the first signal information indicates that there is no voltage or current signal on the first pin.
[0189] As an optional solution, the above device further includes:
[0190] The display module is used for displaying the interface type information on a display screen connected to the single chip computer when the interface type information of the Ethernet interface is determined.
[0191] For specific embodiments, reference may be made to the example shown in the above-mentioned Ethernet interface detection method, which will not be described in detail in this example.
[0192] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned Ethernet interface detection method is also provided. Figure 14 As shown, the electronic device includes a memory 1402 and a processor 1404. The memory 1402 stores a computer program, and the processor 1404 is configured to execute the steps of any of the above method embodiments through the computer program.
[0193] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0194] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0195] S1, connecting the Ethernet interface to be detected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin;
[0196] S2, obtaining first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type;
[0197] S3, when the first signal information indicates that the Ethernet interface is not of a non-standard type, determining a first relay with a highest output power level from a plurality of candidate relays;
[0198] S4, when the first relay is in the start-up state, obtaining second signal information associated with the second pin, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
[0199] Alternatively, those skilled in the art will appreciate that Figure 14 The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal equipment. Figure 14 It does not limit the structure of the above electronic device. For example, the electronic device may also include Figure 14 More or fewer components (such as network interfaces, etc.) as shown in, or with Figure 14 Different configurations shown.
[0200] Among them, the memory 1402 can be used to store software programs and modules, such as the program instructions / modules corresponding to the Ethernet interface detection method and device in the embodiment of the present application. The processor 1404 executes various functional applications and data processing by running the software programs and modules stored in the memory 1402, that is, realizing the above-mentioned Ethernet interface detection method. The memory 1402 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1402 may further include a memory remotely located relative to the processor 1404, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1402 can be used to store, but is not limited to, first signal information, second signal information, and other information. As an example, such as Figure 14 As shown, the memory 1402 may include, but is not limited to, the connection unit 1302, the first acquisition unit 1304, the determination unit 1306, and the second acquisition unit 1308 in the Ethernet interface detection device. In addition, other module units in the Ethernet interface detection device may also be included but are not limited to, which will not be repeated in this example.
[0201] Optionally, the transmission device 1406 is configured to receive or transmit data via a network. Specific examples of the aforementioned network may include wired networks and wireless networks. In one embodiment, the transmission device 1406 includes a network interface controller (NIC), which can be connected to other network devices and a router via a network cable to enable communication with the Internet or a local area network. In one embodiment, the transmission device 806 is a radio frequency (RF) module configured to communicate with the Internet wirelessly.
[0202] In addition, the electronic device further includes: a display 1408 for displaying first signal information, second signal information and other information; and a connection bus 1410 for connecting various module components in the electronic device.
[0203] In other embodiments, the terminal device or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting multiple nodes via network communications. The nodes may form a peer-to-peer (P2P) network, and any computing device, such as a server, terminal, or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0204] According to one aspect of the present application, a computer program product is provided, comprising a computer program / instructions containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component and / or installed from a removable medium. When the computer program is executed by a central processing unit, the various functions provided in the embodiments of the present application are performed.
[0205] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0206] It should be noted that the computer system of the electronic device is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0207] A computer system includes a central processing unit (CPU), which performs various actions and processes based on programs stored in read-only memory (ROM) or loaded from storage into random access memory (RAM). RAM also stores various programs and data required for system operation. The CPU, ROM, and RAM are connected to each other via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0208] The following components are connected to the input / output interface: an input section including a keyboard and mouse; an output section including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; a storage section including a hard disk; and a communication section including network interface cards such as local area network cards and modems. The communication section performs communication processing via a network such as the Internet. Drives are also connected to the input / output interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, and semiconductor memories are installed in the drive as needed, allowing computer programs read from these media to be installed in the storage section as needed.
[0209] In particular, according to an embodiment of the present application, the processes described in the various method flow charts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for executing the methods shown in the flow charts. In such an embodiment, the computer program can be downloaded and installed from a network via a communication portion, and / or installed from a removable medium. When the computer program is executed by a central processing unit, the various functions defined in the system of the present application are performed.
[0210] According to one aspect of the present application, a computer-readable storage medium is provided, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations described above.
[0211] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0212] S1, connecting the Ethernet interface to be detected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin;
[0213] S2, obtaining first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type;
[0214] S3, when the first signal information indicates that the Ethernet interface is not of a non-standard type, determining a first relay with a highest output power level from a plurality of candidate relays;
[0215] S4, when the first relay is in the start-up state, obtaining second signal information associated with the second pin, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
[0216] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing hardware related to the terminal device through a program, and the program may be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0217] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0218] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above-mentioned computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application.
[0219] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0220] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0221] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0222] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0223] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. An Ethernet interface detection method, characterized in that: include: Connecting the Ethernet interface to be detected to a detection circuit, wherein the detection circuit includes a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin; Obtaining first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type; In a case where the first signal information indicates that the Ethernet interface does not belong to the non-standard type, determining a first relay with a highest output power level from the multiple candidate relays; When the first relay is in an activated state, second signal information associated with the second pin is acquired, wherein the second signal information is used to indicate whether the Ethernet interface belongs to a first protocol type associated with the first relay.
2. The method according to claim 1, characterized in that After acquiring the second signal information associated with the second pin, the method further includes: When the second signal information indicates that a voltage or current signal exists on the second pin, determining that the Ethernet interface belongs to the first protocol type; When the second signal information indicates that no voltage or current signal exists on the second pin, it is determined that the Ethernet interface does not belong to the first protocol type.
3. The method according to claim 2, characterized in that After determining that the Ethernet interface does not belong to the first protocol type, the method further includes: determining a second relay having the highest output power level from a plurality of candidate relays excluding the first relay; When the second relay is in an activated state, third signal information associated with the second pin is obtained, wherein the third signal information is used to indicate whether the Ethernet interface belongs to a second protocol type associated with the second relay.
4. The method according to claim 2, characterized in that When the second signal information indicates that a voltage or current signal exists on the second pin, determining that the Ethernet interface belongs to the first protocol type includes: acquiring detection information associated with a detection resistor via a header of a powered device associated with the Ethernet interface, wherein the header is connected between the detection resistor and the first relay; When the detection information indicates a pass, obtaining a graded current emitted by the head, wherein the graded current is used to request closing a target switch of a tail of the powered device, wherein the tail is connected between the first relay and the second pin; In a case where the grading current successfully turns off the target switch, it is determined that the second pin obtains the second signal information indicating the presence of a voltage or current signal.
5. The method according to claim 4, characterized in that When the detection information indicates a pass, before obtaining the classification current sent by the header, the method further includes: Obtaining current circuit information of the detection circuit using the detection resistor, wherein the current circuit information is used to indicate whether a handshake chip exists in the Ethernet interface; In a case where the current circuit information indicates that the Ethernet interface has the handshake chip, determining whether the handshake protocol associated with the handshake chip matches the first protocol type; In a case where the handshake protocol matches the first protocol type, it is confirmed that the detection information passes.
6. The method according to claim 1, characterized in that After obtaining the first signal information associated with the first pin, the method further includes: When the first signal information indicates that a voltage or current signal exists on the first pin, determining that the Ethernet interface belongs to the non-standard type; When the first signal information indicates that no voltage or current signal exists on the first pin, it is determined that the Ethernet interface does not belong to the non-standard type.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: After determining the interface type information of the Ethernet interface, the interface type information is displayed on a display screen connected to the single chip microcomputer.
8. An Ethernet interface detection device, characterized in that: include: a connecting unit, configured to connect the Ethernet interface to be detected to a detection circuit, wherein the detection circuit comprises a single-chip microcomputer and a plurality of candidate relays, and the single-chip microcomputer is provided with a first pin and a second pin; A first acquiring unit, configured to acquire first signal information associated with the first pin, wherein the first signal information is used to indicate whether the Ethernet interface is of a non-standard type; a determining unit, configured to determine a first relay having a highest output power level from the plurality of candidate relays when the first signal information indicates that the Ethernet interface does not belong to the non-standard type; The second acquisition unit is used to acquire second signal information associated with the second pin when the first relay is in the started state, wherein the second signal information is used to indicate whether the Ethernet interface belongs to the first protocol type associated with the first relay.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Multifunctional POE detector and network detection method and POE detection method thereof
CN105681050A
POE switch protocol detection method and load instrument
CN115460113A