Optical module and remote optical module loopback control method based on double MCUs

By adopting a dual MCU solution in the optical module and sending loopback control commands using low-frequency message channels, the problem of difficulty in optical link fault location is solved, and rapid and economical fault location and resolution are achieved.

CN119519828AActive Publication Date: 2025-02-25HISENSE BROADBAND MULTIMEDIA TECH
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311070012.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-23
Publication Date
2025-02-25
Estimated Expiration
2043-08-23

AI Technical Summary

Technical Problem

In the access network communication system, optical link failure causes normal communication between the local device and the remote device. The prior art solves the fault by replacing the optical module, but it is time-consuming and labor-intensive and costly.

Method used

The optical module adopts dual MCUs. Through the coordinated work of the main MCU and the slave MCU, the transmitting optical module sends a loopback control command to the receiving optical module, and uses the low-frequency message channel to determine whether the receiving optical module enters the loopback mode, so as to realize the remote location of optical link failure.

Benefits of technology

It effectively shortens the fault location cycle, reduces labor costs, and improves the success rate of loopback control command transmission, avoiding unnecessary optical module replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119519828A_ABST
    Figure CN119519828A_ABST
Patent Text Reader

Abstract

The invention provides an optical module and a remote optical module loopback control method based on double MCUs, a first main MCU of a near-end optical module generates an update enable command when a sending end upper computer modifies a value of a loopback message enable register to a first value, a loopback control register stores a loopback control value written by the sending end upper computer, and the loopback control value is used for updating the loopback message enable register. And writing the loopback control value into the first slave MCU. And the first slave MCU receives the update enable command from the first master MCU, generates a loopback control command according to the loopback control value, and loads the loopback control command stored in the first slave MCU to the first optical signal. Abnormal positioning of remote equipment in an optical link is completed at a local equipment end, a double-MCU control function is adopted, and a communication response function of opening and closing the slave MCU is utilized, so that the slave MCU is not disturbed by the upper computer and the master MCU when sending and receiving messages, and the success rate of loopback control command transmission is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an optical module and a remote optical module loopback control method based on dual MCUs. Background Art

[0002] In the access network communication system, a mutual optical connection is established between the local device and the remote device to realize data communication. Specifically, the local device has a first optical module, the remote device has a second optical module, and the first optical module and the second optical module form an optical link; the local device sends an optical signal to the second optical module through the first optical module, so that the local device sends data to the remote device; the local device receives the optical signal from the second optical module through the first optical module, so that the local device receives data from the remote device.

[0003] During the communication process, if the above-mentioned optical link fails, it will cause the local device and the remote device to fail to communicate normally. In the prior art, the problem of optical link failure is usually solved by replacing the optical module. However, if the local device and the remote device are far apart, and it is uncertain whether the problem is with the second optical module, replacing the optical module to solve the optical link failure problem is time-consuming, labor-intensive and costly. Summary of the invention

[0004] The present application provides an optical module and a remote optical module loopback control method based on dual MCUs to achieve remote positioning of optical link faults.

[0005] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:

[0006] On the one hand, an embodiment of the present application discloses an optical module, including:

[0007] Circuit boards;

[0008] A first optical emitting component is electrically connected to the circuit board, and the first optical emitting component is configured to emit a first optical signal carrying a first loopback control command, wherein the loopback control command is transmitted in the form of a low-frequency message;

[0009] A first master MCU is electrically connected to the circuit board and is configured to: generate an update enable command when the sending end host computer modifies the value of the loopback message enable register to a first value, the loopback control register stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first slave MCU;

[0010] A first slave MCU is connected to the first master MCU and the first optical emitting component. The first slave MCU sets a first memory to store a loopback control value. The first slave MCU receives an update enable command from the first master MCU, generates a loopback control command according to the loopback control value, and loads the loopback control command stored in the first slave MCU into the first optical signal.

[0011] In a second aspect, an embodiment of the present application discloses an optical module, including:

[0012] Circuit boards;

[0013] A second light receiving component, electrically connected to the circuit board, the second light receiving component being configured to receive a first optical signal carrying a first low-frequency message channel;

[0014] a second slave MCU connected to the second light receiving component, wherein the second slave MCU is configured to: receive the first light signal, parse and obtain a loopback control command, modify the value of a temporary loopback register in the second slave MCU to a fifth value, enable a communication response function of the second slave MCU, so that the second master MCU can perform communication access to the second slave MCU; and, after the second master MCU reads the value of the temporary loopback register, modify the value of the temporary loopback register to a sixth value, and disable the communication response function of the second slave MCU, so that the second master MCU cannot perform communication access to the second slave MCU;

[0015] The second main MCU is connected to the second slave MCU, and the second main MCU is configured to read the value of the temporary loopback register, modify the value of the loopback setting register in the second main MCU to the seventh value, and set the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register.

[0016] In a third aspect, an embodiment of the present application discloses a remote optical module loopback control method based on dual MCUs, including: when the host computer modifies the value of the loopback message enable register to a first value, the first master MCU generates an update enable command;

[0017] The loopback control register of the first main MCU receives and stores the loopback control value input by the sending end host computer;

[0018] The first memory of the first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and turns off the communication response function of the first slave MCU, so that the first master MCU cannot communicate with the first slave MCU;

[0019] The first slave MCU loads the loopback control command stored in the first slave MCU into the first optical signal;

[0020] The first slave MCU receives and analyzes the electrical signal converted from the second optical signal sent by the receiving end optical module, and the first slave MCU sets the value of the information status flag bit according to the message sent from the receiving end optical module, and the value of the information status flag bit is used to indicate whether the remote optical module enters the loopback mode;

[0021] The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

[0022] In a fourth aspect, an embodiment of the present application discloses a remote optical module loopback control method based on dual MCUs, including:

[0023] The first main MCU generates an update enable command when the host computer modifies the value of the loopback message enable register to the first value;

[0024] The loopback control register of the first main MCU receives and stores the loopback control value input by the sending end host computer;

[0025] The first memory of the first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and turns off the communication response function of the first slave MCU, so that the first master MCU cannot communicate with the first slave MCU;

[0026] The first slave MCU loads the loopback control command stored in the first slave MCU into the first optical signal;

[0027] The second light receiving component receives the first light signal and converts the first light signal into an electrical signal;

[0028] The second slave MCU receives the electrical signal converted from the first optical signal, and parses it to obtain the loopback control command indicated by the first low-frequency message channel;

[0029] The value of the temporary loopback register in the second slave MCU is changed to the fifth value, and the communication response function of the second slave MCU is enabled, so that the second master MCU can communicate with the second slave MCU;

[0030] The second main MCU reads the value of the temporary loopback register, modifies the value of the loopback setting register in the second main MCU to the seventh value, and performs loopback function setting of the receiving end optical module according to the loopback function information corresponding to the loopback setting register;

[0031] After the second master MCU reads the value of the temporary loopback register, the second master sends loopback function setting enable information to the second slave MCU to modify the value of the temporary loopback register to the sixth value;

[0032] After receiving the loopback function setting enable information, the second slave MCU turns off the communication response function of the second slave MCU, and controls the second optical transmitting component to transmit a second optical signal to the transmitting end optical module, wherein the second optical signal carries the function setting success information;

[0033] The first slave MCU receives and analyzes the electrical signal converted from the second optical signal sent by the receiving end optical module, and the first slave MCU sets the value of the information status flag bit according to the message sent from the receiving end optical module, and the value of the information status flag bit is used to indicate whether the remote optical module enters the loopback mode;

[0034] The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

[0035] Compared with the prior art, the present invention has the following beneficial effects:

[0036] The embodiment of the present application provides an optical module and a remote optical module loopback control method based on a dual MCU. The optical module adopts a dual MCU solution of a master MCU and a slave MCU. The master MCU is responsible for the conventional general function processing of the optical module and is responsible for interacting with the host computer. The slave MCU is responsible for the sending and receiving processing of message information and realizes interaction with the master MCU. When the host computer modifies the value of the loopback message enable register to a first value, the first master MCU of the optical module at the transmitting end generates an update enable command. The loopback control register of the first master MCU receives and stores the loopback control value input by the host computer at the transmitting end. The first memory of the first slave MCU stores the loopback control value, and the first slave MCU receives the update enable command, turns off the communication response function of the first slave MCU, so that the first master MCU cannot communicate with the first slave MCU. The first slave MCU loads the loopback control command stored in the first slave MCU into the first optical signal in the form of a low-frequency message. The receiving end optical module receives the first optical signal sent by the transmitting end optical module through the second optical receiving component to receive the loopback control command sent by the transmitting end optical module. The second slave MCU receives the electrical signal converted from the first optical signal and parses it to obtain the loopback control command. The value of the temporary loopback register in the second slave MCU is modified to the fifth value, and the communication response function of the second slave MCU is turned on, so that the second master MCU can communicate with the second slave MCU. The second master MCU reads the value of the temporary loopback register, modifies the value of the loopback setting register in the second master MCU to the seventh value, and sets the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register. After the second master MCU reads the value of the temporary loopback register, the second master sends the loopback function setting enable information to the second slave MCU, and modifies the value of the temporary loopback register to the sixth value. After the second slave MCU receives the loopback function setting enable information, it turns off the communication response function of the second slave MCU, and controls the second optical emitting component to transmit a second optical signal to the transmitting end optical module, and the second optical signal carries the function setting success information. The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

[0037] In the present application, the near-end optical module sends a loopback control command to the far-end optical module to control the far-end optical module to enter the loopback mode, by judging whether the signal indicating that the optical module at the receiving end has been received and returned in the form of a low-frequency message indicating that it has entered the loopback mode. If not received, it is determined that the optical module at the receiving end or the optical fiber connected to the optical module at the receiving end is in an abnormal state; if received, it is determined that the host computer connected to the optical module at the receiving end is in an abnormal state. The embodiment of the present application loads a low-frequency signal on the basis of a normal business signal, increases the function of the message channel, and then completes the abnormal location of the far-end device in the optical link at the local device end without affecting the normal business communication function, thereby effectively shortening the fault location cycle and reducing labor costs. And adopting the dual MCU control function, by turning on and off the communication response function of the slave MCU, it is achieved that the slave MCU is not disturbed by the host computer and the main MCU when sending and receiving messages, thereby improving the success rate of the transmission of the loopback control command. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the present application, the following is a brief introduction to the drawings required for use in some embodiments of the present application. Obviously, the drawings described below are only drawings of some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings. In addition, the drawings described below can be regarded as schematic diagrams, and are not intended to limit the actual size of the product involved in the embodiments of the present application, the actual process of the method, the actual timing of the signal, etc.

[0039] Figure 1 is a partial architecture diagram of an optical communication system according to some embodiments;

[0040] Figure 2 is a partial structural diagram of a host computer according to some embodiments;

[0041] Figure 3 is a structural diagram of an optical module according to some embodiments;

[0042] Figure 4 is an exploded view of an optical module according to some embodiments;

[0043] Figure 5 A schematic diagram of using dual MCUs in an optical module according to some embodiments of the present application;

[0044] Figure 6 A schematic diagram of sending loopback control information of a transmitting end optical module according to some embodiments of the present application Figure 1 ;

[0045] Figure 7 A schematic diagram of sending loopback control information of a transmitting end optical module according to some embodiments of the present application Figure 2 ;

[0046] Figure 8 A schematic diagram of sending a loopback control command of a transmitting end optical module according to some embodiments of the present application Figure 3 ;

[0047] Fig. 9 A loopback control command sending schematic diagram of a receiving end optical module according to some embodiments of the present application Figure 1 ;

[0048] Fig.10 A loopback control command receiving schematic diagram of a receiving end optical module according to some embodiments of the present application Figure 2 ;

[0049] Fig.11 A loopback control flow chart based on a dual MCU optical module is provided according to some embodiments of the present application. DETAILED DESCRIPTION

[0050] Optical communication technology establishes information transmission between information processing devices. Optical communication technology loads information onto light and uses the propagation of light to achieve information transmission. Light loaded with information is an optical signal. When optical signals propagate in information transmission equipment, they can reduce the loss of optical power and achieve high-speed, long-distance, and low-cost information transmission. Information that can be processed by information processing equipment exists in the form of electrical signals. Optical network terminals / gateways, routers, switches, mobile phones, computers, servers, tablets, and televisions are common information processing devices, and optical fibers and optical waveguides are common information transmission equipment.

[0051] The mutual conversion of optical signals and electrical signals between information processing equipment and information transmission equipment is realized through optical modules. For example, an optical fiber is connected to the optical signal input end and / or the optical signal output end of the optical module, and an optical network terminal is connected to the electrical signal input end and / or the electrical signal output end of the optical module; the first signal light from the optical fiber is transmitted into the optical module, the optical module converts the first signal light into a first electrical signal, and the optical module transmits the first electrical signal into the optical network terminal; the second electrical signal from the optical network terminal is transmitted into the optical module, the optical module converts the second electrical signal into a second signal light, and the optical module transmits the second signal light into the optical fiber. Since information processing devices can be connected to each other through an electrical signal network, at least one type of information processing device needs to be directly connected to the optical module, and it is not necessary for all types of information processing devices to be directly connected to the optical module. The information processing device directly connected to the optical module is called the host computer of the optical module.

[0052] Figure 1 FIG. 1 is a partial architecture diagram of an optical communication system according to some embodiments. Figure 1As shown, the optical communication system is partially presented as a remote information processing device 1000 , a local information processing device 2000 , a host computer 100 , an optical module 200 , an optical fiber 101 and a network cable 103 .

[0053] One end of the optical fiber 101 extends toward the remote information processing device 1000, and the other end is connected to the optical interface of the optical module 200. The optical signal can be totally reflected in the optical fiber 101, and the propagation of the optical signal in the direction of total reflection can almost maintain the original optical power. The optical signal is totally reflected multiple times in the optical fiber 101, and the optical signal from the direction of the remote information processing device 1000 is transmitted into the optical module 200, or the light from the optical module 200 is propagated toward the remote information processing device 1000, so as to realize long-distance and low-power-loss information transmission.

[0054] The number of optical fibers 101 may be one or more (two or more); the optical fiber 101 and the optical module 200 may be connected in a pluggable movable manner or in a fixed manner.

[0055] The host computer 100 has an optical module interface 102, which is configured to access the optical module 200, so that the host computer 100 establishes a unidirectional / bidirectional electrical signal connection with the optical module 200; the host computer 100 is configured to provide data signals to the optical module 200, or receive data signals from the optical module 200, or detect and control the working status of the optical module 200.

[0056] The host computer 100 has an external electrical interface, such as a Universal Serial Bus (USB) interface and a network cable interface 104, which can be connected to an electrical signal network. For example, the network cable interface 104 is configured to connect to the network cable 103, so that the host computer 100 and the network cable 103 establish a unidirectional / bidirectional electrical signal connection.

[0057] Optical Network Unit (ONU), Optical Line Terminal (OLT), Optical Network Equipment (ONT) and Data Center Server are common host computers.

[0058] One end of the network cable 103 is connected to the local information processing device 2000 , and the other end is connected to the host computer 100 . The network cable 103 establishes an electrical signal connection between the local information processing device 2000 and the host computer 100 .

[0059] For example, the third electrical signal emitted by the local information processing device 2000 is transmitted to the host computer 100 through the network cable 103. The host computer 100 generates a second electrical signal based on the third electrical signal. The second electrical signal from the host computer 100 is transmitted to the optical module 200. The optical module 200 converts the second electrical signal into a second optical signal. The optical module 200 transmits the second optical signal into the optical fiber 101. The second optical signal is transmitted to the remote information processing device 1000 in the optical fiber 101.

[0060] For example, a first optical signal from the direction of a remote information processing device 1000 propagates through the optical fiber 101, the first optical signal from the optical fiber 101 is transmitted into the optical module 200, the optical module 200 converts the first optical signal into a first electrical signal, the optical module 200 transmits the first electrical signal into the host computer 100, the host computer 100 generates a fourth electrical signal based on the first electrical signal, and the host computer 100 transmits the fourth electrical signal to the local information processing device 2000.

[0061] The optical module is a tool for realizing the mutual conversion between optical signals and electrical signals. During the conversion process between optical signals and electrical signals, the information does not change, but the encoding and decoding method of the information can change.

[0062] Figure 2 FIG. 1 is a partial structural diagram of a host computer according to some embodiments. In order to clearly show the connection relationship between the optical module 200 and the host computer 100, Figure 2 Only the structures related to the host computer 100 and the optical module 200 are shown. Figure 2 As shown, the host computer 100 also includes a PCB circuit board 105 arranged in the shell, a cage 106 arranged on the surface of the PCB circuit board 105, a heat sink 107 arranged on the cage 106, and an electrical connector (not shown in the figure) arranged inside the cage 106. The heat sink 107 has a protruding structure that increases the heat dissipation area, and the fin-shaped structure is a common protruding structure.

[0063] The optical module 200 is inserted into the cage 106 of the host computer 100, and the cage 106 fixes the optical module 200. The heat generated by the optical module 200 is transferred to the cage 106 and then diffused through the heat sink 107. After the optical module 200 is inserted into the cage 106, the electrical interface of the optical module 200 is connected to the electrical connector inside the cage 106.

[0064] Figure 3 is a structural diagram of an optical module according to some embodiments, Figure 4 FIG. 1 is an exploded view of an optical module according to some embodiments. Figure 3 and Figure 4As shown, the optical module 200 includes a shell, a circuit board 300 disposed in the shell, a light emitting component 400 and a light receiving component 500. However, the present application is not limited thereto. In some embodiments, the optical module 200 includes one of the light emitting component 400 and the light receiving component 500.

[0065] The housing comprises an upper housing 201 and a lower housing 202 . The upper housing 201 covers the lower housing 202 to form the housing having two openings 204 and 205 . The outer contour of the housing is generally a square body.

[0066] In some embodiments, the lower shell 202 includes a bottom plate 2021 and two lower side plates 2022 located on both sides of the bottom plate 2021 and arranged perpendicular to the bottom plate 2021; the upper shell 201 includes a cover plate 2011, and the cover plate 2011 covers the two lower side plates 2022 of the lower shell 202 to form the above-mentioned shell.

[0067] In some embodiments, the lower shell 202 includes a bottom plate 2021 and two lower side plates 2022 located on both sides of the bottom plate 2021 and vertically arranged with the bottom plate 2021; the upper shell 201 includes a cover plate 2011 and two upper side plates located on both sides of the cover plate 2011 and vertically arranged with the cover plate 2011, and the two upper side plates are combined with the two lower side plates 2022 to realize that the upper shell 201 covers the lower shell 202.

[0068] The direction of the line connecting the two openings 204 and 205 may be consistent with the length direction of the optical module 200, or may be inconsistent with the length direction of the optical module 200. For example, the opening 204 is located at the end of the optical module 200 ( Figure 3 The opening 205 is also located at the end of the optical module 200 ( Figure 3 Alternatively, the opening 204 is located at the end of the optical module 200, and the opening 205 is located at the side of the optical module 200. The opening 204 is an electrical interface, and the gold finger 301 of the circuit board 300 extends from the electrical interface and is inserted into the electrical connector of the host computer; the opening 205 is an optical port, which is configured to access the optical fiber 101 so that the optical fiber 101 is connected to the optical emitting component 400 and / or the optical receiving component 500 in the optical module 200.

[0069] The assembly method of combining the upper shell 201 and the lower shell 202 is adopted, which facilitates the installation of components such as the circuit board 300, the light emitting component 400, and the light receiving component 500 into the above-mentioned shell, and the upper shell 201 and the lower shell 202 can encapsulate and protect the shapes of these components. In addition, when assembling components such as the circuit board 300, the light emitting component 400 and the light receiving component 500, it is convenient to deploy the positioning components, heat dissipation components, and electromagnetic shielding components of these devices, which is conducive to the automated implementation of production.

[0070] In some embodiments, the upper shell 201 and the lower shell 202 are made of metal materials to facilitate electromagnetic shielding and heat dissipation.

[0071] In some embodiments, the optical module 200 further includes an unlocking component 600 located outside its housing. The unlocking component 600 is configured to achieve a fixed connection between the optical module 200 and the host computer, or to release the fixed connection between the optical module 200 and the host computer.

[0072] For example, the unlocking component 600 is located on the outside of the two lower side plates 2022 of the lower housing 202, and includes a snap-fit ​​component that matches the cage 106 of the host computer. When the optical module 200 is inserted into the cage 106, the snap-fit ​​component of the unlocking component 600 fixes the optical module 200 in the cage 106; when the unlocking component 600 is pulled, the snap-fit ​​component of the unlocking component 600 moves accordingly, thereby changing the connection relationship between the snap-fit ​​component and the host computer, so as to release the snap-fit ​​fixed connection between the optical module 200 and the host computer, so that the optical module 200 can be pulled out of the cage 106.

[0073] The circuit board 300 includes circuit traces, electronic components and chips, etc. The electronic components and chips are connected together according to the circuit design through the circuit traces to realize the functions of power supply, electrical signal transmission and grounding. The electronic components may include capacitors, resistors, triodes, metal-oxide-semiconductor field-effect transistors (MOSFET), etc. The chips may include microcontroller units (MCU), laser driver chips, transimpedance amplifiers (TIA), limiting amplifiers, clock and data recovery chips (CDR), power management chips, and digital signal processing (DSP) chips.

[0074] The circuit board 300 is generally a rigid circuit board. Due to its relatively hard material, the rigid circuit board can also realize the load-bearing function. For example, the rigid circuit board can stably carry the above-mentioned electronic components and chips; the rigid circuit board is also easy to insert into the electrical connector in the upper computer cage.

[0075] The circuit board 300 further includes a gold finger 301 formed on the end surface thereof, and the gold finger 301 is composed of a plurality of independent pins. The circuit board 300 is inserted into the cage 106, and the gold finger 301 is connected to the electrical connector in the cage 106. The gold finger 301 can be provided on only one side of the circuit board 300 (e.g. Figure 4 The gold finger 301 is configured to establish an electrical connection with the host computer to achieve power supply, grounding, I2C signal transmission, data signal transmission, etc.

[0076] Of course, flexible circuit boards are also used in some optical modules. Flexible circuit boards are generally used in conjunction with rigid circuit boards to supplement rigid circuit boards.

[0077] The light emitting component 400 and / or the light receiving component 500 are located on a side of the circuit board 300 away from the gold finger 301; in some embodiments, the light emitting component 400 and the light receiving component 500 are physically separated from the circuit board 300, and then electrically connected to the circuit board 300 through corresponding flexible circuit boards or electrical connectors; in some embodiments, the light emitting component and / or the light receiving component can be directly set on the circuit board 300, can be set on the surface of the circuit board, and can also be set on the side of the circuit board.

[0078] In the access network communication system, an optical connection is established between the optical line terminal and the optical network unit to realize data communication. Specifically, the optical line terminal has a near-end optical module (second optical module), the optical network unit has a far-end optical module (second optical module), and an optical connection is established between the first optical module and the second optical module; the optical line terminal sends an optical signal to the first optical module through the second optical module, so that the optical line terminal sends data to the optical network unit; the optical line terminal receives the optical signal from the first optical module through the second optical module, so that the optical line terminal receives data from the optical network unit.

[0079] The optical line terminal and optical network unit are the host computers of the optical module. The host computer inputs the data electrical signal into the optical module, and the optical module converts the data electrical signal into an optical signal and sends it out, so that the host computer can send data; the optical module converts the optical signal from the outside into a data electrical signal, and inputs the data electrical signal into the host computer, so that the host computer can receive data.

[0080] During the operation of the optical module, the present embodiment is configured to send a relatively high-frequency data optical signal according to the data electrical signal from the optical line terminal to maintain the original external data transmission service of the optical line terminal. At the same time, the optical module also sends a relatively low-frequency control optical signal according to the non-data electrical signal (i.e., a signal not used for normal transmission service) to send control information to the optical module at the opposite end, thereby transmitting control data to the remote system without interrupting normal service, so as to realize self-inspection of the optical link.

[0081] Since the optical module and the optical module at the opposite end are both connected to the outside by an optical fiber, the data optical signal and the control optical signal are mixed in the same beam of light and transmitted by the same optical fiber. In order to distinguish different signals, the data optical signal and the control optical signal are set to have different frequencies in this embodiment. In its implementation, the microprocessor, optical transmitting component and optical receiving component in the optical module can be set to control the optical transmitting component to superimpose a low-frequency modulation signal (control optical signal) on the high-frequency signal (data optical signal) it emits. In this embodiment, the low-frequency modulation signal is called a low-frequency message channel. For example, a low-frequency modulation signal of 50Kbps is superimposed on a 10Gbps or 25Gbps signal, wherein the 10Gbps or 25Gbps signal is a normal business signal, and the added low-frequency signal of 50Kbps performs other control functions.

[0082] The embodiment of the present application provides an optical module, which adopts a dual MCU solution of a master MCU and a slave MCU. The master MCU is responsible for the conventional general function processing of the optical module and for interacting with the host computer, and the slave MCU is responsible for the sending and receiving processing of message information and for interacting with the master MCU. Through the coordinated application between the sending end host computer, the sending end master MCU, the sending end slave MCU, the receiving end master MCU, and the receiving end slave MCU, the purpose of monitoring the operating status of the remote module in real time or at any time can be achieved.

[0083] Figure 5 A schematic diagram of using dual MCUs in an optical module according to some embodiments of the present application. Figure 6 A schematic diagram of sending loopback control information of a transmitting end optical module according to some embodiments of the present application Figure 1 .like Figure 5 and Figure 6 As shown, the transmitting end optical module (first optical module, proximal optical module) provided in the embodiment of the present application includes a first optical emitting component, a first optical receiving component, a first master MCU and a first slave MCU.

[0084] The first main MCU is connected to the sending end host computer for communication. The first main MCU is provided with a loopback control register and a loopback message enabling register.

[0085] The first master MCU is connected to the transmitting end host computer in communication, and a loopback message enable register is set in the first master MCU. The first master MCU is configured to generate an update enable command when the transmitting end host computer modifies the value of the loopback message enable register to a first value. That is, when the transmitting end host computer monitors that the optical module is in an idle state and needs to perform link detection, the transmitting end host computer sets the value of the loopback message enable register to the first value to trigger the transmission of information of the transmitting end optical module. When the first master MCU detects that the value of the loopback message enable register is the first value, it will generate an update enable command and send the update enable command to the first slave MCU.

[0086] For example, the first value can be 1. If the first value is 1, when the transmitting end host computer modifies the value of the loopback message enable register to 1, an update enable command is generated. That is, when the transmitting end host computer receives a link detection request, the transmitting end host computer sets the value of the loopback message enable register to 1 to trigger the sending of information of the transmitting end optical module. When the first master MCU detects that the value of the loopback message enable register is 1, it generates an update enable command and sends the update enable command to the first slave MCU.

[0087] In some embodiments, when the value of the loopback message enable register is the enable default value, the first master MCU does not generate an update enable command.

[0088] The loopback control register of the first master MCU stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first slave MCU. When the sending end host computer monitors the link function detection command, the sending end host computer writes the loopback control value into the loopback control register.

[0089] The host computer updates the loopback control value according to the loopback control request. For example, the loopback control value can be a single control value, such as the loopback control value is the first control bit (such as 1 or 0), which means that the loopback function of the optical module at the opposite end needs to be controlled to be turned on. The loopback control value is the first control bit, which means that the loopback function of the optical module at the opposite end needs to be controlled to be turned off.

[0090] The loopback control value can also be a double control value, and the loopback control value includes a first score and a second score. When the first score of the loopback control register is the first control bit and the second score is the second control bit (the loopback control register is 10), it means that the TX loopback function of the opposite optical module needs to be controlled to be turned on; when the first score of the loopback control register is the second control bit and the second score is the first control bit (the loopback control register is 01), it means that the RX loopback function of the opposite optical module needs to be controlled to be turned on. When the first score of the loopback control register is the second control bit and the second score is the second control bit (the loopback control register is 00), it means that the loopback function of the opposite optical module needs to be controlled to be turned off.

[0091] The first slave MCU is connected to the first master MCU, the first slave MCU stores the loopback control value, receives the update enable command from the first master MCU, generates the loopback control command according to the loopback control value, and loads the loopback control command stored in the first slave MCU to the first low-frequency message channel. That is, after the first slave MCU receives the update enable command sent by the first master MCU, it generates the loopback control command according to the loopback control value, and loads the loopback control command to the first optical signal. The loopback control command is transmitted in a low-frequency form.

[0092] In some embodiments, the first slave MCU includes a first memory, which stores loopback control values ​​and preset loopback control commands. When the first slave MCU receives an update enable command, the first slave MCU loads the preset loopback control commands stored in the first memory to the first low-frequency message channel.

[0093] The loopback control register stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first memory of the first slave MCU. The loopback control command is mapped to the loopback control value.

[0094] For example, the loopback control value is a single control value, such as the loopback control value is the first control bit (such as 1), the first slave MCU. Generate a corresponding loopback control command according to the first control bit. When the first slave MCU detects that the loopback control value in the first memory is 1, it will generate a loopback function enable command, and load the loopback function enable command to the first low-frequency message channel. In this embodiment, the loopback control command can be a TX loopback function enable command, or it can be an RX loopback function enable command. If the loopback control value is the second control bit (such as 0), when the transmitting end host computer modifies the value of the loopback control register to the second control bit, a loopback control command is generated to close. That is, when the transmitting end host computer monitors the link function detection command to close, the transmitting end host computer will set the value of the loopback control register to the second control bit, which is used to trigger the sending of the loopback control command of the transmitting end optical module. When the first master MCU detects that the value of the loopback control register is 0, it will generate a loopback control command to close, and send the loopback control command to the first slave MCU. In this embodiment, the loopback control command may be a TX loopback close control command or a RX loopback close command.

[0095] For example, the loopback control value is a dual control value, and the loopback control value includes a first score and a second score. When the first main MCU detects that the first score of the loopback control register is the first control bit and the second score is the second control bit (the loopback control value of the first memory is 10), it will generate a TX loopback function enable command and load the TX loopback function enable command to the first optical signal. When the first main MCU detects that the first score of the loopback control register is the second control bit and the second score is the first control bit (the loopback control value of the first memory is 01), it will generate an RX loopback function enable command and load the RX enable loopback control command to the first optical signal. When the first main MCU detects that the first score of the loopback control register is the second control bit and the second score is the second control bit (the loopback control value of the first memory is 00), it will generate a loopback function disable command and load the loopback function disable command to the first optical signal.

[0096] The first optical transmitting component is connected to the first slave MCU and is configured to transmit a first optical signal carrying a first low-frequency message channel, that is, the first slave MCU controls the first optical transmitting component to transmit a first optical signal to the transmitting end optical module, and the first optical signal carries a loopback control command.

[0097] In some embodiments, in order to improve the success rate of sending the loopback control command, the first slave MCU controls the first optical emitting component to cyclically send the first optical signal until the sending is successful or it is determined that the command sending fails.

[0098] The first optical receiving component is connected to the first slave MCU. When the loopback function of the receiving end optical module is successfully set, the first optical receiving component is configured to receive a message sent from the receiving end optical module to achieve communication interaction between the sending end optical module and the receiving end optical module.

[0099] The transmitting optical module provided in the embodiment of the present application modifies the value of the loopback message enable register to the first value and writes the loopback control value to the loopback control register when receiving the loopback control request. The loopback control register of the first master MCU stores the loopback control value, and generates an update enable command when the transmitting host computer modifies the value of the loopback message enable register to the first value. The first memory of the first slave MCU stores the loopback control value and the preset loopback control command. When the first slave MCU receives the update enable command, the first slave MCU loads the preset loopback control command stored in the first memory to the first low-frequency message channel.

[0100] Figure 7 A schematic diagram of sending loopback control information of a transmitting end optical module according to some embodiments of the present application Figure 2To prevent the first master MCU from accessing the first slave MCU when the first slave MCU is in the message sending state, resulting in a message sending failure, the first slave MCU does not respond to the first master MCU when the first slave MCU is sending information. The first slave MCU is also provided with a communication response module and a response flag. The communication response module responds or does not respond to the communication access of the first master MCU according to the value of the response flag.

[0101] Before sending the update enable command to the first slave MCU, the first master MCU accesses the communication response module, and the communication response module responds or does not respond to the communication access of the first master MCU according to the value of the response flag bit.

[0102] For example, when the first slave MCU is sending or receiving information, the response flag is set to a second value, such as setting the response flag to 0, to turn off the communication response function of the first slave MCU. The first slave MCU does not respond to the communication access of the first master MCU, so that the first master MCU cannot communicate with the first slave MCU.

[0103] When the first slave MCU is in an idle state, the response flag is set to a third value, such as setting the response flag to 1 to enable the communication response function of the first slave MCU. The first slave MCU responds to the communication access of the first master MCU, so that the first master MCU communicates with the first slave MCU.

[0104] The default value of the response flag of the first slave MCU is the third value. At this time, the first slave MCU responds to the communication access of the first master MCU, so that the first master MCU can perform communication access to the first slave MCU.

[0105] In some embodiments, when the first slave MCU is in an idle state, the response flag is set to a third value, the first slave MCU responds to the communication access of the first master MCU, the first master MCU sends an update enable command to the first slave MCU, and writes the loopback control value to the first memory. After receiving the update enable command, the first slave MCU will immediately turn off the communication response function, indicating that a message will be sent at this time and no communication response will be made.

[0106] The first slave MCU is also provided with an information status register, which stores an information status flag bit, which represents the sending status of the loopback control command. The first slave MCU sets the value of the information status flag bit according to the message sent by the receiving end optical module.

[0107] For example, if the receiving optical module has completed the loopback function setting and sent the function setting success information to the first optical receiving component, the information status flag is set to the third value (such as 1); if the first slave MCU repeatedly sends the loopback control command for multiple times and reaches the specified upper limit and still does not receive any return information, the information status flag is set to the fourth value (such as 2). The initial value of the information status flag is the fifth value (such as 0).

[0108] After the loopback control command is sent, the first slave MCU will reopen the communication response function, at which time the first master MCU can read the message sending status register of the first slave MCU to obtain the specific result of the message sending. After the first master MCU can read the message sending status register of the first slave MCU to obtain the result of the message sending, if the loopback control command does not need to be resent, the value of the loopback message enable register is set to the enable default value.

[0109] The first slave MCU receives and analyzes the second optical signal emitted by the receiving optical module, sets the value of the information status flag according to the message sent from the receiving optical module, and changes back to the default value of the response flag in the first slave MCU, so that the first master MCU can communicate with the first slave MCU.

[0110] After the first slave MCU receives the second optical signal sent by the receiving optical module, it will set the value of the information status flag to the third value (such as 1), indicating that the function setting message is successful; if the first slave MCU repeatedly sends data to the specified upper limit and still does not receive any information back, the information status flag will be set to the fourth value (such as 2), indicating that the function setting message failed; regardless of whether the message setting is successful or failed, the first slave MCU will turn on the communication response function at this time, so that the first master MCU can access the first slave MCU and read the status flag. The first master MCU can read the message sending status register of the first slave MCU to obtain the result of the message sending as the third value, and there is no need to resend the loopback control command, and the value of the loopback message enable register is set to the enable default value.

[0111] In the present embodiment, the first main MCU is also provided with a loopback function result memory, and the loopback function result memory is used to store the loopback function result. The first main MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register. After the first main MCU reads the value in the information status register of the first slave MCU, the value will be copied to the loopback function result memory (such as: 1 represents successful message transmission, 2 represents message transmission failure), and the first main MCU will automatically clear the loopback message enable register to inform the host computer that the transmission result of this message can be accessed.

[0112] Figure 8 A loopback control command sending schematic diagram of a transmitting end optical module according to some embodiments of the present application Figure 3 .like Figure 8 As shown, in some embodiments, the communication response module of the first slave MCU responds to the communication access of the first master MCU or does not respond according to the channel operation status.

[0113] After receiving the response from the first slave MCU, the first master MCU writes the value of the loopback message enable register into the first memory of the first slave MCU, and sends an update enable command to the first slave MCU.

[0114] When the first slave MCU is in a message sending state, the transmitting optical module turns off the communication response function of the first slave MCU, so that the first slave MCU is not disturbed by the receiving host computer and the first master MCU when the first slave MCU is in a message sending state, thereby improving the communication success rate.

[0115] Fig. 9 A loopback control command sending schematic diagram of a receiving end optical module according to some embodiments of the present application Figure 1 .like Fig. 9 As shown, the receiving end optical module (second optical module, remote optical module) includes a second optical emitting component, a second optical receiving component, a second master MCU and a second slave MCU.

[0116] The second optical receiving component is configured to receive a first optical signal carrying a first low-frequency message channel, and the first low-frequency message channel is used to indicate a loopback control command, that is, the receiving end optical module receives the first optical signal sent by the sending end optical module through the second optical receiving component to receive the loopback control command sent by the sending end optical module.

[0117] The second slave MCU is connected to the second optical receiving component. The second slave MCU is configured to: receive the first optical signal, parse and obtain the loopback control command indicated by the first low-frequency message channel, modify the value of the temporary loopback register in the second slave MCU to the fifth value, enable the communication response function of the second slave MCU, so that the second master MCU can communicate with the second slave MCU; and, after the second master MCU reads the value of the temporary loopback register, modify the value of the temporary loopback register to the sixth value, and disable the communication response function of the second slave MCU, so that the second master MCU cannot communicate with the second slave MCU.

[0118] In some embodiments, after the loopback test, the receiving optical module turns off the communication response function of the second slave MCU by default, so that the second slave MCU does not respond to the communication access of the second master MCU, thereby preventing other communications from affecting the second slave MCU from receiving the first optical signal.

[0119] A temporary loopback register is set in the second slave MCU. When the second slave MCU receives the first optical signal and parses the loopback control command indicated by the first low-frequency message channel, the second slave MCU sets the value of the temporary loopback register to 1 to indicate that the second slave MCU receives the temporary loopback register sent by the receiving optical module. Then the second slave MCU turns on its communication response function, allowing the second master MCU to communicate with the second slave MCU.

[0120] In some embodiments, when the second optical receiving component does not receive the first optical signal, or the second slave MCU does not parse the loopback control command indicated by the first low-frequency message channel, the second slave MCU sets the value of the temporary loopback register to a default value to indicate that the second slave MCU has not successfully received the loopback control command sent by the transmitting optical module. At this time, the second slave MCU still turns off its communication response function and waits for the next command to arrive.

[0121] The second master MCU is connected to the second slave MCU, and the second master MCU is configured to: read the value of the temporary loopback register, modify the value of the loopback setting register in the second master MCU to the seventh value, and set the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register.

[0122] In some embodiments, a loopback setting register is set in the second master MCU. After the second slave MCU turns on its communication response function, when the second master MCU polls and accesses the second slave MCU, the second master MCU reads the value of the temporary loopback register inside the second slave MCU. After reading the value of the temporary loopback register, the second master MCU can write the value of the temporary loopback register into the loopback setting register. The value of the loopback setting register preset in the second master MCU corresponds to the loopback function information, and the second master MCU controls the loopback function setting of the receiving end optical module according to the value of the loopback setting register.

[0123] In some embodiments, after the second master MCU reads the value of the temporary loopback register, the second master MCU may copy the value of the temporary loopback register to the loopback setting register, and also send loopback function setting enable information to the second slave MCU. The second master MCU is provided with a loopback function setting module, and the loopback function setting module sets the loopback function according to the value of the loopback setting register. The loopback function setting enable information indicates that the receiving end optical module has entered the loopback function mode.

[0124] For example, when the value of the loopback setting register is the first loopback temporary value (such as 10), the loopback function setting module turns on the TX loopback function; when the value of the loopback setting register is the second loopback temporary value (such as 01), the loopback function setting module turns on the RX loopback function; when the value of the loopback setting register is the third loopback temporary value (such as 00), the loopback function setting module turns off the loopback function.

[0125] After the second slave MCU receives the loopback function setting enable information, the communication response function of the second slave MCU is turned off, and the second optical emitting component is controlled to send function setting success information.

[0126] The second optical transmitting component is connected to the second slave MCU and is configured to transmit a second optical signal carrying a second low-frequency message channel, that is, the second slave MCU controls the second optical transmitting component to transmit a second optical signal to the transmitting end optical module, and the second optical signal carries function setting success information.

[0127] Reference Fig. 9 In some embodiments, in order to turn on or off the communication response function of the second slave MCU, a communication response module and an ACK response flag are provided in the second slave MCU. The communication response module responds to the communication access of the second master MCU or does not respond according to the value of the ACK response flag.

[0128] When the second slave MCU receives and parses the loopback control command, the second slave MCU modifies the ACK response flag in it to the eighth value. For example, the ACK response flag is set to 1 to enable the communication response function of the second slave MCU, so that the second master MCU can communicate with the second slave MCU, and the second master MCU can read the loopback control command in the second slave MCU.

[0129] After the second master MCU reads the loopback control command, the second slave MCU modifies its ACK response flag to the ninth value, for example, clears the ACK response flag to disable the communication response function of the second slave MCU, so that the second master MCU cannot communicate with the second slave MCU.

[0130] The second optical emitting component is connected to the second slave MCU and is configured to: send an optical signal to the transmitting end optical module to achieve communication interaction between the transmitting end optical module and the receiving end optical module.

[0131] The second optical signal carrying the second low-frequency message channel is transmitted, that is, the second slave MCU controls the second optical transmitting component to transmit the second optical signal to the transmitting end optical module, and the second optical signal carries the function setting success information.

[0132] Fig.10 A loopback control command receiving schematic diagram of a receiving end optical module according to some embodiments of the present application Figure 2 .like Fig.10 As shown, in some embodiments, the communication response module of the second slave MCU responds to the communication access of the second master MCU, or does not respond, according to the channel operation status.

[0133] After receiving the response from the second slave MCU, the second master MCU copies the value of the temporary loopback register to the loopback setting register of the second master MCU, and sets the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register. After reading the value of the temporary loopback register, the second master MCU can copy the value of the temporary loopback register to the loopback setting register, and also send the loopback function setting enable information to the second slave MCU. The second master MCU is provided with a loopback function setting module, and the loopback function setting module sets the loopback function according to the value of the loopback setting register.

[0134] After the second slave MCU receives the loopback function setting enable information, the communication response function of the second slave MCU is turned off, and the second optical emitting component is controlled to send function setting success information.

[0135] When the second slave MCU is in the message sending state, the receiving end optical module can disable the communication response function of the second slave MCU, so that the second slave MCU is not disturbed by the receiving end host computer and the second master MCU when the second slave MCU is in the message sending state, thereby improving the communication success rate.

[0136] The optical module provided in the embodiment of the present application adds the function of the message channel. By using the dual MCU to establish the message sending function between the proximal optical module and the distal optical module, when the communication between the distal optical module and the proximal optical module is abnormal, the proximal optical module sends a loopback control command to the distal optical module, so that the distal optical module, by judging whether the signal indicating that it enters the optical loopback mode is received based on the low-frequency message channel returned by the optical module of the receiving end. If not received, it is determined that the optical module of the receiving end or the optical fiber connected to the optical module of the receiving end is in an abnormal state; if received, it is determined that the host computer connected to the optical module of the receiving end is in an abnormal state. The embodiment of the present application loads a low-frequency signal on the basis of the normal business signal, adds the function of the message channel, and then completes the abnormal location of the remote device in the optical link at the local device end without affecting the normal business communication function, thereby effectively shortening the fault location cycle and reducing the labor cost. And adopting the dual MCU control function, by turning on and off the communication response function of the slave MCU, it is realized that the slave MCU is not disturbed by the host computer and the main MCU when sending and receiving messages, thereby improving the success rate of the transmission of the loopback control command.

[0137] Fig.11 The following is a loopback control flow chart based on a dual MCU optical module according to some embodiments of the present application. Fig.11 As shown, the remote optical module loopback control method based on dual MCUs provided in the embodiment of the present application includes:

[0138] S100: When the host computer modifies the value of the loopback message enable register to the first value, the first main MCU generates an update enable command.

[0139] When the host computer at the sending end monitors that the optical module is in an idle state and link detection is required, the host computer at the sending end sets the value of the loopback message enable register to the first value to trigger the sending of information of the optical module at the sending end. When the first master MCU detects that the value of the loopback message enable register is the first value, it generates an update enable command and sends the update enable command to the first slave MCU.

[0140] The loopback control register of the first master MCU stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first slave MCU. When the sending end host computer monitors the link function detection command, the sending end host computer writes the loopback control value into the loopback control register.

[0141] S200: The loopback control register of the first main MCU receives and stores the loopback control value input by the sending end host computer.

[0142] The loopback control register of the first master MCU stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first slave MCU. When the sending end host computer monitors the link function detection command, the sending end host computer writes the loopback control value into the loopback control register.

[0143] The host computer updates the loopback control value according to the loopback control request. For example, the loopback control value can be a single control value, such as the loopback control value is the first control bit (such as 1 or 0), which means that the loopback function of the optical module at the opposite end needs to be controlled to be turned on. The loopback control value is the first control bit, which means that the loopback function of the optical module at the opposite end needs to be controlled to be turned off.

[0144] The loopback control value can also be a double control value, and the loopback control value includes a first score and a second score. When the first score of the loopback control register is the first control bit and the second score is the second control bit (the value of the loopback control register is 10), it means that the TX loopback function of the opposite optical module needs to be controlled to be turned on; when the first score of the loopback control register is the second control bit and the second score is the first control bit (the value of the loopback control register is 01), it means that the RX loopback function of the opposite optical module needs to be controlled to be turned on. When the first score of the loopback control register is the second control bit and the second score is the second control bit (the value of the loopback control register is 00), it means that the loopback function of the opposite optical module needs to be controlled to be turned off.

[0145] S300: The first memory of the first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and turns off the communication response function of the first slave MCU, so that the first master MCU cannot perform communication access to the first slave MCU.

[0146] After the first slave MCU receives the update enable command sent by the first master MCU, the communication response function of the first slave MCU is turned off, so that the first slave MCU does not respond to the communication access to the first master MCU, which can prevent the first master MCU from making other communication accesses to the first slave MCU, so that the first slave MCU regards the loopback control command as the highest priority and does not perform other operations.

[0147] S400: The first slave MCU loads the loopback control command stored in the first slave MCU to the first low-frequency message channel.

[0148] When the first slave MCU receives the update enable command, the first slave MCU loads the pre-programmed loopback control command stored in the first memory to the first low-frequency message channel.

[0149] The first slave MCU controls the first optical emitting component to emit a first optical signal carrying a first low-frequency message channel.

[0150] The first slave MCU controls the first optical transmitting component to transmit a first optical signal to the transmitting end optical module, wherein the first optical signal carries a low-frequency message of a loopback control command to control the receiving end optical module to perform a loopback test.

[0151] In order to improve the success rate of sending the loopback control command, the first slave MCU controls the first optical emitting component to cyclically send the first optical signal until the sending is successful or it is determined that the command sending fails.

[0152] T100: The second optical receiving component receives the first optical signal carrying the first low-frequency message channel, and converts the first optical signal into an electrical signal.

[0153] The receiving end optical module receives the first optical signal sent by the transmitting end optical module through the second optical receiving component, so as to receive the loopback control command sent by the transmitting end optical module.

[0154] T200: The second slave MCU receives the electrical signal converted from the first optical signal, and parses it to obtain the loopback control command indicated by the first low-frequency message channel.

[0155] T300: The value of the temporary loopback register in the second slave MCU is changed to the fifth value, and the communication response function of the second slave MCU is enabled, so that the second master MCU can communicate with the second slave MCU.

[0156] A temporary loopback register is set in the second slave MCU. When the second slave MCU receives the first optical signal and parses the loopback control command indicated by the first low-frequency message channel, the second slave MCU sets the value of the temporary loopback register to 1 to indicate that the second slave MCU receives the temporary loopback register sent by the receiving optical module. Then the second slave MCU turns on its communication response function, allowing the second master MCU to communicate with the second slave MCU.

[0157] In some embodiments, when the second optical receiving component does not receive the first optical signal, or the second slave MCU does not parse the loopback control command indicated by the first low-frequency message channel, the second slave MCU sets the value of the temporary loopback register to 0 to indicate that the second slave MCU has not successfully received the loopback control command sent by the transmitting optical module. At this time, the second slave MCU still turns off its communication response function and waits for the next command to arrive.

[0158] T400: The second main MCU reads the value of the temporary loopback register, modifies the value of the loopback setting register in the second main MCU to the seventh value, and sets the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register.

[0159] In some embodiments, a loopback setting register is set in the second master MCU. After the second slave MCU turns on its communication response function, when the second master MCU polls and accesses the second slave MCU, the second master MCU reads the value of the temporary loopback register inside the second slave MCU. After reading the value of the temporary loopback register, the second master MCU can write the value of the temporary loopback register into the loopback setting register. The value of the loopback setting register preset in the second master MCU corresponds to the loopback function information, and the second master MCU controls the loopback function setting of the receiving end optical module according to the value of the loopback setting register.

[0160] In some embodiments, after the second master MCU reads the value of the temporary loopback register, the second master MCU may copy the value of the temporary loopback register to the loopback setting register, and also send loopback function setting enable information to the second slave MCU. The second master MCU is provided with a loopback function setting module, and the loopback function setting module sets the loopback function according to the value of the loopback setting register.

[0161] T500: After the second master MCU reads the value of the temporary loopback register, the second master MCU sends loopback function setting enable information to the second slave MCU, and modifies the value of the temporary loopback register to the sixth value to indicate that the second master MCU has read the value of the temporary loopback register.

[0162] T600: After receiving the loopback function setting enable information, the second slave MCU turns off the communication response function of the second slave MCU, and controls the second optical transmitting component to transmit a second optical signal to the transmitting end optical module, wherein the second optical signal carries function setting success information.

[0163] S500: The first slave MCU receives and analyzes the electrical signal converted from the second optical signal sent by the receiving end optical module, and the first slave MCU sets the value of the information status flag according to the message sent from the receiving end optical module. The first optical receiving component receives the second optical signal and converts it into an electrical signal first slave MCU. The value of the information status flag is used to indicate whether the remote optical module enters the loopback mode.

[0164] S600: The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

[0165] When the first master MCU reads the value in the information status register of the first slave MCU, it will copy the value to the loopback function result memory (such as: 1 indicates that the message is sent successfully, and 2 indicates that the message fails to be sent). At the same time, the first master MCU will automatically clear the loopback message enable register to inform the host computer that it can access the sending result of this message.

[0166] In some embodiments of the present application, when transmitting data between optical modules, there may be a situation where the data transmission fails due to temporary power failure of the optical module, network problems, etc. In order to prevent the situation where the fault location is wrong due to data transmission failure, this embodiment also provides a method for retransmitting data between optical modules, by setting a data retransmission flag in the optical module at the transmitting end, and before sending the low-frequency message channel signal, first change the data retransmission flag from the second preset value to the first preset value, indicating that the data retransmission mechanism is started.

[0167] Under this mechanism, if the signal is that the receiving end optical module has entered the optical loopback mode, in addition to executing the above step S400, the data retransmission flag is changed from the first preset value to the second preset value. In addition, when the signal received is not that the receiving end optical module has entered the optical loopback mode, this embodiment also provides a data retransmission method, that is, step S401 can also be executed including:

[0168] S4011: If it is not a signal indicating that the receiving end optical module completes the loopback setting, then when the first optical signal has been sent for a period of time exceeding a preset period of time, determine whether the number of times the data has been sent to indicate that the optical signal receiving end optical module enters the loopback mode does not exceed a preset number threshold.

[0169] Among them, the sending number register sendcounter and the sending interval period register Runcounter can be set inside the sending optical module, wherein, when the optical module is initially powered on, both of these registers have a default value of 0. Each time the optical module sends out the above-mentioned low-frequency message channel signal, the count value of the sending number register sendcounter will be accumulated by 1, and at the same time, the sending interval period register Runcounter is equivalent to the start of the timer, and the register count value will be increased by 1 after each software cycle.

[0170] In some embodiments, the sending times register and the sending interval period register are located in the first main MCU.

[0171] If the number of times does not exceed the preset threshold, execute step S4012; otherwise, execute step S4013.

[0172] S4012: Send out the data for instructing the first optical signal receiving end optical module to enter the loopback test again through the low-frequency information channel.

[0173] S4013: Setting the information status register to a third preset value to indicate that the optical module at the receiving end or the optical fiber connected to the optical module at the receiving end is in an abnormal state.

[0174] This indicates that after the local optical module (i.e., the transmitting optical module) repeatedly sends data for multiple times, the remote optical module (i.e., the receiving optical module) still does not receive the correct data, indicating that the optical port loopback of the remote optical module has completely failed, and it is determined that the receiving optical module or the optical fiber connected to the receiving optical module is in an abnormal state.

[0175] Since the above embodiments are all described by citing and combining with other embodiments, different embodiments have the same parts, and the same and similar parts between the embodiments in this specification can be referred to each other. No further detailed description is given here.

[0176] It should be noted that, in this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such circuit structure, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the circuit structure, article or device including the element.

[0177] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure of the present application. The present application is intended to cover any variation, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the content of the claims.

[0178] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.

Claims

1. An optical module, characterized in that: include: Circuit boards; A first optical emitting component is electrically connected to the circuit board, and the first optical emitting component is configured to emit a first optical signal carrying a first loopback control command, wherein the loopback control command is transmitted in the form of a low-frequency message; A first master MCU is electrically connected to the circuit board and is configured to: generate an update enable command when the sending end host computer modifies the value of the loopback message enable register to a first value, the loopback control register stores the loopback control value written by the sending end host computer, and writes the loopback control value into the first slave MCU; A first slave MCU is connected to the first master MCU and the first light emitting component, and the first slave MCU sets a first memory to store a loopback control value; The first slave MCU receives the update enable command from the first master MCU, generates a loopback control command according to the loopback control value, and loads the loopback control command stored in the first slave MCU into the first optical signal.

2. The optical module according to claim 1, characterized in that: A response flag is set in the first slave MCU, and the first slave MCU is further configured to, upon receiving the loopback control command, modify the value of the response flag in the first slave MCU to a second value, so that the first master MCU cannot perform communication access to the first slave MCU; Before the first master MCU writes the loopback control value into the first slave MCU, the value of the response flag is read as the third value.

3. The optical module according to claim 1, characterized in that: Also includes: A first optical receiving component receives a second optical signal from an opposite end; The first slave MCU is connected to the first optical receiving component, the first slave MCU receives and parses the second optical signal emitted by the receiving end optical module, and the first slave MCU sets the value of the information status flag according to the message sent from the receiving end optical module; and sets the response flag in the first slave MCU to a third value, so that the first master MCU can communicate with the first slave MCU; when the value of the message sending status register of the first slave MCU is the third value, the value of the loopback message enable register is set to enable the default value.

4. The optical module according to claim 3, characterized in that: The first master MCU is further configured to: read the information status register of the first slave MCU, and copy the value of the loopback function result memory into the information status register.

5. An optical module, characterized in that: include: Circuit boards; A second optical receiving component is electrically connected to the circuit board, and the second optical receiving component is configured to receive a first optical signal carrying a loopback control command channel, wherein the loopback control command is transmitted in the form of a low-frequency message; A second slave MCU is connected to the second light receiving component, and the second slave MCU is configured to: receive the first light signal, parse and obtain a loopback control command, modify the value of the temporary loopback register in the second slave MCU to the fifth value, and enable the communication response function of the second slave MCU, so that the second master MCU can communicate with the second slave MCU; and, after the second master MCU reads the value of the temporary loopback register, modify the value of the temporary loopback register to the sixth value, and after the second slave MCU receives the loopback function setting enable information, modify the value of the ACK response flag bit, so that the second master MCU cannot communicate with the second slave MCU; The second main MCU is connected to the second slave MCU, and the second main MCU is configured to read the value of the temporary loopback register, modify the value of the loopback setting register in the second main MCU to the seventh value, and set the loopback function of the receiving end optical module according to the loopback function information corresponding to the loopback setting register.

6. The optical module according to claim 5, characterized in that: An ACK response flag is set in the second slave MCU, and the second slave MCU is further configured to modify the ACK response flag to an eighth value when parsing a loopback control command, so that the second master MCU can communicate with the second slave MCU.

7. The optical module according to claim 5, characterized in that: Also includes: The second light emitting component is connected to the second slave MCU; the second light emitting component is configured to emit a second light signal, wherein the second light signal carries function setting success information.

8. The optical module according to claim 7, characterized in that: The second master MCU is further configured to: after setting the loopback function according to the value of the loopback setting register, send loopback function setting enable information to the second slave MCU; The second slave MCU is further configured to: after receiving the loopback function setting enabling information, turn off the communication response function of the second slave MCU and control the second optical emitting component to emit the second optical signal.

9. A remote optical module loopback control method based on dual MCUs, characterized in that: include: The first main MCU generates an update enable command when the host computer modifies the value of the loopback message enable register to the first value; The loopback control register of the first main MCU receives and stores the loopback control value input by the sending end host computer; The first memory of the first slave MCU stores the loopback control value, and the first slave MCU receives the update enable command to load the loopback control command stored in the first slave MCU into the first optical signal in the form of a low-frequency message; The first slave MCU receives and analyzes the electrical signal converted from the second optical signal sent by the receiving end optical module, and the first slave MCU sets the value of the information status register according to the message sent from the receiving end optical module, and the value of the information status register is used to indicate whether the remote optical module enters the loopback mode; The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

10. A remote optical module loopback control method based on dual MCUs, characterized in that: The method comprises: The first main MCU generates an update enable command when the host computer modifies the value of the loopback message enable register to the first value; The loopback control register of the first main MCU receives and stores the loopback control value input by the sending end host computer; The first memory of the first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and turns off the communication response function of the first slave MCU, so that the first master MCU cannot communicate with the first slave MCU; The first slave MCU loads the loopback control command stored in the first slave MCU into the first optical signal in the form of low-frequency information; The second light receiving component receives the first light signal and converts the first light signal into an electrical signal; The second slave MCU receives the electrical signal converted from the first optical signal, and parses it to obtain the loopback control command indicated by the first optical signal; The value of the temporary loopback register in the second slave MCU is modified to the fifth value, and the value of the ACK response flag is modified so that the second master MCU can communicate with the second slave MCU; The second main MCU reads the value of the temporary loopback register, modifies the value of the loopback setting register in the second main MCU to the seventh value, and performs loopback function setting of the receiving end optical module according to the loopback function information corresponding to the loopback setting register; After the second master MCU reads the value of the temporary loopback register, the second master sends loopback function setting enable information to the second slave MCU to modify the value of the temporary loopback register to the sixth value; After receiving the loopback function setting enabling information from the second MCU, the second optical transmitting component is controlled to transmit a second optical signal to the transmitting end optical module, and the second optical signal carries the function setting success information; The first slave MCU receives and analyzes the electrical signal converted from the second optical signal sent by the receiving end optical module, and the first slave MCU sets the value of the information status flag bit according to the message sent from the receiving end optical module, and the value of the information status flag bit is used to indicate whether the remote optical module enters the loopback mode; The first master MCU reads the information status register of the first slave MCU, and copies the value of the loopback function result memory to the information status register.

Citation Information

Patent Citations

  • Optical module for local loopback module

    CN108880674A

  • Seamless switching method and system for special line main and standby MCUs

    CN111970475A

  • Optical module and method for acquiring far-end monitoring data based on double-MCU optical module

    CN113098596A

  • Optical link self-checking method and optical module

    CN113824492A

  • Intelligent optical systems and methods for optical-layer management

    US20090214221A1