WO2011144104A2 - 软件升级方法、装置和光模块 - Google Patents

软件升级方法、装置和光模块 Download PDF

Info

Publication number
WO2011144104A2
WO2011144104A2 PCT/CN2011/074759 CN2011074759W WO2011144104A2 WO 2011144104 A2 WO2011144104 A2 WO 2011144104A2 CN 2011074759 W CN2011074759 W CN 2011074759W WO 2011144104 A2 WO2011144104 A2 WO 2011144104A2
Authority
WO
WIPO (PCT)
Prior art keywords
data packet
upgrade
motherboard
optical module
response frame
Prior art date
Application number
PCT/CN2011/074759
Other languages
English (en)
French (fr)
Other versions
WO2011144104A3 (zh
Inventor
吴艳琴
叶俳岑
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2011/074759 priority Critical patent/WO2011144104A2/zh
Priority to CN2011800006676A priority patent/CN102203732A/zh
Publication of WO2011144104A2 publication Critical patent/WO2011144104A2/zh
Publication of WO2011144104A3 publication Critical patent/WO2011144104A3/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a software upgrade method, apparatus, and optical module. Background technique
  • the optical module is an important component of the optical transmission system, and is mainly used on equipment boards such as wavelength division/access.
  • Common optical modules include optical transmitters, optical receivers, optical transceivers (Transceivers) and optical repeaters (Transponders).
  • Transceivers optical transceivers
  • Transponders optical repeaters
  • the existing optical module software upgrade method mainly includes the following steps:
  • the motherboard sends a command to notify the optical module that the software upgrade operation is about to be performed
  • the optical module After receiving the command, the optical module prepares for the upgrade and feeds back a response signal to the motherboard, and the response signal identifies whether the operation is completed.
  • the motherboard writes the upgraded software file to the optical module.
  • the motherboard sends the same type of write command multiple times, and the upgraded software file is sub-packaged to the optical module.
  • the motherboard even needs to know which upgraded software files are stored in which area of the optical module, and perform specific operations according to the characteristics of the storage medium in the optical module. For example, suppose that the upgraded software file should be stored in the FLASH of the optical module.
  • the motherboard will first issue an erase command to the specified area of the FLASH (because the FLASH has the following characteristics: Data 1 can be directly written as 0, but 0 cannot be directly written. If it is 1 , if you want to write 0 as 1, you must first perform an erase operation on the data area, and then send a packet write data command.
  • the motherboard needs to clearly understand the internal details of the optical module. Poor sex.
  • the optical module stores the upgraded software file package in the sequence on the storage medium inside the module, and returns a response signal to the motherboard for each package to identify whether the operation is completed.
  • the motherboard completes the transmission of all data of the software file, and sends an upgrade end command to notify the optical module to run the new version of the software.
  • the command frame sent by the motherboard generally includes a command code field, a command length field, and Information such as a pure data field and a check field, where the command code field is used to identify various command meanings, for example, the upgrade preparation command of step S101 is different from the command code of the upgrade end command of step S105, which facilitates the optical module side to receive and parse;
  • the command length field identifies the entire command frame length;
  • the pure data field is the payload software version data;
  • the check field carries the check information, which is used to verify the frame validity.
  • the motherboard needs to identify the specific type of the optical module, perform framing according to specific constraints, and then send the image to the optical module.
  • the response frame/response signal on the module side generally includes information such as a command execution status field and a check field, wherein the command execution status field identifies information such as successful or failed command execution or busy; and the check field is used to verify frame validity.
  • the mother board interprets the response frame of the optical module, according to the command execution state, different timing control is required.
  • the motherboard retry mechanism for example, the number of retries and the retry wait time, are different depending on the optical module. If a new optical module is introduced, these controls must be re-adjusted to increase the complexity of the motherboard adaptation. Since the command frame format/command code of each optical module is different, the required communication timing is also different. Therefore, the motherboard performs the framing before sending the command, the transmission frame flow control, and the time configuration for waiting for the response of the optical module. To be treated separately, deal with them separately.
  • the motherboard needs to consider different transmission timings and data flows when upgrading the optical modules, and the existing optical modules are upgraded.
  • the method is strongly related to the type of optical module.
  • the motherboard software must be compatible with the differences of these optical modules, which not only increases the development cost of the parent product board software, but also is very easy to be on the live network. Introducing complex upgrade issues.
  • the embodiment of the invention provides a software upgrade method, device and optical module, which can shield the difference of different types of optical modules, so that the motherboard uses the same method to upgrade various types of optical modules.
  • the software upgrade method provided by the embodiment of the present invention includes: receiving, by the motherboard, a response frame returned by the optical module, where the response frame includes an indication for instructing the motherboard to send a data packet of a specified length next time; Sending, by the indication information, the data packet of the specified length from the upgrade file to the light Module, the upgrade file is encapsulated with an upgrade command frame.
  • the software upgrade method provided by the embodiment of the present invention includes: the optical module receives the data packet sent by the motherboard, where the data packet is obtained by the motherboard from the upgrade file, and the upgrade file is encapsulated with an upgrade command frame; Parsing the data packet to execute a corresponding command; the optical module returns a response frame to the motherboard, the response frame including an indication for indicating that the motherboard sends a data packet of a specified length next time.
  • the software upgrade apparatus includes: a response frame receiving module, configured to receive a response frame returned by the optical module, where the response frame includes an indication for indicating that the motherboard sends a data packet of a specified length next time; An obtaining module, configured to obtain, according to the indication, the data packet of the specified length from the upgrade file, and the sending module, configured to send the specified length data packet obtained by the acquiring module to the optical module, where the upgrade file is encapsulated Upgrade the command frame.
  • the optical module includes: a data packet receiving module, configured to receive a data packet sent by the motherboard, where the data packet is obtained by the motherboard from an upgrade file, and the upgrade file is encapsulated with an upgrade command frame; a parsing module, configured to parse the data packet to execute a corresponding command; a returning module, configured to return a response frame to the motherboard, where the response frame includes a data packet for instructing the motherboard to send a specified length next time Instructions.
  • a data packet receiving module configured to receive a data packet sent by the motherboard, where the data packet is obtained by the motherboard from an upgrade file, and the upgrade file is encapsulated with an upgrade command frame
  • a parsing module configured to parse the data packet to execute a corresponding command
  • a returning module configured to return a response frame to the motherboard, where the response frame includes a data packet for instructing the motherboard to send a specified length next time Instructions.
  • the motherboard receives the response frame returned by the optical module, and may obtain a data packet of a specified length from the upgrade file according to the indication, and send the data packet to the light.
  • Module Therefore, compared with the optical module software upgrade method provided by the prior art, the optical module software upgrade method provided by the embodiment of the present invention shields the difference of different optical module types, has good scalability, and can be easily extended to a new type of light.
  • the upgrade of the module is implemented, thereby avoiding the problem of poor compatibility introduced by the inconsistent upgrade methods of various types of optical modules, and reducing the development cost of the motherboard software.
  • 1-1 is a schematic flowchart of a software upgrade method according to an embodiment of the present invention.
  • Figure 1-2 is a schematic structural diagram of an upgrade command frame provided by an embodiment of the present invention.
  • FIGS. 1-3 are schematic diagrams of a file containing only upgrade data and an upgrade file including an upgrade command frame according to an embodiment of the present invention
  • 2-1 is a schematic flowchart of a software upgrade method according to another embodiment of the present invention.
  • 2-2 is a schematic structural diagram of a response frame according to an embodiment of the present invention
  • 3 is a schematic structural diagram of a software upgrade apparatus according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of an optical module according to another embodiment of the present invention.
  • the embodiment of the invention provides an optical module software upgrade method and device, and an optical module, which can shield different types of optical modules from being different, so that the motherboard uses the same method to upgrade various types of optical modules.
  • a schematic flowchart of a software upgrade method provided by an embodiment of the present invention includes:
  • the motherboard receives a response frame returned by the optical module, where the response frame includes indication information for indicating that the motherboard sends a data packet of a specified length next time.
  • the response frame returned by the optical module is the response of the optical module after receiving the data packet sent by the motherboard.
  • the length of the data packet sent by the motherboard is statically configured by the motherboard software, and different optical modules are different. Therefore, the cost of the motherboard software development is increased.
  • the response frame returned by the optical module includes indication information for indicating that the motherboard sends the data packet of the specified length next time, and the length of the data packet sent by the motherboard each time may be light. Module specified.
  • the motherboard dynamically changes the length of the transmitted data packet according to the indication of the optical module, which avoids the problem of increased adaptation cost when multiple optical modules exist.
  • the first data packet when the first data packet is sent by the motherboard, the first data sent by the motherboard to the optical module is not received before the first data packet is sent.
  • the length of the package can be agreed by the motherboard and the optical module.
  • the response frame further includes time information for indicating a waiting time required for the master to read the execution state of the command corresponding to the response frame.
  • time information for indicating a waiting time required for the master to read the execution state of the command corresponding to the response frame.
  • the response frame returned by the optical module to the motherboard may carry a time information, and notify the motherboard to read the execution status of the command corresponding to the response frame, for example, the command execution succeeds or the execution fails.
  • the waiting time required When the waiting time arrives, the motherboard starts to access the execution state of the command corresponding to the response frame.
  • the response frame further includes a packet number of the data packet corresponding to the response frame. For example, if the motherboard sends a data packet with the packet number 1, the response frame returned by the optical module includes the information that the packet number is 1. After the motherboard knows this information, the data packet with the packet number 2 is sent. S102. The motherboard obtains the data packet of the specified length from the upgrade file and sends the data packet to the optical module according to the indication information, where the upgrade file is encapsulated with an upgrade command frame.
  • the format of the upgrade command frame is as shown in FIG. 1-2, which includes the command code, the data for upgrading, the checksum, and the like, and is encapsulated in the upgrade file in advance.
  • Figure 1-3 shows a diagram of a file containing only the data for upgrade (left half of Figure 1-3) and an upgrade file containing the upgrade command frame (right half of Figure 1-3).
  • the data for the upgrade is sub-packaged, and the command code information ("FD FC" in the right half of Figure 1-3) and the packet length information are added to each packet of data (in the right half of Figure 1-3).
  • the motherboard does not need to understand the command format of each upgrade step as in the prior art, and then composes corresponding command frames according to these command formats.
  • the motherboard obtains the data packet of the specified length from the upgrade file and sends it to the optical module according to the indication in the response frame.
  • the motherboard obtains the first data packet from the upgrade file according to the agreement with the optical module.
  • a packet of a predetermined length is sent to the optical module.
  • the entire upgrade operation is similar to a "black box" operation, ie, the motherboard does not know what the packet sent to the optical module contains. This feature of the upgrade file relieves the coupling to the motherboard to a large extent.
  • each upgrade command frame is not encapsulated by the motherboard, the upgrade file of the command frame is received on the motherboard.
  • the motherboard receives the response frame returned by the optical module, and may obtain a data packet of a specified length from the upgrade file according to the indication, and send the data packet to the light.
  • Module Therefore, compared with the optical module software upgrade method provided by the prior art, the optical module software upgrade method provided by the embodiment of the present invention shields the difference of different optical module types, has good scalability, and can be easily extended to a new type of light.
  • the upgrade of the module is implemented, thereby avoiding the problem of poor compatibility introduced by the inconsistent upgrade methods of various types of optical modules, and reducing the development cost of the motherboard software.
  • 2-1 is a schematic flowchart of a software upgrade method according to another embodiment of the present invention, which mainly includes the following steps: S201.
  • the optical module receives the data packet sent by the motherboard.
  • the data packet is obtained from the upgrade file by the motherboard, and the upgrade file is encapsulated with an upgrade command frame, and the upgrade command frame includes the following information: an upgrade command code, upgrade software data, and a frame checksum.
  • the optical module parses the received data packet, and executes a corresponding upgrade command.
  • the optical module although it receives the data packet, it still executes the corresponding command according to the upgrade command frame format. For example, if the data package contains the "Upgrade Start” command, the optical module prepares for the upgrade after parsing the data packet; for example, if the data packet contains the "Write Upgrade File” command, the optical module is After parsing the data packet, the upgrade file is stored; for example, if the data packet includes the "upgrade complete” command, the optical module runs the new version of the software after parsing the data packet.
  • the optical module returns a response frame to the motherboard, where the response frame includes indication information for indicating that the motherboard sends a data packet of a specified length next time.
  • the returned response frame is the response made by the optical module after receiving the data packet sent by the motherboard in step S201.
  • the response frame includes indication information for indicating that the motherboard sends the data packet of the specified length next time.
  • FIG. 2-2 it is a format of a response frame provided by an embodiment of the present invention, which includes a packet number, a current frame execution state, and a 4-byte data field, and a packet number (IByte), that is, a current data frame packet.
  • the length send frame command code + length byte indicates the current data frame.
  • the waiting time for the next readback of the motherboard, in ms, the current data frame module is positive.
  • the length of the data packet sent by the motherboard is statically configured by the motherboard software, and different optical modules are different in these configurations, thereby increasing the cost of the motherboard software development.
  • the length of the data packet sent by the motherboard is specified by the optical module. The length of the data packet that is dynamically changed according to the indication of the optical module can avoid the increase of the adaptation cost when multiple optical modules exist. problem.
  • the response frame further includes time information for indicating a waiting time required for the master to read the execution state of the command corresponding to the response frame.
  • time information for indicating a waiting time required for the master to read the execution state of the command corresponding to the response frame.
  • the response frame returned by the optical module to the motherboard may carry a time information, and notify the motherboard to read the execution status of the command corresponding to the response frame (for example, the command execution succeeds or the execution fails. ) The waiting time required.
  • the optical module obtains the data packet of the specified length from the upgrade file and sends the data packet to the optical module according to the indication information in the response frame.
  • the response frame further includes a packet number of the data packet corresponding to the response frame. For example, if the motherboard sends a packet with a packet number of 1, the response frame returned by the optical module includes the information that the packet number is 1. After the motherboard knows this information, it sends a packet with the packet number 2.
  • FIG. 3 it is a schematic structural diagram of a software upgrade apparatus according to an embodiment of the present invention. For the convenience of explanation, only the parts related to the embodiment of the present invention are shown.
  • the optical module software upgrading apparatus of the example of FIG. 3 includes a response frame receiving module 301, an obtaining module 302, and a transmitting module 303, wherein:
  • the response frame receiving module 301 is configured to receive a response frame returned by the optical module, where the response frame includes an indication for indicating that the motherboard sends a data packet of a specified length next time;
  • the obtaining module 302 is configured to obtain, according to the indication information, the data packet of the specified length from the upgrade file;
  • the sending module 303 is configured to send the specified length data packet obtained by the obtaining module 302 to the optical module, where the upgrade file is encapsulated with an upgrade command frame.
  • the response frame received by the response frame receiving module 301 further includes time information for indicating a waiting time required for the execution status of the command corresponding to the master accessing the response frame.
  • the obtaining module 302 is configured to: when the waiting time arrives, acquire a data packet of a specified length from the upgrade file according to the indication included in the response frame, where the sending module 303 can be used to wait for the waiting time.
  • the specified length data packet acquired by the obtaining module 302 is sent to the optical module.
  • the embodiment of the present invention further provides a motherboard, which includes the optical module software upgrading device illustrated in FIG.
  • FIG. 4 it is a schematic structural diagram of an optical module according to an embodiment of the present invention. For the convenience of description, only parts related to the embodiment of the present invention are shown.
  • the optical module of the example of Figure 4 includes a data packet receiving module 401, a parsing module 402, and a return module 403, where:
  • a data packet receiving module 401 configured to receive a data packet sent by the motherboard, where the data packet is obtained by the motherboard from an upgrade file, where the upgrade file is encapsulated with an upgrade command frame;
  • a parsing module 402 configured to parse the data packet to execute a corresponding command
  • the returning module 403 is configured to return a response frame to the motherboard, where the response frame includes an indication for indicating that the motherboard sends a data packet of a specified length next time.
  • the response frame returned by the return module 403 further includes time information for indicating a waiting time required for the master to access the execution state of the command corresponding to the response frame.
  • the embodiment of the invention further provides an optical module, which comprises the optical module software upgrading device illustrated in FIG. 4 .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Optical Communication System (AREA)

Abstract

本发明实施例提供了软件升级方法、装置和光模块。该方法能够屏蔽不同类型光模块的差异,由此母板仅使用同一种方法升级各种类型光模块。该方法包括步骤:母板接收光模块返回的响应帧,所述响应帧包括用于指示所述母板下次发送指定长度的数据包的指示;所述母板根据所述指示,从升级文件中获取所述指定长度的数据包并发送至所述光模块,所述升级文件封装有升级命令帧。该光模块软件升级方法具有良好的扩展性,能够方便地用于新类型光模块的软件升级,由此解决了各类型光模块不同升级方法产生的兼容性变差的问题,并降低了母板软件的开发成本。

Description

软件升级方法、 装置和光模块 技术领域
本发明实施例涉及通信领域, 尤其涉及软件升级方法、 装置和光模块。 背景技术
光模块是光传输系统的重要器件, 主要装配在波分 /接入等产品设备板上 使用。 常见的光模块包括光发送器、 光接收器、 光收发一体模块(Transceiver ) 和光转发器(Transponder )。 随着光模块技术迅猛发展, 配套的软件实现也逐 渐趋向于复杂多样。 为了能动态地满足客户需求, 光模块软件的升级功能变得 越来越重要, 而光模块的软件升级主要依靠所应用的母板软件。
现有的光模块软件升级方法主要包括如下步骤:
5101 , 母板发送命令通知光模块即将进行软件升级操作;
5102, 光模块收到命令后, 做好升级准备并向母板反馈筒单的应答信号, 该应答信号标识操作是否完成;
S103 , 母板向光模块写入升级的软件文件;
一般地,母板会多次下发同样类型的写入命令,将升级的软件文件分包传 输至光模块。对于某些光模块,母板甚至需要了解这些升级的软件文件存放在 光模块哪一片区域内, 并且根据光模块内的存储介质特性, 进行特定的操作。 例如, 假设升级的软件文件应该存储在光模块内部 FLASH中, 母板会先下发 对 FLASH指定区域的擦除命令 (因为 FLASH具有以下特性: 数据 1可以直 接写为 0, 但是 0不能直接写为 1 , 如果想要将 0写为 1 , 必须先对数据区域 执行擦除操作), 再下发各包写入数据命令, 如此, 母板需要对光模块内部细 节清楚地了解, 光模块封装性较差。
5104,光模块按先后顺序依次将升级的软件文件包存放到模块内部的存储 介质上, 针对各个包, 分别向母板返回筒单的应答信号, 标识操作是否完成;
5105 ,母板完成软件文件全部数据的传输,发送升级结束命令通知光模块 运行新版本软件。
以上各步骤中, 母板发送的命令帧一般包含命令码字段、 命令长度字段、 纯数据字段和校验字段等信息, 其中, 命令码字段用以识别各种命令含义, 例 如, 步骤 S101的升级准备命令和步骤 S105的升级结束命令对应命令码不同, 便于光模块侧接收解析; 命令长度字段标识整个命令帧长度; 纯数据字段是净 负荷软件版本数据; 校验字段承载校验信息, 用于校验帧有效性。 随着光模块 生产厂家以及光模块类型的不同,以上各字段要求填充的字节数目以及具体数 值都有差异。 因此现有的光模块软件升级方法中,母板需要通过识别光模块的 具体类型, 按照特定的约束条件进行组帧, 然后发送至光模块。
模块侧的响应帧 /应答信号一般包含命令执行状态字段和校验字段等信 息, 其中, 命令执行状态字段标识命令执行成功或者失败或者忙碌等信息; 校 验字段用于校验帧有效性。母板在解读光模块的响应帧时,根据命令执行状态, 需要进行不同的时序控制。 当光模块返回忙状态, 母板重试机制, 例如, 重试 次数以及重试等待时间, 都是因光模块而异的。 若新引入一种光模块, 这些控 制都要重新调整,增加母板适配的复杂性。 由于不同的光模块各步骤的命令帧 格式 /命令码不同, 要求的通信时序也不尽相同, 因此母板在发送命令之前的 组帧、发送帧流量控制以及等待光模块响应的时间配置上都要区分对待,单独 处理。
从以上说明可知,由于不同类型的光模块选用的器件在硬件特性上存在一 定的差异,使得母板在对光模块进行软件升级时需要考虑不同的传输时序和数 据流量,现有的光模块升级方法与光模块类型是强相关的。 当一种母板在不同 的组网环境下需要装配不同的光模块时, 母板软件必须兼容这些光模块的差 异,如此不仅增加了父项产品板软件的开发成本,也极容易在现网引入复杂的 升级问题。
发明内容
本发明实施例提供了软件升级方法、装置和光模块, 能够屏蔽不同类型光 模块的差异, 使得母板使用同一种方法升级各种类型光模块。
本发明实施例提供的软件升级方法,包括:母板接收光模块返回的响应帧, 所述响应帧包括用于指示所述母板下次发送指定长度的数据包的指示;所述母 板根据所述指示信息,从升级文件中获取所述指定长度的数据包发送至所述光 模块, 所述升级文件封装有升级命令帧。
本发明实施例提供的软件升级方法,包括:光模块接收母板发送的数据包, 所述数据包由所述母板从升级文件获取, 所述升级文件封装有升级命令帧; 所 述光模块解析所述数据包以执行相应的命令;所述光模块向所述母板返回响应 帧, 所述响应帧包括用于指示所述母板下次发送指定长度的数据包的指示。
本发明实施例提供的软件升级装置, 包括: 响应帧接收模块, 用于接收光 模块返回的响应帧,所述响应帧包括用于指示所述母板下次发送指定长度的数 据包的指示; 获取模块, 用于根据所述指示从升级文件中获取所述指定长度的 数据包; 发送模块,用于发送所述获取模块获取的指定长度数据包至所述光模 块, 所述升级文件封装有升级命令帧。
本发明实施例提供的光模块, 包括: 数据包接收模块, 用于接收母板发送 的数据包, 所述数据包由所述母板从升级文件获取, 所述升级文件封装有升级 命令帧; 解析模块, 用于解析所述数据包以执行相应的命令; 返回模块, 用于 向所述母板返回响应帧,所述响应帧包括用于指示所述母板下次发送指定长度 的数据包的指示。
从上述本发明实施例可知, 由于升级命令帧是封装在升级文件中,母板接 收光模块返回的响应帧后,可以根据其中的指示从升级文件中获取指定长度的 数据包发送至所述光模块。因此,与现有技术提供的光模块软件升级方法相比, 本发明实施例提供的光模块软件升级方法屏蔽了不同光模块类型的差异,具有 良好的扩展性, 能够方便地扩展至新类型光模块的升级实现, 由此规避了各类 型光模块升级方法不一致引入的兼容性变差的问题,降低了母板软件的开发成 本。
附图说明
图 1-1是本发明实施例提供的软件升级方法流程示意图;
图 1-2是本发明实施例提供的升级命令帧结构示意图;
图 1-3是本发明实施例提供的只包含升级用的数据的文件和包含了升级命 令帧的升级文件的示意图;
图 2-1是本发明另一实施例提供的软件升级方法流程示意图;
图 2-2是本发明实施例提供的响应帧结构示意图; 图 3是本发明实施例提供的软件升级装置结构示意图;
图 4是本发明另一实施例提供的光模块结构示意图。
具体实施方式
本发明实施例提供了光模块软件升级方法、装置和一种光模块, 能够屏蔽 不同类型光模块的差异, 使得母板使用同一种方法升级各种类型光模块。
请参阅图 1-1 , 本发明实施例提供的软件升级方法流程示意图, 主要包括 步骤:
S101 ,母板接收光模块返回的响应帧,所述响应帧包括用于指示所述母板 下次发送指定长度的数据包的指示信息。
光模块返回的响应帧是光模块接收母板下发的数据包后所作的响应。现有 技术中, 母板发送的数据包的长度是由母板软件静态配置, 不同的光模块, 这 些配置都不一样, 因此, 增加了母板软件开发的成本。 与现有技术不同, 在本 发明实施例中,光模块返回的响应帧包括用于指示母板下次发送指定长度的数 据包的指示信息,母板每次发送的数据包的长度可以由光模块指定。母板根据 光模块的指示, 动态变化发送的数据包的长度,避免了存在多种光模块时适配 成本增加的问题。
需要说明的是, 在本发明实施例中, 母板发送第一个数据包时, 由于发送 第一个数据包之前不可能收到响应帧, 因此,母板向光模块发送的第一个数据 包的长度可以由母板和光模块约定。
在本发明另一实施例中, 响应帧还包括时间信息, 该时间信息用于指示母 板读取响应帧对应的命令的执行状态所需等待时间。例如, 当光模块正在处理 接收的升级数据时, 光模块向母板返回的响应帧可以携带一个时间信息,通知 母板读取响应帧对应的命令的执行状态, 例如,命令执行成功或执行失败需要 的等待时间。在所述等待时间到达时,母板开始访问响应帧对应的命令的执行 状态。
为了验证母板和光模块之间通信是否有效,在本发明另一个实施例中, 响 应帧还包括该响应帧对应的数据包的包号。例如,母板发送包号为 1的数据包, 则光模块返回的响应帧包括该包号为 1这一信息; 母板获知这一信息后,发送 包号为 2的数据包。 S102,母板根据所述指示信息,从升级文件中获取所述指定长度的数据包 发送至所述光模块, 所述升级文件封装有升级命令帧。
在本发明实施例中, 升级命令帧格式如附图 1-2所示, 其包含命令码、 升 级用的数据和校验和等, 事先封装于升级文件中。 附图 1-3给出了只包含升级 用的数据的文件 (附图 1-3左半部分)和包含了升级命令帧的升级文件(附图 1-3右半部分) 的示意图。 实际上, 将升级用的数据分包, 对每包数据添加命 令码信息(附图 1-3右半部分中的 "FD FC" )、 包长信息 (附图 1-3右半部 分中的 "FA" )、 包号信息(附图 1-3右半部分中的 "OA" )以及校验和信息(附 图 1-3右半部分中的 "5E" )等过程即是升级命令帧封装于升级文件的过程。 附图 1-3的左半部分和右半部分是以附图 1-3中间的所示竖线界定。
在本发明实施例中,母板无需像现有技术一样去了解各升级步骤的命令格 式,然后按照这些命令格式组成相应的命令帧。母板只要根据响应帧中的指示, 从升级文件中获取指定长度的数据包发送至光模块, 或者,母板根据与光模块 的约定,在发送第一个数据包时,从升级文件中获取约定长度的数据包发送至 光模块。 对母板而言, 整个升级操作类似于 "黑盒"操作, 即, 母板并不知道 发送至光模块的数据包包含的内容。升级文件的这种特性在 4艮大程度上解除了 与母板的耦合。
需要说明的是, 由于各项升级命令帧不是由母板封装, 因此, 在母板接收 命令帧的升级文件。
从上述本发明实施例可知, 由于升级命令帧是封装在升级文件中,母板接 收光模块返回的响应帧后,可以根据其中的指示从升级文件中获取指定长度的 数据包发送至所述光模块。因此,与现有技术提供的光模块软件升级方法相比, 本发明实施例提供的光模块软件升级方法屏蔽了不同光模块类型的差异,具有 良好的扩展性, 能够方便地扩展至新类型光模块的升级实现, 由此规避了各类 型光模块升级方法不一致引入的兼容性变差的问题,降低了母板软件的开发成 本。
请参阅图 2-1 , 本发明另一实施例提供的软件升级方法流程示意图, 主要 包括步骤: S201 , 光模块接收母板发送的数据包。
在本实施例中,数据包是由母板从升级文件获取, 该升级文件封装有升级 命令帧, 该升级命令帧包含有如下信息: 升级命令码、 升级软件数据和帧校验 和等。
S202, 光模块解析接收到的数据包, 执行相应的升级命令。
对光模块而言,尽管其接收的是数据包,但仍然按照升级命令帧格式解析 出相应的命令后执行。 例如, 若数据包包含了 "升级开始"命令, 则光模块在 解析了该数据包后, 做好升级准备工作; 再如, 若数据包包含了 "写入升级文 件"命令, 则光模块在解析了该数据包后, 存储升级文件; 还如, 若数据包包 含了 "升级完成" 命令, 则光模块在解析了该数据包后, 运行新版本的软件。
S203 ,光模块向母板返回响应帧,所述响应帧包括用于指示所述母板下次 发送指定长度的数据包的指示信息。
返回的响应帧是光模块在步骤 S201中接收母板下发的数据包后所作的响 应。在本发明实施例中, 响应帧包括用于指示母板下次发送指定长度的数据包 的指示信息。 如附图 2-2所示, 是本发明实施例提供的响应帧的格式, 其包括 包号、 当前帧执行状态和 4个字节数据等字段, 包号(IByte ), 即当前数据帧 包号, 与接收到的母板命令帧包号一致, 用于校验帧的实时性; 当前帧执行状 态, 即 STS字段, 根据 STS不同, 4字节数据字段对应的意义也不同, 如下 表一所示:
STS 4字节数据 1 ~ 4 说明
要求母板下次发送帧长度,该长度 =发送帧命令码 + 长度字节 表明当前数据帧
0x00
+校验和字节 +数据字节长度 (包括包号字节);母板必须遵守 处理正常结束 此长度发送下一帧数据, 当到达升级文件末尾, 文件剩余长度
小于该建议长度时, 以实际数据长度为准。
要求母板下次回读的等待时间, 以 ms为单位 当前数据帧模块正
0x05 在处理中, 请稍等 模块内部定义的错误调测码,用以定位问题 当前数据帧模块
OxOA
处理失败 现有技术中,母板发送的数据包的长度是由母板软件静态配置, 不同的光 模块, 这些配置都不一样, 因此, 增加了母板软件开发的成本。 与现有技术不 同,母板每次发送的数据包的长度由光模块指定, 这种根据光模块的指示动态 变化发送的数据包的长度, 可以避免存在多种光模块时适配成本增加的问题。
在本发明另一实施例中, 响应帧还包括时间信息, 该时间信息用于指示母 板读取响应帧对应的命令的执行状态所需等待时间。例如, 当光模块正在处理 接收的升级数据时, 光模块向母板返回的响应帧可以携带一个时间信息,通知 母板读取响应帧对应的命令的执行状态(例如, 命令执行成功或执行失败)需 要的等待时间。
母板在所述等待时间到达时,即光模块处理完响应帧对应的数据包所包含 的升级数据时,根据响应帧中的指示信息,从升级文件中获取指定长度的数据 包发送至光模块。
为了验证母板和光模块之间通信是否有效,在本发明另一个实施例中, 响 应帧还包括该响应帧对应的数据包的包号。例如,母板发送包号为 1的数据包, 则光模块返回的响应帧包括该包号为 1这一信息; 母板获知这一信息后,发送 包号为 2的数据包。
请参阅附图 3 , 是本发明实施例提供的软件升级装置结构示意图。 为了便 于说明,仅仅示出了与本发明实施例相关的部分。 附图 3示例的光模块软件升 级装置包括响应帧接收模块 301、 获取模块 302和发送模块 303 , 其中:
响应帧接收模块 301 , 用于接收光模块返回的响应帧, 所述响应帧包括用 于指示所述母板下次发送指定长度的数据包的指示;
获取模块 302, 用于根据所述指示信息从升级文件中获取所述指定长度的 数据包;
发送模块 303 , 用于获取模块 302获取的指定长度数据包发送至所述光模 块, 所述升级文件封装有升级命令帧。
在本发明另一实施例中,响应帧接收模块 301接收的响应帧还包括时间信 息, 该时间信息用于指示母板访问响应帧对应的命令的执行状态所需等待时 间。 此时, 获取模块 302可用于在所述等待时间到达时, 根据响应帧包含的指 示从升级文件中获取指定长度的数据包,发送模块 303可用于在所述等待时间 到达时发送获取模块 302获取的指定长度数据包至所述光模块。
本发明实施例还提供一种母板,该母板包括附图 3示例的光模块软件升级 装置。
请参阅附图 4,是本发明实施例提供的光模块结构示意图。为了便于说明, 仅仅示出了与本发明实施例相关的部分。附图 4示例的光模块包括数据包接收 模块 401、 解析模块 402和返回模块 403 , 其中:
数据包接收模块 401 , 用于接收母板发送的数据包, 所述数据包由所述母 板从升级文件获取, 所述升级文件封装有升级命令帧;
解析模块 402, 用于解析所述数据包以执行相应的命令;
返回模块 403 , 用于向所述母板返回响应帧, 所述响应帧包括用于指示所 述母板下次发送指定长度的数据包的指示。
在本发明另一实施例中,返回模块 403返回的响应帧还包括时间信息, 该 时间信息用于指示母板访问响应帧对应的命令的执行状态所需等待时间。
本发明实施例还提供一种光模块,该光模块包括附图 4示例的光模块软件 升级装置。
需要说明的是, 上述装置各模块 /单元之间的信息交互、 执行过程等内容, 由于与本发明方法实施例基于同一构思,其带来的技术效果与本发明方法实施 例相同, 具体内容可参见本发明方法实施例中的叙述, 此处不再赘述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤 是可以通过程序来指令相关的硬件完成,该程序可以存储于一种计算机可读存 储介质中, 上述提到的存储介质可以是只读存储器, 磁盘或光盘等。
以上对本发明所提供的光模块软件升级方法、装置和一种母板及光模块进 行了详细介绍, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具 体实施方式及应用范围上均会有改变之处, 因此, 本说明书内容不应理解为对 本发明的限制。

Claims

权 利 要 求
1、 一种软件升级方法, 其特征在于, 所述方法包括:
母板接收光模块返回的响应帧,所述响应帧包括用于指示所述母板下次发 送指定长度的数据包的指示;
所述母板根据所述指示信息,从升级文件中获取所述指定长度的数据包发 送至所述光模块, 所述升级文件封装有升级命令帧。
2、 根据权利要求 1所述的方法, 其特征在于, 所述响应帧还包括时间信 需等待时间;
所述母板根据所述指示从升级文件中获取所述指定长度的数据包发送至 所述光模块为: 所述母板在所述等待时间到达时,根据所述指示从升级文件中 获取所述指定长度的数据包发送至所述光模块。
3、 根据权利要求 1所述的方法, 其特征在于, 所述响应帧还包括所述响 应帧对应的数据包的包号。
4、 根据权利要求 1至 3任意一项所述的方法, 其特征在于, 所述升级命 令帧包括命令码、 升级用的数据和校验和。
5、 一种软件升级方法, 其特征在于, 所述方法包括:
光模块接收母板发送的数据包, 所述数据包由所述母板从升级文件获取, 所述升级文件封装有升级命令帧;
所述光模块解析所述数据包以执行相应的命令;
所述光模块向所述母板返回响应帧,所述响应帧包括用于指示所述母板下 次发送指定长度的数据包的指示。
6、 根据权利要求 5所述的方法, 其特征在于, 所述响应帧还包括时间信 需等待时间。
7、 根据权利要求 5所述的方法, 其特征在于, 所述响应帧还包括所述响 应帧对应的数据包的包号。
8、 一种升级装置, 其特征在于, 所述装置包括:
响应帧接收模块, 用于接收光模块返回的响应帧, 所述响应帧包括用于指 示所述母板下次发送指定长度的数据包的指示;
获取模块, 用于根据所述指示从升级文件中获取所述指定长度的数据包; 发送模块, 用于发送所述获取模块获取的指定长度数据包至所述光模块, 所述升级文件封装有升级命令帧。
9、 如权利要求 8所述的装置, 其特征在于, 所述响应帧还包括时间信息, 等待时间;
所述获取模块还用于在所述等待时间到达时,根据所述指示从升级文件中 获取所述指定长度的数据包;
所述发送模块还用于在所述等待时间到达时发送所述获取模块获取的指 定长度数据包至所述光模块。
10、 如权利要求 8或 9所述的装置, 其特征在于, 所述升级命令帧包括命 令码、 升级用的数据和校验和。
11、 一种光模块, 其特征在于, 包括:
数据包接收模块, 用于接收母板发送的数据包, 所述数据包由所述母板从 升级文件获取, 所述升级文件封装有升级命令帧;
解析模块, 用于解析所述数据包以执行相应的命令;
返回模块,用于向所述母板返回响应帧, 所述响应帧包括用于指示所述母 板下次发送指定长度的数据包的指示。
12、 根据权利要求 11所述的装置, 其特征在于, 所述响应帧还包括时间 信息,所述时间信息用于指示所述母板读取所述响应帧对应的命令的执行状态 所需等待时间。
PCT/CN2011/074759 2011-05-27 2011-05-27 软件升级方法、装置和光模块 WO2011144104A2 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2011/074759 WO2011144104A2 (zh) 2011-05-27 2011-05-27 软件升级方法、装置和光模块
CN2011800006676A CN102203732A (zh) 2011-05-27 2011-05-27 软件升级方法、装置和光模块

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/074759 WO2011144104A2 (zh) 2011-05-27 2011-05-27 软件升级方法、装置和光模块

Publications (2)

Publication Number Publication Date
WO2011144104A2 true WO2011144104A2 (zh) 2011-11-24
WO2011144104A3 WO2011144104A3 (zh) 2012-04-26

Family

ID=44662777

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074759 WO2011144104A2 (zh) 2011-05-27 2011-05-27 软件升级方法、装置和光模块

Country Status (2)

Country Link
CN (1) CN102203732A (zh)
WO (1) WO2011144104A2 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401879A (zh) * 2013-08-14 2013-11-20 青岛海信宽带多媒体技术有限公司 一种光模块及保证光模块协议数据完整性的方法
CN103441992A (zh) * 2013-08-14 2013-12-11 青岛海信宽带多媒体技术有限公司 一种保证光模块协议数据完整性的方法

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105700906B (zh) * 2014-11-29 2020-04-21 海思光电子有限公司 一种光模块的软件升级方法、相关设备和系统
CN104461639A (zh) * 2014-12-12 2015-03-25 四川华拓光通信股份有限公司 一种基于Bootloader的CSFP光模块升级方法
CN106257417B (zh) * 2015-06-17 2021-07-20 中兴通讯股份有限公司 引导程序升级方法、嵌入式设备、控制设备及嵌入式系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145843A (zh) * 2007-10-25 2008-03-19 中兴通讯股份有限公司 一种吉比特无源光网络终端软件版本的下载方法
CN101166321A (zh) * 2006-10-17 2008-04-23 中兴通讯股份有限公司 无线通信系统中远端射频单元的软件升级方法
CN101729948A (zh) * 2009-12-02 2010-06-09 中兴通讯股份有限公司 远程升级方法及系统
CN101860456A (zh) * 2010-06-29 2010-10-13 中兴通讯股份有限公司 一种以太网无源光网络中光节点的软件升级方法及系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1417568A1 (en) * 2001-07-23 2004-05-12 Tut Systems, Inc. Automated upgrading of memory data structures

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101166321A (zh) * 2006-10-17 2008-04-23 中兴通讯股份有限公司 无线通信系统中远端射频单元的软件升级方法
CN101145843A (zh) * 2007-10-25 2008-03-19 中兴通讯股份有限公司 一种吉比特无源光网络终端软件版本的下载方法
CN101729948A (zh) * 2009-12-02 2010-06-09 中兴通讯股份有限公司 远程升级方法及系统
CN101860456A (zh) * 2010-06-29 2010-10-13 中兴通讯股份有限公司 一种以太网无源光网络中光节点的软件升级方法及系统

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103401879A (zh) * 2013-08-14 2013-11-20 青岛海信宽带多媒体技术有限公司 一种光模块及保证光模块协议数据完整性的方法
CN103441992A (zh) * 2013-08-14 2013-12-11 青岛海信宽带多媒体技术有限公司 一种保证光模块协议数据完整性的方法

Also Published As

Publication number Publication date
CN102203732A (zh) 2011-09-28
WO2011144104A3 (zh) 2012-04-26

Similar Documents

Publication Publication Date Title
EP3110068B1 (en) Device management method
WO2011144104A2 (zh) 软件升级方法、装置和光模块
US20090222809A1 (en) Portable device upgrade via a content transfer protocol
US9680930B2 (en) Data communication system for a storage management system and communication method thereof
CN107025203B (zh) 第一板卡、第二板卡及一种设备
CN103428627A (zh) 物联网系统中数据的传送方法、物联网系统及相应装置
CN110799956B (zh) 具有多个主数据通道的高带宽soundwire主控设备
CN101416161A (zh) 在分区环境中显露设备特征
CA2812025A1 (en) Usb to i2c and spi bridge
CN103106095A (zh) 一种工业照相机远程升级的方法及照相机
US20090327537A1 (en) Virtualized Serial Attached SCSI Adapter
CN103812695A (zh) 小型光网络单元sfp onu的软件调试方法和装置
CN102916776B (zh) 光模块参数传输方法及装置
EP3429128A1 (en) Hard drive operation method and hard drive manager
WO2016023187A1 (zh) 处理操作请求的存储系统、方法及装置
US20230325175A1 (en) Methods for Optics Module Firmware In-Field Upgrade
CN109977053A (zh) 一种基于网络的共享io接口设计方法和系统
JP5455684B2 (ja) 通信装置及び通信方法及びプログラム
CN109032582A (zh) 一种生成服务器运维脚本的方法及装置
CN112087430B (zh) 一种通过smash接口访问mctp设备的系统及方法
JP6140367B2 (ja) データカード、並びにデータカード切り替え方法及び装置
CN108134963B (zh) 数字电视一体机升级方法、装置、介质及计算机设备
JP2014002637A (ja) ディスクアレイ装置、パラメータ設定方法およびプログラム
CN112925848A (zh) 一种数据同步方法、装置、设备及可读存储介质
CN104102619A (zh) 第一操作系统对第二操作系统的dsp进行操作的方法及系统

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180000667.6

Country of ref document: CN

NENP Non-entry into the national phase in:

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11783021

Country of ref document: EP

Kind code of ref document: A2