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

The remote optical module loopback control method using dual MCUs working together enables remote location of optical link faults by utilizing low-frequency message-based loopback control commands. This solves the communication interruption problem caused by optical link faults, improves fault location efficiency, and reduces costs.

CN119519828BActive Publication Date: 2025-12-12HISENSE BROADBAND MULTIMEDIA TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In access network communication systems, optical link failures prevent local and remote devices from communicating normally. Existing technologies that solve this problem by replacing optical modules are time-consuming, labor-intensive, and costly, especially when the remote and local devices are far apart.

Method used

A remote optical module loopback control method based on dual MCUs is adopted. Through the collaborative work of the master MCU and the slave MCU, the loopback control command in the form of low-frequency messages is used to realize the remote location of optical link faults. The master MCU is responsible for the general functions of the optical module and the interaction with the host computer, while the slave MCU is responsible for the sending and receiving of message information, so as to realize the self-testing and fault location of the optical link.

Benefits of technology

It effectively shortens the fault location cycle, reduces manpower costs, and improves the success rate of loopback control command transmission, ensuring that the abnormal location of the optical link is completed without affecting normal business communication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119519828B_ABST
    Figure CN119519828B_ABST
Patent Text Reader

Abstract

The application provides an optical module and a remote optical module loopback control method based on double MCUs. When a first master MCU of a near-end optical module modifies a value of a loopback message enable register to a first value on a sending end host computer, the first master MCU generates an update enable command. A loopback control register stores a loopback control value written by the sending end host computer and writes the loopback control value into a first slave MCU. The first slave MCU receives the update enable command from the first master MCU and generates a loopback control command according to the loopback control value. The loopback control command stored in the first slave MCU is loaded into a first optical signal. The abnormal positioning of a remote device in an optical link is completed at a local device end. The double MCU control function is adopted, the communication response function of the slave MCU is turned on and off, the slave MCU is not disturbed when sending and receiving messages by the host computer and the master MCU, and therefore the success rate of the 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, in particular to an optical module and a remote optical module loopback control method based on double MCUs. BACKGROUND

[0002] In an access network communication system, an optical connection is established between a local device and a remote device to realize data communication. Specifically, the local device has a first optical module, and 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 to realize data transmission from the local device to the remote device; the local device receives an optical signal from the second optical module through the first optical module to realize data reception from the remote device.

[0003] In the communication process, if the optical link fails, the local device and the remote device cannot normally communicate. In the prior art, the optical module is usually replaced to solve the problem of optical link failure. However, if the local device and the remote device are far apart, it is time-consuming, laborious and costly to replace the optical module to solve the problem of optical link failure without determining whether the second optical module is problematic. SUMMARY

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

[0005] To solve the above technical problems, the present application discloses the following technical solutions:

[0006] In one aspect, the present application discloses an optical module, comprising:

[0007] a circuit board;

[0008] a first optical transmitting component electrically connected to the circuit board, the first optical transmitting component being configured to transmit a first optical signal carrying a first loopback control command, the loopback control command being transmitted in the form of a low-frequency message;

[0009] a first master MCU electrically connected to the circuit board, the first master MCU being configured to generate an update enable command when a value of a loopback message enable register of a sending end host computer is modified to a first value, and store a loopback control value written by the sending end host computer in a loopback control register and write the loopback control value into a first slave MCU;

[0010] A first slave MCU is connected with the first master MCU and the first light emitting component, and the first slave MCU is configured to set a first memory to store a loopback control value; the first slave MCU receives an update enable command from the first master MCU, and 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, the embodiments of the present application disclose an optical module, comprising:

[0012] A circuit board;

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

[0014] A second slave MCU is connected with the second light receiving component, and the second slave MCU is configured to: receive the first optical signal, and parse the loopback control command to modify a value of a temporary loopback register in the second slave MCU to a fifth value, start a communication response function of the second slave MCU, so that the second master MCU can access the second slave MCU for communication; 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 close the communication response function of the second slave MCU, so that the second master MCU cannot access the second slave MCU for communication;

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

[0016] In a third aspect, the embodiments of the present application disclose a loopback control method of a remote optical module based on a double MCU, comprising: when a first master MCU modifies a value of a loopback message enable register to a first value on a host computer, generating an update enable command;

[0017] A loopback control register of the first master MCU receives and stores a loopback control value input by a sending-end host computer;

[0018] A first memory of a first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and closes a communication response function of the first slave MCU, so that the first master MCU cannot access the first slave MCU for communication;

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

[0020] The first slave MCU receives and analyzes an electrical signal converted from a second optical signal sent by a receiving optical module, and sets a value of an information state flag bit according to a message sent by the receiving optical module, where the value of the information state flag bit is used to represent whether the remote optical module enters a loopback mode or not.

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

[0022] In a fourth aspect, the embodiments of the present application disclose a remote optical module loopback control method based on double MCUs, which comprises the following steps:

[0023] The first master MCU generates an update enable command when a value of a loopback message enable register of a host computer is modified to a first value.

[0024] A loopback control register of the first master MCU receives and stores a loopback control value input by a sending host computer.

[0025] A first memory of the first slave MCU stores the loopback control value, the first slave MCU receives the update enable command, and the communication response function of the first slave MCU is closed, so that the first master MCU cannot access the first slave MCU.

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

[0027] A second optical receiving component receives the first optical signal and converts the first optical signal into an electrical signal.

[0028] A second slave MCU receives the electrical signal converted from the first optical signal and analyzes a loopback control command indicated by a first low-frequency message channel.

[0029] A value of a temporary loopback register in the second slave MCU is modified to a fifth value, and the communication response function of the second slave MCU is opened, so that the second master MCU can access the second slave MCU.

[0030] The second master MCU reads the value of the temporary loopback register, modifies a value of a loopback setting register in the second master MCU to a seventh value, and sets a loopback function of the receiving optical module according to loopback function information corresponding to the loopback setting register.

[0031] After reading 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 a sixth value.

[0032] After the second slave MCU receives the loopback function setting enable information, the communication response function of the second slave MCU is closed, and the second light emitting component is controlled to emit a second light signal to the sending end optical module, and the second light signal carries function setting success information;

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

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

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

[0036] The embodiment of the application provides a kind of optical module and the remote optical module loopback control method based on double MCU, the optical module adopts the double MCU scheme of main MCU and slave MCU, main MCU is responsible for the general function processing of optical module and is responsible for interaction with host computer, and slave MCU is responsible for the sending and receiving processing of message information and realizes the interaction with main MCU.The first main MCU of sending end optical module generates update enable command when the value of loopback message enable register is modified to the first value in host computer.The loopback control register of first main MCU receives and stores the loopback control value input by sending end host computer.The first memory of first slave MCU stores loopback control value, and first slave MCU receives update enable command, and the communication response function of first slave MCU is closed, so that first main MCU cannot communicate access to first slave MCU.First slave MCU loads the loopback control command stored in first slave MCU into first optical signal in the form of low frequency message.Receiving end optical module receives the first optical signal sent by sending end optical module by second optical receiving component, to receive the loopback control command sent by sending end optical module.The electrical signal converted by second slave MCU receives first optical signal, and loopback control command is obtained by parsing.The value of temporary loopback register in second slave MCU is modified to the fifth value, and the communication response function of second slave MCU is opened, so that second main MCU can communicate access to second slave MCU.Second main MCU reads the value of temporary loopback register, and the value of loopback setting register in second main MCU is modified to the seventh value, and according to the loopback function information corresponding to loopback setting register, the loopback function setting of receiving end optical module is carried out.Second main MCU reads the value of temporary loopback register, and second main sends loopback function setting enable information to second slave MCU, and the value of temporary loopback register is modified to the sixth value.After receiving loopback function setting enable information, the communication response function of second slave MCU is closed, and second optical emitting component is controlled to emit second optical signal to sending end optical module, and the second optical signal carries function setting success information.First main MCU reads the information status register of first slave MCU, and the value of loopback function result memory is copied to information status register.

[0037] In the 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 a loopback mode, and whether the far-end optical module enters the loopback mode is judged based on whether a signal indicating that the far-end optical module enters the loopback mode returned by the far-end optical module in the form of a low-frequency message is received. If the signal is not received, it is determined that the far-end optical module or an optical fiber connected to the far-end optical module is in an abnormal state; if the signal is received, it is determined that a host computer connected to the far-end optical module is in an abnormal state. The embodiment of the application loads a low-frequency signal on the basis of a normal service signal, increases the function of a message channel, and then completes the abnormal positioning of the far-end device in the optical link at the local device end on the basis of not affecting the normal service communication function, thereby effectively shortening the fault positioning period and reducing the labor cost. And the double MCU control function is adopted, the communication response function of the slave MCU is turned on and off, the slave MCU is not disturbed by the host computer and the master MCU when sending and receiving messages, and the success rate of the loopback control command transmission is improved. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the application, the following will briefly introduce the drawings needed to be used in some embodiments of the application. Obviously, the drawings in the following description are only some drawings of the embodiments of the application, and other drawings can also be obtained by those skilled in the art according to these drawings. In addition, the drawings in the following description can be regarded as schematic diagrams, and are not limited to the actual size, actual process, actual time sequence, etc. of the product involved in the embodiments of the application.

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

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

[0041] Figure 3 A structure diagram of an optical module according to some embodiments;

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

[0043] Figure 5 A use schematic diagram of a double MCU in an optical module according to some embodiments of the application;

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

[0045] Figure 7 A loopback control information sending schematic diagram of a sending-end optical module according to some embodiments of the applicationFigure 2

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

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

[0048] Figure 10 A receiving end optical module loopback control command receiving diagram provided according to some embodiments of the present application Figure 2

[0049] Figure 11 A loopback control flowchart of a dual MCU optical module provided according to some embodiments of the present applicationDETAILED DESCRIPTION

[0050] Optical communication technology establishes information transmission between information processing devices. Optical communication technology loads information onto light, uses the propagation of light to realize information transmission, and the light loaded with information is optical signal. Optical signal propagates in information transmission devices, which can reduce the loss of optical power and realize high-speed, long-distance and low-cost information transmission. The information that information processing devices can process exists in the form of electrical signal. Optical network terminal / gateway, router, switch, mobile phone, computer, server, tablet computer and television are common information processing devices, and optical fiber and optical waveguide are common information transmission devices.

[0051] Optical signal and electrical signal between information processing devices and information transmission devices are converted through optical modules. For example, an optical fiber is connected to the optical signal input end and / or optical signal output end of the optical module, and an optical network terminal is connected to the electrical signal input end and / or electrical signal output end of the optical module. First signal light from the optical fiber is transmitted into the optical module, the optical module converts the first signal light into first electrical signal, and the optical module transmits the first electrical signal into the optical network terminal. Second electrical signal from the optical network terminal is transmitted into the optical module, the optical module converts the second electrical signal into 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 all types of information processing devices do not need 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 A local architecture diagram of an optical communication system according to some embodiments. As shown in Figure 1 ​​​​As shown, the local part of the optical communication system includes 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 towards 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 maintain the original optical power. The optical signal is totally reflected multiple times in the optical fiber 101, and the optical signal from the remote information processing device 1000 is transmitted into the optical module 200, or the optical signal from the optical module 200 is propagated towards the remote information processing device 1000, thereby realizing long-distance and low-power-loss information transmission.

[0054] The number of optical fibers 101 can be one or more (two or more). The optical fiber 101 and the optical module 200 are connected in a pluggable manner, or can be fixedly connected.

[0055] The host computer 100 has an optical module interface 102 configured to connect to the optical module 200, so that the host computer 100 and the optical module 200 establish a one-way / two-way electrical signal connection. The host computer 100 is configured to provide a data signal to the optical module 200, or receive a data signal from the optical module 200, or detect and control the working state 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. The external electrical interface 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 one-way / two-way electrical signal connection.

[0057] The optical network unit (ONU), the optical line terminal (OLT), the optical network terminal (ONT), and the 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 electric signal sent 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 electric signal based on the third electric signal, the second electric signal from the host computer 100 is transmitted to the optical module 200, the optical module 200 converts the second electric signal into a second optical signal, the optical module 200 transmits the second optical signal to the optical fiber 101, and the second optical signal is transmitted to the remote information processing device 1000 in the optical fiber 101.

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

[0061] The optical module is a tool for converting optical signals and electric signals, and the information does not change in the conversion process of the optical signals and the electric signals, and the encoding and decoding mode of the information can change.

[0062] Figure 2 A partial structure 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 structure related to the optical module 200 of the host computer 100 is shown. As Figure 2 The host computer 100 further 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 electric connector (not shown in the figure) arranged in the cage 106. The heat sink 107 has a convex structure to increase the heat dissipation area, and the fin-shaped structure is a common convex structure.

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

[0064] Figure 3 A structure diagram of an optical module according to some embodiments, Figure 4 An exploded view of an optical module according to some embodiments. As Figure 3 And Figure 4As shown, the optical module 200 comprises a shell, a circuit board 300 arranged in the shell, an optical transmitting component 400 and an optical receiving component 500. However, the present application is not limited thereto, and in some embodiments, the optical module 200 comprises one of the optical transmitting component 400 and the optical receiving component 500.

[0065] The shell comprises an upper shell 201 and a lower shell 202, the upper shell 201 covers the lower shell 202 to form the above-mentioned shell having two openings 204 and 205; the outer contour of the shell generally presents a square body.

[0066] In some embodiments, the lower shell 202 comprises a bottom plate 2021 and two lower side plates 2022 arranged perpendicularly to the bottom plate 2021 on both sides of the bottom plate 2021; the upper shell 201 comprises a cover plate 2011, 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 comprises a bottom plate 2021 and two lower side plates 2022 arranged perpendicularly to the bottom plate 2021 on both sides of the bottom plate 2021; the upper shell 201 comprises a cover plate 2011 and two upper side plates arranged perpendicularly to the cover plate 2011 on both sides of the cover plate 2011, the two upper side plates and the two lower side plates 2022 are combined 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 can be consistent with the length direction of the optical module 200, or can 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 (the right end of the optical module 200), and the opening 205 is also located at the end of the optical module 200 (the left end of the optical module 200). 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 configured to access the optical fiber 101 so that the optical fiber 101 is connected to the optical transmitting component 400 and / or the optical receiving component 500 in the optical module 200. Figure 3 Figure 3 The assembly mode of the upper shell 201 and the lower shell 202 facilitates the installation of the components such as the circuit board 300, the optical transmitting component 400 and the optical receiving component 500 into the above-mentioned shell, and the upper shell 201 and the lower shell 202 can protect the shape of these components. In addition, when assembling the components such as the circuit board 300, the optical transmitting component 400 and the optical receiving component 500, the positioning components, heat dissipation components and electromagnetic shielding components of these devices can be deployed, which is conducive to the automatic implementation of production.

[0069] The assembly mode of the upper shell 201 and the lower shell 202 facilitates the installation of the components such as the circuit board 300, the optical transmitting component 400 and the optical receiving component 500 into the above-mentioned shell, and the upper shell 201 and the lower shell 202 can protect the shape of these components. In addition, when assembling the components such as the circuit board 300, the optical transmitting component 400 and the optical receiving component 500, the positioning components, heat dissipation components and electromagnetic shielding components of these devices can be deployed, which is conducive to the automatic implementation of production. ​

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

[0071] In some embodiments, the optical module 200 further comprises an unlocking component 600 outside the shell thereof. The unlocking component 600 is configured to realize the 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 outside the two lower side plates 2022 of the lower shell 202, and comprises a clamping component matched with the cage 106 of the host computer. When the optical module 200 is inserted into the cage 106, the optical module 200 is fixed in the cage 106 by the clamping component of the unlocking component 600; when the unlocking component 600 is pulled, the clamping component of the unlocking component 600 moves, thereby changing the connection relationship between the clamping component and the host computer, to release the clamping and 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 comprises 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, etc. The electronic components may, for example, comprise capacitors, resistors, transistors, metal oxide semiconductor field effect transistors (MOSFETs). The chips may, for example, comprise microcontroller units (MCUs), laser drive chips, transimpedance amplifiers (TIAs), limiting amplifiers, clock and data recovery chips (CDRs), power management chips, digital signal processing (DSP) chips.

[0074] The circuit board 300 is generally a hard circuit board. Due to its relatively hard material, the hard circuit board can also realize the bearing function, such as the hard circuit board can stably bear the above-mentioned electronic components and chips; the hard circuit board is also convenient for being inserted into the electrical connector in the cage of the host computer.

[0075] The circuit board 300 further comprises a gold finger 301 formed on the surface of the end 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 in conduction with the electrical connector in the cage 106. The gold finger 301 may be arranged only on the surface of one side of the circuit board 300 (for example, the surface of the lower side of the circuit board 300), or may be arranged on the surfaces of both sides of the circuit board 300 (for example, the surfaces of the upper side and the lower side of the circuit board 300).Figure 4 The gold finger 301 can also be arranged on the upper and lower surfaces of the circuit board 300 to provide more pins. The gold finger 301 is configured to establish an electrical connection with the host computer to realize power supply, grounding, I2C signal transmission, data signal transmission, and the like.

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

[0077] The optical transmitting component 400 and / or the optical receiving component 500 are located on the side of the circuit board 300 away from the gold finger 301; in some embodiments, the optical transmitting component 400 and the optical 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 optical transmitting component and / or the optical receiving component can be directly arranged on the circuit board 300 and can be arranged on the surface of the circuit board or the side of the circuit board.

[0078] In the access network communication system, the 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), and the optical network unit has a far-end optical module (second optical module), and the 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 to realize data transmission from the optical line terminal to the optical network unit; the optical line terminal receives an optical signal from the first optical module through the second optical module to realize data reception from the optical network unit.

[0079] The optical line terminal and the optical network unit are the host computer of the optical module, the host computer inputs a data electrical signal into the optical module, and the optical module converts the data electrical signal into an optical signal to be emitted to realize data transmission of the host computer; the optical module converts an optical signal from the outside into a data electrical signal and inputs the data electrical signal into the host computer to realize data reception of the host computer.

[0080] In the working process of the optical module, the present embodiment is configured to emit a relatively high-frequency data optical signal according to a data electrical signal from the optical line terminal to maintain the original data transmission service of the optical line terminal to the outside, and at the same time, the optical module also emits a relatively low-frequency control optical signal according to a non-data electrical signal (i.e., a signal that is not used for normal transmission service) to emit control information to the optical module at the opposite end to realize the transmission of control data to the far-end system without interrupting the normal service, so as to realize the self-checking of the optical link.

[0081] Since the optical module and the optical module of the opposite end are both connected to the outside by one optical fiber, the data optical signal and the control optical signal are mixed in the same light beam for transmission by the same optical fiber. In order to distinguish different signals, the data optical signal and the control optical signal have different frequencies in the embodiment. In the implementation, the microprocessor, the optical transmitting component and the 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) emitted thereby. The low-frequency modulation signal is referred to as a low-frequency message channel in the embodiment. For example, a low-frequency modulation signal of 50 Kbps is superimposed on a 10 Gbps or 25 Gbps signal, wherein the 10 Gbps or 25 Gbps signal is a normal service signal, and the additional low-frequency signal of 50 Kbps performs other control functions.

[0082] The embodiment of the present application provides an optical module, which adopts a double MCU scheme of a master (Master) MCU and a slave (Slave) MCU. The master MCU is responsible for processing of general functions of the optical module and is responsible for interaction with a host computer. The slave MCU is responsible for processing of sending and receiving of message information and realizes interaction with the master MCU. Through cooperation 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 running state of a remote module at any time or in real time can be realized.

[0083] Figure 5 A use schematic diagram of the double MCUs in the optical module according to some embodiments of the present application is provided. Figure 6 A loopback control information sending schematic diagram of a sending-end optical module according to some embodiments of the present application Figure 1 As shown in Figure 5 and Figure 6 , the sending-end optical module (the first optical module, the near-end optical module) provided by the embodiment of the present application comprises a first optical transmitting component, a first optical receiving component, a first master MCU and a first slave MCU.

[0084] The first master MCU is in communication connection with the sending-end host computer. The first master MCU is provided with a loopback control register and a loopback message enabling register.

[0085] The first main MCU is in communication connection with the sending end host computer. A loopback message enabling register is arranged in the first main MCU. The first main MCU is configured to generate an update enabling command when the sending end host computer modifies the value of the loopback message enabling register to a first value. That is, when the sending end host computer monitors that the optical module is in an idle state and needs to perform link detection, the sending end host computer sets the value of the loopback message enabling register to the first value to trigger the sending of information of the sending end optical module. When the first main MCU detects that the value of the loopback message enabling register is the first value, the first main MCU generates the update enabling command and sends the update enabling command to the first slave MCU.

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

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

[0088] The loopback control register of the first main 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 a link function detection command, the sending end host computer writes the loopback control value into the loopback control register.

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

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

[0091] The first slave MCU is connected with 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, the first slave MCU 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 the form of low frequency.

[0092] In some embodiments, the first slave MCU includes a first memory, the first memory stores the loopback control value and the preset loopback control command, and the first slave MCU loads the preset loopback control command stored in the first memory to the first low-frequency message channel when receiving the update enable command.

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

[0094] For example, the loopback control value is a single control value, such as a first control bit (e.g., 1), and the first slave MCU. According to the first control bit, the corresponding loopback control command is generated. When the first slave MCU detects that the loopback control value in the first memory is 1, the first slave MCU generates a loopback function start command, and loads the loopback function start command to the first low-frequency message channel. In this embodiment, the loopback control command can be a TX loopback function start command or a RX loopback function start command. If the loopback control value is a second control bit (e.g., 0), when the value of the loopback control register of the sending end host computer is modified to the second control bit, a loopback control command is generated. That is, when the sending end host computer monitors the close link function detection command, the sending end host computer sets 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 sending end optical module. When the first master MCU detects that the value of the loopback control register is 0, the first master MCU generates a loopback control command, and sends the loopback control command to the first slave MCU. In this embodiment, the loopback control command can be a TX loopback control command or a RX loopback command.

[0095] For example, the loopback control value is a double control value, the loopback control value includes a first sub-value and a second sub-value, the first master MCU generates a TX loopback function start command and loads the TX loopback function start command into the first optical signal when detecting that the first sub-value of the loopback control register is a first control bit and the second sub-value is a second control bit (the loopback control value of the first memory is 10). The first master MCU generates an RX loopback function start command and loads the RX loopback function start command into the first optical signal when detecting that the first sub-value of the loopback control register is the second control bit and the second sub-value is the first control bit (the loopback control value of the first memory is 01). The first master MCU generates a loopback function stop command and loads the loopback function stop command into the first optical signal when detecting that the first sub-value of the loopback control register is the second control bit and the second sub-value is the second control bit (the loopback control value of the first memory is 00).

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

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

[0098] The first optical receiving component is connected with 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 the message sent from the receiving-end optical module, so as to realize the communication interaction between the transmitting-end optical module and the receiving-end optical module.

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

[0100] Figure 7 A loopback control information sending schematic of a transmitting-end optical module according to some embodiments of the present application Figure 2To avoid the first master MCU accessing the first slave MCU when the first slave MCU is in the message sending state, resulting in the failure of message sending, the first slave MCU does not respond to the first master MCU when sending information.

[0101] The first master MCU accesses the communication response module before sending the update enable command to the first slave MCU, 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.

[0102] For example, when the first slave MCU is sending or receiving information, the response flag is set to a second value, such as 0, to turn off the communication response function of the first slave MCU, and the first slave MCU does not respond to the communication access of the first master MCU, so that the first master MCU cannot access 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 1, to turn on the communication response function of the first slave MCU, and the first slave MCU responds to the communication access of the first master MCU, so that the first master MCU accesses 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 access 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 a loopback control value into the first memory. After receiving the update enable command, the first slave MCU will immediately turn off the communication response function, indicating that message sending is to be performed at this time, and no communication response will be performed.

[0106] The first slave MCU also has an information state register, which stores an information state flag, and the information state flag represents a loopback control command sending state. The first slave MCU sets the value of the information state flag according to the message sent by the receiving end optical module.

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

[0108] Until the loopback control command is sent completely, the first slave MCU reopens the communication response function, and at this time the first master MCU can read the message sending state register of the first slave MCU to obtain the specific result of message sending. After the first master MCU reads the message sending state register of the first slave MCU to obtain the result of message sending, if the loopback message enabling register value is not set to the enabling default value, the loopback message enabling register value is set to the enabling default value.

[0109] The first slave MCU receives and analyzes the second optical signal sent by the receiving end optical module, the first slave MCU sets the value of the information state flag bit according to the message sent by the receiving end optical module, and resets the default value of the response flag bit 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 end optical module, the value of the information state flag bit is set to the third value (such as 1), indicating that the function setting message is successful this time; if the first slave MCU repeatedly sends data for a plurality of times and still does not receive any information return after reaching the specified upper limit number of times, the information state flag bit is set to the fourth value (such as 2), indicating that the function setting message fails this time; no matter whether the message setting is successful or fails this time, the first slave MCU will open the communication response function at this time, so that the first master MCU can access the first slave MCU and read the state flag bit. When the first master MCU reads the result of message sending of the first slave MCU as the third value, the loopback message enabling register value is set to the enabling default value without re-sending the loopback control command.

[0111] In the embodiment, the first master MCU is further provided with a loopback function result storage, and the loopback function result storage is used to store the loopback function result. The first master MCU reads the information state register of the first slave MCU, and copies the value of the loopback function result storage to the information state register. When the first master MCU reads the value in the information state register of the first slave MCU, the value is copied to the loopback function result storage (such as 1 indicating that the message sending is successful, and 2 indicating that the message sending fails), and the first master MCU automatically clears the loopback message enabling register to inform the upper computer that the sending result of the message can be accessed.

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

[0113] After receiving the response of 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] The sending end optical module can achieve that the first slave MCU is not disturbed by the receiving end host computer and the first master MCU when the first slave MCU is in the message sending state by closing the communication response function of the first slave MCU, thereby improving the communication success rate.

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

[0116] The second light 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 light receiving component to receive the loopback control command sent by the sending end optical module.

[0117] The second slave MCU is connected with the second light receiving component. The second slave MCU is configured to: receive the first optical signal and parse the loopback control command indicated by the first low-frequency message channel, modify the value of a temporary loopback register in the second slave MCU to a fifth value, start the 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 close the communication response function of the second slave MCU, so that the second master MCU cannot perform communication access to the second slave MCU.

[0118] In some embodiments, the receiving end optical module defaults to close the communication response function of the second slave MCU after the loopback test, so that the second slave MCU does not respond to the communication access of the second master MCU, thereby avoiding the influence of other communications on the reception of the first optical signal by the second slave MCU.

[0119] The second slave MCU is internally provided with a temporary loopback register. 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 has received the temporary loopback register sent by the receiving end optical module. Then the second slave MCU opens its communication response function, allowing the second master MCU to access the second slave MCU for communication.

[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 sending end optical module. At this time, the second slave MCU still closes its communication response function, and waits for the next command.

[0121] The second master MCU is connected with the second slave MCU, and the second master MCU is configured to read the value of the temporary loopback register, modify the value of a loopback setting register in the second master MCU to a 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, the second master MCU is internally provided with a loopback setting register. When the second slave MCU opens its communication response function, the second master MCU polls the second slave MCU, reads the value of the temporary loopback register in the second slave MCU, and writes the value of the temporary loopback register into the loopback setting register. The second master MCU is preconfigured with a function corresponding to the value of the loopback setting register and the loopback function information, and 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 reading the value of the temporary loopback register, the second master MCU can copy the value of the temporary loopback register into the loopback setting register, and also send loopback function setting enabling information to the second slave MCU. The second master MCU is provided with a loopback function setting module, which sets the loopback function according to the value of the loopback setting register. The loopback function setting enabling 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 a first loopback temporary value (such as 10), the loopback function setting module opens the TX loopback function; when the value of the loopback setting register is a second loopback temporary value (such as 01), the loopback function setting module opens the RX loopback function; and when the value of the loopback setting register is a third loopback temporary value (such as 00), the loopback function setting module closes the loopback function.

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

[0126] The second optical transmitter is connected to the second slave MCU. The second optical transmitter 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 transmitter to transmit the second optical signal to the transmitting optical module, and the second optical signal carries a function setting success message.

[0127] Reference Figure 10 In some embodiments, to enable or disable the communication response function of the second slave MCU, the second slave MCU is equipped with a communication response module and an ACK response flag. The communication response module responds to the communication access of the second master MCU or does not respond based on the value of the ACK response flag.

[0128] When the second slave MCU receives and parses the loopback control command, it modifies the ACK flag bit to the eighth value. For example, setting the ACK flag to 1 enables the communication acknowledgment function of the second slave MCU, allowing the second master MCU to communicate with and access the second slave MCU, and read the loopback control command from the second slave MCU.

[0129] After the second master MCU finishes reading the loopback control command, the second slave MCU modifies its ACK response flag to the ninth value, for example, by clearing the ACK response flag to zero, so as to disable the communication response function of the second slave MCU and prevent the second master MCU from communicating with the second slave MCU.

[0130] The second optical transmitting component is connected to the second slave MCU. The second optical transmitting component is configured to transmit optical signals to the transmitting optical module to realize communication between the transmitting optical module and the receiving optical module.

[0131] Transmit a second optical signal carrying a second low-frequency message channel, that is, the second optical transmitting component controlled by the MCU transmits the second optical signal to the transmitting optical module. The second optical signal carries a function setting success message.

[0132] Figure 2 This is a schematic diagram of a loopback control command receiving method for a receiver optical module according to some embodiments of this application. Figure 10 .like Figure 11 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, depending on the channel operating status.

[0133] The second master MCU copies the value of the temporary loopback register into the loopback setting register of the second master MCU after receiving the response of the second slave 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 into 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, which 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 transmitting component is controlled to send the function setting success information.

[0135] When the second slave MCU is in the message sending state, the receiving end optical module can realize 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 by turning off the communication response function of the second slave MCU, thereby improving the communication success rate.

[0136] The optical module provided by the embodiment of the present application increases the function of the message channel, and establishes the message sending function of the near-end optical module and the far-end optical module by using the double MCU. When the far-end optical module and the near-end optical module communicate abnormally, the near-end optical module sends a loopback control command to the far-end optical module, so that the far-end optical module judges whether a signal indicating that the receiving end optical module enters the optical loopback mode is returned based on the low-frequency message channel. If the signal is not received, it is determined that the receiving end optical module or the optical fiber connected to the receiving end optical module is in an abnormal state; if the signal is received, it is determined that the host computer connected to the receiving end optical module is in an abnormal state. The embodiment of the present application loads the low-frequency signal on the basis of the normal service signal, increases the function of the message channel, and further completes the abnormal positioning of the far-end device in the optical link on the basis of not affecting the normal service communication function, thereby effectively shortening the fault positioning period and reducing the labor cost. Moreover, the double MCU control function is adopted, the communication response function of the slave MCU is turned on and turned off, the slave MCU is not disturbed by the host computer and the master MCU when sending and receiving messages, and the success rate of the loopback control command transmission is improved.

[0137] Figure 11 A loopback control flowchart of a double MCU-based optical module according to some embodiments of the present application is provided. As shown in ​ the loopback control method of the far-end optical module based on the double MCU provided by the embodiment of the present application includes:

[0138] S100: The first master MCU generates an update enable command when the host computer modifies the value of the loopback message enable register to the first value.

[0139] When the sending end host computer monitors that the optical module is in an idle state and needs to perform link detection, the sending end host computer sets the value of the loopback message enable register to the first value to trigger the sending of information of the sending end optical module. The first master MCU generates an update enable command when it detects that the value of the loopback message enable register is the first value, 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 to 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 to the loopback control register.

[0141] S200: The loopback control register of the first master 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 to 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 to the loopback control register.

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

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

[0145] S300: The first slave MCU stores the loopback control value in the first memory, receives the update enable command, and closes the communication response function of the first slave MCU, so that the first master MCU cannot access 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 closed, so that the first slave MCU does not respond to the communication access of the first master MCU, and the first master MCU can be prevented from performing other communication access to the first slave MCU, so that the first slave MCU takes 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 into 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 into the first low-frequency message channel.

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

[0150] The first slave MCU controls the first light emitting component to emit the first optical signal to the transmitting optical module, and the first optical signal carries the low-frequency message of the loopback control command to control the receiving optical module to perform loopback test.

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

[0152] T100: The second light 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 optical module receives the first optical signal sent by the transmitting optical module through the second light receiving component to receive the loopback control command sent by the transmitting optical module.

[0154] T200: The second slave MCU receives the electrical signal converted from the first optical signal and parses 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 modified to the fifth value, and the communication response function of the second slave MCU is opened, so that the second master MCU can perform communication access to the second slave MCU.

[0156] The second slave MCU is provided with a temporary loopback register. 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 end optical module. Then, the second slave MCU opens the communication response function, and allows the second master MCU to access 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 does not successfully receive the loopback control command sent by the sending end optical module. At this time, the second slave MCU still closes the communication response function, and waits for the next command.

[0158] T400: 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 a 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, the second master MCU is provided with a loopback setting register. When the second slave MCU opens the communication response function, the second master MCU polls the second slave MCU, reads the value of the temporary loopback register in the second slave MCU, and writes the value of the temporary loopback register into the loopback setting register. The second master MCU is provided with a loopback function setting module, which sets the loopback function according to the value of the loopback setting register.

[0160] In some embodiments, after reading the value of the temporary loopback register, the second master MCU can copy the value of the temporary loopback register into the loopback setting register, and send the loopback function setting enable information to the second slave MCU. The second master MCU is provided with a loopback function setting module, which 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 the loopback function setting enable information to the second slave MCU, and modifies the value of the temporary loopback register to a 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 from the second slave MCU, the second slave MCU closes the communication response function and controls the second optical transmitting component to transmit a second optical signal to the sending end optical module, and 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 transmitted by the receiving end optical module, and sets the value of the information status flag bit according to the message setting information sent by the receiving end optical module. The first optical receiving component receives the second optical signal and converts it into an electrical signal for the first slave MCU. The value of the information status flag bit is used to represent 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 storage into the information status register.

[0165] When the first master MCU reads the value in the information status register of the first slave MCU, it copies the value into the loopback function result storage (e.g., 1 indicates that the message sending is successful, and 2 indicates that the message sending fails), and the first master MCU automatically clears the loopback message enable register to inform the upper computer that the sending result of this message can be accessed.

[0166] In some embodiments of the present application, when transmitting data between optical modules, the optical modules may be temporarily powered off, network problems may occur, and other reasons may cause the data sending to fail. In order to prevent the fault positioning error caused by the data transmission failure, the present embodiment provides a data retransmission method between optical modules. By setting a data retransmission flag bit in the sending end optical module, before sending the low-frequency message channel signal, the data retransmission flag bit is changed 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 received by the receiving end optical module has entered the optical loopback mode, in addition to performing the above step S400, the data retransmission flag bit is changed from the first preset value to the second preset value. In addition, when the received signal is not the signal indicating that the receiving end optical module has entered the optical loopback mode, the present embodiment also provides a data retransmission method, that is, step S401 can also be performed.

[0168] S4011: If the signal is not the signal indicating that the receiving end optical module has completed the loopback setting, when the first optical signal has been sent for more than a preset time, it is judged whether the number of times of sending the data indicating that the optical signal receiving end optical module enters the loopback mode has not exceeded a preset number threshold.

[0169] The sending times register sendcounter and the sending interval period register Runcounter can be arranged inside the sending optical module. When the optical module is initially powered on, both the registers are default value 0. When the optical module sends the low frequency message channel signal each time, the count value of the sending times register sendcounter is added by 1, and at the same time, the sending interval period register Runcounter is equivalent to a timer starting to count, and the count value of the register is added by 1 every time a software period passes.

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

[0171] If the preset number threshold is not exceeded, step S4012 is performed; otherwise, step S4013 is performed.

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

[0173] S4013: the information state register is set 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] It is indicated that after the optical module (i.e. the sending end optical module) at the local end repeatedly sends data multiple times, the optical module (i.e. the receiving end optical module) at the remote end still does not receive correct data, indicating that the optical port loopback of the optical module at the remote end completely fails, and it is further 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.

[0175] Since the above embodiments are described in combination with other manners, the same parts exist between different embodiments, and the same and similar parts between the embodiments in the description can be referred to. Herein, no detailed description is given.

[0176] It should be noted that in the present specification, the relationship 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 the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the circuit structure, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to the circuit structure, article or device. Without more limitations, the element defined by the phrase "including a" does not exclude the presence of another identical element in the circuit structure, article or device including the element.

[0177] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the contents of the following claims.

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

Claims

1. An optical module, characterized in that, include: Circuit board; A first optical emitting component is electrically connected to the circuit board. The first optical emitting component is configured to emit a first optical signal carrying a loopback control command, the loopback control command being transmitted in the form of a low-frequency message. The first master MCU is electrically connected to the circuit board. The first master MCU includes a loopback message enable register and a loopback control register. The first master MCU is configured to generate an update enable command when the transmitting host computer modifies the value of the loopback message enable register to a first value. The value of the loopback message enable register is set to a first value by the transmitting host computer when the transmitting host computer monitors that the optical module is in an idle state and needs to perform link detection, so as to trigger the transmission of messages by the transmitting optical module. When the first master MCU detects that the value of the loopback message enable register is a first value, it generates an update enable command and sends the update enable command to the first slave MCU. When the transmitting host computer detects a link function detection command, the loopback control register is written with a loopback control value. The loopback control register stores the loopback control value written by the transmitting host computer and writes the loopback control value to the first slave MCU. The loopback control value represents whether the loopback function of the peer optical module needs to be enabled or disabled. The first slave MCU is connected to the first master MCU and the first optical emitting component. The first slave MCU is configured to store loopback control values ​​in a first memory. The first slave MCU receives an update enable command from the first master MCU and generates a loopback control command based on the loopback control values. The loopback control command stored in the first slave MCU is then loaded into the first optical signal. It also includes: a first optical receiving component, which receives a second optical signal from the other 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 optical module. The first slave MCU sets the value of the information status flag bit according to the message sent by the receiving optical module. The first slave MCU also sets the response flag bit in the first slave MCU to the third value, so that the first master MCU can communicate with the first slave MCU. When the value of the information status register of the first slave MCU is the third value, that is, when the receiving optical module has completed the loopback function setting and sent the function setting success information to the first optical receiving component, the value of the loopback message enable register is set to the enable default value. The first master MCU is also 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.

2. The optical module according to claim 1, characterized in that, The first slave MCU is provided with an acknowledgment flag. The first slave MCU is also configured to modify the value of the acknowledgment flag in the first slave MCU to a second value when it receives the loopback control command, so that the first master MCU cannot communicate with the first slave MCU. Before the first master MCU writes the loopback control value to the first slave MCU, it reads the value of the response flag as the third value.

3. An optical module, characterized in that, include: Circuit board; The second optical receiving component is electrically connected to the circuit board. The second optical receiving component is configured to receive a first optical signal carrying a loopback control command channel. The loopback control command is transmitted by the first optical transmitting component in the optical module of claim 1 or 2 in the form of a low-frequency message. The second slave MCU is connected to the second optical receiving unit. The second slave MCU is configured to: receive the first optical signal, parse the loopback control command, modify the value of the temporary loopback register in the second slave MCU to the fifth value, enable the communication acknowledgment 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 to indicate that the second master MCU has read the value of the temporary loopback register. After receiving the loopback function setting enable information, the second slave MCU modifies the value of the ACK acknowledgment flag bit, so that the second master MCU cannot communicate with the second slave MCU. The second master MCU is connected to the second slave MCU. 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 optical module according to the loopback function information corresponding to the loopback setting register. A second optical emitting component is connected to a second slave MCU; the second optical emitting component is configured to emit a second optical signal, which carries a function setting success message. The second master MCU is also configured to: after setting the loopback function according to the value of the loopback setting register, send the loopback function setting enable information to the second slave MCU; The second slave MCU is also configured to: after receiving the loopback function setting enable information, disable the communication response function of the second slave MCU and control the second optical emitting component to emit the second optical signal.

4. The optical module according to claim 3, characterized in that, The second slave MCU is equipped with an ACK response flag. The second slave MCU is also configured to modify the ACK response flag to an eighth value when it parses a loopback control command, so that the second master MCU can communicate with the second slave MCU.

5. A remote optical module loopback control method based on dual MCUs, characterized in that, include: When the host computer modifies the value of the loopback message enable register to the first value, the first master MCU generates an update enable command. When the host computer at the transmitting end detects that the optical module is in an idle state and needs to perform link detection, the value of the loopback message enable register is set to the first value to trigger the transmission of messages from the optical module at the transmitting 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. The loopback control register of the first main MCU receives and stores the loopback control value input by the transmitting host computer; wherein, when the transmitting host computer monitors the link function detection command, the loopback control register is written with the loopback control value, which represents the need to control the loopback function of the peer optical module to be turned on or off; The first slave MCU stores the loopback control value in its first memory, receives an update enable command from the first slave MCU, generates a loopback control command based on the loopback control value, and loads the loopback control command stored in the first slave MCU into the first optical signal in the form of a low-frequency message. First, the MCU receives and parses the electrical signal converted from the second optical signal emitted by the receiving optical module. The first MCU sets the value of the information status register according to the message sent by the receiving optical module. The value of the information status register is used to characterize whether the remote optical module has entered 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 into the information status register.

6. A remote optical module loopback control method based on dual MCUs, characterized in that, The method includes: When the host computer modifies the value of the loopback message enable register to the first value, the first master MCU generates an update enable command. When the host computer at the transmitting end detects that the optical module is in an idle state and needs to perform link detection, the value of the loopback message enable register is set to the first value to trigger the transmission of messages from the optical module at the transmitting 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. The loopback control register of the first main MCU receives and stores the loopback control value input by the transmitting host computer; wherein, when the transmitting host computer monitors the link function detection command, the loopback control register is written with the loopback control value, which represents the need to control the loopback function of the peer optical module to be turned on or off; The first slave MCU stores the loopback control value in its first memory. The first slave MCU receives an update enable command and disables the communication response function of the first slave MCU, so that the first master MCU cannot communicate with or access the first slave MCU. The first slave MCU generates a loopback control command based on the loopback control value, and 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 optical receiving component receives the first optical signal and converts the first optical signal into an electrical signal. The second step is to receive the electrical signal converted from the first optical signal from the MCU and parse 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 acknowledgement flag is modified so that the second master MCU can communicate with and access 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 sets the loopback function of the receiving 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, it 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 to indicate that the second master MCU has read the value of the temporary loopback register. After receiving the loopback function setting enable information from the MCU, the second optical transmitting component is controlled to transmit a second optical signal to the transmitting optical module. The second optical signal carries the function setting success information. First, the MCU receives and parses the electrical signal converted from the second optical signal emitted by the receiving optical module. The first MCU sets the value of the information status flag bit according to the message sent by the receiving optical module. The value of the information status flag bit is used to characterize whether the remote optical module has entered 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 into the information status register.

Citation Information

Patent Citations

  • 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