A CATV optical receiving module and a data communication method, system and storage medium thereof
Patent Information
- Application Number
- CN202610975053.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-01
- Publication Date
- 2026-09-22
AI Technical Summary
[0003]传统CATV方案中,一些状态读取、修改参数等功能分散在不同寄存器中或不同通信流程中,如RF开关控制、AGC参数配置、光功率读取、RF输出功率读取、TIA温度读取、告警状态读取、I2C诊断状态读取等,缺少统一的命令帧格式和错误返回机制
本申请提供的一种CATV光接收模块及其数据通信方法、系统、存储介质,方法提及,通过接收基于自定义协议帧封装的HID命令报文,先对报文数据进行完整性与合法性验证,再根据报文中的操作指令,统一执行实时状态查询、设备信息查询与修改、RF输出控制、AGC参数修改等全部操作,最后按照统一自定义协议帧组装并返回包含查询结果或执行状态的响应报文,将原本分散的读取、修改、控制、诊断功能整合到同一套通信流程与帧格式中。该方法将RF开关、AGC参数、光功率、输出功率、温度、告警、诊断等分散功能收拢于统一的自定义协议帧内,实现了查询、配置、控制、诊断操作的标准化与一体化,解决了功能分散、流程混乱的缺陷,同时依托统一帧格式与验证机制,建立规范的错误返回与状态反馈体系,大幅提升通信可靠性与指令执行可追溯性,简化上位机软件的通信逻辑与解析处理。
Smart Images

Figure CN122802658A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of CATV optical receiver module technology, and in particular to a CATV optical receiver module and its data communication method, system and storage medium. Background Technology
[0002] The CATV optical receiver module is a component of fiber optic cable television (CATV) equipment. It converts the optical signals transmitted through optical fibers into radio frequency (RF) electrical signals for use by television terminals and set-top boxes. It is a key unit for the downlink of broadcast signals in optical networks. The CATV optical receiver module is mainly installed on ONU (Optical Network Unit) equipment to realize integrated access of broadband and cable television signals, and is widely used in fiber-to-the-home (FTTH) scenarios.
[0003] In traditional CATV solutions, some functions such as status reading and parameter modification are scattered in different registers or different communication processes, such as RF switch control, AGC parameter configuration, optical power reading, RF output power reading, TIA temperature reading, alarm status reading, I2C diagnostic status reading, etc., lacking a unified command frame format and error return mechanism. Summary of the Invention
[0004] The technical problem this application aims to solve is that in traditional CATV solutions, some functions such as status reading and parameter modification are scattered in different registers or different communication processes, lacking a unified command frame format and error return mechanism.
[0005] To address the aforementioned issues, this application provides a CATV optical receiving module and its data communication method, system, and storage medium.
[0006] In a first aspect, the present invention discloses a data communication method for a CATV optical receiver module, comprising, Receive HID command messages edited according to a custom protocol frame and verify the data in the HID command messages; In response to the operation instructions carried in the HID command message, the CATV optical receiver module executes the operation processing corresponding to the operation instructions. The operation processing includes querying the real-time status of the CATV optical receiver module, querying or modifying the device information of the CATV optical receiver module, controlling the RF output unit of the CATV optical receiver module, and modifying the AGC related parameters of the CATV optical receiver module. The CATV optical receiver module completes the operation processing according to the operation instructions and returns a response message assembled based on a custom protocol frame. The response message includes the query result or execution status.
[0007] Preferably, receiving an HID command message edited according to a custom protocol frame and verifying the CATV optical receiver module according to the instructions in the HID command message specifically includes the following steps: When the CATV optical receiver module is powered on, it sends a USB device descriptor to the connected ONU host computer. The ONU host computer recognizes the CATV optical receiver module as a custom HID device. The ONU host computer edits the HID command message according to the custom protocol frame and sends it to the CATV optical receiver module. The CATV optical receiver module verifies the start and end identifier fields of the HID command message and outputs the query results. Verify the data area based on the data area verification data of the HID command message, and output the query results; When the start identifier and end identifier fields are successfully verified or the data area is successfully verified, a successful verification response message is returned to the ONU host computer. When the start and end identifiers fail to be verified or the data area fails to be verified, a verification error response message is returned to the ONU host computer. The error code is marked in the verification error response message.
[0008] Preferably, in response to the operation instructions carried in the HID command message, the CATV optical receiving module performs the operation processing corresponding to the operation instructions, specifically including the following steps: Based on the combination of the command code field, flag field, and parameter field in the HID command message, the CATV optical receiver module performs corresponding operations. The command code for the HID command message is 1, which queries or modifies the device information of the CATV optical receiver module. The command code for the HID command message is 4, which controls the RF output unit of the CATV optical receiver module or modifies the AGC-related parameters of the CATV optical receiver module. The command code for the HID command message is 5, which queries the real-time status of the CATV optical receiver module.
[0009] Preferably, the CATV optical receiving module completes the operation processing according to the operation command and returns a response message assembled based on a custom protocol frame. The response message includes the query result or execution status, and specifically includes the following steps: The CATV optical receiver module completes the operation processing according to the operation instructions and records the operation processing results in the data area of the response message; The response message's parameter fields record the success code. The response message also records the same session number and command code fields as the HID command message. The checksum of the response data area is recalculated and recorded in the response message's data checksum field. The response message is then assembled with data and returned to the ONU host computer.
[0010] Preferably, the custom protocol frame has 64 bytes, including a protocol header and a data area. The first to eighth bytes are the protocol header, and the ninth to sixty-fourth bytes are the data area. The contents transmitted by each byte in the protocol header are the start identifier field, data length field, data verification field, session number field, command code field, flag field, parameter field, and end identifier field.
[0011] Secondly, the present invention discloses a CATV optical receiving module, applicable to the data communication method of the aforementioned CATV optical receiving module, comprising an MCU unit, a PD unit, a TIA unit, and an RF output unit, wherein the TIA unit is connected to the MCU unit, the PD unit, and the RF output unit respectively; The MCU unit is equipped with a USB interface, which connects to the ONU host computer to transmit signals. The PD unit transmits optical signals through the optical fiber.
[0012] Preferably, the MCU unit is equipped with an I2C interface, and the I2C interface transmits signals with the TIA unit.
[0013] Preferably, the MCU unit is equipped with an ADC sampling subunit, which acquires relevant analog signals and calculates the input optical power.
[0014] Thirdly, the present invention discloses a data communication system for a CATV optical receiver module, which includes a data communication method for the CATV optical receiver module.
[0015] Fourthly, the present invention discloses a readable storage medium storing a computer program, which, when executed by a processor, implements the method steps described above.
[0016] The technical solution provided in this application has the following advantages compared with the prior art: This application provides a CATV optical receiving module and its data communication method, system, and storage medium. The method involves receiving HID command messages encapsulated based on a custom protocol frame, first verifying the integrity and legality of the message data, then uniformly executing all operations such as real-time status query, device information query and modification, RF output control, and AGC parameter modification according to the operation instructions in the message. Finally, a response message containing query results or execution status is assembled and returned according to the unified custom protocol frame. This integrates the originally scattered reading, modification, control, and diagnostic functions into a single communication process and frame format. This method consolidates the scattered functions of RF switch, AGC parameters, optical power, output power, temperature, alarms, and diagnostics into a unified custom protocol frame, achieving standardization and integration of query, configuration, control, and diagnostic operations. It solves the defects of scattered functions and chaotic processes. Simultaneously, relying on the unified frame format and verification mechanism, it establishes a standardized error return and status feedback system, significantly improving communication reliability and command execution traceability, and simplifying the communication logic and parsing processing of the host computer software.
[0017] The CATV optical receiver module mentions that the MCU unit is configured with a USB interface to communicate with the ONU host computer. It receives HID command messages in a unified format via the USB interface, centrally scheduling and encapsulating the previously scattered status acquisition, parameter configuration, RF control, and diagnostic reading functions. The hardware structure supports unified command frame execution and unified response return, replacing the traditional method of scattered access to multiple registers and independent communication processes. Through unified scheduling by the MCU unit and standardized transmission via the USB interface, this module integrates the originally scattered register operations and communication processes into a unified module-level interactive interface. This allows the ONU host computer to complete all functional operations without having to adapt to multiple types of registers and multiple communication processes separately. Simultaneously, relying on the unified processing logic within the module to form a standardized error return mechanism reduces communication complexity and improves the consistency, stability, and maintainability of parameter configuration and status reading. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a data communication method for a CATV optical receiver module provided in this application; Figure 2 A flowchart illustrating step S1 of a data communication method for a CATV optical receiver module provided in this application; Figure 3 A flowchart illustrating step S2 of a data communication method for a CATV optical receiver module provided in this application; Figure 4 A flowchart illustrating step S3 of a data communication method for a CATV optical receiver module provided in this application; Figure 5 A communication flowchart of a data communication method for a CATV optical receiver module provided in this application; Figure 6 A structural module diagram of a CATV optical receiver module provided in this application; Figure 7 This application provides an architectural block diagram of a CATV optical receiver module.
[0021] Explanation of reference numerals in the attached figures: 1. CATV optical receiver module; 2. ONU host computer; 11. MCU unit; 111. USB interface; 112. I2C interface; 113. ADC sampling subunit; 12. PD unit; 13. TIA Unit; 14. RF output unit. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] Firstly, see Figures 1-5 This invention discloses a data communication method for a CATV optical receiver module, comprising: Step S1: Receive the HID command message edited according to the custom protocol frame and verify the data of the HID command message; Step S2: In response to the operation instructions carried in the HID command message, the CATV optical receiver module executes the operation processing corresponding to the operation instructions. The operation processing includes querying the real-time status of the CATV optical receiver module, querying or modifying the device information of the CATV optical receiver module, controlling the RF output unit of the CATV optical receiver module, and modifying the AGC related parameters of the CATV optical receiver module. Step S3: The CATV optical receiving module completes the operation processing according to the operation instructions and returns a response message assembled based on the custom protocol frame. The response message includes the query result or execution status.
[0024] Specifically, in step S1, the CATV optical receiver module receives a 64-byte HID command message encapsulated based on a custom protocol frame format from the ONU host computer via the USB interface. First, it verifies the frame format validity byte by byte, checking whether the first byte is a fixed start identifier (0x02) and the eighth byte is a fixed end identifier (0x03) to confirm the frame boundary is valid. Then, it reads the data length field of the second byte and verifies whether its value range is within the valid range. Finally, based on the data length, it extracts the optional data area from the ninth byte to the corresponding end position, recalculates the byte-by-byte XOR check value, and compares it with the data check field of the third byte to complete the data integrity check. If the check passes, it proceeds to the subsequent instruction processing flow; if the check fails, it directly assembles the corresponding error response frame and returns it. Through this three-layer verification mechanism of frame boundary verification, length validity verification, and data integrity verification, invalid frames, out-of-order frames, and corrupted data during transmission are filtered out, and illegal instruction requests are intercepted, ensuring that only messages with compliant format and complete data can enter the subsequent processing stages.
[0025] Specifically, in step S2, after the message verification is successful, the command code field of the 5th byte of the protocol frame is parsed. Combined with the session number field of the 4th byte and the parameter field of the 7th byte, the instructions are classified, distributed, and executed: For real-time status query instructions, the optical power data of the ADC, RF output power and temperature data, and internal alarm status register data are collected synchronously to complete the summary of all status information; for device information read / write instructions, the SN serial number, unique ID, production date, and other traceability information inside the CATV optical receiver module are read or written; for RF output control instructions, the MCU unit sends RF output switch instructions to the TIA unit through the I2C interface; for AGC parameter modification instructions, the MCU unit updates the AGC enable status, offset, and other register configurations of the TIA unit through the I2C interface to complete parameter synchronization. Through a unified instruction distribution logic, the functions of status reading, parameter configuration, RF control, and information reading / writing, which were originally scattered in different registers and different communication processes, are consolidated into a single processing flow, realizing standardized scheduling of multiple operations and shielding the operational details of the underlying hardware registers. It solves the shortcomings of traditional solutions, such as scattered functions and chaotic processes, and realizes integrated management and control of all functions. This allows the ONU host computer to complete all operations without having to adapt to multiple types of registers and multiple communication processes separately. It only needs to use unified command codes to complete all operations, which greatly simplifies the software logic of the host computer, while ensuring the consistency and stability of parameter configuration and status reading.
[0026] Specifically, in step S3, after completing the corresponding operation processing, a 64-byte response message is assembled based on the same custom protocol frame format: the session number field and command code field of the original command frame are reused, and the flag field of the 6th byte is set according to the operation execution result (0x00 represents execution success, 0x80 represents execution failure). If the execution fails, the corresponding error code is filled into the parameter field of the 7th byte; if the execution succeeds, the corresponding sub-parameter is filled into the parameter field. At the same time, the query result, configuration effective status, and other data are filled into the optional data area of bytes 9-64. After recalculating the XOR check value of the data area, the response message is uploaded to the ONU host computer via the USB interface. Through a unified response frame format and a standardized status feedback mechanism, the standardized return of query results, execution status, and error information is realized, establishing a closed-loop communication interaction logic to ensure that the ONU host computer can parse the execution results of all operations through a fixed format. A standardized error return and status feedback system has been established, enabling the ONU host computer to quickly identify command execution results, accurately locate various anomalies such as configuration failure and parameter errors, improve the traceability of communication interaction and the efficiency of fault diagnosis, and realize one-to-one matching of requests and responses to avoid command confusion in multi-session scenarios.
[0027] It is understandable that by receiving HID command messages encapsulated based on a custom protocol frame, the integrity and legality of the message data are first verified. Then, based on the operation instructions in the message, all operations such as real-time status query, device information query and modification, RF output control, and AGC parameter modification are uniformly executed. Finally, a response message containing query results or execution status is assembled and returned according to the unified custom protocol frame. This integrates the originally scattered reading, modification, control, and diagnostic functions into a single communication process and frame format. This method consolidates the scattered functions of RF switch, AGC parameters, optical power, output power, temperature, alarm, and diagnosis into a unified custom protocol frame, achieving standardization and integration of query, configuration, control, and diagnostic operations. It solves the defects of scattered functions and chaotic processes. At the same time, relying on the unified frame format and verification mechanism, a standardized error return and status feedback system is established, which greatly improves communication reliability and command execution traceability, and simplifies the communication logic and parsing processing of the host computer software.
[0028] Specifically, in step S1, the custom protocol frame is 64 bytes long. The custom protocol frame includes a protocol header and a data area. The first to eighth bytes are the protocol header, and the ninth to sixty-fourth bytes are the data area. The contents of each byte in the protocol header are the start identifier field, data length field, data verification field, session number field, command code field, flag field, parameter field, and end identifier field. The data area is used to carry command parameters, status objects, diagnostic data, module information, version strings, or other extended data.
[0029] The custom protocol frame logical format is shown in the table below:
[0030] Step S1 specifically includes the following steps: Step S11: The CATV optical receiver module is powered on. The ONU host computer actively enumerates and identifies the USB device descriptor of the CATV optical receiver module, thereby recognizing the CATV optical receiver module as a custom HID device. Step S12: The ONU host computer edits the HID command message according to the custom protocol frame and sends it to the CATV optical receiver module; Step S13: The CATV optical receiver module verifies the start and end identifier fields of the HID command message and outputs the query results; Step S14: Verify the data area based on the data area verification data of the HID command message, and output the query results; Step S15: When the start identifier and end identifier fields are successfully verified or the data area is successfully verified, a verification success response message is returned to the ONU host computer; Step S16: When the verification of the start identifier and end identifier fails or the data area verification fails, a verification error response message is returned to the ONU host computer. The error code is marked in the flag bit of the verification error response message.
[0031] Specifically, firstly, after the CATV optical receiver module powers on and resets, its MCU initializes the USB FS controller and generates a USB device descriptor. The connected ONU host computer enumerates and identifies the CATV optical receiver module's USB device descriptor, configuring the module as a manufacturer-defined HID device. The USB device descriptor includes a device descriptor, interface descriptor, HID report descriptor, and VID and PID information. The ONU host computer completes device enumeration and identification according to the USB standard protocol, recognizing the CATV optical receiver module as a valid custom HID device and establishing a communication link. This standard USB enumeration enables plug-and-play device identification, eliminating the need for additional interface and driver configuration, thus improving device access convenience and compatibility. Based on the type of operation to be executed, the ONU host computer sequentially fills in the start identifier field, data length field, data verification field, session number field, command code field, flag field, parameter field, and end identifier field according to the custom protocol frame format. The control command or query command is encapsulated into a 64-byte HID command message and sent to the CATV optical receiver module via the USB interface. The CATV optical receiver module's MCU completes standardized instruction framing and distribution according to a unified protocol, ensuring all control and query operations follow the same communication format. This achieves instruction format uniformity, avoiding the parsing chaos caused by traditional multi-register and multi-process methods, and reducing the development and maintenance costs of the host computer software. Then, upon receiving the HID command message, the CATV optical receiver module's MCU reads the start identifier field (byte 1) and end identifier field (byte 8) of the message, comparing them with fixed values 0x02 and 0x03 respectively to determine the validity of the frame header and trailer, and outputs the identifier verification result. This allows for rapid determination of whether the message is a valid protocol frame, filtering transmission noise, incomplete data, and illegal messages, reducing invalid processing steps. Rapid frame boundary verification improves protocol processing efficiency, prevents illegal data from entering subsequent processes, and enhances the system's anti-interference capability. After successful frame header and trailer verification, the CATV optical receiver module's MCU reads the data length field of the command message to determine the valid location and length of the data area. It then performs a byte-by-byte XOR calculation on the data area content, compares the resulting checksum with the data area checksum field in the message, completes the data area integrity verification, and outputs the verification result. The system verifies whether data has been tampered with, lost, or misaligned during transmission to ensure the command payload is authentic and valid. Data verification guarantees command reliability, preventing parameter configuration errors or status reading errors due to transmission mistakes, thus improving communication stability. Finally, when both the start and end identifiers are valid and the data area integrity verification passes, the MCU of the CATV optical receiver module confirms the validity of the current command message, assembles a successfully verified response message according to the custom protocol frame format, and returns it to the ONU host computer via the USB interface, indicating that the message is valid and execution can continue.This system achieves feedback of verification results to the host computer, forming a standardized verification response mechanism. This ensures that the host computer recognizes that the command has been correctly received and can proceed to the execution phase, guaranteeing an orderly and traceable communication process. When the start and end identifiers do not match, or the data area verification results are inconsistent, the MCU of the CATV optical receiver module determines the command message is invalid. It assembles a verification error response message according to a custom protocol frame format, marks the error status in the flag bits of the response message, fills in the corresponding error code in the parameter field, and returns it to the ONU host computer via the USB interface. This clearly feeds back the verification failure type to the host computer, supporting rapid location of the cause of the anomaly. This standardized error return mechanism facilitates the host computer's identification of transmission errors, format errors, and other problems, improving fault diagnosis efficiency and system maintainability.
[0032] In the USB device descriptor, a device category field set to 0 indicates that the device category is specified by the interface descriptor; an interface category field of 0x03 indicates a HID class device; and both the interface subclass field and the interface protocol field are 0x00, indicating that standard keyboard, mouse, or other boot protocols are not used. The VID (device manufacturer) and PID (specific product model) of this USB device are as follows: VID: 0x546D; PID: 0x210A.
[0033] The HID report descriptor uses the manufacturer-defined purpose page 0xFF00. The report size is 8 bits, and the number of reports is 64, therefore a single HID report is 64 bytes long. This report defines both output and input reports, used to carry command messages from the ONU to the CATV module, and response messages from the CATV optical receiver module to the ONU. In the current configuration, the USB configuration descriptor contains one interface. Endpoint 0 is used for USB control transfers and HID class requests; endpoint 1 is an IN direction interrupt endpoint with address 0x81, a maximum packet length of 64 bytes, and a polling interval of 1ms. The firmware also retains an optional OUT interrupt endpoint configuration; when dual-endpoint configuration is enabled, an OUT direction interrupt endpoint can be added for host-to-device data transfer. Through the above descriptor design, the ONU host computer can identify the CATV optical receiver module as a manufacturer-defined HID device and identify and manage the module based on the VID / PID, product string, serial number string, or the module SN read by subsequent custom commands.
[0034] When an error occurs, the response message records the error code and performs the following operations: The flag field in the response message is marked 0x80 to indicate command execution failure; the parameter field in the response can carry the corresponding error code. The error codes and their meanings are as follows: Error code 0: Success; Error code 1: Data verification failed; Error code 2: Invalid data; Error code 3: Invalid data length; Error code 4: Invalid parameter; Error code 5: Invalid index; Error code 6: Invalid range; Error code 7: Operation failed; Error code 8: Invalid offset; Error code 9: Buffer overflow; Error code 10: No available buffer; Error code 11: Write failed; Error code 255: Unknown command.
[0035] Through the above error handling mechanism, the ONU host computer can clearly distinguish abnormal scenarios such as communication errors, data format errors, parameter errors, write failures, and unknown commands, thereby improving the diagnosability and reliability of the host control software.
[0036] Step S2 specifically includes the following steps: Step S21: Based on the combination of the command code field, flag field, and parameter field in the HID command message, the CATV optical receiving module performs corresponding operation processing; Step S22: The command code of the HID command message is 1, querying or modifying the device information of the CATV optical receiver module; Step S23: The command code of the HID command message is 4, which controls the RF output unit of the CATV optical receiver module or modifies the AGC related parameters of the CATV optical receiver module; Step S24: The command code of the HID command message is 5, querying the real-time status of the CATV optical receiver module.
[0037] Specifically, firstly, after verifying the legality of the command message, the MCU of the CATV optical receiver module parses the command code field, flag field, and parameter field within the HID command message. Based on the combination of these three fields, it determines the operation type, execution permission, and specific sub-function of the current instruction, and then enters the corresponding command processing branch to execute the matching operation. This step achieves accurate command distribution and branch scheduling, unifying scattered functional operations into a single instruction parsing logic to complete command type identification and task allocation. Through multi-field joint parsing, unambiguous instruction distribution is achieved, ensuring the orderly execution of various control and query operations, avoiding command confusion and misoperation, and improving system execution reliability.
[0038] When the command code in the HID command message is 1, the MCU of the CATV optical receiver module further locates the information item to be queried or modified based on the parameter fields in the message. It reads device information such as firmware version, build date, hardware type, and MCU unique ID from the module's internal storage area, or writes the device information to the designated storage area according to the data area content, completing the query or modification operation of device information. This operation enables unified management of module identity and version information, providing data support for device identification, production traceability, and version compatibility judgment. The dedicated command code standardizes information operations, allowing information reading and writing to be completed without accessing distributed registers, facilitating production configuration and after-sales maintenance tracking.
[0039] Specifically, when the command code of the HID command message is 4, the MCU of the CATV optical receiver module parses the control parameters in the message data area and selectively executes RF output unit switch control or AGC-related parameter modification based on the valid flag bits. For RF output control, the MCU updates the RF enable state and synchronizes it to the RF channel. For AGC parameter modification, the MCU updates the AGC enable, AGC offset, receive offset, transmit offset, and other configurations and synchronizes them to the TIA chip to implement the new gain control strategy. This operation integrates RF path control and automatic gain adjustment functions into a single setting command, achieving unified configuration of the hardware execution unit. This unified command can simultaneously support RF control and AGC adjustment, simplifying the host computer control logic, reducing hardware operation complexity, and improving parameter configuration efficiency and consistency.
[0040] Specifically, when the command code in the HID command message is 5, the MCU of the CATV optical receiver module uniformly collects and summarizes the module's real-time operating data, including received optical power, RF output power, TIA chip temperature, alarm status, RF operating status, AGC enable and offset status, gain limit, and other operating parameters, completing a full-dimensional real-time status query. This operation integrates multiple previously scattered operating statuses into a single command, providing complete real-time data for host computer monitoring, fault diagnosis, and remote diagnostics. A single command can retrieve the entire set of status information, reducing communication interactions, improving status refresh efficiency, and facilitating rapid identification of operational anomalies and fault causes.
[0041] The ONU host computer executes instructions through different codes in the HID command message. Specific operations include: 1. To check the firmware version number of the CATV optical receiver module, perform the following operations: The input command code field 1 reads the firmware version number of the CATV optical receiver module. Different information items can be specified by inputting different parameter fields. The version-related information that can be queried includes: Input parameter field 1 retrieves the firmware version string; Input parameter field 4 retrieves the firmware version byte array; Input parameter field 2 retrieves the firmware build date string; Input parameter field 3 retrieves the firmware commit hash string; Input parameter field 14 retrieves the hardware motherboard type. When processing this command, the CATV optical receiver module reads the version information from the application information area or compilation configuration and writes it to the data area of the response frame. That is, the ONU host computer can use this information to determine the current firmware version of the CATV optical receiver module, facilitating version compatibility assessment, maintenance records, and after-sales service location.
[0042] 2. To query the device serial number (SN) and unique ID of the CATV optical receiver module, perform the following operations: The input command code field is 1, the parameter field is 5, and it can read the 12-byte unique ID from the MCU unit or CATV optical receiver module's operating data; Enter command code field 6 to read the contents of the information area in the MCU unit or CATV optical receiver module, including 16-byte SN serial number, 8-byte production date, 16-byte order number, 16-byte manufacturer information, etc., to realize module production and after-sales traceability.
[0043] It is understandable that, through the above method, the ONU host computer can read the unique SN or unique ID of the CATV optical receiver module via the USB interface without disassembling the device or relying on manual tag identification, and associate it with the ONU device, production batch, order information, firmware version and operating status.
[0044] 3. To check the real-time status of the CATV optical receiver module, perform the following operations: Enter command code 5 to read the current operating status of the CATV module. The CATV optical receiver module returns a real-time parameter object, where the real-time status includes: alarm status, received optical power, RF output power, RF status, TIA chip temperature, MCU temperature or initialization temperature, MCU authentication status, ONU authentication status, gain limit, AGC offset, and AGC enable status.
[0045] Through this real-time status query mechanism, the ONU host computer can periodically read the operating status of the CATV optical receiver module and use it for page display, alarm judgment, remote diagnosis and fault location.
[0046] 4. To control the RF switch of the CATV optical receiver module, perform the following operations: Entering command code field 4 can control the RF output switch of the CATV optical receiver module. The data area of this command carries the working status object, which includes the RF1 enable field and the RF2 enable field.
[0047] When the CATV optical receiver module receives the working status setting command, it first verifies the data length and object length fields.
[0048] With the command code field set to 4 and the flag field set to 1, the CATV optical receiver module updates the RF1 target enable state based on the value of this field and sets the RF update flag. Subsequently, the main loop or related control flow controls the TIA unit or related RF output circuit according to the RF update flag, turning the RF output on or off. This mechanism allows the ONU-side software to control the RF output state of the CATV optical receiver module without directly accessing its registers or understanding the RF control circuit; it can do so simply through unified USB commands.
[0049] 5. To modify AGC-related parameters, perform the following operations: Enter command code 4 to modify AGC-related parameters. The working status object includes fields such as AGC enable, AGC offset, receive offset, and transmit offset.
[0050] After receiving the command, the MCU selectively updates the corresponding parameters based on the valid flags of each field: When the AGC enable field is valid, update the AGC enable status; When the AGC offset field is valid, update the AGC offset value; When the receive offset or transmit offset field is valid, the receive or transmit offset is updated and the AGC offset update is triggered. After the MCU unit updates the parameters, the corresponding global flag is set. The subsequent AGC processing flow adjusts the control parameters according to these flags and synchronizes them to the TIA unit or RF-related control unit through the I2C interface or internal control flow.
[0051] 6. To write module information, perform the following operations: Input command code field: 9. The ONU host computer can write module information via the module information command. The module information structure includes fields such as unique ID, production date, serial number (SN), order number, manufacturer information, function code, interface mode, and hardware version. In production or maintenance scenarios, this mechanism can be used to write data such as module SN, order number, production date, and manufacturer information. In the ONU host computer's operation scenario, this mechanism can be used to read module identity information and configuration parameters, thereby enabling device traceability, batch management, and fault tracking.
[0052] Step S3 specifically includes the following steps: Step S31: The CATV optical receiving module completes the operation processing according to the operation command and records the operation processing result in the data area of the response message; Step S32: The parameter field of the response message records the success code. The response message records the session number field and command code field, which are the same as those in the HID command message. The check value of the response data area is recalculated and recorded in the data check field of the response message. The response message is assembled with data and returned to the ONU host computer.
[0053] Specifically, firstly, after completing the operation processing corresponding to the command code, the MCU of the CATV optical receiver module writes the real-time status, device information, or execution results of parameter configuration, RF control, and AGC modification obtained from the query into the data area of the response message according to the data structure specified by the custom protocol frame, thus completing the standardized carrying of the operation results. The output information of various operations is uniformly stored in a fixed-format data area, ensuring that the host computer can parse all returned content according to unified rules. By encapsulating the results in a unified data area, standardized output of query data and execution status is achieved, solving the problems of scattered return information and difficult parsing in traditional solutions. Then, the MCU of the CATV optical receiver module fills the operation execution success code into the parameter field of the response message, while ensuring that the response message, session number field, and command code field are completely consistent with the received HID command message, ensuring accurate correspondence between request and response. The MCU re-performs a byte-by-byte XOR calculation on the data area with the filled results, writes the new checksum into the data check field of the response message, completing the integrity encapsulation of the entire frame of data. The MCU assembles the complete response message according to the custom protocol frame format and returns it to the ONU host computer via the USB interface. Establish a unique correspondence between requests and responses, complete the legality encapsulation of response frames and realize result feedback. By maintaining consistency between sessions and commands and recalculating check values, ensure that the response frame format is legal and the data is reliable, realize reliable closed-loop feedback of instructions, and improve the accuracy and traceability of communication.
[0054] Secondly, see Figures 6-7This invention discloses a CATV optical receiving module 1, applicable to the data communication method of the aforementioned CATV optical receiving module 1. It includes an MCU unit 11, a PD unit 12, a TIA unit 13, and an RF output unit 14. The TIA unit 13 is connected to the MCU unit 11, the PD unit 12, and the RF output unit 14. The MCU unit 11 is used to collect the module's operating status, control the chip of the TIA unit 13, manage AGC parameters, and perform alarm judgments. The MCU unit 11 uses a CH32X033F8P6 chip. The TIA (transimpedance amplifier) unit is used to amplify, adjust the gain, and RF the weak electrical signal output by the PD (photodiode) unit. The output processing unit has a built-in TIA (transimpedance amplifier) or optical receiver amplifier chip. The TIA unit 13 uses the RT990 chip. The PD unit 12 has a photodiode that converts the optical signal transmitted from the optical fiber into a PD electrical signal. At the same time, it reflects the 1310nm and 1490nm light in the optical signal, retains the 1550nm light, and transmits it to the TIA unit 13. The RF output unit 14 has a built-in RF output terminal to transmit signals with an external coaxial link.
[0055] The MCU unit 11 is equipped with a USB interface 111, which connects to the ONU host computer 2 for signal transmission. The PD unit 12 transmits optical signals to the optical fiber. Specifically, the ONU host computer 2 acts as the USB host-side control terminal, used to identify the USB CATV optical receiver module 1 and send query commands or control commands to the module through the manufacturer-defined USB HID command message. The ONU-side host software is also used to receive status data, diagnostic data, version information, and module identity information returned by the CATV optical receiver module 1. In particular, the USB interface 111 adopts a USB FS (Full-Speed) interface, a full-speed interface with a rate of 12 Mbps in the USB 2.0 standard, integrated on the chip of the MCU unit 11.
[0056] Specifically, the MCU unit 11 is configured with a USB interface 111 to communicate with the ONU host computer 2. It receives HID command messages in a unified format via the USB interface 111, centrally scheduling and encapsulating the previously dispersed status acquisition, parameter configuration, RF control, and diagnostic reading functions. This hardware structure supports unified command frame execution and unified response return, replacing the traditional method of dispersed access to multiple registers and independent communication processes. Through the unified scheduling of the MCU unit 11 and the standardized transmission of the USB interface 111, this module integrates the originally dispersed register operations and communication processes into a unified module-level interactive interface. This allows the ONU host computer 2 to complete all functional operations without separately adapting to multiple types of registers and multiple communication processes. Simultaneously, relying on the unified processing logic within the module to form a standardized error return mechanism reduces communication complexity and improves the consistency, stability, and maintainability of parameter configuration and status reading.
[0057] The MCU unit 11 is equipped with an I2C interface 112 and an ADC sampling subunit 113. The I2C interface 112 transmits signals to the TIA unit 13, and the ADC sampling subunit 113 acquires relevant analog signals and calculates the input optical power. Specifically, the MCU unit 11 transmits signals to the TIA unit 13 through the I2C interface 112 to manage the TIA unit 13, and acquires relevant analog signals and calculates the input optical power through the built-in ADC sampling subunit 113.
[0058] It is understood that in the CATV optical receiving module 1, the PD unit 12 receives 1550nm light and outputs an electrical signal to the TIA unit 13; the TIA unit 13 performs transimpedance amplification, gain processing and RF output on the electrical signal; the MCU unit 11 manages the TIA unit 13 through the built-in I2C interface 112, samples the relevant analog signals of the ADC subunit 113 and calculates the input optical power, and communicates with the ONU host computer 2 through the USB interface 111.
[0059] Thirdly, the present invention discloses a data communication system for a CATV optical receiver module, which includes the data communication method for a CATV optical receiver module disclosed in the first aspect.
[0060] Specifically, the third aspect implements the method disclosed in the first aspect. This method involves receiving USBHID command messages encapsulated based on a custom protocol frame, first verifying the integrity and legality of the message data, then uniformly executing all operations such as real-time status query, device information query and modification, RF output control, and AGC parameter modification according to the operation instructions in the message. Finally, it assembles and returns a response message containing query results or execution status according to the unified custom protocol frame, integrating the originally scattered reading, modification, control, and diagnostic functions into a single communication process and frame format. This method consolidates the scattered functions of RF switch, AGC parameters, optical power, output power, temperature, alarm, and diagnostics into a unified custom protocol frame, achieving standardization and integration of query, configuration, control, and diagnostic operations. It solves the defects of scattered functions and chaotic processes. Simultaneously, relying on the unified frame format and verification mechanism, it establishes a standardized error return and status feedback system, significantly improving communication reliability and command execution traceability, and simplifying the communication logic and parsing processing of the host computer software.
[0061] Fourthly, the present invention discloses a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the data communication method for a CATV optical receiving module as described above.
[0062] Specifically, the fourth aspect implements the method disclosed in the first aspect. This method involves receiving USBHID command messages encapsulated based on a custom protocol frame, first verifying the integrity and legality of the message data, then uniformly executing all operations such as real-time status query, device information query and modification, RF output control, and AGC parameter modification according to the operation instructions in the message. Finally, it assembles and returns a response message containing query results or execution status according to the unified custom protocol frame, integrating the originally scattered reading, modification, control, and diagnostic functions into a single communication process and frame format. This method consolidates the scattered functions of RF switch, AGC parameters, optical power, output power, temperature, alarms, and diagnostics into a unified custom protocol frame, achieving standardization and integration of query, configuration, control, and diagnostic operations. It solves the defects of scattered functions and chaotic processes. Simultaneously, relying on the unified frame format and verification mechanism, it establishes a standardized error return and status feedback system, significantly improving communication reliability and command execution traceability, and simplifying the communication logic and parsing processing of the host computer software.
[0063] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0064] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," and "counterclockwise," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0065] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0066] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0067] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature directly below or diagonally below the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.
[0068] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. The illustrative expressions of the above terms in this specification should not be construed as necessarily referring to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification.
[0069] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Since these modifications and variations fall within the scope of the claims and their equivalents, this invention also intends to include these modifications and variations.
[0070] The above description describes specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data communication method for a CATV optical receiver module, characterized in that, include, Receive HID command messages edited according to a custom protocol frame and verify the data in the HID command messages; In response to the operation instructions carried in the HID command message, the CATV optical receiver module executes the operation processing corresponding to the operation instructions. The operation processing includes querying the real-time status of the CATV optical receiver module, querying or modifying the device information of the CATV optical receiver module, controlling the RF output unit of the CATV optical receiver module, and modifying the AGC related parameters of the CATV optical receiver module. The CATV optical receiver module completes the operation processing according to the operation instructions and returns a response message assembled based on a custom protocol frame. The response message includes the query result or execution status.
2. The method according to claim 1, characterized in that, Receiving HID command messages edited according to a custom protocol frame, and verifying the CATV optical receiver module according to the instructions in the HID command messages, specifically includes the following steps: When the CATV optical receiver module is powered on, it sends a USB device descriptor to the connected ONU host computer. The ONU host computer recognizes the CATV optical receiver module as a custom HID device. The ONU host computer edits the HID command message according to the custom protocol frame and sends it to the CATV optical receiver module. The CATV optical receiver module verifies the start and end identifier fields of the HID command message and outputs the query results. Verify the data area based on the data area verification data of the HID command message, and output the query results; When the start identifier and end identifier fields are successfully verified or the data area is successfully verified, a successful verification response message is returned to the ONU host computer. When the start and end identifiers fail to be verified or the data area fails to be verified, a verification error response message is returned to the ONU host computer. The error code is marked in the verification error response message.
3. The method according to claim 1, characterized in that, In response to the operation instructions carried in the HID command message, the CATV optical receiver module executes the operation processing corresponding to the operation instructions, specifically including the following steps: Based on the combination of the command code field, flag field, and parameter field in the HID command message, the CATV optical receiver module performs corresponding operations. The command code for the HID command message is 1, which queries or modifies the device information of the CATV optical receiver module. The command code for the HID command message is 4, which controls the RF output unit of the CATV optical receiver module or modifies the AGC-related parameters of the CATV optical receiver module. The command code for the HID command message is 5, which queries the real-time status of the CATV optical receiver module.
4. The method according to claim 1, characterized in that, The CATV optical receiver module completes the operation processing according to the operation command and returns a response message assembled based on a custom protocol frame. The response message includes the query result or execution status, and specifically includes the following steps: The CATV optical receiver module completes the operation processing according to the operation instructions and records the operation processing results in the data area of the response message; The response message's parameter fields record the success code. The response message also records the same session number and command code fields as the HID command message. The checksum of the response data area is recalculated and recorded in the response message's data checksum field. The response message is then assembled with data and returned to the ONU host computer.
5. The method according to claim 1, characterized in that, A custom protocol frame is 64 bytes long. The custom protocol frame includes a protocol header and a data area. The first eight bytes are the protocol header, and the ninth to sixty-fourth bytes are the data area. The contents transmitted by each byte in the protocol header are the start identifier field, data length field, data verification field, session number field, command code field, flag field, parameter field, and end identifier field.
6. A CATV optical receiver module, applicable to the data communication method of the CATV optical receiver module according to any one of claims 1-5, characterized in that, It includes an MCU unit, a PD unit, a TIA unit, and an RF output unit. The TIA unit is connected to the MCU unit, the PD unit, and the RF output unit, respectively. The MCU unit is equipped with a USB interface, which connects to the ONU host computer to transmit signals. The PD unit transmits optical signals through the optical fiber.
7. The CATV optical receiving module according to claim 6, characterized in that, The MCU unit is equipped with an I2C interface, which transmits signals to the TIA unit.
8. The CATV optical receiving module according to claim 6, characterized in that, The MCU unit is equipped with an ADC sampling subunit, which acquires relevant analog signals and calculates the input optical power.
9. A data communication system for a CATV optical receiver module, characterized in that, The data communication method of a CATV optical receiving module as described in any one of claims 1-5.
10. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-5.