CN117609145A - Serial port protection circuit, switch, server, protection method and related components - Google Patents

Serial port protection circuit, switch, server, protection method and related components Download PDF

Info

Publication number
CN117609145A
CN117609145A CN202410096665.0A CN202410096665A CN117609145A CN 117609145 A CN117609145 A CN 117609145A CN 202410096665 A CN202410096665 A CN 202410096665A CN 117609145 A CN117609145 A CN 117609145A
Authority
CN
China
Prior art keywords
serial port
circuit
detected
line
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410096665.0A
Other languages
Chinese (zh)
Other versions
CN117609145B (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.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202410096665.0A priority Critical patent/CN117609145B/en
Publication of CN117609145A publication Critical patent/CN117609145A/en
Application granted granted Critical
Publication of CN117609145B publication Critical patent/CN117609145B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a serial port protection circuit, a switch, a server, a protection method and related components, relates to the field of serial port safety protection, and is used for solving the problem of mixed insertion of a network port and a serial port. The circuit comprises a central processing unit and/or a baseboard management controller, a signal transmission circuit, a serial connector and a control circuit, wherein a detection end of the control circuit is connected with undefined pins to be detected in the serial connector, so that when the serial connector is connected with a circuit, whether the circuit is a serial line or not is judged according to the signal output state of the pins to be detected, and the on-off of a transmission channel is controlled. When the mixed-plug condition occurs, the control circuit can detect the signal output of the pin to be detected, and interrupt the transmission channel when the abnormal condition is found, so that the problem that the whole system cannot normally operate due to unexpected signal input is avoided, the problem of mixed-plug of the network port and the serial port can be effectively solved, and the stability and the reliability of the system are improved.

Description

Serial port protection circuit, switch, server, protection method and related components
Technical Field
The present invention relates to the field of serial port security protection, and in particular, to a serial port protection circuit, a switch, a server, a protection method, and related components.
Background
To facilitate research and development and device on-line operation, devices typically provide a serial port and a network port for debugging. However, due to physical foolproof considerations, the network port and the serial port should employ port connectors of different configurations or sizes. However, for various reasons, there are many devices on the market that are identical in form and size to the network and serial ports. To solve this problem, distinction is usually made by conspicuous identification, such as labeling the network port and the serial port with different colors, or using different color indicator lamps. However, in the actual use process, the situation of mixed insertion still cannot be completely avoided.
If mixed insertion occurs during the starting process of the CPU (Central Processing Unit/Processor) or the BMC (Baseboard Management Controller ), for example, if a network cable is inserted into a serial port connector, the network cable will send a signal through the serial port connector, after processing the signal, an unexpected signal input may be misjudged as an interrupt input signal or a special combination hotkey combination signal to be input to the CPU or the BMC, and these signals may be identified as valid inputs by the CPU or the BMC, so that the currently executed code is interrupted or an unpredictable function is triggered, and the CPU or the BMC may not operate normally.
Disclosure of Invention
The invention aims to provide a serial port protection circuit, a switch, a server, a protection method and related components, when mixed insertion occurs, a control circuit can detect signal output of pins to be detected, and interrupt a transmission channel when abnormal conditions are found, so that the problem that the whole system cannot normally operate due to unexpected signal input is avoided, the problem of mixed insertion of a network port and a serial port can be effectively solved, and the stability and reliability of the system are improved.
In order to solve the technical problems, the invention provides a serial port protection circuit, which comprises a central processing unit and/or a baseboard management controller, a signal transmission circuit, a serial port connector and a control circuit;
the serial port of the central processing unit and/or the serial port of the baseboard management controller are sequentially connected with the serial port connector through a control circuit and a signal transmission circuit, and undefined pins to be detected in the serial port connector are connected with the detection end of the control circuit;
the signal transmission circuit is used for carrying out signal transmission between the serial port connector and the control circuit;
the control circuit is used for judging whether the connected line is a serial port line according to the signal output state of the pin to be detected when the serial port connector is connected with the line, and controlling the serial port of the central processing unit and/or the on-off of a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to a judging result, wherein the pin to be detected does not output a signal when the serial port connector is connected with the serial port line.
In one embodiment, the serial port protection circuit further includes:
the reference voltage output circuit is connected with the control circuit and used for outputting reference voltage;
the control circuit is specifically configured to determine, when the serial connector connects a line, whether the connected line is the serial line according to a comparison result of the voltage to be detected and the reference voltage of the pin to be detected, and control on-off of a serial port of the central processing unit and/or a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result.
In one embodiment, the control circuit is connected with a plurality of pins to be detected in the serial port connector;
the control circuit is specifically configured to determine, when the serial connector connects a line, whether the connected line is a serial line according to a signal output state of each pin to be detected, and control on-off of a serial port of the central processing unit and/or a transmission channel between a serial port of the baseboard management controller and the signal transmission circuit according to a determination result.
In one embodiment, the control circuit includes a detection circuit and a switching circuit;
The input end of the detection circuit is connected with the undefined pin to be detected in the serial port connector, the output end of the detection circuit is connected with the control end of the switch circuit, one end of the switch circuit is respectively connected with the serial port of the central processing unit and/or the serial port of the baseboard management controller, and the other end of the switch circuit is connected with the signal transmission circuit;
the detection circuit is used for detecting whether the pin to be detected outputs a signal when the serial port connector is connected with a circuit, outputting a first trigger signal to the switch circuit when the pin to be detected outputs the signal, and outputting a second trigger signal to the switch circuit when the pin to be detected does not output the signal;
the switch circuit is used for controlling the self-cut-off when receiving the first trigger signal so as to cut off a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit; and when the second trigger signal is received, controlling the self-conduction so as to conduct a serial port of the central processing unit and/or a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit.
In one embodiment, the control circuit is connected with a plurality of pins to be detected in the serial port connector;
the detection circuit is specifically configured to detect whether each pin to be detected outputs a signal when the serial port connector is connected to the circuit, and output a first trigger signal to the switch circuit when any one pin to be detected outputs a signal, and output a second trigger signal to the switch circuit when all pins to be detected do not output a signal.
In one embodiment, the signal transmission circuit includes a level transceiver and a complex programmable logic device;
one end of the complex programmable logic device is connected with the serial port of the central processing unit and/or the serial port of the baseboard management controller respectively, and the other end of the complex programmable logic device is connected with the serial port connector through a level transceiver;
the control circuit multiplexes the complex programmable logic device, and the level transceiver is used for signal transmission between the complex programmable logic device and the serial port connector.
In order to solve the technical problem, the invention also provides a switch, which comprises the serial port protection circuit.
In order to solve the technical problems, the invention also provides a server which comprises the serial port protection circuit.
In order to solve the technical problem, the invention also provides a serial port protection method, which is applied to the serial port protection circuit, and comprises the following steps:
when the serial port connector is connected with a circuit, acquiring a signal output state of a pin to be detected;
judging whether a circuit connected with the serial port connector is a serial port circuit or not according to the signal output state;
and controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
In one embodiment, determining whether the line connected to the serial port connector is a serial port line according to the signal output state includes:
judging whether the pin to be detected outputs a signal or not;
if the pin to be detected outputs a signal, judging that the line is not the serial port line;
and if the pin to be detected does not output a signal, judging that the circuit is the serial port line.
In one embodiment, the serial port protection circuit further includes a reference voltage output circuit connected to the control circuit and configured to output a reference voltage, and when the serial port connector is connected to the circuit, the serial port protection circuit obtains a signal output state of a pin to be detected, including:
Monitoring the voltage to be detected of the pin to be detected when the serial port connector is connected with the circuit;
judging whether the circuit connected with the serial port connector is a serial port circuit according to the signal output state, comprising:
and judging whether a line connected with the serial port connector is the serial port line or not according to a comparison result of the voltage to be detected and the reference voltage.
In one embodiment, when the line is a network cable, determining whether the line connected to the serial port connector is the serial port line according to a comparison result of the voltage to be detected and the reference voltage includes:
when the voltage to be detected is larger than the reference voltage, judging that the line is not the serial port line;
when the voltage to be detected is not greater than the reference voltage, judging that the line is the serial port line;
the network cable outputs voltage larger than the reference voltage through the pin to be detected.
In one embodiment, controlling the connection and disconnection of the serial port of the central processing unit and/or the transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result includes:
when the line is judged not to be the serial line, controlling a serial port of the central processing unit and/or a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit to be cut off;
And when the line is judged to be the serial port line, controlling the serial port of the central processing unit and/or the serial port of the baseboard management controller to be communicated with a transmission channel between the signal transmission circuit.
In one embodiment, controlling the connection and disconnection of the serial port of the central processing unit and/or the transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result includes:
and determining whether to shield the serial port of the central processing unit and/or the signal transmission between the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
In one embodiment, the control circuit is connected to a plurality of pins to be detected in the serial connector, and obtains a signal output state of the pins to be detected when the serial connector is connected to a circuit, including:
acquiring signal output states of the pins to be detected when the serial port connector is connected with a circuit;
judging whether the circuit connected with the serial port connector is a serial port circuit according to the signal output state, comprising:
judging whether the circuit connected with the serial port connector is a serial port line or not according to the signal output state of each pin to be detected.
In one embodiment, determining whether the line connected to the serial port connector is a serial port line according to the signal output state of each pin to be detected includes:
judging whether each pin to be detected outputs a signal or not;
if any one of the pins to be detected outputs a signal, judging that the line is not the serial port line;
if no signal is output by all the pins to be detected, judging that the circuit is the serial port line.
In one embodiment, after determining that the pin to be detected does not output a signal, the serial port protection method further includes:
delaying for a preset time, and re-entering a step of judging whether the pin to be detected outputs a signal or not after the preset time;
if the pin to be detected outputs a signal after the preset time, judging that the line is not the serial port line;
and if the pin to be detected does not output a signal after the preset time, judging that the line is the serial port line.
In order to solve the technical problem, the invention also provides a serial port protection system, which is applied to the serial port protection circuit, and comprises:
the acquisition unit is used for acquiring the signal output state of the pin to be detected when the serial port connector is connected with the circuit;
The judging unit is used for judging whether the circuit connected with the serial port connector is a serial port line or not according to the signal output state;
and the execution unit is used for controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
In order to solve the technical problem, the invention also provides a serial port protection device, which comprises:
a memory for storing a computer program;
and the control circuit is used for realizing the steps of the serial port protection method when executing the computer program.
In order to solve the technical problem, the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the serial port protection method when being executed by a processor.
The invention provides a serial port protection circuit, a switch, a server, a protection method and related components, relates to the field of serial port safety protection, and is used for solving the problem of mixed insertion of a network port and a serial port. The circuit comprises a central processing unit and/or a baseboard management controller, a signal transmission circuit, a serial connector and a control circuit, wherein a detection end of the control circuit is connected with undefined pins to be detected in the serial connector, so that when the serial connector is connected with a circuit, whether the circuit is a serial line or not is judged according to the signal output state of the pins to be detected, and the on-off of a transmission channel is controlled. When the mixed-plug condition occurs, the control circuit can detect the signal output of the pin to be detected, and interrupt the transmission channel when the abnormal condition is found, so that the problem that the whole system cannot normally operate due to unexpected signal input is avoided, the problem of mixed-plug of the network port and the serial port can be effectively solved, and the stability and the reliability of the system are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required in the prior art and the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a serial port structure of a switch according to the present invention;
FIG. 2 is a schematic diagram of a serial port protection circuit according to the present invention;
FIG. 3 is a schematic diagram of a serial port protection circuit according to the present invention;
FIG. 4 is a flow chart of a serial port protection method provided by the invention;
fig. 5 is a schematic flow chart of a specific implementation of a serial port protection method provided by the present invention;
fig. 6 is a block diagram of a serial port protection system according to the present invention.
Detailed Description
The invention has the core of providing a serial port protection circuit, a switch, a server, a protection method and related components, wherein when the mixed insertion condition occurs, the control circuit can detect the signal output of a pin to be detected, and interrupt a transmission channel when the abnormal condition is found, so that the problem that the whole system cannot normally operate due to unexpected signal input is avoided, the problem of mixed insertion of a network port and a serial port can be effectively solved, and the stability and the reliability of the system are improved.
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specifically, in an alternative embodiment, a serial port structure of the switch is shown in fig. 1, where the network port adopts a standard RJ45 connector, and the RJ45 network port connector is connected with the central processor 1 and the baseboard management controller 2 sequentially through a network transformer and an ethernet controller. Due to physical foolproof design, other connector shapes or sizes are needed for debugging the serial port. However, most of the switches currently on the market still use RJ45 type serial connectors, specifically, RJ45 serial connectors are connected to the central processor 1 and the baseboard management controller 2 through the signal transmission circuit 3. This results in the same device (e.g., switch or server) simultaneously providing two RJ 45-style connectors to the outside, one RJ45 port connector and the other RJ45 serial port connector. Normally, the RJ45 network port connector should be connected with the network cable of other devices, and the RJ45 serial port connector should be connected with the serial port cable of other devices.
On the basis of fig. 1, as shown in fig. 2, in order to solve the problem of mixed insertion of a network port and a serial port in the same form, the invention provides a serial port protection circuit, which comprises a central processing unit 1 and/or a baseboard management controller 2, a signal transmission circuit 3, a serial port connector and a control circuit 4; the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 are sequentially connected with a serial port connector through a control circuit 4 and a signal transmission circuit 3, and undefined pins to be detected in the serial port connector are connected with a detection end of the control circuit 4;
the signal transmission circuit 3 is used for transmitting signals between the serial port connector and the control circuit 4; the control circuit 4 is configured to determine, when the serial connector connects the lines, whether the connected lines are serial lines according to a signal output state of the pin to be detected, and control on/off of a transmission channel between the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to a determination result (specifically, control on/off of a transmission channel between the serial port of the central processing unit 1 and the signal transmission circuit 3, and/or control on/off of a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3), where the pin to be detected does not output a signal when the serial connector connects the serial lines (in this embodiment, the signal output state may include a first output state corresponding to an output signal and a second output state corresponding to a non-output signal).
The present embodiment describes the structure and function of a serial port protection circuit. The circuit comprises a central processing unit 1 and/or a baseboard management controller 2, a signal transmission circuit 3, a serial port connector and a control circuit 4. The serial port of the central processing unit 1 and/or the baseboard management controller 2 is connected with a serial port connector through a control circuit 4 and a signal transmission circuit 3; this means that the serial connector is used for connecting the serial port of the central processing unit 1 and/or the baseboard management controller 2, and signal transmission is performed through the control circuit 4 and the signal transmission circuit 3. In this serial protection circuit, the serial connector has undefined pins to be detected, which are connected to the detection terminals of the control circuit 4, and which are introduced for detecting whether the line connected to the serial connector is a serial line. The signal transmission circuit 3 is responsible for signal transmission between the serial port connector and the control circuit 4, and plays a role of a bridge for connecting the serial port connector and the control circuit, so that the signal can be normally transmitted. The control circuit 4 is used for judging whether the connected line is a serial port line according to the signal output state of the pin to be detected when the serial port connector is connected with the line, and the control circuit 4 controls the on-off of a transmission channel between the serial port of the central processing unit 1 and/or the substrate management controller 2 and the signal transmission circuit 3 according to the judging result, specifically, when the serial port connector is connected with the serial port line, the pin to be detected cannot output signals.
In summary, the circuit of the present invention can help prevent the problem caused by the mixed plug in the starting process of the CPU or the BMC, and ensure the normal operation of the CPU 1 and/or the BMC 2.
In one embodiment, the control circuit 4 is connected with a plurality of pins to be detected in the serial connector; the control circuit 4 is specifically configured to determine whether the connected line is a serial port line according to the signal output state of each pin to be detected when the serial port connector is connected to the line, and control on-off of a serial port of the central processing unit 1 and/or a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to a determination result.
In order to improve the reliability, the control circuit 4 is connected with a plurality of pins to be detected in the serial connector, and the purpose of this measure is to determine whether the connection line is a serial line or not through the signal output states of the plurality of pins to be detected when the serial line is connected, thereby improving the accuracy and reliability of the determination. In the serial port protection circuit, the pins to be detected are undefined pins, the signal output state of the pins to be detected can be used for judging whether the connected line is a serial port line, and the control circuit 4 can monitor the signal output states of the pins to be detected simultaneously by connecting the pins to be detected with the control circuit 4, so that the judging accuracy and reliability are improved. Because if the serial port circuit is judged by only depending on the signal output state of a single pin to be detected, the serial port circuit may be interfered by other factors, so that the judgment result is inaccurate.
In one embodiment, the serial port protection circuit further comprises: a reference voltage output circuit connected to the control circuit 4 for outputting a reference voltage; the control circuit 4 is specifically configured to determine, when the serial connector connects the lines, whether the connected lines are serial lines according to a comparison result of the voltage to be detected and the reference voltage of the pin to be detected, and control on-off of a serial port of the central processing unit 1 and/or a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to the determination result.
Further, when the serial port protection circuit further includes a reference voltage output circuit, the control circuit 4 is specifically configured to determine, when the serial port connector connects the lines, whether the connected lines are serial lines according to a comparison result of the voltage to be detected and the reference voltage of the pin to be detected, so as to control on-off of the serial port of the central processing unit 1 and/or a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3. The reference voltage output circuit is used for outputting a fixed reference voltage, and the control circuit 4 compares the voltage to be detected of the pin to be detected by using the reference voltage; the serial port line generates a specific voltage signal when transmitting data, and other types of lines do not generate the specific voltage signal (in this embodiment, when the serial port is connected to the serial port line, the pin to be detected does not output a voltage signal, and when the serial port is connected to a line other than the serial port line, the pin to be detected outputs a voltage (such as a network cable) with a certain amplitude, where the signal output state includes a first state in which the voltage to be detected is higher than the reference voltage, and a second state in which the voltage to be detected is lower than the reference voltage). Therefore, by comparing the magnitude relation between the voltage to be detected and the reference voltage of the pin to be detected, the control circuit 4 can determine whether the connected line is a serial line. The method for comparing the serial port lines can accurately judge the line connected with the pins to be detected, so that whether the serial port lines are serial port lines or not is detected. In this way, in practical application, the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the transmission channel between the signal transmission circuit 3 can be controlled according to the judgment result, so as to protect the safe use of the serial port line.
In an alternative embodiment, if the line to be detected is a network cable, when the network cable is connected to the serial port, the network cable periodically sends an FLP (Fast Link Pulse) signal to the serial port connector to detect the connection condition of the Link, that is, the pin to be detected outputs an intermittent and periodic signal of about ±2v; however, if the serial port connector is connected with a serial port line, no signal is sent out from the pin to be detected, that is, no voltage is applied to the pin to be detected. If the reference voltage is set to be 1V, whether the line connected with the serial port connector is a network line or a serial port line can be judged by judging whether the pin to be detected has voltage larger than 1V.
In one embodiment, the control circuit 4 includes a detection circuit and a switching circuit; the input end of the detection circuit is connected with undefined pins to be detected in the serial port connector, the output end of the detection circuit is connected with the control end of the switch circuit, one end of the switch circuit is respectively connected with the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2, and the other end of the switch circuit is connected with the signal transmission circuit 3 (the two ends of the switch circuit are not the same as the control end of the switch circuit); the detection circuit is used for detecting whether the pin to be detected outputs a signal when the serial port connector is connected with the circuit, outputting a first trigger signal to the switch circuit when the pin to be detected outputs the signal, and outputting a second trigger signal to the switch circuit when the pin to be detected does not output the signal; the switch circuit is used for controlling the self-cut-off when receiving the first trigger signal so as to cut off the serial port of the central processing unit 1 and/or the transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3; when the second trigger signal is received, the self-conduction is controlled so as to conduct the serial port of the central processing unit 1 and/or the transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3.
In this embodiment, when the control circuit 4 includes a detection circuit and a switch circuit and the serial port protection circuit is used to perform serial port line detection, the detection circuit monitors whether the pin to be detected outputs a signal by connecting with the pin to be detected; if the pin to be detected outputs a signal, the detection circuit outputs a first trigger signal to the switch circuit; if the pin to be detected does not output a signal, the detection circuit outputs a second trigger signal to the switch circuit. The switching circuit controls the cut-off or on state of the switching circuit according to the received first trigger signal or second trigger signal; specifically, when the switch circuit receives the first trigger signal, it controls itself to cut off, so that the serial port of the central processing unit 1 and/or the transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 are also in a cut-off state, and the non-serial port line is prevented from being connected; when the switch circuit receives the second trigger signal, it controls itself to be conducted, so that the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the transmission channel between the signal transmission circuit 3 are in a conducting state, and the normal serial port line can transmit data. In this embodiment, the detection circuit and the switch circuit can effectively prevent the wrong serial port line from being connected, so as to realize reliable detection of the serial port line.
In one embodiment, the control circuit 4 is connected with a plurality of pins to be detected in the serial connector; the detection circuit is specifically used for detecting whether each pin to be detected outputs a signal when the serial port connector is connected with the circuit, outputting a first trigger signal to the switch circuit when any pin to be detected outputs a signal, and outputting a second trigger signal to the switch circuit when all pins to be detected do not output a signal.
In order to improve reliability, in the present application, the control circuit 4 is connected to a plurality of pins to be detected in the serial connector, and when any pin to be detected outputs a signal, the detection circuit outputs a first trigger signal to the switch circuit, so that a transmission channel between the serial port of the central processor 1 and/or the serial port of the baseboard management controller 2 and the signal transmission circuit 3 is cut off; when no signal is output from all the pins to be detected, the detection circuit outputs a second trigger signal to the switch circuit, so that the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 are/is conducted with the transmission channel between the signal transmission circuit 3. The embodiment has the advantages that the signal output states of the plurality of pins to be detected are judged, and the second trigger signal is released only when no signal is output by all the pins to be detected, so that the reliability of connecting the circuit is ensured; the multi-pin joint judging method can improve the reliability of detection, and can judge and control the state of other pins even if one or a part of pins are abnormal, so that the possibility of misjudgment is reduced, and the stability and the reliability of the whole system are improved.
In one embodiment, the signal transmission circuit 3 includes a level transceiver and a complex programmable logic device; one end of the complex programmable logic device is connected with the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 respectively, and the other end of the complex programmable logic device is connected with the serial port connector through the level transceiver; the control circuit 4 multiplexes the complex programmable logic devices and the level transceiver is used for signal transmission between the complex programmable logic devices and the serial connector.
In the present embodiment, the signal transmission circuit 3 includes a level transceiver and a complex programmable logic device (CPLD, complex Programmable Logic Device). The level transceiver may be an RS-232 level transceiver. Wherein the logic of RS-232 is as shown in Table 1:
table 1 logical schematic table of RS-232 level transceiver
The complex programmable logic device is an integrated circuit which can be reprogrammed according to the needs of a user, and the device can realize different functions by reconfiguring internal connections without changing hardware, so that the flexibility and the expandability of the system are improved. For the serial port protection circuit, a plurality of different serial port connection configurations can be realized by using a complex programmable logic device so as to adapt to different application requirements. Because the complex programmable logic device is reprogrammable, when the system needs to be updated or maintained, the updating and maintenance of the functions can be realized by reconfiguring the logic device, so that the cost and the complexity of the system maintenance are reduced; the cost of the system is reduced by multiplexing complex programmable logic devices.
One embodiment is as follows, the connector is an RJ45 connector, and specifically, please refer to table 2 and table 3:
table 2 pin definition table for serial port connector
Table 3 pin definition table of network port connector
The principle mainly utilized in this embodiment is: different Pin definitions of the network port connector and the serial port connector, pins Pin1, pin2, pin7 and Pin8 in the serial port connector in an RJ45 mode are undefined pins, namely unused pins. In the network port connector in the RJ45 mode, all pins are defined, when a network cable is connected with the connector in the RJ45 mode, pin6 in the serial port connector in the RJ45 mode is an RX Pin, when the serial port connector is connected with the serial port line, remote equipment periodically sends FLP signals through each Pin of the network cable to detect the connection condition of a link, based on PAM5 codes, the pins (such as Pin 6) of the connector connected with the network cable send signals with signal swing of about +/-2V, and the signals can be judged to be effective high and low input signals because the level judgment threshold of the RS-232 level converter is 1.25V.
As shown in fig. 3, the control circuit 4 in this embodiment continuously monitors the signal output status of the undefined Pin of the serial port connector in the RJ45 form, determines that no signal is input as in the unused pins Pin1, pin2, pin7, pin8 in the above table 2, and determines that the serial port connector is plugged into a normal serial port line, and at this time, controls to connect uart_sys_rx and cpu_uart1_rx channels (or bmc_urat1_rx channels), wherein when uart_sys_rx and cpu_uart1_rx channels are connected, the transmission channel between the central processor 1 and the signal transmission circuit 3 is turned on, and when uart_sys_rx and bmc_urat1_rx channels are connected, the transmission channel between the baseboard management controller 2 and the signal transmission circuit 3 is turned on. As long as the control circuit 4 monitors Pin1, pin2, pin7, pin8, any Pin has a signal input exceeding the decision threshold (the reference voltage in the above embodiment), it is determined that the RJ 45-type serial connector is erroneously inserted into the RJ45 network cable, and the uart_sys_rx and the cpu_uart1_rx channel (or the bmc_urat1_rx channel) are not connected at this time.
Based on the analysis, after the network cable is mistakenly plugged into the serial port connector in the RJ45 mode, a 2V level signal can be monitored on the Pin, and whether a misplug event occurs is judged by judging whether the signal level of the Pin to be detected is high. In particular, in order to more accurately identify the misplug event, in this embodiment, all unused 4 pins are used as pins to be detected and connected to the control circuit 4. The control circuit 4 is connected to a Vref reference voltage (typically 1V, which can be adjusted according to the actual situation), and the control circuit 4 determines whether an erroneous insertion event occurs by comparing the magnitude relation between the signal voltage on the pin to be detected and the reference voltage. If the voltage of any pin to be detected is larger than Vref, the false insertion event can be judged to occur, the logic level '1' is output, and otherwise, the logic level '0' is output. The voltage of the 4 pins to be detected is compared with the Vref voltage reference to generate 4 logic levels, and the control circuit 4 performs OR logic operation on the 4 logic levels and outputs a logic level to control whether the channel is conducted or not.
In particular, based on the signal characteristics of the network cable inserted into the serial port connector in the RJ45 mode, in order to prevent misjudgment, when the logic level of the 4 pins to be detected is logic or is processed to be "0", a delay time (or debounce processing) is required, that is, in a preset time (with an adjustable time, typically 120 ns), after the logic low level "0" is determined, the logic level is output to control whether the channel is turned on or not.
In order to solve the technical problem, the invention also provides a switch, which comprises the serial port protection circuit.
In order to solve the technical problem, the invention also provides a server which comprises the serial port protection circuit.
As shown in fig. 4, the present invention further provides a serial port protection method, which is applied to the serial port protection circuit, and the serial port protection method includes:
s11: when the serial port connector is connected with a circuit, acquiring a signal output state of a pin to be detected;
s12: judging whether a line connected with the serial port connector is a serial port line or not according to the signal output state;
the step is to monitor the signal state of the connection line, so as to determine whether the line is a serial port line, the pins to be detected are undefined pins in the serial port connector, and the property of the connection line can be determined by obtaining the signal output state. When the step is implemented, the signal output state of the pin to be detected can be obtained through a corresponding circuit and control logic, and if the pin to be detected does not output a signal, the connection line is possibly a serial port line; other types of lines are possible if the pin to be detected outputs a signal. The connection circuit can be primarily judged by acquiring the signal output state of the pin to be detected, so that a basis is provided for subsequent serial port protection measures.
S13: and controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
In this step, once the line connected to the serial connector is determined to be a serial line, the control circuit 4 controls the serial port of the cpu 1 and/or the transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 to be turned on according to the determination result, otherwise, the transmission channel is turned off.
In one embodiment, controlling the connection and disconnection of the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the transmission channel between the signal transmission circuit 3 according to the determination result includes: when the line is judged not to be a serial line, the serial port of the central processing unit 1 and/or a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 is controlled to be cut off; when the line is determined to be a serial line, the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 are controlled to be conducted with a transmission channel between the signal transmission circuit 3.
In one embodiment, controlling the connection and disconnection of the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the transmission channel between the signal transmission circuit 3 according to the determination result includes: it is determined whether to mask the signal transfer between the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to the determination result. This means that after determining whether the line connected to the serial connector is a serial line, it is possible to determine whether to mask the signal transfer between the serial port of the cpu 1 and/or the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to the determination result. The principle of masking signal transfer is to block or control signal transmission by controlling switches or other circuit elements. When the determination result indicates that the connected line is a serial line, measures may be taken, for example, by adjusting the state of a switch or a controller to block signal transmission between the serial port of the central processing unit 1 and/or the serial port of the baseboard management controller 2 and the signal transmission circuit 3, thereby protecting the system from the risk that the serial line may bring. The shielding mechanism can effectively protect the safety of the system and ensure the reliability of signal transmission.
That is, if it is determined that the signal is not a serial port line, the transmission channel may be disconnected, so that a signal that does not meet the serial port standard is prevented from passing, and the safety and stability of the serial port are ensured. In summary, the present embodiment can effectively prevent illegal or non-standard signals from entering the cpu 1 or the baseboard management controller 2 through the serial connector, thereby protecting the security and stability of the system.
In one embodiment, determining whether the line connected to the serial port connector is a serial port line according to the signal output state includes: judging whether the pin to be detected outputs a signal or not; if the pin to be detected outputs a signal, judging that the line is not a serial port line; if the pin to be detected does not output a signal, the circuit is judged to be a serial port line.
The embodiment provides a method for judging whether a serial port connector connection line is a serial port line, specifically, in a normal condition, when the serial port connector is connected to the serial port line, a pin to be detected does not output a signal. Thus, if the pin to be detected outputs a signal, it can be inferred that the connected line is not a serial line. In contrast, if the pin to be detected does not output a signal, it may be determined that the connected line is a serial line. The method can help to judge the line connected with the serial port and control the on-off of the serial port of the central processing unit 1 and/or a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 according to the judging result.
In one embodiment, the serial port protection circuit further includes a reference voltage output circuit connected to the control circuit 4 and configured to output a reference voltage, and when the serial port connector is connected to the line, the signal output state of the pin to be detected is obtained, including: monitoring the voltage to be detected of the pin to be detected when the serial port connector is connected with the circuit; judging whether the circuit connected with the serial port connector is a serial port line according to the signal output state, comprising: and judging whether the line connected with the serial port connector is a serial port line or not according to the comparison result of the voltage to be detected and the reference voltage. In one embodiment, when the line is a network cable, determining whether the line connected to the serial port connector is a serial port line according to a comparison result of the voltage to be detected and the reference voltage includes: when the voltage to be detected is larger than the reference voltage, judging that the line is not a serial port line; when the voltage to be detected is not greater than the reference voltage, judging that the line is a serial port line; the network cable outputs voltage larger than the reference voltage through the pin to be detected.
In this embodiment, the serial port protection circuit includes a reference voltage output circuit, where the reference voltage output circuit is used to output a fixed reference voltage for helping the control circuit 4 to compare the voltage to be detected of the pin to be detected. The serial line generates a specific voltage signal when transmitting data, while other types of lines do not generate the specific voltage signal. Specifically, in this embodiment, the lines to which the pins to be detected may be connected are a net line and a serial line. When the connected line is a network cable, the network cable can periodically send FLP signal to detect the connection condition of the link, so that the pin to be detected outputs intermittent and periodic signals; when the connected line is a serial line, the pin to be detected does not output a signal. By setting the reference voltage to a specific value (for example, 1V), the control circuit 4 can determine whether the connected line is a serial line or a net line by comparing the magnitude relation between the voltage to be detected of the line connected to the pin to be detected and the reference voltage. If the voltage to be detected is greater than the reference voltage, judging that the connected line is a network cable; if the voltage to be detected is less than or equal to the reference voltage, the connected line can be judged to be a serial line. The reference voltage output circuit is used for helping the control circuit 4 to accurately judge pins to be detected of different types of lines, so that whether the pins are serial lines or not is detected. By the method, in practical application, the serial port of the central processing unit 1 and/or the on-off of a transmission channel between the serial port of the baseboard management controller 2 and the signal transmission circuit 3 can be controlled according to the judging result so as to protect the safe use of the serial port line.
In one embodiment, the control circuit 4 is connected to a plurality of pins to be detected in the serial connector, and obtains a signal output state of the pins to be detected when the serial connector is connected to a circuit, including: when the serial port connector is connected with a circuit, acquiring the signal output state of each pin to be detected; judging whether the circuit connected with the serial port connector is a serial port line according to the signal output state, comprising: judging whether the circuit connected with the serial port connector is a serial port line or not according to the signal output state of each pin to be detected.
In one embodiment, determining whether a line connected to the serial port connector is a serial port line according to a signal output state of each pin to be detected includes: judging whether each pin to be detected outputs a signal or not; if any pin to be detected outputs a signal, judging that the line is not a serial port line; if all the pins to be detected do not output signals, the circuit is judged to be a serial port line.
In this embodiment, the control circuit 4 is connected to a plurality of pins to be detected in the serial connector, and obtains a signal output state of the pins to be detected when the serial connector is connected to a circuit. In practical use, the system can monitor the signal output states of a plurality of pins to be detected at the same time, so that the reliability of comprehensively judging whether the circuit connected by the serial port connector is a serial port line is higher. Specifically, a plurality of pins to be detected are connected to the control circuit 4, and the signal output states of the respective pins to be detected can be acquired simultaneously. By comprehensively judging the signal output states of the pins to be detected, judgment errors caused by abnormal output of a single pin can be eliminated, and the judgment accuracy is improved. If any pin to be detected outputs a signal, the circuit can be judged not to be a serial port line, and the multi-pin parallel judgment method greatly improves the accurate judgment capability of the system on the serial port line. In summary, the embodiment improves the reliability of judging the serial port line in the serial port protection method, and can judge the property of the line more accurately by a mode of judging in parallel with multiple pins, thereby improving the reliability and stability of the system.
In one embodiment, after determining that the line is not a serial line, the serial protection method further includes: and reporting the serial port connection error information and visualizing the serial port connection error information.
In this embodiment, after determining that the line is not the serial line, reporting serial connection error information, and visualizing the serial connection error information is further included. This means that the system can inform the user of the error in the serial connection in an appropriate manner so that the user can take appropriate measures in time. Reporting error information may be accomplished in a variety of ways, such as sending an alarm, displaying the error information, or transmitting to other systems via a network for processing. The visual serial port connection error information can enable a user to intuitively know the nature and the reason of the error, is helpful for quickly performing fault diagnosis and repair, and can improve the reliability and the user experience of the system.
In one embodiment, after determining that the pin to be detected does not output a signal, the serial port protection method further includes: delaying for a preset time, and re-entering a step of judging whether the pin to be detected outputs a signal or not after the preset time; if the pin to be detected outputs a signal after the preset time, judging that the line is not a serial port line; if the pin to be detected does not output a signal after the preset time, the circuit is judged to be a serial port line.
After judging that the pin to be detected does not output the signal, the serial port protection method further comprises the steps of delaying preset time and re-entering the step of judging whether the pin to be detected outputs the signal after the preset time. Specifically, the setting of the delay preset time can effectively exclude some temporary interference signals or instantaneous state changes, and accurate judgment of the output state of the pin signals to be detected is ensured. And the judgment is carried out again after the preset time, so that the detection accuracy and reliability of the serial port circuit can be effectively improved, the possibility of misjudgment is reduced, and the reliability and stability of the serial port protection circuit are improved. In addition, the delay preset time can also help to eliminate judgment errors caused by the transmission delay of signal transmission or the slow change of signals, so that the judgment accuracy is improved. Therefore, whether the pin to be detected outputs a signal or not is judged again through delaying for a preset time, stability and reliability of the serial port protection method are improved, and performance and practicality of the whole serial port protection circuit are improved.
In addition, besides delaying for a preset time, the method can also be subjected to jitter removal treatment. The debounce processing is a processing mode for eliminating jitter signals which may occur when the circuit switch is contacted, that is, the step of judging whether the pin to be detected outputs signals or not can be re-entered after the debounce processing, if the pin to be detected outputs signals after the debounce processing, the circuit is judged not to be a serial port line; if the pin to be detected does not output a signal after the debouncing treatment, judging that the circuit is a serial port circuit; therefore, stability of signals is ensured, and accuracy and stability of the system to-be-detected pin state can be improved.
As shown in fig. 5, one specific process includes: the RJ45 type port connector is inserted into a line; monitoring the voltages to be detected of all pins to be detected, comparing the voltages to be detected with a reference voltage, and outputting logic levels after logic OR; judging whether the logic level is high, if so, indicating that the serial port connector is erroneously inserted into a network cable, and disconnecting the UART_SYS_RX from the CPU_UART1_RX and/or BMC_UART1_RX; if the logic level is not high, delaying for a preset time or removing jitter, and further judging whether the logic level is high or not; if the logic level is not high, indicating that the serial port connector has not occurred a misinsertion event, connecting the uart_sys_rx with the cpu_uart1_rx and/or the bmc_uart1_rx, and ending the judgment.
In order to solve the above technical problem, the present invention further provides a serial port protection system, as shown in fig. 6, applied to the serial port protection circuit, where the serial port protection system includes:
an obtaining unit 61, configured to obtain a signal output state of a pin to be detected when the serial port connector connects the lines;
a judging unit 62, configured to judge whether the line connected to the serial port connector is a serial port line according to the signal output state;
and the execution unit 63 is used for controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
In one embodiment, the judging unit 62 is specifically configured to judge whether the pin to be detected outputs a signal; if the pin to be detected outputs a signal, judging that the line is not a serial port line; if the pin to be detected does not output a signal, the circuit is judged to be a serial port line.
In one embodiment, the serial port protection circuit further includes a reference voltage output circuit connected to the control circuit and configured to output a reference voltage, and the obtaining unit 61 is specifically configured to monitor a voltage to be detected of the pin to be detected when the serial port connector is connected to the line;
the judging unit 62 is specifically configured to judge whether the line connected to the serial port connector is a serial port line according to a comparison result of the voltage to be detected and the reference voltage.
In one embodiment, when the line is a network cable, the determining unit 62 is specifically configured to determine that the line is not a serial port line when the voltage to be detected is greater than the reference voltage; when the voltage to be detected is not greater than the reference voltage, judging that the line is a serial port line; the network cable outputs voltage larger than the reference voltage through the pin to be detected.
In one embodiment, the executing unit 63 is specifically configured to control, when the line is determined not to be a serial line, a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit to be cut off; when the judging circuit is a serial port line, the serial port of the central processing unit and/or the transmission channel between the serial port of the baseboard management controller and the signal transmission circuit is controlled to be conducted.
In one embodiment, the execution unit 63 is specifically configured to determine whether to mask the serial port of the central processing unit and/or the signal transmission between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result.
In one embodiment, the control circuit is connected to a plurality of pins to be detected in the serial connector, and the obtaining unit 61 is specifically configured to obtain a signal output state of each pin to be detected when the serial connector is connected to the circuit;
The judging unit 62 is specifically configured to judge whether the line connected to the serial port connector is a serial port line according to the signal output status of each pin to be detected.
In one embodiment, the judging unit 62 is specifically configured to judge whether each pin to be detected outputs a signal; if any pin to be detected outputs a signal, judging that the line is not a serial port line; if all the pins to be detected do not output signals, the circuit is judged to be a serial port line.
In one embodiment, after determining that the line is not a serial line, the serial protection system further includes: and the error information reporting unit is used for reporting the serial port connection error information and visualizing the serial port connection error information.
In one embodiment, after determining that the pin to be detected does not output a signal, the serial port protection system further includes: and a delay unit for delaying a preset time and triggering the judging unit 62 after the preset time.
For the description of the serial port protection system, please refer to the above embodiment, and the description of the present invention is omitted herein.
In order to solve the technical problem, the invention also provides a serial port protection device, which comprises:
a memory for storing a computer program;
and the control circuit is used for realizing the steps of the serial port protection method when executing the computer program.
For the description of the serial port protection device, please refer to the above embodiment, and the description of the present invention is omitted herein.
In order to solve the technical problem, the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the steps of the serial port protection method when being executed by a processor.
For the description of the computer-readable storage medium, refer to the above embodiments, and the disclosure is not repeated here.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (20)

1. The serial port protection circuit is characterized by comprising a central processing unit and/or a substrate management controller, a signal transmission circuit, a serial port connector and a control circuit;
the serial port of the central processing unit and/or the serial port of the baseboard management controller are sequentially connected with the serial port connector through the control circuit and the signal transmission circuit, and undefined pins to be detected in the serial port connector are connected with the detection end of the control circuit;
the signal transmission circuit is used for carrying out signal transmission between the serial port connector and the control circuit;
the control circuit is used for judging whether the connected line is a serial port line according to the signal output state of the pin to be detected when the serial port connector is connected with the line, and controlling the serial port of the central processing unit and/or the on-off of a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to a judging result, wherein the pin to be detected does not output a signal when the serial port connector is connected with the serial port line.
2. The serial port protection circuit of claim 1, wherein the serial port protection circuit further comprises:
the reference voltage output circuit is connected with the control circuit and used for outputting reference voltage;
the control circuit is specifically configured to determine, when the serial connector connects a line, whether the connected line is the serial line according to a comparison result of the voltage to be detected and the reference voltage of the pin to be detected, and control on-off of a serial port of the central processing unit and/or a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result.
3. The serial port protection circuit of claim 1, wherein the control circuit is connected with a plurality of pins to be detected in the serial port connector;
the control circuit is specifically configured to determine, when the serial connector connects a line, whether the connected line is a serial line according to a signal output state of each pin to be detected, and control on-off of a serial port of the central processing unit and/or a transmission channel between a serial port of the baseboard management controller and the signal transmission circuit according to a determination result.
4. The serial port protection circuit of claim 1, wherein the control circuit comprises a detection circuit and a switching circuit;
the input end of the detection circuit is connected with the undefined pin to be detected in the serial port connector, the output end of the detection circuit is connected with the control end of the switch circuit, one end of the switch circuit is respectively connected with the serial port of the central processing unit and/or the serial port of the baseboard management controller, and the other end of the switch circuit is connected with the signal transmission circuit;
the detection circuit is used for detecting whether the pin to be detected outputs a signal when the serial port connector is connected with a circuit, outputting a first trigger signal to the switch circuit when the pin to be detected outputs the signal, and outputting a second trigger signal to the switch circuit when the pin to be detected does not output the signal;
the switch circuit is used for controlling the self-cut-off when the first trigger signal is received, so that the serial port of the central processing unit and/or the serial port of the baseboard management controller is/are cut off with the transmission channel between the signal transmission circuit, and controlling the self-cut-on when the second trigger signal is received, so that the serial port of the central processing unit and/or the serial port of the baseboard management controller is/are conducted with the transmission channel between the signal transmission circuit.
5. The serial port protection circuit of claim 4, wherein the control circuit is connected with a plurality of pins to be detected in the serial port connector;
the detection circuit is specifically configured to detect whether each pin to be detected outputs a signal when the serial port connector is connected to the circuit, and output a first trigger signal to the switch circuit when any one pin to be detected outputs a signal, and output a second trigger signal to the switch circuit when all pins to be detected do not output a signal.
6. The serial port protection circuit of any one of claims 1-5 wherein the signal transmission circuit comprises a level transceiver and a complex programmable logic device;
one end of the complex programmable logic device is connected with the serial port of the central processing unit and/or the serial port of the baseboard management controller respectively, and the other end of the complex programmable logic device is connected with the serial port connector through a level transceiver;
the control circuit multiplexes the complex programmable logic device, and the level transceiver is used for signal transmission between the complex programmable logic device and the serial port connector.
7. A switch comprising the serial port protection circuit of any one of claims 1-6.
8. A server comprising the serial port protection circuit of any one of claims 1-6.
9. A serial port protection method, applied to the serial port protection circuit according to any one of claims 1 to 6, comprising:
when the serial port connector is connected with a circuit, acquiring a signal output state of a pin to be detected;
judging whether a circuit connected with the serial port connector is a serial port circuit or not according to the signal output state;
and controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
10. The serial port protection method according to claim 9, wherein determining whether the line connected to the serial port connector is a serial port line according to the signal output state comprises:
judging whether the pin to be detected outputs a signal or not;
if the pin to be detected outputs a signal, judging that the line is not the serial port line;
and if the pin to be detected does not output a signal, judging that the circuit is the serial port line.
11. The serial port protection method of claim 9, wherein the serial port protection circuit further comprises a reference voltage output circuit connected with the control circuit and used for outputting a reference voltage, and the obtaining the signal output state of the pin to be detected when the serial port connector is connected with the circuit comprises:
monitoring the voltage to be detected of the pin to be detected when the serial port connector is connected with the circuit;
judging whether the circuit connected with the serial port connector is a serial port circuit according to the signal output state, comprising:
and judging whether a line connected with the serial port connector is the serial port line or not according to a comparison result of the voltage to be detected and the reference voltage.
12. The serial port protection method of claim 11, wherein when the line is a network cable, determining whether the line connected to the serial port connector is the serial port line according to a comparison result of the voltage to be detected and the reference voltage comprises:
when the voltage to be detected is larger than the reference voltage, judging that the line is not the serial port line;
when the voltage to be detected is not greater than the reference voltage, judging that the line is the serial port line;
The network cable outputs voltage larger than the reference voltage through the pin to be detected.
13. The serial port protection method according to claim 10, wherein controlling the connection and disconnection of the serial port of the central processing unit and/or the transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result comprises:
when the line is judged not to be the serial line, controlling a serial port of the central processing unit and/or a transmission channel between the serial port of the baseboard management controller and the signal transmission circuit to be cut off;
and when the line is judged to be the serial port line, controlling the serial port of the central processing unit and/or the serial port of the baseboard management controller to be communicated with a transmission channel between the signal transmission circuit.
14. The serial port protection method according to claim 9, wherein controlling the connection and disconnection of the serial port of the central processing unit and/or the transmission channel between the serial port of the baseboard management controller and the signal transmission circuit according to the determination result comprises:
and determining whether to shield the serial port of the central processing unit and/or the signal transmission between the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
15. The serial port protection method of claim 9, wherein the control circuit is connected with a plurality of pins to be detected in the serial port connector, and when the serial port connector is connected with a circuit, acquiring a signal output state of the pins to be detected comprises:
acquiring signal output states of the pins to be detected when the serial port connector is connected with a circuit;
judging whether the circuit connected with the serial port connector is a serial port circuit according to the signal output state, comprising:
judging whether the circuit connected with the serial port connector is a serial port line or not according to the signal output state of each pin to be detected.
16. The serial port protection method according to claim 15, wherein determining whether the line connected to the serial port connector is a serial port line according to the signal output state of each pin to be detected comprises:
judging whether each pin to be detected outputs a signal or not;
if any one of the pins to be detected outputs a signal, judging that the line is not the serial port line;
if no signal is output by all the pins to be detected, judging that the circuit is the serial port line.
17. The serial port protection method according to claim 10, wherein after determining that the pin to be detected does not output a signal, the serial port protection method further comprises:
Delaying for a preset time, and re-entering a step of judging whether the pin to be detected outputs a signal or not after the preset time;
if the pin to be detected outputs a signal after the preset time, judging that the line is not the serial port line;
and if the pin to be detected does not output a signal after the preset time, judging that the line is the serial port line.
18. A serial port protection system, applied to the serial port protection circuit according to any one of claims 1 to 6, comprising:
the acquisition unit is used for acquiring the signal output state of the pin to be detected when the serial port connector is connected with the circuit;
the judging unit is used for judging whether the circuit connected with the serial port connector is a serial port line or not according to the signal output state;
and the execution unit is used for controlling the on-off of a transmission channel between the serial port of the central processing unit and/or the serial port of the baseboard management controller and the signal transmission circuit according to the judging result.
19. A serial port protection device, comprising:
a memory for storing a computer program;
control circuitry for implementing the steps of the serial port protection method according to any one of claims 9-17 when the computer program is executed.
20. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the serial port protection method according to any of claims 9-17.
CN202410096665.0A 2024-01-24 2024-01-24 Serial port protection circuit, switch, server, protection method and related components Active CN117609145B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410096665.0A CN117609145B (en) 2024-01-24 2024-01-24 Serial port protection circuit, switch, server, protection method and related components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410096665.0A CN117609145B (en) 2024-01-24 2024-01-24 Serial port protection circuit, switch, server, protection method and related components

Publications (2)

Publication Number Publication Date
CN117609145A true CN117609145A (en) 2024-02-27
CN117609145B CN117609145B (en) 2024-03-22

Family

ID=89952093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410096665.0A Active CN117609145B (en) 2024-01-24 2024-01-24 Serial port protection circuit, switch, server, protection method and related components

Country Status (1)

Country Link
CN (1) CN117609145B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676052A (en) * 2016-01-26 2016-06-15 上海斐讯数据通信技术有限公司 Serial port line sequence identification method and system
CN109597778A (en) * 2018-11-02 2019-04-09 山东超越数控电子股份有限公司 A kind of multi-channel serial port signal list interface duplex output system and its implementation
CN112526898A (en) * 2019-09-19 2021-03-19 恒为科技(上海)股份有限公司 Serial port line plug detection circuit and embedded equipment
US20230299545A1 (en) * 2022-03-21 2023-09-21 Shenzhen Fulian Fugui Precision Industry Co., Ltd. Circuit preventing supply of power to board incorrectly or unstably installed, method, and server system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105676052A (en) * 2016-01-26 2016-06-15 上海斐讯数据通信技术有限公司 Serial port line sequence identification method and system
CN109597778A (en) * 2018-11-02 2019-04-09 山东超越数控电子股份有限公司 A kind of multi-channel serial port signal list interface duplex output system and its implementation
CN112526898A (en) * 2019-09-19 2021-03-19 恒为科技(上海)股份有限公司 Serial port line plug detection circuit and embedded equipment
US20230299545A1 (en) * 2022-03-21 2023-09-21 Shenzhen Fulian Fugui Precision Industry Co., Ltd. Circuit preventing supply of power to board incorrectly or unstably installed, method, and server system

Also Published As

Publication number Publication date
CN117609145B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
JP2648796B2 (en) Data transmission error detection method and data transmission equipment
CN105071957B (en) CAN bus fault diagnosis method and system
US9769041B2 (en) Method for identifying connection errors of a multiconductor data line
JP2020052959A (en) State notification method in USB Type-C interface circuit, device having USB Type-C interface circuit, Type-C cable, and information processing system
US20200125527A1 (en) Serial bus repeater with low power state detection
CN109871344B (en) Communication system, interface circuit and signal transmission method thereof
WO2014082275A1 (en) Method and apparatus for detecting cable connection condition
CN102246050A (en) System and method of detecting and locating intermittent electrical faults in electrical systems
CN117609145B (en) Serial port protection circuit, switch, server, protection method and related components
US10606703B2 (en) Monitoring circuit
US20030154762A1 (en) System and method for the monitoring of a measurement and control device
CN109074031B (en) Bus node and method for operating a bus node
WO2015041686A1 (en) Snapshot message
CN115729872A (en) Computing device and detection method for PCIE cable connection
CN100539716C (en) The method that a kind of main and standby boards is monitored and switched automatically
KR101539579B1 (en) Apparatus for detecting and processing rs232c serial communication hardware fault and the method thereof
CN114443552A (en) System and method for automatically checking connection relation of communication cables
CN109274611B (en) Method for switching sharing network protocol by baseboard management controller
CN113009246B (en) PSE device detection device and PSE device detection method
CN114878113A (en) Liquid cooling server liquid leakage detection device and detection method
WO2022098813A1 (en) Short to ground protection and automatic recovery
US6412016B1 (en) Network link bypass device
CN112751753A (en) Method and communication equipment for protecting main/standby states of single board
KR102131194B1 (en) Apparatus for detecting fault of ethernet
CN116719734A (en) Debugging method, baseboard management controller and server

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