Device for downloading firmware to optical module, firmware downloading system and method
By designing a device that includes uplink, control, storage and downlink communication units, using adaptive instructions and processor information comparison, the problem of insufficient expansion and universality of the existing optical module firmware download method is solved, and the correct Efficient firmware downloads of different optical modules ensure the accuracy and efficiency of downloads.
Patent Information
- Application Number
- CN202411076528.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-12-24
AI Technical Summary
The existing optical module firmware download method has poor expansion and low versatility, and cannot adapt to different types and specifications of optical modules, resulting in incompatible and inefficient firmware download process.
A device including an uplink communication unit, a control unit, a storage unit and a downlink communication unit is designed. By comparing adaptive instructions with the current processor information, matching matching firmware data is automatically selected and downloaded, and supports dynamic acquisition and update of firmware data. , suitable for different types of optical modules.
Improve the versatility and scalability of firmware downloads, ensure the accuracy and efficiency of firmware downloads, and automatically identify and match the processor information of the optical module, reduce the problem of firmware incompatibility, and enhance the intelligence of the device. and versatility.
Smart Images

Figure CN119182458A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of optical modules, and in particular to a device for downloading firmware to an optical module, a firmware downloading system and a method. Background Art
[0002] With the popularization of optical fiber communication technology and the increasing application of 5G communication, the demand for optical fiber communication modules from major communication operators and communication equipment manufacturers is also increasing. Therefore, the development of the optical module industry has been vigorous in recent years, and the requirements of various optical module manufacturers for product R&D cycle and production efficiency are getting higher and higher. At the same time, the functional and performance requirements for auxiliary equipment for R&D and production will also become higher and higher.
[0003] When testing the optical module, the required firmware data needs to be downloaded. The existing optical module firmware download method mainly implements the optical module firmware download function through the supporting host computer software and test board provided by the optical module manufacturer.
[0004] The existing optical module firmware download method requires different types of optical modules to have corresponding matching optical module test boards, which has poor scalability and low versatility. Summary of the invention
[0005] The present invention provides a device for downloading firmware to an optical module, a firmware downloading system and a method, so as to solve the defects of the firmware downloading method in the prior art, such as poor expansibility and low versatility.
[0006] In the first aspect, the present invention provides a device for downloading firmware to an optical module, comprising: an uplink communication unit, a control unit, a storage unit and a downlink communication unit; the control unit is communicatively connected to the uplink communication unit, the storage unit and the downlink communication unit respectively; the uplink communication unit is used to send the received control instructions or data to the control unit; and, receive and send data provided by the control unit; the control unit is used to control the storage unit to read and write data and make control decisions in response to the control instructions or data sent by the uplink communication unit; the storage unit is communicatively connected to the control unit for storing data; the downlink communication unit is used to send the control instructions or data output by the control unit to the optical module, and, receive and send data fed back by the optical module.
[0007] According to the device for downloading firmware provided by the present invention, the downlink communication unit is I 2 C interface.
[0008] According to the device for downloading firmware provided by the present invention, when the control instruction received by the uplink communication unit is an adaptation instruction, the control unit obtains the current processor information of the optical module through the downlink communication unit; the control unit makes a corresponding control decision based on the information comparison result of the adaptation instruction and the current processor information to execute the firmware data download for the current processor of the optical module; the adaptation instruction includes the processor information corresponding to the firmware data pre-stored in the storage unit; the storage unit pre-stores a plurality of firmware data, which respectively correspond to different processor information for the optical module.
[0009] According to the device for downloading firmware provided by the present invention, the control unit makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when the control unit determines that there is processor information consistent with the current processor information in the adaptation instruction, the firmware data corresponding to the current processor information in the storage unit is sent to the optical module through the downlink communication unit.
[0010] According to the device for downloading firmware provided by the present invention, the control unit makes a corresponding control decision to execute the firmware data download of the optical module based on the information comparison result between the adaptation instruction and the current processor information, including: when the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, the control unit feeds back the optical module replacement information through the uplink communication unit to execute the firmware download task for another replaced optical module.
[0011] According to the device for downloading firmware provided by the present invention, the control unit makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, the control unit updates the firmware data in the storage unit and sends the new firmware data to the optical module through the downlink communication unit.
[0012] According to the device for downloading firmware provided by the present invention, the control unit updates the firmware data in the storage unit when it is determined that there is no processor information consistent with the current processor information in the adaptation instruction, including: the control unit feeds back the current processor information to the uplink communication unit, and receives new firmware data sent by the uplink communication unit; wherein the new firmware data includes firmware data corresponding to the current processor information; and the control unit stores the new firmware data in the storage unit.
[0013] According to the device for downloading firmware provided by the present invention, the control unit sends new firmware data to the optical module through the downlink communication unit, including: the control unit receives the new adaptation instruction sent by the uplink communication unit; the new adaptation instruction includes current processor information; the control unit executes the new adaptation instruction and sends the new firmware data to the optical module.
[0014] According to the device for downloading firmware provided by the present invention, when the control instruction received by the uplink communication unit is a test instruction, the control unit sends the control instruction through the downlink communication unit to test the optical module.
[0015] According to the device for downloading firmware provided by the present invention, the control unit is further used to obtain test data for the optical module through the downlink control unit, and send the test data through the uplink communication unit.
[0016] In the second aspect, the present invention also provides an optical module firmware download system, comprising: a host computer, an optical module connecting board and any device for downloading firmware as described above; the host computer is communicatively connected to an uplink communication unit of the device for downloading firmware, for sending adaptation instructions or data; the optical module connecting board is connected to a downlink communication unit of the device for downloading firmware; the device for downloading firmware downloads the firmware of the optical module in response to the adaptation instructions or data sent by the host computer.
[0017] In the third aspect, the present invention also provides an optical module firmware downloading method, which is applied to the optical module firmware downloading system as described above, comprising: obtaining instructions sent by a host computer through the uplink communication unit; obtaining current processor information of the optical module through the downlink communication unit in response to an adaptation instruction sent by the host computer; comparing the processor information in the adaptation instruction with the current processor information of the optical module; making corresponding control decisions based on the information comparison result of the adaptation instruction and the current processor information, and sending the firmware corresponding to the current processor of the optical module to the optical module through the downlink communication unit to execute the firmware data download of the optical module.
[0018] According to the optical module firmware downloading method provided by the present invention, a corresponding control decision is made based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when it is determined that there is processor information consistent with the current processor information in the adaptation instruction, the firmware data corresponding to the current processor information in the storage unit is sent to the optical module.
[0019] According to the optical module firmware downloading method provided by the present invention, a corresponding control decision is made based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when it is determined that there is no processor information consistent with the current processor information in the adaptation instruction, the optical module replacement information is fed back to the host computer to execute the firmware data download for another replaced optical module.
[0020] According to the optical module firmware downloading method provided by the present invention, a corresponding control decision is made based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when it is determined that there is no processor information consistent with the current processor information in the adaptation instruction, the firmware data in the storage unit is updated, and the new firmware data is sent to the optical module.
[0021] According to the optical module firmware downloading method provided by the present invention, the firmware data in the storage unit is updated, including: receiving new firmware data; wherein the new firmware data is firmware data corresponding to the current processor information obtained by the host computer; and storing the new firmware data in the storage unit.
[0022] According to the optical module firmware download method provided by the present invention, new firmware data is sent to the optical module, including: receiving a new adaptation instruction; wherein the new adaptation instruction is determined by the host computer according to the current processor information of the optical module, and the new adaptation instruction includes the current processor information; executing the new adaptation instruction to send the new firmware data to the optical module.
[0023] The optical module firmware downloading method provided by the present invention further includes: in response to a test instruction sent by a host computer, controlling the optical module connecting board to test the optical module.
[0024] The optical module firmware downloading method provided by the present invention further includes: acquiring test data of the optical module, and feeding back the test data to the host computer.
[0025] The device for downloading firmware to an optical module provided by the present invention has an uplink communication unit and a downlink communication unit that comply with a standard communication protocol, and a control unit that is capable of parsing and processing different types of instructions and data from the uplink communication unit, so that the firmware downloading device has good versatility and scalability and is suitable for optical modules of different types and specifications.
[0026] The firmware downloading device and firmware downloading method provided by the present invention can ensure that only the optical module matching the processor information in the adaptation instruction can execute the firmware downloading task, which helps to avoid problems caused by firmware incompatibility and ensure the accuracy of the firmware downloading process.
[0027] The firmware downloading device and the firmware downloading method provided by the present invention can ensure that the correct firmware data can be dynamically acquired and downloaded even when matching firmware data is not pre-stored, which not only enhances the intelligence and flexibility of the device, but also improves the efficiency and accuracy of firmware downloading.
[0028] The firmware download device and firmware download method provided by the present invention can not only be used to download firmware, but also can be used as a test platform to check the performance of the optical module. This not only improves the versatility of the device, but also enhances the ability of remote monitoring and maintenance, which helps to timely discover problems with the optical module and take measures.
[0029] The optical module firmware download system provided by the present invention can ensure that the optical module firmware update process is automated and efficient, and is also convenient for remote management and monitoring. This is very useful for optical module maintenance in a large-scale network environment because it can reduce the need for on-site operations and improve operation and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 is a schematic diagram of the structure of a device for downloading firmware to an optical module provided by an embodiment of the present invention;
[0032] Figure 2 This is one of the structural schematic diagrams of the optical module firmware download system provided by an embodiment of the present invention;
[0033] Figure 3 It is a flowchart of a method for downloading optical module firmware provided by an embodiment of the present invention;
[0034] Figure 4 This is a second structural diagram of the optical module firmware download system provided by an embodiment of the present invention;
[0035] Figure 5 The present invention is a schematic diagram of the communication between a host computer and a device for downloading firmware provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] It should be noted that, in the description of the embodiments of the present invention, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0038] Combine the following Figure 1-Figure 5 The invention describes a device, a firmware downloading system and a method for downloading firmware to an optical module provided by an embodiment of the invention.
[0039] Figure 1 is a schematic diagram of the structure of a device for downloading firmware to an optical module provided by an embodiment of the present invention, such as Figure 1 As shown, the device includes: an uplink communication unit, a control unit, a storage unit and a downlink communication unit; the control unit is communicatively connected with the uplink communication unit, the storage unit and the downlink communication unit respectively.
[0040] The uplink communication unit is used to send the received control instructions or data to the control unit; and receive and send the data provided by the control unit.
[0041] The uplink communication unit is responsible for communicating with an external control device (such as a host computer); it can receive control instructions or data from the external control device and forward it to the control unit. At the same time, it can also receive data provided by the control unit and send it back to the external device. Optionally, the uplink communication unit is a USB communication serial port.
[0042] The control unit is used to respond to the control instructions or data sent by the uplink communication unit, control the storage unit to realize the reading and writing of data, and make control decisions.
[0043] The control unit is the "brain" of the entire device and is responsible for processing all received information. When it receives control instructions or data forwarded by the uplink communication unit, it will parse these instructions or data and decide how to further process them. It can control the storage unit to perform data read and write operations according to the received instructions and make corresponding control decisions. The control unit can also generate new control instructions or data as needed and send them to the optical module through the downlink communication unit. For example, the present invention selects a microprocessor (Microcontroller Unit, MCU) / single-chip microcomputer with multiple communication functions, data reading and writing functions as the control unit.
[0044] The storage unit is connected to the control unit for storing data. For example, the present invention selects an electrically erasable programmable read only memory (EEPROM), NAND (Negative-AND) flash memory, FeRAM (Ferroelectric Random Access Memory), PCRAM (PhaseChange Random Access Memory), and a USB flash drive as the storage unit. Optionally, the control unit is connected to the EEPROM via an SPI bus to read and write data to the EEPROM.
[0045] The storage unit is used to store firmware data and other necessary configuration information. During the firmware download process, the control unit reads the firmware data from the storage unit and sends it to the optical module. It may also be necessary to support the write operation of firmware data in order to update the firmware version in the storage unit.
[0046] The downlink communication unit is used to send the control instruction or data output by the control unit to the optical module, and to receive and send the data fed back by the optical module.
[0047] The downlink communication unit is responsible for the communication with the optical module; it will send data to the optical module according to the instructions of the control unit for firmware update; further, it will receive the information fed back by the optical module and send it to the control unit.
[0048] Optionally, the downlink communication unit is I 2 C (Inter-Integrated Circuit) interface. 2 I C is a widely used serial communication protocol for connecting microcontrollers and peripheral devices. Many modern optical modules support I 2 C interface, so use I 2 C as the interface of the downlink communication unit can make the device compatible with a wide range of optical modules.
[0049] The uplink communication unit and the downlink communication unit in the present invention follow the standard communication protocol, and the control unit can parse and process different types of instructions and data from the uplink communication unit. Such a design makes the firmware download device have good versatility and scalability and is suitable for optical modules of different types and specifications.
[0050] Based on the contents of the above embodiments, as an optional embodiment, in the device for downloading firmware provided by the present invention, when the control instruction received by the uplink communication unit is an adaptation instruction, the control unit obtains the current processor information of the optical module through the downlink communication unit; the control unit makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download for the current processor of the optical module.
[0051] The adaptation instruction includes processor information corresponding to firmware data pre-stored in the storage unit; the storage unit pre-stores a plurality of firmware data corresponding to different processor information of the optical module.
[0052] As an optional embodiment, the device for downloading firmware provided by the present invention makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when the control unit determines that there is processor information consistent with the current processor information in the adaptation instruction, the firmware data corresponding to the current processor information in the storage unit is sent to the optical module through the downlink communication unit. The following is a specific implementation process of this embodiment:
[0053] (1) Receive the adaptation instruction:
[0054] The uplink communication unit receives an adaptation instruction from an external device, which indicates that the firmware download device needs to download firmware for a specific optical module. The adaptation instruction contains some key data about the processor information of the target optical module, such as the processor model and version.
[0055] The generation of adaptation instructions is usually an automated process, performed by an external control device (such as a host computer) to ensure that no errors occur during the firmware update process, while also ensuring that the update process is as smooth and efficient as possible.
[0056] (2) Obtaining the optical module processor information:
[0057] After receiving the adaptation instruction, the control unit communicates with the downlink communication unit (eg, I 2 C interface) to communicate with the optical module and request the current processor information of the optical module. The optical module feeds back its processor information to the downlink communication unit, and then the downlink communication unit transmits this information to the control unit.
[0058] (3) Information comparison and decision-making:
[0059] The control unit compares the received optical module processor information with the processor information included in the adaptation instruction.
[0060] If the two match, it means that the firmware data is suitable for the processor of the current optical module. The control unit makes corresponding control decisions based on this comparison result and selects the correct firmware data for download.
[0061] (4) Select the correct firmware data:
[0062] The storage unit stores a variety of firmware data in advance, each of which corresponds to different processor information of the optical module. The control unit selects firmware data that matches the current processor information of the optical module from the storage unit according to the comparison result.
[0063] (5) Send firmware data:
[0064] The control unit sends the selected firmware data to the optical module through the downlink communication unit.
[0065] The optical module receives the firmware data and updates the firmware according to the received data.
[0066] As an optional embodiment, the device for downloading firmware provided by the present invention makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, the control unit feeds back the optical module replacement information through the uplink communication unit to execute the firmware download task for another replaced optical module. The following is a specific implementation process of this embodiment:
[0067] (1) Receive the adaptation instruction:
[0068] The uplink communication unit receives an adaptation instruction, which includes information about a target processor to which firmware is to be downloaded.
[0069] (2) Obtaining the optical module processor information:
[0070] The control unit transmits the information to the downstream communication unit (eg I 2 C interface) to communicate with the optical module and request the current processor information of the optical module.
[0071] (3) Information comparison and decision-making:
[0072] The control unit compares the current processor information obtained from the optical module with the target processor information contained in the adaptation instruction.
[0073] If the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, that is, the processor information in the adaptation instruction does not match the actual processor information of the optical module.
[0074] (4) Feedback on optical module replacement information:
[0075] The control unit sends an optical module replacement message to the external device through the uplink communication unit, indicating that the user needs to replace the current optical module so that the firmware download task can be performed.
[0076] (5) Perform the replacement operation:
[0077] The user replaces the optical module according to the received optical module replacement information.
[0078] (6) Retry the firmware download:
[0079] After replacing the optical module, the user restarts the firmware download process. The uplink communication unit receives the adaptation instruction again, and the control unit repeats the previous steps to verify whether the new optical module matches.
[0080] The firmware download device provided by the present invention can ensure that only the optical module that matches the processor information in the adaptation instruction can perform the firmware download task. This helps to avoid problems caused by firmware incompatibility and ensure the accuracy of the firmware download process. At the same time, this mechanism also enhances the intelligence and user-friendliness of the device because it can promptly inform the user to replace the unmatched optical module.
[0081] As an optional embodiment, the device for downloading firmware provided by the present invention makes a corresponding control decision based on the information comparison result between the adaptation instruction and the current processor information to execute the firmware data download of the optical module, including: when the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, the firmware data in the storage unit is updated, and the new firmware data is sent to the optical module through the downlink communication unit. The following is a specific implementation process of this embodiment:
[0082] (1) Receive the adaptation instruction:
[0083] The uplink communication unit receives an adaptation instruction, which includes information about a target processor to which firmware is to be downloaded.
[0084] (2) Obtaining the optical module processor information:
[0085] The control unit transmits the information to the downstream communication unit (eg I 2 C interface) to communicate with the optical module and request the current processor information of the optical module.
[0086] (3) Information comparison and decision-making:
[0087] The control unit compares the current processor information obtained from the optical module with the target processor information contained in the adaptation instruction.
[0088] If the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, that is, the processor information in the adaptation instruction does not match the actual processor information of the optical module.
[0089] As an optional embodiment, when the control unit determines that there is no processor information consistent with the current processor information in the adaptation instruction, the control unit updates the firmware data in the storage unit, including: the control unit feeds back the current processor information to the uplink communication unit, and receives new firmware data sent by the uplink communication unit; wherein the new firmware data includes firmware data corresponding to the current processor information; and the control unit stores the new firmware data in the storage unit.
[0090] For example, first, the control unit notifies the external control device to download firmware data matching the current optical module processor information; then, the control unit writes the new firmware data into the storage unit to update the firmware data.
[0091] (4) Send new firmware data:
[0092] The control unit sends the new firmware data in the storage unit to the optical module through the downlink communication unit. The optical module receives the firmware data and performs firmware update according to the received data.
[0093] The firmware downloading device provided by the present invention can ensure that even if matching firmware data is not pre-stored, correct firmware data can be dynamically acquired and downloaded, which not only enhances the intelligence and flexibility of the device, but also improves the efficiency and accuracy of firmware downloading.
[0094] As an optional embodiment, the device for downloading firmware provided by the present invention sends new firmware data to the optical module through a downlink communication unit, including: a control unit receives a new adaptation instruction sent by an uplink communication unit; the new adaptation instruction includes current processor information; the control unit executes the new adaptation instruction and sends the new firmware data to the optical module.
[0095] It can be understood that the new adaptation instruction in the present invention is generated based on the demand for firmware update. The external control device generates a new adaptation instruction based on the current processor information in response to the matching failure information fed back by the control unit, and the new adaptation instruction is sent to the uplink communication unit, and then transmitted to the control unit of the firmware download device, so as to execute the new adaptation instruction to send the new firmware data to the optical module.
[0096] Based on the content of the above embodiment, as an optional embodiment, in the device for downloading firmware provided by the present invention, when the control instruction received by the uplink communication unit is a test instruction, the control unit sends the control instruction through the downlink communication unit to test the optical module. Optionally, the control unit is also used to obtain the test data of the optical module through the downlink control unit, and send the test data through the uplink communication unit. The following is a specific implementation process of this embodiment:
[0097] (1) Receive test instructions:
[0098] The uplink communication unit receives a test instruction sent by an external control device, where the test instruction indicates that the device needs to test the optical module.
[0099] (2) The control unit processes the test instructions:
[0100] After receiving the test instruction, the control unit parses the content of the instruction and prepares a corresponding test program or command set.
[0101] (3) Send test instructions to the optical module:
[0102] The control unit sends the test instruction to the optical module through the downlink communication unit.
[0103] (4) Optical module execution test:
[0104] After receiving the test instruction, the optical module starts to execute the specified test program. The test program may include but is not limited to signal strength test, connection stability test, etc.
[0105] (5) Collect test data:
[0106] After the optical module completes the test, it generates test data and feeds the test data back to the control unit.
[0107] (6) Control unit obtains test data:
[0108] The control unit obtains the test data of the optical module through the downlink communication unit, and sends the test data back to the external control device through the uplink communication unit.
[0109] The firmware download device provided by the present invention can not only be used to download firmware, but also can be used as a test platform to check the performance of the optical module. This not only improves the versatility of the device, but also enhances the ability of remote monitoring and maintenance, which helps to timely discover problems with the optical module and take measures.
[0110] Figure 2 FIG. 1 is one of the structural diagrams of the optical module firmware download system provided by an embodiment of the present invention. Figure 2As shown, the system includes: a host computer, an optical module connecting board and any device for downloading firmware as described above; the host computer is communicatively connected with an uplink communication unit of the device for downloading firmware, for sending adaptation instructions or data; the optical module connecting board is connected with a downlink communication unit of the device for downloading firmware; the device for downloading firmware downloads the firmware of the optical module in response to the adaptation instructions or data sent by the host computer.
[0111] The host computer in the present invention is responsible for sending adaptation instructions or data to the device for downloading firmware. These instructions or data may include firmware files, configuration parameters or other commands related to firmware updates. The optical module connecting board is responsible for connecting the optical module with the device for downloading firmware. When the device for downloading firmware receives the instruction from the host computer, it sends the firmware file or related instructions to the optical module through the optical module connecting board.
[0112] Optionally, the optical module connection board is an optical module test board, which can not only connect the optical module and the device for downloading firmware to realize the function of mutual communication between the two, but also test the optical module. For example, a QSFP optical module test board is selected as the optical module connection board.
[0113] Figure 3 FIG. 1 is a flow chart of a method for downloading optical module firmware provided by an embodiment of the present invention. Figure 3 As shown, the present invention provides an optical module firmware download method, which is applied to the optical module firmware download system. The execution subject of the method can be a device for downloading firmware, including but not limited to the following steps:
[0114] Step 301: Obtaining instructions sent by a host computer through the uplink communication unit.
[0115] The uplink communication unit receives instructions from the host computer, which may be adaptation instructions or test instructions, etc. The uplink communication unit receives control instructions from the host computer to start the firmware download process or the test process.
[0116] Step 302: In response to the adaptation instruction sent by the host computer, the current processor information of the optical module is obtained through the downlink communication unit.
[0117] When the adaptation instruction is received, the optical module is communicated with through the downlink communication unit to request the current processor information of the optical module to ensure that the firmware to be downloaded is compatible with the processor of the optical module.
[0118] Step 303: Compare the processor information in the adaptation instruction with the current processor information of the optical module.
[0119] The control unit compares the target processor information contained in the adaptation instruction with the actual current processor information of the optical module; and verifies whether the firmware in the adaptation instruction is applicable to the processor of the current optical module.
[0120] Step 304: according to the information comparison result of the adaptation instruction and the current processor information, a corresponding control decision is made, and the firmware corresponding to the current processor of the optical module is sent to the optical module through the downlink communication unit to execute the firmware data download of the optical module.
[0121] As an optional embodiment, when it is determined that processor information consistent with current processor information exists in the adaptation instruction, firmware data corresponding to the current processor information in the storage unit is sent to the optical module.
[0122] As an optional embodiment, when it is determined that there is no processor information consistent with the current processor information in the adaptation instruction, the optical module replacement information is fed back to the host computer to execute the download of firmware data for another replaced optical module; or, the firmware data in the storage unit is updated and the new firmware data is sent to the optical module.
[0123] Based on the contents of the above embodiments, as an optional embodiment, updating the firmware data in the storage unit includes: receiving new firmware data; wherein the new firmware data is firmware data corresponding to the current processor information obtained by the host computer; storing the new firmware data in the storage unit.
[0124] Specifically, the host computer downloads a firmware file matching the optical module processor information from a central server or a firmware database, and sends new firmware data to the device downloading the firmware through an uplink communication unit.
[0125] The host computer sends the new firmware data to the device downloading the firmware through the USB interface, Ethernet interface or other appropriate communication interface. The uplink communication unit of the device downloading the firmware receives the new firmware data from the host computer and writes the new firmware data into the storage unit for subsequent use.
[0126] Optionally, sending new firmware data to the optical module includes: receiving a new adaptation instruction; wherein the new adaptation instruction is determined by the host computer based on the current processor information of the optical module, and the new adaptation instruction includes the current processor information; executing the new adaptation instruction to send the new firmware data to the optical module.
[0127] It can be understood that the new adaptation instruction in the present invention is generated based on the demand for firmware update. The host computer generates a new adaptation instruction based on the current processor information in response to the matching failure information fed back by the control unit. The new adaptation instruction is sent to the uplink communication unit and then transmitted to the firmware download device, so as to execute the new adaptation instruction to send the new firmware data to the optical module.
[0128] Based on the contents of the above embodiments, as an optional embodiment, the optical module firmware downloading method provided by the present invention further includes: in response to a test instruction sent by a host computer, controlling the optical module connection board to test the optical module; and obtaining test data of the optical module and feeding back the test data to the host computer.
[0129] The device for downloading firmware receives a test instruction sent by the host computer, and the test instruction indicates that the device needs to test the optical module; after receiving the test instruction, the device for downloading firmware parses the content of the test instruction, prepares a corresponding test program or command set, and sends the test instruction to the optical module.
[0130] After receiving the test instruction, the optical module starts to execute the specified test program. The test program may include but is not limited to signal strength test, connection stability test, etc. After the optical module completes the test, it will generate test data and feed back the test data to the device that downloaded the firmware, and send the test data back to the host computer.
[0131] The present invention can not only be used to download firmware, but also be used as a test platform to check the performance of the optical module. This not only improves the versatility of the device, but also enhances the ability of remote monitoring and maintenance, which helps to timely discover problems with the optical module and take measures.
[0132] In order to more clearly illustrate the technical solution of the present invention, further description is given below in conjunction with specific embodiments.
[0133] Figure 4 This is a schematic diagram of the structure of the optical module firmware download system provided by the embodiment of the present invention.
[0134] Second, such as Figure 4 As shown, the upstream communication unit of the device downloading the firmware adopts USB Type B
[0135] Connector: The device that downloads the firmware uses a USB with one end being Type B and the other end being Type A.
[0136] The cable is connected to the PC host, and the other end is connected to the optical module connection board through a DuPont line; the MCU and EEPROM in the device that downloads the firmware realize the data transmission function through the SPI bus.
[0137] Figure 5This is a schematic diagram of the communication between the host computer and the device for downloading firmware provided by an embodiment of the present invention. In this process, the host computer (PC host) interacts with the device through the USB interface to achieve firmware downloading and data storage and reading. The following is a brief description of each step:
[0138] 1. Initialization: Initialization operations are performed when the device starts, including setting the initial state and starting the watchdog timer to prevent the system from deadlocking.
[0139] 2. Start Watchdog: Start the watchdog timer, which is a safety mechanism that automatically resets the device if it does not respond within a certain period of time.
[0140] 3. Query the USB interface status: The device detects whether there is a USB communication request. If not, continue to wait in a loop; if yes, proceed to the next step.
[0141] 4.USB communication request: The host computer sends a communication request to the device through the USB interface, which may be a firmware update or other data exchange requirement.
[0142] 5. USB data analysis: After receiving the USB request, the device analyzes it and determines the specific operation task:
[0143] I2C (i.e. I 2 C) Communication: If I2C communication is required, the device will exchange data with the optical module through the I2C bus.
[0144] Data storage: For data that needs to be saved, the device writes it to EEPROM (Electrically Erasable Read-Only Memory) for subsequent use or restoring factory settings.
[0145] Data reading: When the stored data needs to be obtained, the device reads the required information from the EEPROM.
[0146] Based on the above optical module firmware download system and communication process, the following is a firmware download process:
[0147] Step 1: The PC host sends an adaptation command to the device where the firmware is downloaded;
[0148] Step 2: After receiving the adaptation instruction, the MCU of the device that downloaded the firmware reads the MCU model of the optical module currently tested, and compares the read MCU model with the MCU information in the adaptation instruction to determine whether they are consistent;
[0149] Step 3: If they are consistent, the MCU of the device that downloads the firmware calls the corresponding firmware data from the memory and sends it to the optical module set on the optical module connection board to perform subsequent writing actions;
[0150] If they are inconsistent, the MCU of the device that downloaded the firmware will send feedback information to the PC host. There are two situations:
[0151] (1) If the optical module is incorrectly selected, replace it with a new one;
[0152] (2) If the firmware data in the memory of the device to which the firmware is downloaded needs to be updated, the PC host downloads and sends the new firmware data to the MCU control unit, and the new firmware data is written into the memory by the control unit; the PC host sends a new adaptation instruction to the device to which the firmware is downloaded, and repeats step 2.
[0153] Based on the above optical module firmware download system and communication process, the following is a process for testing the optical module:
[0154] Step 1: The PC host sends test instructions to the device where the firmware is downloaded through the USB serial port.
[0155] Step 2: After receiving the test instruction, the MCU of the device that downloads the firmware parses the content of the instruction and prepares a corresponding test program or command set to perform the corresponding test item.
[0156] Step 3: Send a test command to the optical module on the optical module connection board; after receiving the test command, the optical module starts to execute the specified test program using the optical module connection board. The test program may include but is not limited to signal strength test, connection stability test, etc.
[0157] Step 4: After the optical module connection board (which may be an optical module test board) completes the test of the optical module, test data is generated and fed back to the device for downloading the firmware.
[0158] Step 5: The device that downloaded the firmware obtains the test data and feeds it back to the PC host.
[0159] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
[0160] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A device for downloading firmware to an optical module, characterized in that: include: An uplink communication unit, a control unit, a storage unit and a downlink communication unit; The control unit is communicatively connected with the uplink communication unit, the storage unit and the downlink communication unit respectively; The uplink communication unit is used to send the received control instruction or data to the control unit; and receive and send data provided by the control unit; The control unit is used to control the storage unit to read and write data and make control decisions in response to the control instructions or data sent by the uplink communication unit; The storage unit is communicatively connected with the control unit and is used to store data; The downlink communication unit is used to send the control instruction or data output by the control unit to the optical module, and to receive and send the data fed back by the optical module.
2. The device for downloading firmware according to claim 1, characterized in that: The downlink communication unit is I 2 C interface.
3. The device for downloading firmware according to claim 1, characterized in that: In a case where the control instruction received by the uplink communication unit is an adaptation instruction, the control unit obtains the current processor information of the optical module through the downlink communication unit; The control unit makes a corresponding control decision according to the information comparison result of the adaptation instruction and the current processor information to execute the firmware data download of the current processor for the optical module; the adaptation instruction includes the processor information corresponding to the firmware data pre-stored in the storage unit; The storage unit pre-stores a variety of firmware data corresponding to different processor information of the optical module.
4. An optical module firmware download system, characterized in that: include: A host computer, an optical module connecting board and a device for downloading firmware as claimed in any one of claims 1 to 3; The host computer is communicatively connected with the uplink communication unit of the device for downloading firmware, and is used to send adaptation instructions or data; The optical module connection board is connected to a downlink communication unit of a device for downloading firmware; The device for downloading firmware downloads the firmware of the optical module in response to the adaptation instruction or data sent by the host computer.
5. A method for downloading optical module firmware, applied to the optical module firmware downloading system as claimed in claim 4, characterized in that: include: Obtaining instructions sent by the host computer through the uplink communication unit; In response to the adaptation instruction sent by the host computer, the current processor information of the optical module is obtained through the downlink communication unit; Comparing the processor information in the adaptation instruction with the current processor information of the optical module; According to the information comparison result of the adaptation instruction and the current processor information, a corresponding control decision is made, and the firmware corresponding to the current processor of the optical module is sent to the optical module through the downlink communication unit to execute the firmware data download of the optical module.
6. The optical module firmware downloading method according to claim 5, characterized in that: According to the information comparison result of the adaptation instruction and the current processor information, a corresponding control decision is made to execute the firmware data download of the optical module, including: When it is determined that the adaptation instruction contains processor information that is consistent with the current processor information, the firmware data corresponding to the current processor information in the storage unit is sent to the optical module.
7. The optical module firmware downloading method according to claim 5, characterized in that: According to the information comparison result of the adaptation instruction and the current processor information, a corresponding control decision is made to execute the firmware data download of the optical module, including: When it is determined that the adaptation instruction does not contain processor information consistent with the current processor information, feeding back the optical module replacement information to the host computer to execute firmware data download for another replaced optical module; When it is determined that the adaptation instruction does not contain processor information consistent with the current processor information, the firmware data in the storage unit is updated, and the new firmware data is sent to the optical module.
8. The optical module firmware downloading method according to claim 7, characterized in that: Update the firmware data in the storage unit, including: Receive new firmware data; wherein the new firmware data is firmware data corresponding to the current processor information obtained by the host computer; The new firmware data is stored in the storage unit.
9. The optical module firmware downloading method according to claim 8, characterized in that: Send new firmware data to the optical module, including: Receive a new adaptation instruction; wherein the new adaptation instruction is determined by the host computer according to the current processor information of the optical module, and the new adaptation instruction includes the current processor information; Execute the new adaptation instruction to send the new firmware data to the optical module.
10. The optical module firmware downloading method according to claim 5, characterized in that: Also includes: In response to a test instruction sent by the host computer, controlling the optical module connecting board to test the optical module; Acquire test data of the optical module, and feed the test data back to the host computer.
