Optical module

By using the MCU in the optical module to read and parse the location data in the supplier files and upgrade files, and intercept the corresponding upgrade sub-files, the problem of low upgrade efficiency of existing optical modules is solved, and an efficient method for multiple optical modules to complete firmware upgrade through one upgrade package is realized.

CN119987800APending Publication Date: 2025-05-13HISENSE BROADBAND MULTIMEDIA TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311494629.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing optical module firmware upgrade method is inefficient, especially when multiple optical modules are upgraded at the same time, corresponding upgrade files need to be sent multiple times, resulting in complex and time-consuming upgrade process.

Method used

An optical module is provided, including an MCU and volatile memory. The MCU uses the signature subfile and location subfile in the supplier file to judge and parse the location data of the upgraded subfile in the upgraded file, thereby intercepting and using the corresponding upgraded subfile to complete the firmware upgrade.

Benefits of technology

The firmware upgrade of multiple optical modules through one upgrade package is realized, which improves the upgrade efficiency, reduces the multiple upgrade file transfers of each optical module by the switch, and simplifies the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119987800A_ABST
    Figure CN119987800A_ABST
Patent Text Reader

Abstract

An MCU is used for storing a supplier file and an upgrade file, the supplier file comprises a signature sub-file and a position sub-file, the signature of the signature sub-file is a category signature, the position sub-file comprises a plurality of pieces of position data, and the upgrade file comprises a plurality of upgrade sub-files. The position data is position information of the upgrading sub-file in the upgrading file, and the position data and the upgrading sub-file are correspondingly arranged. The MCU judges whether the signature subfile belongs to the optical module or not; if the signature sub-file belongs to the optical module, analyzing the position sub-file to obtain position data of an upgrade sub-file of the optical module; and reading the upgrading file, and intercepting the upgrading sub-file of the optical module from the upgrading file according to the position data of the upgrading sub-file of the optical module. In the application, the optical module obtains the position data of the upgrade sub-file of the optical module according to the signature sub-file and the position sub-file, obtains the upgrade sub-file of the optical module according to the position data, and completes firmware upgrade by using the upgrade sub-file of the optical module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of optical fiber communication technology, and in particular to an optical module. Background Art

[0002] The CMIS protocol is mainly a general management interface specification protocol for hot-pluggable optical modules including double-density quad-channel hot-pluggable optical modules (QSFP-DD) and quad-channel hot-pluggable optical modules (QSFP). In this protocol, it is specifically pointed out that the CDB online upgrade protocol (Command Data Block) can be used to implement the online firmware upgrade (Firmware Upgrade) of the optical module, without returning the optical module to the manufacturer to modify the configuration data to meet the requirements. Summary of the invention

[0003] The present application provides an optical module to implement firmware upgrade.

[0004] An optical module, comprising:

[0005] MCU, including a volatile memory; the volatile memory is used to store an upgrade package, the upgrade package includes a vendor file and an upgrade file, the upgrade file includes multiple upgrade sub-files, the vendor file includes a signature sub-file and a position sub-file, the signature of the signature sub-file is a category signature, the position sub-file includes multiple position data, the position data is set corresponding to the upgrade sub-file, and the position data is the position information of the upgrade sub-file in the upgrade file;

[0006] MCU, configured as:

[0007] Read the vendor file and determine whether the signature subfile in the vendor file belongs to the optical module;

[0008] If the signature subfile does not belong to the optical module, stop;

[0009] If the signature sub-file belongs to the optical module, parse the location sub-file to obtain the location data of the upgrade sub-file of the optical module;

[0010] The upgrade file is read, and according to the location data of the upgrade sub-file of the optical module, the upgrade sub-file of the optical module is intercepted from the upgrade file.

[0011] A method for upgrading optical module firmware, the method comprising:

[0012] Read the vendor file and determine whether the signature subfile in the vendor file belongs to the optical module;

[0013] If the signature subfile does not belong to the optical module, stop;

[0014] If the signature sub-file belongs to the optical module, parse the location sub-file in the vendor file to obtain the location data of the upgrade sub-file of the optical module;

[0015] Read the upgrade file, and determine whether the starting address and the ending address of the upgrade file include the location data of the sub-upgrade of the optical module;

[0016] If the starting address and the ending address of the upgrade file do not include the location data of the sub-upgrade of the optical module, continue to read the upgrade file until the starting address and the ending address of the upgrade file include the location data of the sub-upgrade of the optical module;

[0017] If the start address and the end address of the upgrade file include the location data of the upgrade sub-file of the optical module, the upgrade sub-file of the optical module is intercepted from the upgrade file.

[0018] Beneficial effects: The present application provides an optical module, including an MCU, the MCU including a volatile memory, the volatile memory is used to store an upgrade package, the upgrade package includes a vendor file and an upgrade file, the vendor file includes a signature subfile and a position subfile, the signature of the signature subfile is a category signature, and the signature subfile belongs to all optical modules of the same category. The position subfile includes multiple position data, the upgrade file includes multiple upgrade subfiles, the position data is the position information of the upgrade subfile in the upgrade file, the position data is set corresponding to the upgrade subfile, one upgrade subfile corresponds to one optical module, and the upgrade file can be used as a common upgrade file for multiple optical modules, so that multiple optical modules can be upgraded through the upgrade file. The upgrade package including the vendor file and the upgrade file can be used as a common upgrade package for multiple optical modules of the same category, so that multiple optical modules of the same category can be upgraded through the upgrade package. When multiple optical modules are inserted into the same switch for firmware upgrade, the switch only needs to download one upgrade package and distribute the upgrade package to the optical module, and the optical module intercepts the sub-upgrade package of the optical module from the upgrade file to complete the firmware upgrade. MCU reads the supplier file and determines whether the signature subfile in the supplier file belongs to the optical module; if the signature subfile does not belong to the optical module, stop; if the signature subfile belongs to the optical module, parse the position subfile in the supplier file to obtain the position data of the upgrade subfile of the optical module; read the upgrade file, intercept the upgrade subfile of the optical module from the upgrade file according to the position data of the upgrade subfile of the optical module, and use the upgrade subfile of the optical module to complete the firmware upgrade. The optical module first determines whether the signature subfile of the supplier file belongs to the optical module. After determining that the signature subfile belongs to the optical module, it obtains the position data of the upgrade subfile of the optical module, and intercepts the upgrade subfile of the optical module from the upgrade file according to the position data, and uses the upgrade subfile of the optical module to complete the firmware upgrade. In the present application, the optical module obtains the position data of the upgrade subfile of the optical module according to the signature subfile and the position subfile, obtains the upgrade subfile of the optical module according to the position data, and uses the upgrade subfile of the optical module to complete the firmware upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 is a partial structural diagram of an optical communication system provided according to some embodiments;

[0021] Figure 2 A partial structural diagram of a host computer provided according to some embodiments;

[0022] Figure 3 A structural diagram of an optical module provided according to some embodiments;

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

[0024] Figure 5 A diagram of the structure of a supplier document provided according to some embodiments;

[0025] Figure 6 A structural diagram of an upgrade package provided according to some embodiments;

[0026] Figure 7 A structural diagram of an MCU provided according to some embodiments;

[0027] Figure 8 A first flow chart of a method for upgrading optical module firmware according to some embodiments;

[0028] Fig. 9 A second flow chart of an optical module firmware upgrade method provided according to some embodiments;

[0029] Fig.10 The third flow chart is a method for upgrading optical module firmware according to some embodiments. DETAILED DESCRIPTION

[0030] Some embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. However, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments provided by the present disclosure, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of the present disclosure.

[0031] Unless the context requires otherwise, throughout the specification and claims, the term "comprising" is to be interpreted as having an open, inclusive meaning, that is, "including, but not limited to"; the terms "first" and "second" are not to be understood as indicating or implying relative importance or indicating an upper limit on quantity; the term "plurality" means two or more; the term "connected" is to be understood in a broad sense, for example, "connected" can be a fixed connection, a detachable connection, or an integral connection, and can be directly connected or indirectly connected through an intermediate medium; the use of the terms "suitable for" or "configured to" means open and inclusive language, which does not exclude devices that are suitable for or configured to perform additional tasks or steps; the terms "parallel", "perpendicular", "same", "equal", "consistent", "flush" and other descriptions are not limited to absolute mathematical theoretical relationships, but also include an acceptable error range generated in practice, and also include differences based on the same design concept but due to manufacturing reasons.

[0032] In optical communication technology, in order to establish information transmission between information processing devices, it is necessary to load information onto light and use the propagation of light to achieve information transmission. Here, the light loaded with information is an optical signal. When optical signals are transmitted in information transmission equipment, the loss of optical power can be reduced, so high-speed, long-distance, and low-cost information transmission can be achieved. The signals that information processing equipment can recognize and process are electrical signals. Information processing equipment usually includes optical network terminals (Optical Network Unit, ONU), gateways, routers, switches, mobile phones, computers, servers, tablets, televisions, etc., and information transmission equipment usually includes optical fibers and optical waveguides.

[0033] The optical module can realize the mutual conversion between optical signals and electrical signals between information processing equipment and information transmission equipment. For example, at least one of the optical signal input end or the optical signal output end of the optical module is connected to an optical fiber, and at least one of the electrical signal input end or the electrical signal output end of the optical module is connected to an optical network terminal; the first optical signal from the optical fiber is transmitted to the optical module, and the optical module converts the first optical signal into a first electrical signal, and transmits the first electrical signal to the optical network terminal; the second electrical signal from the optical network terminal is transmitted to the optical module, and the optical module converts the second electrical signal into a second optical signal, and transmits the second optical signal to the optical fiber. Since multiple information processing devices can transmit information through electrical signals, at least one of the multiple information processing devices needs to be directly connected to the optical module, and all information processing devices do not need to be directly connected to the optical module. Here, the information processing device directly connected to the optical module is called the upper computer of the optical module. In addition, the optical signal input end or the optical signal output end of the optical module can be called an optical port, and the electrical signal input end or the electrical signal output end of the optical module can be called an electrical port.

[0034] Figure 1 FIG. 1 is a partial structural diagram of an optical communication system provided according to some embodiments. Figure 1 As shown, the optical communication system mainly 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 .

[0035] One end of the optical fiber 101 extends toward the remote information processing device 1000, and the other end of the optical fiber 101 is connected to the optical module 200 through the optical port 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 total reflection direction can almost maintain the original optical power. The optical signal undergoes multiple total reflections in the optical fiber 101 to transmit the optical signal from the remote information processing device 1000 to the optical module 200, or to transmit the optical signal from the optical module 200 to the remote information processing device 1000, thereby realizing long-distance, low-power loss information transmission.

[0036] The optical communication system may include one or more optical fibers 101, and the optical fibers 101 are detachably connected or fixedly connected to the optical module 200. The host computer 100 is configured to provide data signals to the optical module 200, receive data signals from the optical module 200, or monitor or control the working state of the optical module 200.

[0037] The host computer 100 includes a substantially rectangular housing and an optical module interface 102 disposed on the housing. The optical module interface 102 is configured to connect to the optical module 200 so that the host computer 100 and the optical module 200 establish a unidirectional or bidirectional electrical signal connection.

[0038] The host computer 100 also includes an external electrical interface, which can be connected to an electrical signal network. For example, the external electrical interface includes a universal serial bus interface (USB) or a network cable interface 104, and the network cable interface 104 is configured to access the network cable 103 so that the host computer 100 establishes a unidirectional or bidirectional electrical signal connection with the network cable 103. One end of the network cable 103 is connected to the local information processing device 2000, and the other end of the network cable 103 is connected to the host computer 100, so as to establish an electrical signal connection between the local information processing device 2000 and the host computer 100 through the network cable 103. By way of example, the third electrical signal sent by the local information processing device 2000 is transmitted to the host computer 100 through the network cable 103, and the host computer 100 generates a second electrical signal according to the third electrical signal. The second electrical signal from the host computer 100 is transmitted to the optical module 200, and the optical module 200 converts the second electrical signal into a second optical signal, and 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. By way of example, the first optical signal from the remote information processing device 1000 is transmitted through the optical fiber 101, and the first optical signal from the optical fiber 101 is transmitted to the optical module 200, and the optical module 200 converts the first optical signal into a first electrical signal, and the optical module 200 transmits the first electrical signal to the host computer 100, and the host computer 100 generates a fourth electrical signal according to the first electrical signal, and transmits the fourth electrical signal to the local information processing device 2000. It should be noted that the optical module is a tool for realizing the mutual conversion between optical signals and electrical signals. During the conversion process between the optical signals and electrical signals, the information does not change, but the encoding and decoding methods of the information can change.

[0039] In addition to the optical network terminal, the host computer 100 also includes an optical line terminal (OLT), an optical network device (ONT), or a data center server.

[0040] Figure 2 FIG. 1 is a partial structural diagram of a host computer according to some embodiments. In order to clearly show the connection relationship between the optical module 200 and the host computer 100, Figure 2 Only the structure of the host computer 100 related to the optical module 200 is shown. Figure 2 As shown, the host computer 100 further includes a PCB circuit board 105 disposed in the housing, a cage 106 disposed on the surface of the PCB circuit board 105, a heat sink 107 disposed on the cage 106, and an electrical connector disposed inside the cage 106. The electrical connector is configured to access the electrical port of the optical module 200; the heat sink 107 has a protruding structure such as fins to increase the heat dissipation area.

[0041] The optical module 200 is inserted into the cage 106 of the host computer 100, and the cage 106 fixes the optical module 200. The heat generated by the optical module 200 is transferred to the cage 106 and then diffused through the heat sink 107. After the optical module 200 is inserted into the cage 106, the electrical port of the optical module 200 is connected to the electrical connector inside the cage 106, so that the optical module 200 establishes a bidirectional electrical signal connection with the host computer 100. In addition, the optical port of the optical module 200 is connected to the optical fiber 101, so that the optical module 200 establishes a bidirectional optical signal connection with the optical fiber 101.

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

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

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

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

[0046] The direction of the line connecting the two openings 204 and 205 may be consistent with the length direction of the optical module 200, or may be inconsistent with the length direction of the optical module 200. For example, the opening 204 is located at the end of the optical module 200 ( Figure 3 The opening 205 is also located at the end of the optical module 200 ( Figure 3Alternatively, 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 port, and the gold finger of the circuit board 300 extends from the electrical port and is inserted into the electrical connector of the host computer 100; the opening 205 is an optical port, which is configured to access the external optical fiber 101, so that the optical fiber 101 connects the optical emitting component 400 and the optical receiving component 500 in the optical module 200.

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

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

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

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

[0051] The circuit board 300 includes circuit traces, electronic components and chips, etc. The electronic components and chips are connected according to the circuit design through the circuit traces to realize the functions of power supply, electrical signal transmission and grounding. The electronic components can include capacitors, resistors, triodes, metal oxide semiconductor field effect transistors (Metal-Oxide-Semiconductor Field-EffectTransistor, MOSFET) by way of example. The chip can include a microcontroller unit (MCU), a laser driver chip, a transimpedance amplifier (TIA), a limiting amplifier, a clock and data recovery chip (CDR), a power management chip, and a digital signal processing (DSP) chip by way of example.

[0052] The circuit board 300 is generally a rigid circuit board. Due to its relatively hard material, the rigid circuit board can also realize the load-bearing function. For example, the rigid circuit board can stably carry the above-mentioned electronic components and chips; the rigid circuit board can also be inserted into the electrical connector in the cage 106 of the host computer 100.

[0053] The circuit board 300 also includes a gold finger formed on the end surface thereof, and the gold finger is composed of a plurality of independent pins. The circuit board 300 is inserted into the cage 106, and the gold finger is connected to the electrical connector in the cage 106. The gold finger can be provided on the surface of only one side of the circuit board 300 (for example, Figure 4 The upper surface shown in the figure) can also be set on the upper and lower surfaces of the circuit board 300 to provide a larger number of pins, so as to adapt to occasions where the number of pins is large. The gold finger is configured to establish an electrical connection with the host computer to achieve power supply, grounding, two-wire synchronous serial (Inter-Integrated Circuit, I2C) signal transmission, data signal transmission, etc. Of course, flexible circuit boards are also used in some optical modules. Flexible circuit boards are generally used in conjunction with rigid circuit boards to supplement rigid circuit boards.

[0054] At least one of the light emitting component 400 or the light receiving component 500 is located on a side of the circuit board 300 away from the gold finger.

[0055] In some embodiments, the light emitting component 400 and the light receiving component 500 are physically separated from the circuit board 300 and then electrically connected to the circuit board 300 through corresponding flexible circuit boards or electrical connectors.

[0056] In some embodiments, at least one of the light emitting component or the light receiving component may be directly disposed on the circuit board 300. For example, at least one of the light emitting component or the light receiving component may be disposed on a surface of the circuit board 300 or a side of the circuit board 300.

[0057] The optical modules running the CMIS protocol all support the CDB online upgrade protocol (Command Data Block). The protocol stipulates that an image file will only be upgraded for one optical module, mainly because of the concern that the optical module will be upgraded to an image file that does not correspond to it, causing the module to become "bricked". Therefore, the protocol provides protection suggestions, allowing the optical module to be judged first when upgrading. If the image file (upgrade file) of the optical module is issued by the current switch, it will be upgraded. If not, an error will be returned. The customer site is usually one optical module corresponding to one image file, a one-to-one upgrade method. However, some customers plug multiple optical modules into a switch at the same time. Although the product performance and mode are different, they are plugged into the same switch and share the same switch, so they belong to the same type of module. If the same type of optical module is upgraded by using one upgrade file corresponding to one optical module, the switch needs to send the corresponding upgrade file to each optical module multiple times, and the upgrade efficiency is low. In order to solve this problem, in some embodiments, the switch sends an upgrade package, the upgrade package includes an upgrade file, the upgrade file includes multiple upgrade sub-files, each upgrade sub-file corresponds to an optical module, and the optical module intercepts the corresponding upgrade sub-file from the upgrade file to complete the firmware upgrade.

[0058] Figure 5 A diagram of the structure of a vendor document provided according to some embodiments. Figure 6 FIG. 1 is a structural diagram of an upgrade package provided according to some embodiments. Figure 5 and Figure 6 As shown, the upgrade package includes a vendor file and an upgrade file. The vendor file includes a signature sub-file. The signature sub-file is used to determine whether the upgrade package is an upgrade package for the optical module. The upgrade file is used for firmware upgrade of the optical module.

[0059] The optical module firmware upgrade process is as follows: the switch loads the upgrade package, the switch first sends the upgrade command to the optical module, and at the same time sends the vendor file of the upgrade package to the optical module. After receiving the upgrade command, the optical module enters the upgrade mode, and the optical module parses the received vendor file to determine whether the signature subfile of the vendor file belongs to the optical module. If the signature subfile of the vendor file does not belong to the optical module, the optical module fails to send it to the switch, and the switch stops. If the signature subfile of the vendor file belongs to the optical module, the optical module successfully sends it to the switch, the switch sends the upgrade file to the optical module, the optical module receives the upgrade file, and uses the upgrade file to complete the firmware upgrade.

[0060] In some embodiments, the vendor file includes only a signature subfile, the signature of the signature subfile is a product signature, the upgrade package including the signature subfile includes only one upgrade subfile, and the upgrade package can only enable one optical module to complete the firmware upgrade. The signature of the signature subfile is a product signature, and the signature subfile belongs to only one optical module.

[0061] The optical module upgrade process is as follows: After receiving the upgrade instruction, the optical module enters the upgrade module to determine whether the signature subfile of the vendor file belongs to the optical module. If the signature subfile of the vendor file does not belong to the optical module, the optical module fails to send it to the switch, and the switch stops. If the signature subfile of the vendor file belongs to the optical module, the optical module successfully sends it to the switch, the switch sends the upgrade file to the optical module, the optical module receives the upgrade file, and uses an upgrade subfile of the upgrade file to complete the firmware upgrade.

[0062] In some embodiments, the vendor file includes a signature subfile and a position subfile, the signature of the signature subfile is a category signature, the position subfile includes a plurality of position data, the position data is the position information of the upgrade subfile in the upgrade file, the upgrade file including the upgrade package of the vendor file includes a plurality of upgrade subfiles, and the upgrade package enables a plurality of optical modules to complete the firmware upgrade. Since the signature subfile is a category signature, the signature subfile may belong to all optical modules of the same category.

[0063] The optical module upgrade process is as follows: After receiving the upgrade instruction, the optical module enters the upgrade module to determine whether the signature subfile of the vendor file belongs to the optical module. If the signature subfile of the vendor file does not belong to the optical module, the optical module fails to send it to the switch, and the switch stops. If the signature subfile of the vendor file belongs to the optical module, the optical module successfully sends it to the switch, and at the same time, the optical module parses the location subfile in the vendor file to obtain the location data of the optical module. When the optical module receives the upgrade file, the optical module intercepts the upgrade subfile corresponding to the optical module from the upgrade file according to the location data of the optical module, and the optical module uses the upgrade subfile to complete the firmware upgrade.

[0064] like Figure 5As shown, the signature subfile is a 10-byte "special signature", the signature of the signature subfile is a category signature, the position subfile is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 1" to "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 12", and the position subfile includes multiple position data, position data 1 is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 1", position data 2 is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 2", position data 3 is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 2", and so on, position data 11 is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 11", and position data 12 is "the starting address (4 bytes), and the ending address (4 bytes) of the image of module 12". The optical module can select the position data corresponding to the serial number from the position subfile according to the serial number of the optical module, thereby obtaining the start address (4 bytes) and the end address (4 bytes) of the image of the optical module.

[0065] The multiple position data of the position sub-file are sorted according to the sequence number. For example, the sequence number of module 1 is 1, the sequence number of module 2 is 2, the sequence number of module 3 is 3, and so on, the sequence number of module 11 is 11, and the sequence number of module 12 is 12.

[0066] like Figure 6 As shown, the upgrade file includes multiple upgrade sub-files, upgrade sub-file 1 is the image of module 1: image1, upgrade sub-file 2 is the image of module 2: image2, upgrade sub-file 3 is the image of module 3: image3, and so on, upgrade sub-file 11 is the image of module 11: image11, and upgrade sub-file 12 is the image of module 12: image12. Different optical modules correspond to different upgrade sub-files, and the optical module intercepts the upgrade sub-file corresponding to the optical module from the upgrade file according to the position data. For example, optical module 1 intercepts upgrade sub-file 1 corresponding to position data 1 according to position data 1, and optical module 2 intercepts upgrade sub-file 2 corresponding to position data 2 according to position data 2.

[0067] Figure 7 FIG. 1 is a structural diagram of an MCU provided according to some embodiments. Figure 7As shown, the MCU includes a volatile memory and a non-volatile memory, the volatile memory is used to store the supplier file or the upgrade file, the non-volatile memory is used to store the upgrade sub-file corresponding to the optical module, the optical module determines whether the signature sub-file belongs to the optical module according to the signature sub-file in the supplier file in the volatile memory, the optical module intercepts the upgrade sub-file of the upgrade file according to the position data in the supplier file, and burns the upgrade sub-file into the non-volatile memory, and the optical module completes the firmware upgrade according to the upgrade sub-file in the non-volatile memory.

[0068] The MCU also includes a first register and a second register. The first register is used to store a product signature and a category signature. One optical module corresponds to one product signature, and multiple optical modules of the same category correspond to one category signature. The second register is used to store a serial number.

[0069] The optical module can determine whether the signature subfile of the upgrade package belongs to the optical module by determining whether the signature subfile of the upgrade package is the same as the product signature or category signature in the first register. Since the signature of the signature subfile of the upgrade package is a category signature, to determine whether the signature subfile of the upgrade package belongs to the optical module, it is only necessary to determine whether the signature of the signature subfile of the upgrade package is the same as the category signature in the first register.

[0070] The MCU is configured to: read the supplier file, determine whether the signature subfile in the supplier file belongs to the optical module; if the signature subfile does not belong to the optical module, stop; if the signature subfile belongs to the optical module, parse the position subfile to obtain the position data corresponding to the optical module; read the upgrade file, and according to the position data corresponding to the optical module, extract the upgrade subfile corresponding to the optical module from the upgrade file.

[0071] The MCU is also configured to: when reading the upgrade file, determine whether the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module; if the starting address and the ending address of the upgrade file do not include the location data of the upgrade sub-file of the optical module, continue to read the upgrade file until the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module; if the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module, intercept the upgrade sub-file of the optical module from the upgrade file.

[0072] The signature subfile is a class signature, and the MCU is further configured to: read the class signature in the first register, and determine whether the signature of the signature subfile is the same as the class signature. If the signature of the signature subfile is the same as the class signature, the signature subfile belongs to the optical module; if the signature of the signature subfile is different from the class signature, the signature subfile does not belong to the optical module.

[0073] The MCU is further configured to: if the signature sub-file belongs to the optical module, read the serial number in the second register, parse the position sub-file according to the serial number, and obtain the position data of the upgrade sub-file corresponding to the serial number.

[0074] The MCU is also configured to: read the upgrade instruction and start the upgrade.

[0075] Since the location data is the starting address and ending address of the upgrade sub-file in the upgrade file, whether the starting address and ending address of the upgrade file include the location data corresponding to the optical module refers to the starting address and ending address of the upgrade sub-file corresponding to the optical module, which is located between the starting address and ending address of the upgrade file.

[0076] In some embodiments, the optical module includes an MCU, the MCU includes a volatile memory, the volatile memory is used to store an upgrade package, the upgrade package includes a vendor file and an upgrade file, the vendor file includes a signature subfile and a position subfile, the signature of the signature subfile is a category signature, and the signature subfile belongs to all optical modules of the same category. The position subfile includes multiple position data, the upgrade file includes multiple upgrade subfiles, the position data is the position information of the upgrade subfile in the upgrade file, the position data is set corresponding to the upgrade subfile, one upgrade subfile corresponds to one optical module, and the upgrade file can be used as a common upgrade file for multiple optical modules, so that multiple optical modules can be upgraded through the upgrade file. The upgrade package including the vendor file and the upgrade file can be used as a common upgrade package for multiple optical modules of the same category, so that multiple optical modules of the same category can be upgraded through the upgrade package. When multiple optical modules are inserted into the same switch for firmware upgrade, the switch only needs to download one upgrade package and distribute the upgrade package to the optical module, and the optical module intercepts the sub-upgrade package of the optical module from the upgrade file to complete the firmware upgrade. MCU reads the supplier file and determines whether the signature subfile in the supplier file belongs to the optical module; if the signature subfile does not belong to the optical module, stop; if the signature subfile belongs to the optical module, parse the position subfile in the supplier file to obtain the position data of the upgrade subfile of the optical module; read the upgrade file, intercept the upgrade subfile of the optical module from the upgrade file according to the position data of the upgrade subfile of the optical module, and use the upgrade subfile of the optical module to complete the firmware upgrade. The optical module first determines whether the signature subfile of the supplier file belongs to the optical module. After determining that the signature subfile belongs to the optical module, it obtains the position data of the upgrade subfile of the optical module, and intercepts the upgrade subfile of the optical module from the upgrade file according to the position data, and uses the upgrade subfile of the optical module to complete the firmware upgrade. In the present application, the optical module obtains the position data of the upgrade subfile of the optical module according to the signature subfile and the position subfile, obtains the upgrade subfile of the optical module according to the position data, and uses the upgrade subfile of the optical module to complete the firmware upgrade.

[0077] In order to solve this problem, in addition to providing an optical module, the present application also provides an optical module firmware upgrade method. Figure 8 This is a first flow chart of an optical module firmware upgrade method provided according to some embodiments. Fig. 9 This is a second flow chart of an optical module firmware upgrade method provided according to some embodiments. Fig.10 FIG. 3 is a third flow chart of a method for upgrading optical module firmware according to some embodiments. Figure 8 , Fig. 9 and Fig.10 As shown in the figure, the optical module firmware upgrade method includes:

[0078] S100: Read the supplier file.

[0079] The switch loads the upgrade package, sends the upgrade command, and the optical module starts the upgrade after receiving the upgrade command. At the same time, the switch sends the vendor file of the upgrade package, which is stored in the volatile memory of the optical module, and the MCU reads the vendor file in the volatile memory.

[0080] S200: Determine whether the signature sub-file in the vendor file belongs to the optical module.

[0081] The MCU determines whether the signature sub-file in the vendor file belongs to the optical module. If the signature sub-file in the vendor file does not belong to the optical module, the optical module fails to be sent, and the switch no longer sends the upgrade file, that is, the switch stops upgrading, and the optical module cannot receive the upgrade file, and the optical module stops. If the signature sub-file in the vendor file belongs to the optical module, the optical module is sent successfully, and the switch sends the upgrade file, that is, the switch continues to upgrade, and the optical module can also receive the upgrade file, and the optical module continues to upgrade.

[0082] The signature of the signature subfile in the vendor file is a category signature, which can belong to all optical modules of the same category. The MCU determines whether the signature subfile in the vendor file belongs to the optical module by determining whether the signature of the signature subfile of the upgrade package is the same as the category signature in the first register. The specific process is as follows:

[0083] S201: Read the class signature in the first register.

[0084] S202: Determine whether the signature of the signature sub-file is the same as the category signature.

[0085] S203: If the signature of the signature sub-file is different from the category signature, the signature sub-file in the vendor file does not belong to the optical module.

[0086] S204: If the signature of the signature sub-file is the same as the category signature, the signature sub-file in the vendor file belongs to the optical module.

[0087] S300: If the signature subfile in the vendor file does not belong to the optical module, stop.

[0088] S400: If the signature subfile in the vendor file belongs to the optical module, parse the location subfile to obtain location data of the upgrade subfile of the optical module.

[0089] If the signature subfile in the vendor file belongs to the optical module, the MCU parses the location subfile to obtain the location data of the upgrade subfile of the optical module.

[0090] The position data is the starting address and ending address of the upgrade sub-file in the upgrade file, and the multiple position data in the position sub-file are sorted in sequence according to the serial number. Therefore, if the signature sub-file belongs to the optical module, the MCU reads the serial number in the second register, parses the position sub-file according to the serial number, and obtains the position data of the upgrade sub-file corresponding to the serial number. That is, the MCU reads the starting address and ending address of the upgrade sub-file corresponding to the serial number from the position sub-file according to the serial number of the optical module. For example, module 2 takes out "the starting address (4 bytes) and ending address (4 bytes) of the image of module 2" from the position sub-file according to serial number 2.

[0091] S500: Read the upgrade file, and according to the location data of the upgrade sub-file of the optical module, extract the upgrade sub-file corresponding to the optical module from the upgrade file.

[0092] In some embodiments, after waiting for the upgrade file to be completely downloaded, the MCU reads the upgrade file in the volatile memory, and extracts the upgrade sub-file corresponding to the optical module from the upgrade file according to the position data corresponding to the optical module.

[0093] The volatile memory stores the entire upgrade file at one time, and then determines which upgrade sub-file belongs to the optical module from the entire upgrade file, which is a slow process and inefficient. To avoid this problem, in some embodiments, after reading a portion of the upgrade file, the upgrade sub-file corresponding to the optical module is intercepted from the upgrade file according to the position data corresponding to the optical module.

[0094] Since the storage space of the volatile memory is limited, the volatile memory can only store an amount of data that is less than or equal to its storage space at a time. The data currently stored in the volatile memory overwrites the data previously stored in the volatile memory. Therefore, the data read from the volatile memory is different each time. For example, the data read from the non-volatile memory by the MCU last time was the supplier file. The data read from the non-volatile memory by the MCU this time is upgrade sub-file 1, upgrade sub-file 2, and upgrade sub-file 3. The data read from the non-volatile memory by the MCU next time is upgrade sub-file 4, upgrade sub-file 5, and upgrade sub-file 6.

[0095] Since the data read by the MCU from the volatile memory is different each time, each time the upgrade file is read, it is necessary to determine whether the start address and end address of the upgrade file include the location data of the upgrade sub-file of the optical module. The specific process is as follows:

[0096] S501: Determine whether the start address and the end address of the upgrade file include the location data of the upgrade sub-file of the optical module.

[0097] S502: If the start address and the end address of the upgrade file include the location data of the upgrade sub-file of the optical module, intercept the upgrade sub-file of the optical module from the upgrade file.

[0098] The MCU uses the upgrade sub-file in the non-volatile memory to complete the firmware upgrade. Therefore, after the upgrade sub-file of the optical module is intercepted from the upgrade file, the upgrade sub-file of the optical module is burned into the non-volatile memory so that the optical module completes the firmware upgrade.

[0099] S503: If the starting address and the ending address of the upgrade file do not include the location data of the upgrade sub-file of the optical module, the MCU continues to read the upgrade file until the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module.

[0100] If the start address and the end address of the upgrade file do not include the location data of the upgrade subfile of the optical module, the MCU continues to read the upgrade file and returns to S501 until the start address and the end address of the upgrade file include the location data of the upgrade subfile of the optical module.

[0101] When the start address and the end address of the upgrade file include the location data of the upgrade subfile of the optical module, the upgrade subfile of the optical module is intercepted from the upgrade file and burned into the non-volatile memory.

[0102] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An optical module, characterized in that: include: The MCU includes a volatile memory; the volatile memory is used to store an upgrade package, the upgrade package includes a vendor file and an upgrade file, the upgrade file includes multiple upgrade sub-files, the vendor file includes a signature sub-file and a position sub-file, the signature of the signature sub-file is a category signature, the position sub-file includes multiple position data, the position data is set corresponding to the upgrade sub-file, and the position data is the position information of the upgrade sub-file in the upgrade file; The MCU is configured as follows: Read the supplier file, and determine whether the signature subfile in the supplier file belongs to the optical module; If the signature subfile does not belong to the optical module, stop; If the signature subfile belongs to the optical module, parsing the location subfile to obtain location data of the upgrade subfile of the optical module; The upgrade file is read, and the upgrade sub-file of the optical module is intercepted from the upgrade file according to the position data of the upgrade sub-file of the optical module.

2. The optical module according to claim 1, characterized in that: The MCU is also configured to: When the upgrade file is read, determining whether the starting address and the ending address of the upgrade file include the location data of the sub-upgrade of the optical module; If the starting address and the ending address of the upgrade file do not include the location data of the sub-upgrade of the optical module, continue to read the upgrade file until the starting address and the ending address of the upgrade file include the location data of the sub-upgrade of the optical module; If the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module, the upgrade sub-file of the optical module is intercepted from the upgrade file.

3. The optical module according to claim 1, characterized in that: The MCU also includes a first register, the first register being used to store a category signature; The MCU is further configured to: read the category signature in the first register, and determine whether the signature of the signature sub-file is the same as the category signature.

4. The optical module according to claim 1, characterized in that: The MCU also includes a second register, wherein the second register is used to store a serial number; The MCU is further configured to: if the signature subfile belongs to the optical module, read the serial number in the second register, and parse the position subfile according to the serial number to obtain the position data of the upgrade subfile corresponding to the serial number.

5. The optical module according to claim 1, characterized in that: The location data is the starting address and the ending address of the upgrade sub-file in the upgrade file.

6. The optical module according to claim 1, characterized in that: The MCU is also configured to: Read the upgrade instructions and start the upgrade.

7. A method for upgrading optical module firmware, characterized in that: The firmware upgrade method comprises: Read the vendor file and determine whether the signature subfile in the vendor file belongs to the optical module; If the signature subfile does not belong to the optical module, stop; If the signature subfile belongs to the optical module, parse the location subfile in the vendor file to obtain the location data of the upgrade subfile of the optical module; Reading an upgrade file, and determining whether a starting address and an ending address of the upgrade file include location data of a sub-upgrade of the optical module; If the starting address and the ending address of the upgrade file do not include the location data of the sub-upgrade of the optical module, continue to read the upgrade file until the starting address and the ending address of the upgrade file include the location data of the sub-upgrade of the optical module; If the starting address and the ending address of the upgrade file include the location data of the upgrade sub-file of the optical module, the upgrade sub-file of the optical module is intercepted from the upgrade file.

8. The firmware upgrade method according to claim 7, characterized in that: The signature of the signature subfile is a category signature.

9. The firmware upgrade method according to claim 7, characterized in that: The position sub-file includes a plurality of position data, and the position data is the position information of the upgrade sub-file in the upgrade file.