Method for limiting FTTR main and sub gateway networking mode
By introducing the MQTT protocol and networking capability model into the FTTR system, the problem of FTTR networking automatically switching to wireless connection when a link fails is solved, achieving more stable network connection and flexible connection configuration, improving user experience and operator management efficiency.
Patent Information
- Application Number
- CN202511169378.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-20
- Publication Date
- 2025-10-17
AI Technical Summary
Existing FTTR networking technology automatically switches to wireless connection when the primary and secondary gateway links fail, resulting in a decline in user experience quality and a lack of flexible connection configuration mechanism.
By establishing a communication channel based on the MQTT protocol between the main gateway and the sub-gateway, three networking capability modes are configured: the first mode (optical fiber, Ethernet wired, and wireless, with the priority being optical fiber > Ethernet wired > wireless), the second mode (optical fiber, Ethernet wired), and the third mode (optical fiber only). The networking capability modes are synchronized through the MQTT protocol, and the sub-gateways attempt to network according to priority or prompt an exception.
It enhances the ability to perceive and manage network status, reduces user complaints caused by abnormal switching, reduces the operation and maintenance burden, and improves the stability of network quality and user satisfaction.
Smart Images

Figure CN120812427A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communications, and in particular to a method for limiting FTTR master-sub gateway networking modes. Background Art
[0002] With the development of fiber-to-the-room (FTTR) technology, home network configurations are becoming increasingly diverse. The master-sub gateway model has become the mainstream solution for home networking. In FTTR networking, the master gateway is typically connected to the carrier network, while the sub-gateways connect to the master gateway via fiber, wired, or wireless connections, jointly building full-home network coverage.
[0003] However, existing FTTR networking technology has a significant problem: when the fiber or wired connection between the primary and secondary gateways fails, the system automatically switches to wireless mode to maintain network connectivity. While this automatic switching mechanism ensures basic network connectivity, wireless connections are far inferior to wired connections in terms of bandwidth, stability, and interference resistance, resulting in a significant decline in user experience quality. Furthermore, because this switching process is invisible to users, they often have no idea that the physical link has failed and only experience a decrease in network performance, which can lead to complaints, increase maintenance costs for operators, and risk a decline in user satisfaction.
[0004] Furthermore, existing technologies lack an effective mechanism to restrict sub-gateway connection methods, making it impossible to flexibly configure permitted connection methods based on different scenarios and requirements. For example, in some applications with extremely high network quality requirements, it may be desirable to only allow fiber connections, without automatically downgrading to other connection methods in the event of a fiber failure. Or in some environments, it may be desirable to allow fiber and wired connections, but prohibit wireless connections to avoid wireless interference. Summary of the Invention
[0005] Technical problem solved by the present invention: The present invention provides a method for limiting the networking mode of FTTR master and sub-gateways, solving the problem that the existing sub-gateways automatically switch to an unexpected connection mode when a link fails.
[0006] The present invention solves the above technical problems by adopting a technical solution: providing a method for limiting the networking mode of FTTR master and slave gateways, comprising the following steps: S1. Establish a communication channel between the main gateway and the sub-gateway based on the MQTT protocol; S2, configuring a networking capability mode in the master gateway, the networking capability mode including three networking capability modes, respectively one of a first mode, a second mode and a third mode; the first mode including optical fiber, Ethernet wired and wireless, and the priority being optical fiber > Ethernet wired > wireless; the second mode including optical fiber and Ethernet wired, and the priority being optical fiber > Ethernet wired; the third mode being optical fiber only; S3, the sub-gateway obtaining the configured networking capability mode through the MQTT protocol, and networking with the master gateway according to the configured networking capability mode.
[0007] Further, S1 specifically includes: S11, the sub-gateway sending a CONNECT message to the master gateway, the CONNECT message including sub-gateway identity information; S12, the master gateway confirming to establish a connection after verifying the sub-gateway identity information successfully; S13, the sub-gateway subscribing to a networking capability mode topic of the master gateway, and the master gateway subscribing to a state topic of the sub-gateway.
[0008] Further, in S2, configuring the networking capability mode in the master gateway includes the following steps: S21, the master gateway providing a configuration interface, and a user configuring a corresponding networking capability mode in the configuration interface according to a demand, to obtain a configured networking capability mode; S22, the master gateway formatting the configured networking capability mode into a JSON format message, and publishing the JSON format message to a networking capability mode topic through the MQTT protocol.
[0009] Further, in S3, the sub-gateway obtaining the networking capability mode through the MQTT protocol includes: the sub-gateway sending a networking capability mode synchronization request message to the master gateway, obtaining the JSON format message in the networking capability mode topic, and obtaining the configured networking capability mode.
[0010] Further, in S3, networking with the master gateway according to the configured networking capability mode includes: If the configured networking capability mode is the first mode, the sub-gateway first attempts optical fiber networking, if the networking quality does not meet the requirement or the networking is interrupted, then attempts Ethernet wired networking, if the networking quality does not meet the requirement or the networking is interrupted, then attempts wireless networking, if the wireless networking quality does not meet the requirement or the networking is interrupted, then periodically re-attempts networking according to the priority or prompts that the networking quality does not meet the requirement or the networking is interrupted; If the configured networking capability mode is the second mode, the sub-gateway will first try optical fiber networking. If the network quality does not meet the requirements or the network is interrupted, it will try Ethernet wired networking. If the Ethernet wired network quality does not meet the requirements or the network is interrupted, it will periodically retry networking according to priority or prompt that the network quality does not meet the requirements or the network is interrupted; If the configured networking capability mode is the third mode, the sub-gateway attempts to connect to the optical fiber network. If the optical fiber network quality does not meet the requirements or the network is interrupted, the sub-gateway remains disconnected and prompts a link abnormality.
[0011] Beneficial effects of the present invention: The present invention provides a method for limiting the networking mode of FTTR master-sub gateways, by configuring the networking capability mode according to demand in the main network management, the sub-gateway obtains the configured networking capability mode through the MQTT protocol, and is networked with the main gateway according to the configured networking capability mode, the networking capability mode includes three networking capability modes, which are one of the first mode, the second mode and the third mode; the first mode includes optical fiber, Ethernet wired and wireless, and the priority is optical fiber > Ethernet wired > wireless; the second mode includes optical fiber and Ethernet wired, and the priority is optical fiber > Ethernet wired; the third mode is optical fiber only; in this way, by configuring the corresponding networking capability mode, the perception and management capabilities of the network status are enhanced, user complaints caused by abnormal switching are reduced, the operation and maintenance burden and potential service risks are reduced, and the problem that the existing sub-gateway automatically switches to a connection mode that does not meet expectations when a link fails is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 The present invention provides a flow chart of a method for limiting the networking mode of FTTR master and slave gateways. DETAILED DESCRIPTION
[0013] The present invention aims to solve the problem that the existing sub-gateway automatically switches to an undesirable connection mode when a link fails, and provides a method for limiting the networking mode of the FTTR master sub-gateway, such as Figure 1 As shown, the following steps are included: S1. Establish a communication channel based on the MQTT protocol between the main gateway and the sub-gateway.
[0014] Specifically, the FTTR (Fiber To The Room) system is composed of a master gateway and multiple sub-gateways. The master gateway is usually connected to the operator's fiber-to-the-home port and is responsible for the management and control of the entire home network; the sub-gateway is distributed in different rooms of the home and is responsible for expanding the network coverage. In order to realize efficient communication between the master and sub-gateways, a communication channel based on the MQTT (Message Queuing Telemetry Transport) protocol is first established.
[0015] The MQTT protocol is a lightweight publish / subscribe message transmission protocol, especially suitable for resource-constrained devices and low-bandwidth, high-latency or unreliable network environments. In the FTTR system, the master gateway acts as an MQTT server (Broker), and the sub-gateway acts as an MQTT client.
[0016] Establishing a communication channel between the master gateway and the sub-gateway based on the MQTT protocol includes the following steps: S11, the sub-gateway sends a CONNECT message to the master gateway, the CONNECT message including sub-gateway identity information, the sub-gateway identity information including the MAC address, serial number and authentication information of the sub-gateway, etc.; S12, the master gateway verifies the sub-gateway identity information successfully, and confirms the establishment of the connection; S13, the sub-gateway subscribes to the master gateway's networking capability mode topic, and the master gateway subscribes to the sub-gateway's state topic.
[0017] Specifically, the networking capability mode topic such as "fttr / config / networking_capability" is used to receive the configured networking capability mode, and the sub-gateway's state topic such as "fttr / status / gateway / {gateway_id}" is used to monitor the sub-gateway state. In this way, a reliable and real-time bidirectional communication channel is established between the master gateway and the sub-gateway, providing a foundation for subsequent synchronization of the networking capability mode.
[0018] S2, configure the networking capability mode in the master gateway, the networking capability mode including three networking capability modes, one of which is the first mode, the second mode and the third mode; the first mode includes fiber, Ethernet wired and wireless, and the priority is fiber > Ethernet wired > wireless; the second mode includes fiber and Ethernet wired, and the priority is fiber > Ethernet wired; the third mode is fiber only.
[0019] Specifically, the networking capability mode defines the networking mode that the sub-gateway can use, as well as the priority of the networking mode, which is the key configuration to control the networking behavior. Configuring the networking capability mode in the master gateway includes the following steps: S21, the master gateway provides a configuration interface, such as a Web management interface, and a user configures a corresponding networking capability mode in the configuration interface according to a requirement, obtains a configured networking capability mode, and the configured networking capability mode is one of the three networking capability modes; S22, the master gateway formats the configured networking capability mode into a JSON format message and publishes the JSON format message to a networking capability mode topic through an MQTT protocol.
[0020] Specifically, the key field corresponding to the first mode is "fiber_ethernet_wireless". The key field corresponding to the second mode is "fiber_ethernet". The key field corresponding to the third mode is "fiber_only". In this way, the master gateway can centrally manage the networking strategy of the entire FTTR system and ensure that all sub-gateways follow a unified networking rule, that is, a unified networking capability mode.
[0021] When the configured networking capability mode of the master gateway changes, only the corresponding key field needs to be changed to update the configured networking capability mode in the networking capability mode topic.
[0022] S3, the sub-gateway obtains the configured networking capability mode through the MQTT protocol and performs networking with the master gateway according to the configured networking capability mode.
[0023] Specifically, the sub-gateway obtains the configured networking capability mode through the MQTT protocol, including that the sub-gateway sends a networking capability mode synchronization request message to the master gateway, acquires the JSON format message in the networking capability mode topic, and obtains the configured networking capability mode. The sub-gateway can also automatically receive the JSON format message in the networking capability mode topic and obtain the configured networking capability mode. The sub-gateway saves the received networking capability mode in a local storage so that the correct networking capability mode can still be applied after the network is disconnected or restarted.
[0024] According to the configured networking capability mode, the sub-gateway performs networking with the master gateway, including: If the configured networking capability mode is the first mode, in this mode, the sub-gateway can use optical fiber, Ethernet wired or wireless networking to perform networking with the master gateway. According to the priority, the sub-gateway first tries optical fiber networking, if the networking quality does not meet the requirements or the networking is interrupted, it tries Ethernet wired networking, if the networking quality does not meet the requirements or the networking is interrupted, it tries wireless networking, if the wireless networking quality does not meet the requirements or the networking is interrupted, it periodically reattempts networking according to the priority or prompts that the networking quality does not meet the requirements or the networking is interrupted; If the configured networking capability mode is the second mode, in which the sub-gateway can use fiber or Ethernet wired to network with the master gateway, the sub-gateway first tries fiber networking, if the networking quality does not meet the requirements or the networking is interrupted, then tries Ethernet wired networking, if the Ethernet wired networking quality does not meet the requirements or the networking is interrupted, then periodically re-tries networking according to the priority or prompts that the networking quality does not meet the requirements or the networking is interrupted. If the configured networking capability mode is the third mode, such as 8K video transmission, cloud game and other application scenarios with high network performance and security requirements, in which the sub-gateway can only use fiber to network with the master gateway, the sub-gateway tries fiber networking, if the fiber networking quality does not meet the requirements or the networking is interrupted, then the sub-gateway remains in a disconnected state and prompts that the link is abnormal.
[0025] Specifically, the networking quality does not meet the requirements, which can be judged by physical layer detection, link layer detection and network layer detection, such as monitoring the signal strength (Rx Power) and transmission power (Tx Power) of the optical module, detecting optical signal loss, monitoring bit error rate, monitoring Ethernet link state, monitoring Ethernet frame error rate, detecting MQTT connection state, etc.
[0026] The prompt can use different light colors or flashing modes of the LED to make corresponding prompts.
[0027] Specifically, the connection mode can be limited by disabling the corresponding hardware interface, or by the priority and availability of the network interface.
[0028] In particular, when establishing a communication channel between the master gateway and the sub-gateway based on the MQTT protocol, any one of fiber, Ethernet wired and wireless connection mode can be used, after the sub-gateway obtains the configured networking capability mode, the connection mode is changed according to the configured networking capability mode, and the networking is completed.
Claims
1. A method for limiting the networking mode of FTTR master and slave gateways, characterized in that: The following steps are involved: S1. Establish a communication channel between the main gateway and the sub-gateway based on the MQTT protocol; S2. Configuring a networking capability mode on the primary gateway. The networking capability mode includes three networking capability modes, namely, a first mode, a second mode, and a third mode. The first mode includes optical fiber, Ethernet wired, and wireless, and the priority is optical fiber > Ethernet wired > wireless. The second mode includes optical fiber and Ethernet wired, and the priority is optical fiber > Ethernet wired. The third mode is optical fiber only. S3. The sub-gateway obtains the configured networking capability mode through the MQTT protocol, and forms a network with the main gateway based on the configured networking capability mode.
2. The method for limiting the FTTR master-sub gateway networking mode according to claim 1 is characterized in that: S1 specifically includes: S11. The sub-gateway sends a CONNECT message to the main gateway, where the CONNECT message includes the sub-gateway identity information. S12. After the main gateway successfully verifies the identity information of the sub-gateway, it confirms the establishment of the connection; S13. The sub-gateway subscribes to the main gateway's networking capability mode topic, and the main gateway subscribes to the sub-gateway's status topic.
3. The method for limiting the FTTR master-sub gateway networking mode according to claim 2, characterized in that: In S2, configure the networking capability mode on the primary gateway, including the following steps: S21. The main gateway provides a configuration interface. The user configures the corresponding networking capability mode in the configuration interface according to the needs and obtains the configured networking capability mode; S22. The main gateway formats the configured networking capability mode into a JSON format message and publishes the JSON format message to the networking capability mode topic through the MQTT protocol.
4. The method for limiting the FTTR master-sub gateway networking mode according to claim 3 is characterized in that: In S3, the sub-gateway obtains the networking capability mode through the MQTT protocol, including: the sub-gateway sends a networking capability mode synchronization request message to the main gateway, obtains the JSON format message in the networking capability mode topic, and obtains the configured networking capability mode.
5. The method for limiting the FTTR master-sub gateway networking mode according to claim 3 is characterized in that: In S3, networking is performed with the primary gateway according to the configured networking capability mode, including: If the configured networking capability mode is the first mode, the sub-gateway will first try optical fiber networking. If the network quality does not meet the requirements or the network is interrupted, it will try Ethernet wired networking. If the network quality does not meet the requirements or the network is interrupted, it will try wireless networking. If the wireless network quality does not meet the requirements or the network is interrupted, it will retry networking according to priority or prompt that the network quality does not meet the requirements or the network is interrupted. If the configured networking capability mode is the second mode, the sub-gateway will first try optical fiber networking. If the network quality does not meet the requirements or the network is interrupted, it will try Ethernet wired networking. If the Ethernet wired network quality does not meet the requirements or the network is interrupted, it will periodically retry networking according to priority or prompt that the network quality does not meet the requirements or the network is interrupted; If the configured networking capability mode is the third mode, the sub-gateway attempts to connect to the optical fiber network. If the optical fiber network quality does not meet the requirements or the network is interrupted, the sub-gateway remains disconnected and prompts a link abnormality.