An OLT-based serial port automatic switching system and method
The serial port switching control module in the automatic serial port switching system detects the baud rate and selects the corresponding CPU or PON chip serial port for switching, which solves the serial port switching problem of OLT equipment when modular connector resources are limited, and ensures normal operation of the equipment.
Patent Information
- Application Number
- CN202410395146.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-02
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-04-02
AI Technical Summary
With limited modular connector resources, existing OLT devices may experience issues if the main CPU malfunctions, preventing normal serial port switching and impacting device usability.
An automatic serial port switching system is adopted. The serial port switching control module detects the baud rate and selects the corresponding CPU or PON chip serial port for switching. It can realize multi-serial port switching and communication when modular connector resources are limited.
When the main CPU malfunctions, multiple serial port switching and communication are implemented to ensure the normal operation of the OLT device.
Smart Images

Figure CN118301508B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, and particularly relates to an OLT-based serial port automatic switching system and method. BACKGROUND
[0002] OLT, which stands for Optical Line Terminal, is a key device in the FTTH (Fiber To The Home) network architecture, located in the central office of the service provider. It is connected to each user's ONU or ONT through an optical fiber, realizing the transmission of multimedia services such as data, voice and video. The main functions of OLT include: signal conversion, data encapsulation and decapsulation, uplink and downlink data transmission, network management and control, and optical splitting function, etc. OLT is usually connected with the switch in the core network to ensure that data can be efficiently transmitted between different network levels; in addition, OLT also supports multiple network protocols to adapt to different types of service requirements.
[0003] At present, OLT devices have the problem of instability such as PON chip disconnection at a high frequency. Some companies do not externally lead out the serial port of PON, making it difficult to accurately observe the state information of the PON chip, and at the same time, the company invests a lot of manpower, material and financial resources to travel to reproduce the problem, increasing the maintenance cost. The prior art proposes a device and method for realizing serial port switching between OLT device CPU and PON chip based on EPLD, including: CPU, EPLD and PON chip, the I2C data line and clock line of the CPU are connected with the IO port of the EPLD chip, the sending line and receiving line of the CPU serial port are connected with the IO port of the EPLD chip; the serial port sending line and receiving line of each PON chip are connected with the IO port of the EPLD chip; the IO port of the EPLD chip is connected with the external serial port; the external serial port is connected with the computer, the device GE port is connected with the computer network cable, and the switching between the CPU serial port and the PON chip serial port is realized by using the telnet function of the switching chip; the switching between the CPU and the PON chip can be completed by only one external serial port of the device, when the PON part of the external device fails, the CPU serial port can be switched to the PON chip, and the state printing information of the PON chip can be observed to help analyze the PON device problem.
[0004] But in the OLT device has master-slave CPU and master-slave PON chip, company shipment to the customer, except the serial port of master CPU, do not want the client to enter other serial ports at will, but when need to query some debugging information, the client can connect other serial ports to query, the existing shell casing serial port is through RJ45 (a kind of 8 (8P8C) modular connector) lead out, if all internal serial ports are led out, different serial port lines need to be configured, and RJ45 can only output 3 serial ports (serial port at least includes sending / receiving / ground, ground serial port can be shared), it is difficult to meet the demand of serial port switching;At present, it is switched by presetting device instructions, but instruction switching needs to wait for the master CPU to start completely before operation, if the master CPU appears abnormal, the serial port cannot be switched, thereby affecting the use of OLT device. SUMMARY
[0005] To solve the problem that the existing OLT device serial port switching technology has limited modular connector resources, if the master CPU appears abnormal, the serial port cannot be normally switched, the application provides a serial port automatic switching system and method based on OLT, which can realize multi-serial port switching and communication when the master CPU appears abnormal under the condition of limited modular connector resources, and effectively ensure the normal use of OLT device.
[0006] To achieve the purpose of the application, the application adopts the following technical scheme:
[0007] A serial port automatic switching system based on OLT, the system comprises a modular connector, a serial port switching control module, a CPU chip and a PON chip, the CPU chip and the PON chip are respectively connected to the serial port connection control module, and the serial port switching control module is connected to the modular connector;
[0008] The CPU chip and the modular connector establish a communication connection;
[0009] The CPU chip and the PON chip are provided with a baud rate, the serial port switching control module detects the information sent by the modular connector, the serial port switching control module selects the serial port of the corresponding CPU chip or PON chip according to the detected baud rate, and establishes a communication connection between the switched CPU chip or PON chip and the modular connector.
[0010] Preferably, the CPU chip includes at least one master CPU serial port and one slave CPU serial port, and the PON chip includes at least one master PON serial port and one slave PON serial port;The master CPU serial port, the slave CPU serial port, the master PON serial port and the slave PON serial port are respectively connected to the serial port switching control module, and the master CPU serial port establishes a communication connection with the modular connector.
[0011] The serial port automatic switching system further comprises a serial port chip, the serial port switching control module is connected with the serial port chip, and the serial port chip is connected with the modular connector; the serial port chip converts the information transmitted between the CPU chip or the PON chip and the modular connector in format, and then transmits the information converted in format to the corresponding CPU chip or PON chip or modular connector.
[0012] In the technical scheme, in the serial port automatic switching system, the serial port switching control module can transmit the information transmitted by the CPU chip or the PON chip to the modular connector, and can detect the baud rate of the information transmitted by the modular connector according to the set baud rate, select the serial port of the corresponding CPU chip or PON chip to switch according to the baud rate, and establish a communication connection between the switched CPU chip or PON chip and the modular connector to transmit and receive information, so that when the main CPU is abnormal, the multiple serial ports can be switched and communicated, and the normal use of the OLT device is effectively ensured; at least one main CPU serial port and one slave CPU serial port, at least one main PON serial port and one slave PON serial port are provided, so that when the main CPU is abnormal, the multiple serial ports can be switched and communicated, and the normal use of the OLT device is effectively ensured.
[0013] A serial port automatic switching method based on an OLT, the method is applied to a serial port automatic switching system based on an OLT, and the method comprises the following steps:
[0014] The CPU chip is connected with the modular connector to establish a communication connection, and information is transmitted and received;
[0015] The baud rates of the CPU chip and the PON chip are set respectively, and the serial port switching control module is used to detect the baud rate of the information transmitted by the modular connector;
[0016] According to the detected baud rate, the serial port of the corresponding CPU chip or PON chip is selected to switch, and the switched CPU chip or PON chip is connected with the modular connector to establish a communication connection to transmit and receive information.
[0017] In the technical scheme, the serial port switching control module can transmit information sent by the CPU chip or the PON chip to the modular connector, and can detect the baud rate of the information sent by the modular connector according to the set baud rate, select the serial port of the CPU chip or the PON chip corresponding to the baud rate for switching, and establish a communication connection between the switched CPU chip or PON chip and the modular connector for information transmission and reception, so that when the main CPU is abnormal, the multi-serial port switching and communication can be realized under the condition that the resources of the modular connector are limited, and the normal use of the OLT device is effectively ensured.
[0018] Further, the main CPU serial port, the slave CPU serial port, the main PON serial port and the slave PON serial port are connected to the serial port switching control module, and the main CPU serial port is connected to the modular connector for information transmission and reception.
[0019] The process of setting the baud rate of the CPU chip and the PON chip respectively includes:
[0020] The baud rate of the main CPU serial port is set as a first baud rate, the baud rate of the slave CPU serial port is set as a second baud rate, the baud rate of the main PON serial port is set as a third baud rate, and the baud rate of the slave PON serial port is set as a fourth baud rate. Each CPU serial port or PON serial port transmits and receives information at a corresponding baud rate, and the modular connector transmits and receives information at the first baud rate or the second baud rate or the third baud rate or the fourth baud rate.
[0021] Further, the process of detecting the baud rate of the information sent by the modular connector by the serial port switching control module includes:
[0022] The signal counting clock and the clock counting period are set, the information sent by the modular connector is counted in real time within the clock counting period by using the signal counting clock, the baud rate corresponding to the information is determined according to the counting of the clock, and a communication connection is established according to the baud rate.
[0023] Further, the process of determining the baud rate corresponding to the information according to the counting of the clock includes:
[0024] A first clock count threshold, a second clock count threshold, a third clock count threshold, and a fourth clock count threshold are set. Starting from the beginning of the clock count cycle, the serial port switching control module detects high and low levels of the information sent by the modular connector in the system. When a high-low level transition is detected, it indicates the end of the clock count cycle. The clock count threshold corresponding to the information is obtained based on the clock count within the clock count cycle. The corresponding baud rate is determined based on the clock count threshold corresponding to the information.
[0025] Wherein, the first clock count threshold corresponds to the first baud rate, the second clock count threshold corresponds to the second baud rate, the third clock count threshold corresponds to the third baud rate, and the fourth clock count threshold corresponds to the fourth baud rate.
[0026] Furthermore, the process of selecting the corresponding serial port to establish a communication connection based on the baud rate includes:
[0027] Set baud rate reception time threshold and count threshold. Based on the time threshold and count threshold, the serial port switching control module detects the baud rate of the information sent by the modular connector in real time. If the serial port switching control module detects the baud rate corresponding to the count threshold within the set time threshold, it selects the corresponding serial port to establish a communication connection based on the baud rate. The process includes:
[0028] If the baud rate is the first baud rate, then maintain the established communication connection between the main CPU serial port and the modular connector or restart and initialize the system;
[0029] If the baud rate is the second baud rate, then the serial port that establishes the communication connection with the modular connector will be switched to the CPU serial port;
[0030] If the baud rate is the third baud rate, the serial port that establishes a communication connection with the modular connector will be switched to the main PON serial port.
[0031] If the baud rate is the fourth baud rate, the serial port that establishes the communication connection with the modular connector will be switched to the PON serial port.
[0032] In the above technical solution, setting the baud rate and the corresponding clock counting threshold enables the serial port switching control module to effectively detect baud rate changes in the information sent by the modular connector during system communication based on the high and low level transitions. Then, based on the baud rate changes and the baud rate reception time and count thresholds, it quickly detects the serial port that needs to establish a communication connection with the modular connector, switches the communication port to the required serial port, and establishes a communication connection between that serial port and the modular connector to send and receive information. This achieves multi-serial port switching and communication, effectively ensuring the normal operation of the OLT device.
[0033] Further, the serial port chip is used to convert the information sent between the CPU chip or the PON chip and the modular connector, and then the converted information is sent to the corresponding CPU chip or PON chip or modular connector.
[0034] Further, the process of converting the information sent between the CPU chip or the PON chip and the modular connector by the serial port chip comprises:
[0035] The information sent by the CPU chip or the PON chip is transmitted to the modular connector after level conversion by the serial port chip, or the information sent by the modular connector is transmitted to the CPU chip or the PON chip after level conversion by the serial port chip.
[0036] Further, the TTL level data sent by the CPU chip or the PON chip is converted into 232 level data by the serial port chip, and then the 232 level data is transmitted to the modular connector; the 232 level data sent by the modular connector is converted into TTL level data by the serial port chip, and then the TTL level data is transmitted to the serial port switching control module for information identification, and the identified data is transmitted to the corresponding CPU chip or PON chip.
[0037] In the above technical solution, the serial port chip provided in the serial port automatic switching system can convert the information sent between the CPU chip or the PON chip and the modular connector, and then the converted information is sent to the corresponding CPU chip or PON chip or modular connector, which facilitates the data monitoring of the serial port switching control module in the communication process and ensures the integrity of the data.
[0038] Compared with the prior art, the present application has the following advantages:
[0039] The serial port automatic switching method based on OLT comprises the following steps: first, in the serial port automatic switching system, the serial port switching control module can transmit the information sent by the CPU chip or the PON chip to the modular connector, and can detect the baud rate of the information sent by the modular connector according to the set baud rate, select the corresponding serial port of the CPU chip or the PON chip according to the baud rate, and establish a communication connection between the switched CPU chip or PON chip and the modular connector for information sending and receiving. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1A structure schematic diagram of a serial port automatic switching system based on an OLT is provided for an embodiment of the present application.
[0041] Figure 2 A flow chart of a serial port automatic switching method based on an OLT is provided for an embodiment of the present application.
[0042] Figure 3 A basic structure principle schematic diagram of a serial port automatic switching system is provided for an embodiment of the present application.
[0043] Figure 4 A principle schematic diagram of an initial communication state of a serial port automatic switching system is provided for an embodiment of the present application.
[0044] Figure 5 A CPU chip and PON chip serial port data bit schematic diagram of a serial port automatic switching system is provided for an embodiment of the present application.
[0045] Figure 6 A count schematic diagram of high-low level conversion is provided for an embodiment of the present application.
[0046] Figure 7 A schematic diagram of a system switching serial port is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to facilitate the understanding of the present application, the present application will be described more fully below with reference to the accompanying drawings. The preferred embodiments of the present application are given in the accompanying drawings. However, the present application can be realized in many different forms and is not limited to the embodiments described herein. On the contrary, these embodiments are provided so that the disclosure of the present application can be more thoroughly and completely understood.
[0048] It should be noted that when an element is referred to as being "fixed" to another element, it can be directly on the other element or there can be intervening elements. When an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. As used herein the terms "vertical", "horizontal", "left", "right", and the like are merely used for the purpose of illustration.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0050] Embodiment one:
[0051] The embodiment provides an OLT-based serial port automatic switching system, which refers to Figure 1 The system comprises a modular connector, a serial port switching control module, a CPU chip and a PON chip, the CPU chip and the PON chip are connected to the serial port switching control module respectively, and the serial port switching control module is connected to the modular connector.
[0052] The CPU chip is connected to the modular connector to establish a communication connection.
[0053] The CPU chip and the PON chip are provided with baud rates, the serial port switching control module detects the baud rate of the information sent by the modular connector, the serial port switching control module selects the serial port of the corresponding CPU chip or PON chip according to the detected baud rate, and establishes a communication connection between the switched CPU chip or PON chip and the modular connector.
[0054] As a preferred embodiment, the CPU chip comprises at least one master CPU serial port and one slave CPU serial port, the PON chip comprises at least one master PON serial port and one slave PON serial port, the master CPU serial port, the slave CPU serial port, the master PON serial port and the slave PON serial port are connected to the serial port switching control module, and the master CPU serial port is connected to the modular connector to establish a communication connection.
[0055] The serial port automatic switching system further comprises a serial port chip, the serial port switching control module is connected to the serial port chip, the serial port chip is connected to the modular connector, the serial port chip converts the format of the information sent between the CPU chip or the PON chip and the modular connector, and then sends the information with the converted format to the corresponding CPU chip or PON chip or the modular connector.
[0056] In the serial port automatic switching system, the serial port switching control module can transmit the information sent by the CPU chip or the PON chip to the modular connector, can detect the baud rate of the information sent by the modular connector according to the set baud rate, can select the serial port of the corresponding CPU chip or PON chip according to the baud rate, and can establish a communication connection between the switched CPU chip or PON chip and the modular connector to send and receive information, so that the multiple serial port switching and communication can be realized when the master CPU is abnormal, and the normal use of the OLT device is effectively ensured when the resources of the modular connector are limited.
[0057] Example 2:
[0058] This embodiment provides a serial port automatic switching method based on an OLT. The method is applied to an OLT-based serial port automatic switching system. See [link to documentation]. Figure 2 The method includes the following steps:
[0059] S1: Establish a communication connection between the CPU chip and the modular connector to send and receive information;
[0060] S2: Set the baud rate for the CPU chip and the PON chip respectively, and use the serial port switching control module to detect the baud rate of the information sent by the modular connector.
[0061] S3: Based on the detected baud rate, select the corresponding CPU chip or PON chip serial port for switching, and establish a communication connection between the switched CPU chip or PON chip and the modular connector to send and receive information.
[0062] As a preferred embodiment, see Figure 3 In the automatic serial port switching system, the CPU chip includes at least one master CPU serial port and one slave CPU serial port, and the PON chip includes at least one master PON serial port and one slave PON serial port.
[0063] The main CPU serial port, slave CPU serial port, main PON serial port, and slave PON serial port are respectively connected to the serial port switching control module, and a communication connection is established between the main CPU serial port and the modular connector to send and receive information.
[0064] For example, see Figure 4 When the system is working, the serial port transmission and reception of the master / slave CPU (i.e., master CPU or slave CPU) and master / slave PON (i.e., master PON or slave PON) are all connected to the CPLD (i.e., serial port switching control module). By default, the serial port of the master CPU is connected to the RJ45 (i.e., modular connector) through the CPLD, and the other three serial ports are simply connected to the CPLD and do not perform any operation.
[0065] Understandably, in a system, setting up at least one master CPU serial port and one slave CPU serial port, as well as at least one master PON serial port and one slave PON serial port, enables multi-serial port switching and communication when the master CPU malfunctions, effectively ensuring the normal operation of the OLT device.
[0066] In the embodiment, in the constructed serial port automatic switching system, the serial port switching control module can transmit information sent by the CPU chip or the PON chip to the modular connector, and can detect the baud rate of the information sent by the modular connector according to the set baud rate, select the serial port of the corresponding CPU chip or PON chip for switching according to the baud rate, and establish a communication connection between the switched CPU chip or PON chip and the modular connector for information transmission and reception, so as to realize multi-serial port switching and communication when the main CPU is abnormal under the condition that the resources of the modular connector are limited, and effectively ensure the normal use of the OLT device.
[0067] Embodiment three:
[0068] The embodiment further illustrates step S3 in embodiment one, and the details are as follows:
[0069] The process of setting the baud rate of the CPU chip and the PON chip respectively in step S3 includes:
[0070] The baud rate of the main CPU serial port is set as a first baud rate, the baud rate of the slave CPU serial port is set as a second baud rate, the baud rate of the main PON serial port is set as a third baud rate, and the baud rate of the slave PON serial port is set as a fourth baud rate.
[0071] Each CPU serial port or PON serial port transmits and receives information at a corresponding baud rate, and the modular connector transmits and receives information at a first baud rate or a second baud rate or a third baud rate or a fourth baud rate.
[0072] As a preferred embodiment, the process of detecting the baud rate of the information sent by the modular connector by the serial port switching control module includes:
[0073] A signal counting clock and a clock counting period are set, the signal counting clock is used to count the clock of the information sent by the modular connector in the clock counting period, the baud rate corresponding to the information is determined according to the counting of the clock, and a communication connection is established according to the baud rate.
[0074] As a preferred embodiment, the process of determining the baud rate corresponding to the information according to the counting of the clock includes:
[0075] The first clock count threshold, the second clock count threshold, the third clock count threshold and the fourth clock count threshold are set, from the start time of the clock count period, the information sent by the modular connector in the system is detected by the serial port switching control module, when the high-low level conversion is detected, it indicates the end time of the clock count period, and the clock count threshold corresponding to the information is obtained according to the clock count in the clock count period; the corresponding baud rate is determined according to the clock count threshold corresponding to the information.
[0076] The first clock count threshold corresponds to the first baud rate, the second clock count threshold corresponds to the second baud rate, the third clock count threshold corresponds to the third baud rate, and the fourth clock count threshold corresponds to the fourth baud rate.
[0077] As a preferred embodiment, the process of establishing a communication connection by selecting a corresponding serial port according to the baud rate includes:
[0078] The baud rate receiving time threshold and the number threshold are set, the baud rate of the information sent by the modular connector is detected in real time by the serial port switching control module according to the time threshold and the number threshold, if the serial port switching control module detects the baud rate corresponding to the number threshold within the set time threshold, then the serial port switching control module is used to establish a communication connection by selecting a corresponding serial port according to the baud rate.
[0079] As a preferred embodiment, the process of establishing a communication connection by selecting a corresponding serial port according to the baud rate includes:
[0080] If the baud rate is the first baud rate, the established communication connection between the main CPU serial port and the modular connector is maintained or the system is restarted and initialized;
[0081] If the baud rate is the second baud rate, the serial port connected with the modular connector is switched to the slave CPU serial port;
[0082] If the baud rate is the third baud rate, the serial port connected with the modular connector is switched to the main PON serial port;
[0083] If the baud rate is the fourth baud rate, the serial port connected with the modular connector is switched to the slave PON serial port.
[0084] As an example, the baud rate of the main CPU serial port is set to 115200, the baud rate of the slave CPU serial port is set to 57600, the baud rate of the main PON serial port is set to 38400, and the baud rate of the slave PON serial port is set to 9600; the switching of the serial port channel is realized by the ENTER key under the serial port with different baud rates.
[0085] The CPLD is used to analyze the serial port information transmitted via RJ45. A higher frequency clock of 100MHz is set to count the input signal, with each cycle lasting 10ns. The minimum cycle for 115200 baud rate is 868 clock counts, for 57600 baud rate it is 1736 clock counts, for 38400 baud rate it is 2604 clock counts, and for 9600 baud rate it is 10417 clock counts. A deviation of 1% from the above standard counts is considered a corresponding baud rate. One high-to-low level transition constitutes one minimum cycle.
[0086] The serial port between the system CPU chip and the PON chip uses 8 data bits, 1 stop bit, and no parity bit, such as... Figure 5 As shown. The ASCII code for the ENTER key is 00001101 in binary, as... Figure 6 As shown. According to Figure Four The waveform of the ENTER key counts the high and low levels starting from START. At a baud rate of 57600, if three instances of data from Table 1 (from the CPU) are detected within 3 seconds, the serial port that established the communication connection with the modular connector is switched to the CPU serial port. Figure 7 As shown.
[0087] At a baud rate of 38400, if the main PON data in Table 1 is detected 3 times within 3 seconds, the serial port that establishes a communication connection with the modular connector will be switched to the main PON serial port.
[0088] At a baud rate of 9600, if three instances of slave PON data from Table 1 are detected within 3 seconds, the serial port that establishes a communication connection with the modular connector will be switched to a slave PON serial port.
[0089] At a baud rate of 115200, if the main CPU data in Table 1 is detected 3 times within 3 seconds, the communication connection between the main CPU serial port and the modular connector is maintained or the system is restarted and initialized.
[0090] Table 1:
[0091]
[0092] In the embodiment, the baud rate is set to correspond to the clock count threshold value, so that the serial port switching control module can effectively detect the baud rate change of the information sent by the modular connector according to the change of high and low levels in the communication of the system, and then quickly detect the serial port that needs to establish a communication connection with the modular connector according to the baud rate change and the baud rate receiving time threshold value and the number threshold value, switch the communication connection port to the required serial port, establish the communication connection between the serial port and the modular connector, and perform information transmission and reception, realize multi-serial port switching and communication, and effectively ensure the normal use of the OLT device.
[0093] As a preferred embodiment, referring to Figure 3 , the serial port chip is used to convert the format of the information transmitted between the CPU chip or the PON chip and the modular connector, and then transmit the information converted in the format to the corresponding CPU chip or PON chip or modular connector.
[0094] As a preferred embodiment, the process of converting the format of the information transmitted between the CPU chip or the PON chip and the modular connector by the serial port chip includes:
[0095] The information transmitted by the CPU chip or the PON chip is converted in level by the serial port chip and then transmitted to the modular connector, or the information transmitted by the modular connector is converted in level by the serial port chip and then transmitted to the CPU chip or the PON chip.
[0096] As a preferred embodiment, the TTL level data transmitted by the CPU chip or the PON chip is converted into 232 level data by the serial port chip, and the 232 level data is transmitted to the modular connector; the 232 level data transmitted by the modular connector is converted into TTL level data by the serial port chip, and the TTL level data is transmitted to the serial port switching control module for information identification, and the identified data is transmitted to the corresponding CPU chip or PON chip.
[0097] In the embodiment, the serial port chip provided in the serial port automatic switching system can convert the format of the information transmitted between the CPU chip or the PON chip and the modular connector, and then transmit the information converted in the format to the corresponding CPU chip or PON chip or modular connector, facilitating the data monitoring of the serial port switching control module in the communication process, while ensuring the integrity of the data.
[0098] The above only describes the embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A serial port automatic switching system based on OLT, characterized in that, The system includes: a modular connector, a serial port switching control module, a CPU chip, and a PON chip. The CPU chip and the PON chip are respectively connected to the control module via serial ports. The serial port switching control module is connected to the modular connector. The CPU chip establishes a communication connection with the modular connector; The CPU chip includes at least one master CPU serial port and one slave CPU serial port, and the PON chip includes at least one master PON serial port and one slave PON serial port; the master CPU serial port, slave CPU serial port, master PON serial port and slave PON serial port are respectively connected to the serial port switching control module, and the master CPU serial port establishes a communication connection with the modular connector. The CPU chip and the PON chip have built-in baud rates. The serial port switching control module detects the baud rate of the information sent by the modular connector. Based on the detected baud rate, the serial port switching control module selects the corresponding serial port of the CPU chip or PON chip for switching and establishes a communication connection between the switched CPU chip or PON chip and the modular connector, including: The baud rate of the main CPU serial port is set to the first baud rate, the baud rate of the slave CPU serial port is set to the second baud rate, the baud rate of the main PON serial port is set to the third baud rate, and the baud rate of the slave PON serial port is set to the fourth baud rate. Information is sent and received using each CPU serial port or PON serial port at its corresponding baud rate, and information is sent and received using the modular connector at the first baud rate, the second baud rate, the third baud rate, or the fourth baud rate. Set a signal counting clock and a clock counting period. Use the signal counting clock to count the information sent by the modular connector in real time within the clock counting period. Determine the baud rate corresponding to the information based on the clock count. Select the corresponding serial port to establish a communication connection based on the baud rate. The automatic serial port switching system also includes a serial port chip. The serial port switching control module is connected to the serial port chip, and the serial port chip is connected to the modular connector. The serial port chip converts the format of the information sent between the CPU chip or PON chip and the modular connector, and then sends the converted information to the corresponding CPU chip, PON chip or modular connector.
2. The OLT-based automatic serial port switching system according to claim 1, characterized in that, The process of determining the baud rate corresponding to this information based on clock counting includes: A first clock count threshold, a second clock count threshold, a third clock count threshold, and a fourth clock count threshold are set. Starting from the beginning of the clock count cycle, the serial port switching control module detects high and low levels of the information sent by the modular connector in the system. When a high-low level transition is detected, it indicates the end of the clock count cycle. The clock count threshold corresponding to the information is obtained based on the clock count within the clock count cycle. The corresponding baud rate is determined based on the clock count threshold corresponding to the information. Wherein, the first clock count threshold corresponds to the first baud rate, the second clock count threshold corresponds to the second baud rate, the third clock count threshold corresponds to the third baud rate, and the fourth clock count threshold corresponds to the fourth baud rate. The serial port switching control module selects the corresponding CPU chip or PON chip serial port for switching based on the detected baud rate, wherein: Set baud rate reception time threshold and count threshold. Based on the time threshold and count threshold, the serial port switching control module detects the baud rate of the information sent by the modular connector in real time. If the serial port switching control module detects the baud rate corresponding to the count threshold within the set time threshold, it selects the corresponding serial port to establish a communication connection based on the baud rate. The process includes: If the baud rate is the first baud rate, then maintain the established communication connection between the main CPU serial port and the modular connector or restart and initialize the system; If the baud rate is the second baud rate, then the serial port that establishes the communication connection with the modular connector will be switched to the CPU serial port; If the baud rate is the third baud rate, the serial port that establishes a communication connection with the modular connector will be switched to the main PON serial port. If the baud rate is the fourth baud rate, the serial port that establishes the communication connection with the modular connector will be switched to the PON serial port.
3. A serial port automatic switching method based on OLT, wherein the method is applied to the serial port automatic switching system based on OLT as described in any one of claims 1-2, characterized in that, The method includes the following steps: Establish a communication connection between the CPU chip and the modular connector; Set the baud rate for the CPU chip and the PON chip respectively, and use the serial port switching control module to detect the baud rate of the information sent by the modular connector; Based on the detected baud rate, select the corresponding CPU chip or PON chip serial port for switching, and establish a communication connection between the switched CPU chip or PON chip and the modular connector.
4. The automatic serial port switching method based on OLT according to claim 3, characterized in that, Connect the main CPU serial port, the slave CPU serial port, the main PON serial port, and the slave PON serial port to the serial port switching control module respectively, and establish a communication connection between the main CPU serial port and the modular connector.
5. The automatic serial port switching method based on OLT according to claim 3, characterized in that, The serial port chip is used to convert the format of the information sent between the CPU chip or PON chip and the modular connector, and then the converted information is sent to the corresponding CPU chip, PON chip or modular connector.
6. The automatic serial port switching method based on OLT according to claim 5, characterized in that, The process of converting the format of information transmitted between the CPU chip or PON chip and the modular connector using the serial port chip includes: The serial port chip is used to convert the level of information sent by the CPU chip or PON chip and then transmit it to the modular connector; or the serial port chip is used to convert the level of information sent by the modular connector and then transmit it to the CPU chip or PON chip.
7. The automatic serial port switching method based on OLT according to claim 6, characterized in that, The serial port chip is used to convert TTL level data sent by the CPU chip or PON chip into 232 level data, and then the 232 level data is transmitted to the modular connector; the serial port chip is used to convert the 232 level data sent by the modular connector into TTL level data, and then the TTL level data is transmitted to the serial port switching control module for information identification, and the identified data is transmitted to the corresponding CPU chip or PON chip.
Citation Information
Patent Citations
Device and method for realizing serial port switching between CPU and PON chips of OLT equipment
CN106714010A
Station side device and received signal processing method
JP2014120920A