Method for configuring a gateway device, gateway device and terminal device

CN123020359APending Publication Date: 2026-10-30TP-LINK INT SHENZHEN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611340474.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-30

Smart Images

  • Figure CN123020359A_ABST
    Figure CN123020359A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method for configuring a gateway device, a gateway device and a terminal device. The method for configuring the gateway device performed by the gateway device comprises: in response to the gateway device being in a to-be-configured state, sending, by a Bluetooth module of the gateway device, broadcast information, the broadcast information comprising identification information of the gateway device so that a terminal device identifies the gateway device according to the identification information; in response to the terminal device establishing a Bluetooth connection with the gateway device based on the identification information, receiving, via a Bluetooth link, configuration parameters sent by the terminal device, the configuration parameters comprising parameters determined by the terminal device interacting with a cloud platform via an Internet connection; and configuring the gateway device based on the configuration parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to wireless communication, and more particularly to a method for configuring a gateway device, a gateway device, and a terminal device. Background Technology

[0002] Gateway devices are used to achieve network interconnection and data conversion. With the rapid development and widespread application of IoT technology, gateway devices, such as routers, serve as hubs connecting terminal devices to the Internet, and their deployment efficiency and ease of configuration are increasingly valued. The startup or initial configuration process of gateway devices is the primary step in ensuring the normal operation of the device.

[0003] Traditional gateway device initialization and configuration typically relies on a personal computer (PC) terminal directly connected to the gateway device via a network cable to configure parameters. Operators need to bring their PC terminal to the site, establish a physical connection with the gateway device through the Ethernet interface, and then complete the initialization settings such as network access parameters and wireless configuration parameters through a web interface or command-line tools.

[0004] Some gateway devices integrate Wi-Fi modules or are used in conjunction with wireless access point (AP) devices to form a network, enabling operators to complete initial configuration via a wireless local area network (WLAN). In this solution, after the gateway device starts up, it can create a temporary Wi-Fi hotspot. Operators can connect to this hotspot, for example, using a mobile terminal device, and complete parameter settings through a dedicated configuration page or application. Summary of the Invention

[0005] This disclosure provides a method for configuring a gateway device, the gateway device itself, and a terminal device. The method utilizes a built-in Bluetooth module in the gateway device to enable communication between the terminal device and the gateway device during the configuration process via a Bluetooth link. This allows the terminal device to use its existing internet connection (such as a cellular network or other Wi-Fi network) to interact with the cloud platform and determine parameters for configuring the gateway device, such as cloud account binding information. These parameters, along with parameters set locally by the user on the terminal device, can be sent to the gateway device as configuration parameters via the Bluetooth link. Thus, the overall configuration process of the gateway device does not rely on a wired connection, nor does it require additional Wi-Fi modules or access points. Furthermore, the terminal device does not need to switch its existing network connection, avoiding the loss of internet access or automatic network switching due to connecting to an offline gateway device. This balances low cost, continuous network connectivity for the terminal device during configuration, and connection stability, improving the convenience and efficiency of the configuration process and enhancing the user experience.

[0006] According to one aspect of this disclosure, a method for configuring a gateway device, performed by a gateway device, is provided. The method may include: in response to the gateway device being in a configuration-ready state, sending broadcast information via the gateway device's Bluetooth module, the broadcast information including identification information of the gateway device to enable a terminal device to identify the gateway device based on the identification information; in response to the terminal device establishing a Bluetooth connection with the gateway device based on the identification information, receiving configuration parameters sent by the terminal device via a Bluetooth link, the configuration parameters including parameters determined by the terminal device through interaction with a cloud platform via an Internet connection; and configuring the gateway device based on the configuration parameters.

[0007] According to another aspect of this disclosure, a method for configuring a gateway device, executed by a terminal device, is provided. The method may include: establishing a Bluetooth connection with the gateway device based on identification information, the identification information being included in broadcast information sent by the gateway device's Bluetooth module when the gateway device is in a configuration-ready state; interacting with a cloud platform via an internet connection to determine parameters for configuring the gateway device; and sending configuration parameters, including the aforementioned parameters, to the gateway device via a Bluetooth link.

[0008] According to another aspect of this disclosure, a gateway device is provided. The gateway device may include: one or more processors; a memory of the processor coupled to the processor; and a set of computer program instructions stored in the memory, which, when executed by the processor in the processor, perform the method for configuring the gateway device described above.

[0009] According to another aspect of this disclosure, a terminal device is provided. The terminal device may include: one or more processors; a memory of the processor coupled to the processor; and a set of computer program instructions stored in the memory, which, when executed by the processor in the processor, perform the method described above for configuring a gateway device executed by the terminal device. Attached Figure Description

[0010] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to offer a further understanding of the embodiments of this disclosure and form part of the specification. The drawings, together with the embodiments of this disclosure, are used to explain this disclosure but do not constitute a limitation thereof. In the drawings, unless explicitly stated otherwise, the same reference numerals denote the same parts, steps, or elements.

[0011] Figure 1 This illustrates the general concept of the present disclosure;

[0012] Figure 2 An embodiment according to this disclosure is shown. Figure 1 Interactions between elements within;

[0013] Figure 3 A flowchart is shown of a method for configuring a gateway device performed by a gateway device according to an embodiment of the present disclosure;

[0014] Figure 4 An embodiment according to this disclosure is shown. Figure 3 Sub-steps of the method in the middle;

[0015] Figure 5 A flowchart is shown of a method for configuring a gateway device performed by a terminal device according to an embodiment of the present disclosure;

[0016] Figure 6 An embodiment according to this disclosure is shown. Figure 5 Sub-steps of the method in the middle;

[0017] Figure 7 A schematic diagram of a gateway device according to an embodiment of the present disclosure is shown;

[0018] Figure 8 A schematic diagram of a terminal device according to an embodiment of the present disclosure is shown.

[0019] Those skilled in the art will understand that the elements in the accompanying drawings are illustrated for simplicity and clarity and are not necessarily drawn to scale. For example, the dimensions of some elements in the illustrations, block diagrams, or flowcharts may be exaggerated relative to other elements to aid in accurate understanding of this embodiment. Detailed Implementation

[0020] The technical solutions of this disclosure will now be clearly and completely described in conjunction with the accompanying drawings. Obviously, the described embodiments are part of, but not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without any creative effort fall within the protection scope of this disclosure.

[0021] In the description of this disclosure, it should be noted that terms such as “first,” “second,” and “third” are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Similarly, words such as “a,” “an,” or “the” do not indicate a quantity limitation but rather indicate the presence of at least one. Words such as “including” or “comprising” mean that the element or object preceding the word encompasses those elements or objects listed following the word and their equivalents, without excluding other elements or objects.

[0022] As used herein, discussions of terms such as “receive,” “send,” “determine,” “trigger,” “enable,” “initiate,” or similar terms may refer to the operation and / or processing of a computer, computing platform, computing system, or other electronic computing device that involves the manipulation and / or conversion of data represented as physical (e.g., electronic) quantities in computer registers and / or memory into physical quantities in computer registers and / or memory or other information storage media that may store instructions for performing the operation and / or processing. Terms such as “connection” and “link” are not limited to physical or mechanical connections but also include direct or indirect electrical connections.

[0023] Furthermore, the technical features involved in the different embodiments of this disclosure described below can be combined with each other, as long as there is no conflict between them.

[0024] As mentioned above, gateway device initialization configuration methods can include wired configuration via a direct network cable connection and wireless configuration via a wireless LAN. Wired configuration requires a physical presence of a PC terminal and network cable, placing high demands on the deployment environment. In scenarios without a PC terminal (such as remote areas or mobile work sites), configuration is impossible. Furthermore, in batch deployment scenarios, operators must connect to each gateway device individually for configuration, resulting in a cumbersome process, high labor costs, low configuration efficiency, and a poor user experience. Wireless configuration requires the integration of a Wi-Fi module or the use of an access point (AP) on the gateway device, increasing hardware costs. Additionally, during configuration, the terminal device needs to connect to a temporary wireless network provided by the gateway device that is not connected to the internet, causing an interruption in the terminal device's internet connection. This interruption directly affects cloud-based interactive operations on the device manufacturer's cloud platform, such as account registration and login, which require an internet connection, disrupting the continuity of the user's initial configuration. Some terminal devices have a built-in network quality assessment mechanism in their operating systems. When the system detects that the currently connected gateway device's wireless network is not connected to the internet or has poor signal quality, it will automatically select or switch back to the previously connected network (such as a cellular network or other Wi-Fi network). This automatic switching behavior causes instability or even interruption of the configuration link between the terminal device and the gateway device, thereby reducing the configuration success rate and seriously affecting the user experience.

[0025] In view of the above problems, this disclosure provides a method, gateway device, and terminal device for configuring a gateway device, aiming to solve at least some of the above problems. According to embodiments of this disclosure, the method, gateway device, and terminal device for configuring a gateway device utilize a Bluetooth module built into the gateway device to achieve communication between the terminal device and the gateway device during the configuration process via a Bluetooth link. This allows the terminal device to use its existing internet connection (such as a cellular network or other Wi-Fi network) to interact with the cloud platform to determine parameters for configuring the gateway device, such as cloud account binding information. These parameters, along with parameters set locally by the user on the terminal device, can be sent to the gateway device as configuration parameters via the Bluetooth link. Thus, during the overall configuration process of the gateway device, there is no need to rely on a wired connection, nor is it necessary to configure an additional Wi-Fi module or pair it with an access point (AP) device. Furthermore, the terminal device does not need to switch its existing network connection, avoiding the loss of internet access or automatic network switching due to connecting to an offline gateway device. This balances low cost, continuous network connectivity and connection stability during the configuration process, improving the convenience and efficiency of the configuration process and enhancing the user experience.

[0026] Figure 1 The general concept of this disclosure is illustrated. For example... Figure 1 As shown, the application scenarios of this disclosure can involve gateway device 110, terminal device 120, and cloud platform 130. Gateway device 110 may include network devices with network forwarding and multi-protocol conversion and interoperability capabilities, such as routers. Terminal device 120 may be a user-configured terminal device for gateway device 110, including, for example, a smartphone or tablet, on which a dedicated application (APP) may run for gateway device configuration. Terminal device 120 may have cellular network or wireless LAN connectivity and be able to access the Internet. Cloud platform 130 may be a remote server system provided by the gateway device manufacturer, used to implement functions such as device management, user authentication, and gateway configuration parameter storage. Figure 2 An embodiment according to this disclosure is shown. Figure 1 The interaction between the gateway device 110, the terminal device 120, and the cloud platform 130 is described below. Figure 1 and Figure 2 To describe the overall concept of this disclosure.

[0027] like Figure 1As shown, the gateway device 110 may integrate a Bluetooth module 111. In this scenario, the gateway device 110 can be in a configuration-ready state. For example, the gateway device 110 may be in a configuration-ready state upon first startup or after a factory reset. In this state, the gateway device 110 can broadcast broadcast information containing its identification information via the Bluetooth module 111, such as... Figure 2 The device discovery phase is shown. This identification information may include the physical address, device model, and / or device name of gateway device 110. Additionally, as shown... Figure 1 As further shown, the gateway device 110 may optionally be configured with a screen module 112. See also... Figure 1 and Figure 2 When the Bluetooth module 111 sends a broadcast message containing the identification information of the gateway device 110, the screen module 112 can display this identification information. The terminal device 120 can scan for nearby Bluetooth broadcast messages, display a list of scanned devices in its APP interface, and identify the gateway device 110. For example, the user can compare the scan results displayed in the APP with the identification information on the nameplate or packaging label of the gateway device 110, or compare it with the information displayed on the screen module 112, to confirm that the gateway device 110 is the target gateway device. Then, the terminal device 120 can establish a Bluetooth connection with the gateway device 110. Figure 2 As illustrated, after a Bluetooth connection is established between the terminal device 120 and the gateway device 110, the terminal device 120 and the gateway device 110 may optionally conduct an authentication and key negotiation process, and establish an encrypted communication session through a multi-round handshake to ensure the security of subsequent configuration data transmission.

[0028] Since Bluetooth connectivity does not affect the original internet connection of terminal device 120 (such as cellular network connection or Wi-Fi connection), therefore, Figure 2 As shown, after the Bluetooth connection is established, the terminal device 120 can still interact with the cloud platform 130 through its existing internet connection to complete operations such as user cloud account registration and / or login. Subsequently, the terminal device 120 can send parameters such as cloud account binding information determined through interaction with the cloud platform 130 as part of the configuration parameters for configuring the gateway device to the gateway device 110 via the Bluetooth link. After receiving the configuration parameters, the gateway device 110 can complete its initial configuration and access the internet. During this process, as... Figure 1 and Figure 2As shown, the optional screen module 112 can also display the configuration progress in real time. Although the above mainly describes how the terminal device 120 obtains the aforementioned parameters by interacting with the cloud platform 130 via the internet after the Bluetooth connection is established, it can be understood that after the Bluetooth connection is established, the terminal device 120 can first send local configuration parameters, such as Wi-Fi access credentials, obtained without interaction with the cloud platform, directly to the gateway device 110 via the Bluetooth link. These parameters, locally set by the user on the terminal device, along with parameters determined through interaction between the terminal device and the cloud platform, such as cloud account binding information, can all be sent as configuration parameters to the gateway device 110 via the Bluetooth link.

[0029] like Figure 2 As further illustrated, after the gateway device 110 is configured, the management channel between the gateway device 110 and the terminal device 120 can be switched from the aforementioned Bluetooth link to a cloud management channel connected via the Internet, thereby achieving stable and efficient subsequent management. Although Figure 1 Although not shown, it is understood that the gateway device 110 may also integrate a Wi-Fi module or be used in conjunction with a wireless access point (AP) device for networking. In this case, such as Figure 2 As further shown, after the gateway device 110 is configured, the management channel between the gateway device 110 and the terminal device 120 can also be switched from the Bluetooth link to the local wireless LAN (Wi-Fi network) management channel, thereby achieving stable and efficient subsequent management.

[0030] The above combination Figure 1 and Figure 2 The technical concept described herein is that, during the configuration process of a gateway device, a Bluetooth module is used as the communication means between the gateway device 110 and the terminal device 120, enabling the configuration of the gateway device 110 while ensuring uninterrupted internet connectivity for the terminal device 120. This eliminates the need for wired connections during the overall configuration process, as well as the need for additional Wi-Fi modules or access points (APs) on the gateway device. Furthermore, it avoids the need for terminal devices to switch existing network connections, preventing them from losing internet access or automatically switching networks due to connecting to an unconnected gateway device. Therefore, this approach balances low cost, continuous internet connectivity for terminal devices during configuration, and connection stability, improving the convenience and efficiency of the configuration process and enhancing the user experience.

[0031] Figure 3 A flowchart is shown of a method 300 for configuring a gateway device, performed by a gateway device according to an embodiment of the present disclosure. Method 300 can be performed by... Figure 1 The gateway device 110 in the middle is executed. The following is in conjunction with... Figures 1 to 3The present disclosure describes a method for configuring a gateway device according to embodiments thereof from the perspective of the gateway device.

[0032] like Figure 3 As shown, method 300 may include steps S310 to S330. In step S310, in response to the gateway device 110 being in a configuration-ready state, broadcast information can be sent through the Bluetooth module 111 of the gateway device 110. For example, the gateway device 110 may be in a configuration-ready state upon first startup or after a factory reset. In this case, the gateway device 110 does not store any valid network configuration parameters, cloud binding information, etc. locally, and has no available network configuration, thus requiring initial configuration. When it detects that it has entered the configuration-ready state, the gateway device 110 can automatically trigger Bluetooth broadcast 111 to continuously send broadcast information. This broadcast information may include the identification information of the gateway device 110 so that the terminal device 120 can identify the gateway device 110 based on the identification information and then establish a Bluetooth connection with it.

[0033] In some embodiments, the identification information may include at least one of the following: the physical address of the gateway device 110, the device model, and the device name. For example, the broadcast information may take the form of a standard Bluetooth broadcast frame, and the identification information of the gateway device 110 may be carried in the data payload of the broadcast frame. With the identification information, the terminal device can easily identify the gateway device 110 and establish a Bluetooth connection with it.

[0034] In some embodiments, the identification information of the gateway device 110 may include a preset flag bit, which is used to indicate that the identification information is the identification information of the device to be identified. The terminal device 120 may simultaneously receive one or more broadcast messages including device identification information. To facilitate the terminal device 120 in quickly and accurately identifying the gateway device 110 to be configured, the identification information of the gateway device 110 may include the preset flag bit. When the terminal device 120 scans for surrounding Bluetooth devices, it parses each received broadcast message and detects whether it contains the preset flag bit. If a broadcast message contains the preset flag bit, the terminal device 120 can determine that the broadcast message includes the identification information of the device to be identified and identify the corresponding device based on the identification information; otherwise, if a broadcast message does not contain the preset flag bit, the terminal device 120 can determine that the broadcast message does not include the identification information of the device to be identified and ignore the device identification information in the broadcast message.

[0035] Through the aforementioned filtering mechanism based on preset flags, the terminal device 120 can quickly and accurately locate the gateway device 110 to be configured from one or more Bluetooth broadcast devices. For example, when the terminal device 120 is in an environment where multiple Bluetooth devices such as Bluetooth headsets, Bluetooth speakers, and smart bracelets coexist, the terminal device 120 can only identify and display the gateway device 110 whose identification information includes the preset flag, while automatically ignoring other types of Bluetooth devices such as Bluetooth headsets whose identification information does not include the preset flag. This simplifies user operation, avoids misselection, and improves configuration efficiency and user experience.

[0036] In some embodiments, where the gateway device 110 includes a screen module 112, method 300 may further include (not shown) displaying the identification information on the screen module 112 simultaneously with or after sending broadcast information including the identification information of the gateway device 110 via the Bluetooth module 111. This allows the user to compare one or more device identification information displayed on the display interface of the terminal device 120 with the identification information displayed on the screen module 112, enabling quick selection of the device identification information corresponding to the identification information of the gateway device 110 on the display interface of the terminal device 120. This facilitates the terminal device 120's identification of the gateway device 110 based on its identification information and the establishment of a Bluetooth connection with it. This effectively reduces the probability of misselecting devices in batch deployment scenarios and improves the accuracy of target device identification and configuration efficiency.

[0037] In step S320, in response to the terminal device 120 establishing a Bluetooth connection with the gateway device 110 based on the identification information of the gateway device 110, the gateway device 110 can receive configuration parameters sent by the terminal device 120 via the Bluetooth link. These configuration parameters may include parameters determined by the terminal device 120 through interaction with the cloud platform via an internet connection, such as the cloud account binding information mentioned above. (Refer to the above...) Figure 2As described and as understood by those skilled in the art, a portion of the configuration parameters of gateway device 110 may be determined by terminal device 120 interacting with cloud platform 130 via an internet connection, such as the cloud account binding information mentioned above. Specifically, terminal device 120 may first communicate with cloud platform 130 via its existing internet connection (e.g., cellular network connection or Wi-Fi connection) to perform operations such as user cloud account registration and / or login. The cloud account binding information determined thereby can be used as part of the configuration parameters for gateway device 110, which can then be sent to gateway device 110 via a Bluetooth link. Although the above mainly describes how terminal device 120 interacts with cloud platform 130 via internet connection after Bluetooth connection is established to obtain parameters such as cloud account binding information as part of the configuration parameters of gateway device 110, it is understood that after Bluetooth connection is established, terminal device 120 may first send local configuration parameters obtained without interaction with cloud platform directly to gateway device 110 via Bluetooth link, including, for example, gateway device account and password, network access parameters (such as Wi-Fi access credentials), wireless configuration parameters, etc. In addition, the terminal device 120 can also send these local configuration parameters together with the parameters obtained by interacting with the cloud platform 130 as configuration parameters of the gateway device 110 via the Bluetooth link.

[0038] In some embodiments, the Bluetooth connection between the terminal device 120 and the gateway device 110 can be a Bluetooth Low Energy (BLE) connection. Specifically, the terminal device 120 can establish a BLE connection with the gateway device 110 based on the Bluetooth Low Energy (BLE) protocol, which features low power consumption, low latency, and fast connection speed, making it particularly suitable for short-range, low-data-volume configuration scenarios.

[0039] Figure 4 A sub-step of step S320 according to an embodiment of the present disclosure is shown. (Refer to above) Figure 2 As described, after a Bluetooth connection is established between the terminal device 120 and the gateway device 110, an encrypted communication session can be established to ensure the security of subsequent configuration data transmission. Therefore, as... Figure 4As shown, in some embodiments, step S320 may include sub-steps S321 and S322. In sub-step S321, after establishing a Bluetooth connection with terminal device 120, gateway device 110 and terminal device 120 can establish an encrypted communication session within the Bluetooth link. As described above, terminal device 120 and gateway device 110 can perform authentication and key negotiation processes, establishing an encrypted communication session through multi-round handshakes. In some embodiments, terminal device 120 and gateway device 110 can complete authentication and negotiate the encrypted session key based on the SPAKE2+ (Simple Password-Authenticated Key Exchange 2 Plus) protocol, thereby establishing a secure channel in the local environment to prevent unauthorized device impersonation and configuration data eavesdropping and tampering. Compared with traditional Bluetooth encryption protocols, the SPAKE2+ protocol has the advantages of being lightweight, highly secure, and adaptable to short-range Bluetooth communication, effectively resisting offline dictionary attacks and man-in-the-middle attacks without increasing the computing power burden on gateway device 110 and terminal device 120.

[0040] In sub-step S322, the gateway device 110 can receive configuration parameters of the gateway device 110 sent by the terminal device 120 via an encrypted communication session. By transmitting the configuration parameters of the gateway device 110 in an encrypted communication session, the confidentiality, integrity, and replay attack resistance of the configuration parameters during transmission over the Bluetooth link can be ensured.

[0041] Return to reference Figure 3 In step S330, the gateway device 110 can be configured based on the configuration parameters received in step S320. For example, the gateway device 110 can verify the validity of the received configuration parameters, ensuring that the parameters are complete and legal, and then categorize and write them to local storage and apply them to the corresponding functional modules (such as the wireless network module, WAN port protocol stack, and service policy module). Subsequently, the gateway device 110 can execute the effective policy (dynamically load or restart the service) according to the parameter type. Finally, the gateway device 110 can report the configuration completion status to the cloud platform 130 via the Internet connection, or report network failure information to the terminal device 120 via Bluetooth link to facilitate troubleshooting.

[0042] In some embodiments, where the gateway device 110 includes the screen module 112 described above, method 200 may further include displaying the configuration progress via the screen module 112. The screen module 112 can provide users with real-time configuration progress, improving the visualization of the configuration process and enhancing the user experience.

[0043] like Figure 3As further shown, after the configuration of gateway device 110 is completed, method 200 may further include step S340. (See reference...) Figure 2 As illustrated, in step S340, the management channel between the gateway device 110 and the terminal device 120 can be switched from the aforementioned Bluetooth link to a cloud management channel via an internet connection between the gateway device 110 and the cloud platform 130, or a local management channel via a local wireless LAN. After configuration, the gateway device 110 has complete network connectivity. On one hand, since the gateway device 110 has successfully accessed the internet, the terminal device 120 can access the cloud platform 130 through its own internet connection (such as a cellular network connection or an existing Wi-Fi connection), and then remotely manage and control the gateway device 110 through the cloud platform 130, thereby switching the management channel from a Bluetooth link to a cloud management channel via an internet connection between the gateway device 110 and the cloud platform 130. On the other hand, if the gateway device 110 integrates a Wi-Fi module or is used in conjunction with an AP device for networking, after configuration, the gateway device 110 can create a local wireless LAN, and the terminal device 120 can access this local wireless LAN, thereby switching the management channel from a Bluetooth link to a local management channel via the local wireless LAN. The aforementioned management channel switching mechanism allows for switching the management channel from the Bluetooth link to either the cloud management channel or the local management channel after configuration. This overcomes the short-range and low-speed limitations of Bluetooth, enabling remote management and high-speed data transmission. Simultaneously, it frees up Bluetooth resources and reduces power consumption on terminal devices. Furthermore, this mechanism facilitates smooth switching of management channels, improving user experience and subsequent management efficiency.

[0044] In some embodiments, switching the management channel to the local management channel may include: in response to creating a local wireless local area network (WLAN) during the configuration of gateway device 110 based on the above configuration parameters, guiding terminal device 120 to access the local WLAN to switch the management channel to the local management channel. In this way, instead of notifying the user to manually switch terminal device 120 to the newly created local WLAN (Wi-Fi network) through prompts after the entire configuration process of gateway device 110 is completed, terminal device 120 is guided to access the network immediately after the local WLAN is created. This achieves early, automatic, and seamless switching of the management channel, simplifying user operations and significantly improving the overall consistency of the configuration process and user experience.

[0045] In the method 200 described in the above embodiments of this disclosure, communication between the terminal device and the gateway device during the configuration process is achieved via a Bluetooth link through the Bluetooth module built into the gateway device. This allows the terminal device to use its existing Internet connection (such as a cellular network or other Wi-Fi network) to interact with the cloud platform and determine parameters for configuring the gateway device, such as cloud account binding information. These parameters, along with the parameters set locally by the user on the terminal device, can be sent to the gateway device as configuration parameters via the Bluetooth link. Thus, during the overall configuration process of the gateway device, there is no need to rely on a wired connection, nor is it necessary to configure an additional Wi-Fi module or pair it with an AP device. Furthermore, the terminal device does not need to switch its existing network connection, avoiding the loss of Internet access or automatic network switching due to connecting to an unconnected gateway device. This balances low cost, continuous network connectivity for the terminal device during configuration, and connection stability, improving the convenience and efficiency of the configuration process and enhancing the user experience.

[0046] Figure 5 A flowchart illustrating a method 500 for configuring a gateway device, performed by a terminal device according to an embodiment of the present disclosure, is shown. Method 500 can be performed by... Figure 1 The terminal device 120 executes the command. The following is in conjunction with... Figure 1 , Figure 2 , Figure 5 The present disclosure describes a method for configuring a gateway device according to embodiments of the present disclosure from the perspective of the terminal device.

[0047] like Figure 5 As shown, method 500 may include steps S510 to S530. In step S510, terminal device 120 can establish a Bluetooth connection with gateway device 110 based on the identification information of gateway device 110. As described above, the identification information of gateway device 110 may be included in the broadcast information sent by gateway device 110 through its Bluetooth module 111 when it is in a configuration-ready state. For example, gateway device 110 may be in a configuration-ready state upon first startup or after a factory reset. In this case, gateway device 110 does not store any valid network configuration parameters, cloud binding information, etc. locally, and has no available network configuration, thus requiring initial configuration. When it detects that it has entered the configuration-ready state, gateway device 110 can automatically trigger Bluetooth broadcast 111 to continuously send broadcast information, which may include the identification information of gateway device 110 so that terminal device 120 can identify gateway device 110 based on the identification information. Terminal device 120 can establish a Bluetooth connection with gateway device 110 based on the identification information of gateway device 110.

[0048] In some embodiments, the identification information may include at least one of the following: the physical address of the gateway device 110, the device model, and the device name. For example, the broadcast information may take the form of a standard Bluetooth broadcast frame, and the identification information of the gateway device 110 may be carried in the data payload of the broadcast frame. With the identification information, the terminal device can easily identify the gateway device 110 and establish a Bluetooth connection with it.

[0049] In some embodiments, the identification information of the gateway device 110 may include a preset flag bit, which is used to indicate that the identification information is the identification information of the device to be identified. The terminal device 120 may simultaneously receive one or more broadcast messages including device identification information. To facilitate the terminal device 120 in quickly and accurately identifying the gateway device 110 to be configured, the identification information of the gateway device 110 may include the preset flag bit. When the terminal device 120 scans for surrounding Bluetooth devices, it parses each received broadcast message and detects whether it contains the preset flag bit. If a broadcast message contains the preset flag bit, the terminal device 120 can determine that the broadcast message includes the identification information of the device to be identified and identify the corresponding device based on the identification information; otherwise, if a broadcast message does not contain the preset flag bit, the terminal device 120 can determine that the broadcast message does not include the identification information of the device to be identified and ignore the device identification information in the broadcast message.

[0050] Through the aforementioned filtering mechanism based on preset flags, the terminal device 120 can quickly and accurately locate the gateway device 110 to be configured from one or more Bluetooth broadcast devices. For example, when the terminal device 120 is in an environment where multiple Bluetooth devices such as Bluetooth headsets, Bluetooth speakers, and smart bracelets coexist, the terminal device 120 can only identify and display the gateway device 110 whose identification information includes the preset flag, while automatically ignoring other types of Bluetooth devices such as Bluetooth headsets whose identification information does not include the preset flag. This simplifies user operation, avoids misselection, and improves configuration efficiency and user experience.

[0051] Before establishing a Bluetooth connection with gateway device 110 based on its identification information, terminal device 120 may need to first determine the identification information of gateway device 110. For this purpose, as follows: Figure 5As shown, method 500 may include steps S501 and S502 prior to step S510. As described above, terminal device 120 may simultaneously receive one or more broadcast messages including device identification information. In step S501, one or more device identification information including the aforementioned preset flag bit can be displayed on the display interface of terminal device 120 based on the device identification information obtained from the multiple received broadcast messages, for user selection. When scanning Bluetooth broadcast messages, terminal device 120 simultaneously receives broadcast messages from multiple Bluetooth broadcast devices (including, for example, gateway device 110 and other Bluetooth devices in the same environment, including, for example, Bluetooth headsets, Bluetooth speakers, smart bracelets, etc.), each broadcast message carrying its own device identification information. As described above, the preset flag bit can help filter out non-target type devices (i.e., non-gateway devices), such as Bluetooth headsets, Bluetooth speakers, smart bracelets, etc. In step S501, by displaying only one or more device identification information including the preset flag bit for user selection, irrelevant Bluetooth devices can be filtered out, thereby simplifying user operation and avoiding misselection. For example, when the gateway device 110 includes a screen module 112, the user can compare one or more device identification information including preset flags with the identification information displayed on the screen module 112 to select the device identification information corresponding to the identification information of the gateway device 110. When the gateway device 110 does not include a screen module 112, the user can compare one or more device identification information including preset flags with the identification information in the device nameplate or packaging label of the gateway device 110 to select the device identification information corresponding to the identification information of the gateway device 110. In step S502, the terminal device 120 can determine the identification information of the gateway device 110 based on the device identification information selected by the user. This facilitates the terminal device 120 in step S510 to identify the gateway device 110 based on its identification information and establish a Bluetooth connection with it, effectively reducing the probability of misselecting devices in batch deployment scenarios and improving the accuracy of target device identification and configuration efficiency.

[0052] In some embodiments, the display of one or more device identification information, including a preset flag, on the display interface in sub-step S501 can be based on signal strength to facilitate user selection. To this end, sub-step S501 may further include: first, determining the display order of the one or more device identification information based on the signal strength of the corresponding one or more broadcast messages including the one or more device identification information. Then, the one or more device identification information can be displayed according to the determined display order.

[0053] Terminal device 120 can measure the signal strength of each broadcast message including one or more device identification information, such as the Received Signal Strength Indication (RSSI). Generally, a higher signal strength (e.g., a smaller absolute RSSI value) indicates that the transmitter of the broadcast message is closer to terminal device 120; conversely, a lower signal strength (e.g., a larger absolute RSSI value) indicates that the transmitter is farther from terminal device 120. After filtering out non-target type devices (i.e., non-gateway devices), the environment in which terminal device 120 is located may still contain multiple target type devices (i.e., multiple gateway devices). In this case, the relevant device identification information can be displayed in order of RSSI strength to indicate the distance between terminal device 120 and each target type device. For example, after acquiring each broadcast message including one or more device identification information and its corresponding signal strength, terminal device 120 can determine the display order of the corresponding one or more device identification information according to the order of signal strength from high to low, and present the one or more device identification information to the user on the display interface from top to bottom or from front to back according to this display order. This mechanism enables users to quickly select the gateway device 110 to be configured from multiple potential Bluetooth broadcast devices, significantly reducing the user's selection burden, thereby enabling the terminal device 120 to quickly identify the gateway device 110 and establish a Bluetooth connection with it.

[0054] In some embodiments, the terminal device 120 may display only the device identification information corresponding to broadcast information with signal strength higher than a predetermined threshold on the display interface, thereby filtering out Bluetooth devices that are too far away, have poor signal quality, or are unlikely to be the target device, thus reducing the user's selection range and reducing visual interference. The predetermined threshold can be configured according to the Bluetooth signal propagation characteristics in the actual application scenario.

[0055] Continue to refer to Figure 5After establishing a Bluetooth connection, in step S520, the terminal device 120 can interact with the cloud platform 130 via an internet connection to determine parameters for configuring the gateway device 110. Specifically, the terminal device 120 can first communicate with the cloud platform 130 via its existing internet connection (e.g., cellular network connection or Wi-Fi connection) to perform operations such as user cloud account registration and / or login. Then, the terminal device 120 can use parameters such as cloud account binding information determined through interaction with the cloud platform 130 as parameters for configuring the gateway device 110. These parameters can be used together with local configuration parameters input by the user via the terminal device 120 as configuration parameters for the gateway device 110. As mentioned above, the local configuration parameters input by the user may include, for example, the gateway device's account and password, network access parameters (such as Wi-Fi access credentials), wireless configuration parameters, etc.

[0056] In step S530, terminal device 120 may send configuration parameters, including the parameters determined in step S520, to gateway device 110 via a Bluetooth link. Terminal device 120 may first send the aforementioned local configuration parameters, obtained without interaction with the cloud platform, directly to gateway device 110 via the Bluetooth link, and then determine the parameters for configuring gateway device 110 through interaction with cloud platform 130 and send them to gateway device 110 via the Bluetooth link; alternatively, it may combine the aforementioned local configuration parameters with the parameters obtained through interaction with cloud platform 130 as configuration parameters for gateway device 110 and send them to gateway device 110 via the Bluetooth link.

[0057] Figure 6 A sub-step of step S530 according to an embodiment of the present disclosure is shown. (Refer to above) Figure 2 As described, after a Bluetooth connection is established between the terminal device 120 and the gateway device 110, an encrypted communication session can be established to ensure the security of subsequent configuration data transmission. Therefore, as... Figure 6As shown, in some embodiments, step S530 may include sub-steps S531 and S532. In sub-step S531, after establishing a Bluetooth connection with gateway device 110, terminal device 120 may establish an encrypted communication session within the Bluetooth link with gateway device 110. As described above, terminal device 120 and gateway device 110 can perform authentication and key negotiation processes, establishing an encrypted communication session through multi-round handshakes. In some embodiments, terminal device 120 and gateway device 110 may complete authentication and negotiate the encrypted session key based on the SPAKE2+ (Simple Password-Authenticated Key Exchange 2 Plus) protocol, thereby establishing a secure channel in the local environment to prevent unauthorized device impersonation and configuration data eavesdropping and tampering. Compared with traditional Bluetooth encryption protocols, the SPAKE2+ protocol has the advantages of being lightweight, highly secure, and adaptable to short-range Bluetooth communication, effectively resisting offline dictionary attacks and man-in-the-middle attacks without increasing the computing power burden on gateway device 110 and terminal device 120.

[0058] In sub-step S532, terminal device 120 can send configuration parameters of gateway device 110 via an encrypted communication session. By transmitting the configuration parameters of gateway device 110 in an encrypted communication session, the confidentiality, integrity, and resistance to replay attacks of the configuration parameters during transmission over the Bluetooth link can be ensured.

[0059] After the terminal device 120 sends the configuration parameters, the gateway device 110 can complete its own configuration based on these parameters. For example, the gateway device 110 can verify the validity of the received configuration parameters, ensuring that the parameters are complete and legal, and then categorize and write them to local storage and apply them to the corresponding functional modules (such as the wireless network module, WAN port protocol stack, and service policy module). Subsequently, the gateway device 110 can execute the activation policy (dynamically load or restart the service) according to the parameter type. Finally, the gateway device 110 can report the configuration completion status to the cloud platform 130 via the Internet connection, or report network failure information to the terminal device 120 via Bluetooth link to facilitate troubleshooting.

[0060] like Figure 5 As further shown, after the gateway device 110 completes the configuration based on the configuration parameters, method 500 may further include step S540. See also... Figure 2As illustrated, in step S540, the management channel between the terminal device 120 and the gateway device 110 can be switched from the aforementioned Bluetooth link to a cloud management channel via an internet connection between the gateway device 110 and the cloud platform 130, or a local management channel via a local wireless LAN. After configuration, the gateway device 110 has complete network connectivity. On one hand, since the gateway device 110 has successfully accessed the internet, the terminal device 120 can access the cloud platform 130 through its own internet connection (such as a cellular network connection or an existing Wi-Fi connection), and then remotely manage and control the gateway device 110 through the cloud platform 130, thereby switching the management channel from a Bluetooth link to a cloud management channel via an internet connection between the gateway device 110 and the cloud platform 130. On the other hand, if the gateway device 110 integrates a Wi-Fi module or is used in conjunction with an AP device for networking, after configuration, the gateway device 110 can create a local wireless LAN, and the terminal device 120 can access this local wireless LAN, thereby switching the management channel from a Bluetooth link to a local management channel via the local wireless LAN. The aforementioned management channel switching mechanism allows for switching the management channel from the Bluetooth link to either the cloud management channel or the local management channel after configuration. This overcomes the short-range and low-speed limitations of Bluetooth, enabling remote management and high-speed data transmission. Simultaneously, it frees up Bluetooth resources and reduces power consumption on terminal devices. Furthermore, this mechanism facilitates smooth switching of management channels, improving user experience and subsequent management efficiency.

[0061] In some embodiments, switching the management channel to the local management channel may include: during the process of creating a local wireless LAN based on the configuration parameters by the gateway device 110, in response to the guidance of the gateway device, the terminal device 120 accesses the created local wireless LAN to switch the management channel to the local management channel. In this way, instead of notifying the user to manually switch the terminal device 120 to the newly created local wireless LAN (Wi-Fi network) through prompts after the entire configuration process of the gateway device 110 is completed, the terminal device 120 is guided to access the network immediately after the local wireless LAN is created. This achieves early, automatic, and seamless switching of the management channel and a smooth transition, simplifying user operations and significantly improving the overall consistency of the configuration process and user experience.

[0062] In some embodiments, the Bluetooth connection between the terminal device 120 and the gateway device 110 can be a Bluetooth Low Energy (BLE) connection. Specifically, the terminal device 120 can establish a BLE connection with the gateway device 110 based on the Bluetooth Low Energy (BLE) protocol, which features low power consumption, low latency, and fast connection speed, making it particularly suitable for short-range, low-data-volume configuration scenarios.

[0063] In some embodiments, the terminal device 110 may be a mobile terminal device. This mobile terminal device may include, but is not limited to, portable electronic devices with Bluetooth communication and network connectivity, such as smartphones, tablets, and personal digital assistants (PDAs). Mobile terminal devices are portable and ready to use, making them particularly suitable for deployment scenarios such as homes and offices.

[0064] In the method 500 described in the above embodiments of this disclosure, communication between the terminal device and the gateway device during the configuration process is achieved via a Bluetooth link through the Bluetooth module built into the gateway device. This allows the terminal device to use its existing Internet connection (such as a cellular network or other Wi-Fi network) to interact with the cloud platform and determine parameters for configuring the gateway device, such as cloud account binding information. These parameters, along with the parameters set locally by the user on the terminal device, can be sent to the gateway device as configuration parameters via the Bluetooth link. Thus, during the overall configuration process of the gateway device, there is no need to rely on a wired connection, nor is it necessary to configure an additional Wi-Fi module or pair it with an AP device. Furthermore, the terminal device does not need to switch its existing network connection, avoiding the loss of Internet access or automatic network switching due to connecting to an unconnected gateway device. This balances low cost, continuous network connectivity for the terminal device during configuration, and connection stability, improving the convenience and efficiency of the configuration process and enhancing the user experience.

[0065] Embodiments of this disclosure also provide a gateway device. Figure 7 A schematic diagram of a gateway device 700 according to an embodiment of the present disclosure is shown. The gateway device 700 can be used to perform, for example, the method 300 described above.

[0066] like Figure 7 As shown, the gateway device 700 may include one or more processors 710 and a memory 720. The processor 710 is communicatively coupled to the memory and is configured to perform the method 300 discussed above.

[0067] Examples of processor 710 include microprocessors, microcontrollers, digital signal processors (DSPs), field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described in this disclosure.

[0068] Processor 710 can execute software. Software should be broadly interpreted as instructions, instruction sets, code, code segments, program code, programs, subroutines, software modules, application programs, software applications, software packages, routines, subroutines, objects, executable files, execution threads, procedures, functions, etc., regardless of whether it is referred to as software, firmware, middleware, microcode, hardware description languages, or otherwise. The software may reside on memory 720.

[0069] Memory 720 may be a non-transitory computer-readable medium. Non-transitory computer-readable media include, for example, magnetic storage devices (e.g., hard disks, floppy disks, magnetic stripes), optical disks (e.g., optical discs (CDs) or digital versatile optical discs (DVDs)), smart cards, flash memory devices (e.g., cards, memory cards, or key drives), random access memory (RAM), read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, removable disks, and any other suitable medium for storing software and / or instructions that can be accessed and read by a computer. Memory 720 may reside in processor 710, be external to processor 710, or be distributed across multiple entities including processor 710. Memory 720 may be embodied in a computer program product. For example, a computer program product may include a computer-readable medium in packaging material. Those skilled in the art will recognize how the functionality described throughout this disclosure can be implemented based on the specific application and overall design constraints imposed on the overall system.

[0070] Embodiments of this disclosure also provide a gateway device. Figure 8 A schematic diagram of a terminal device 800 according to an embodiment of the present disclosure is shown. The terminal device 800 can be used to perform, for example, the method 500 described above.

[0071] like Figure 8 As shown, the terminal device 800 may include one or more processors 810 and a memory 820. The processor 810 is communicatively coupled to the memory and is configured to perform the method 500 discussed above.

[0072] Examples of processor 810 include microprocessors, microcontrollers, digital signal processors (DSPs), field-programmable gate arrays (FPGAs), programmable logic devices (PLDs), state machines, gated logic, discrete hardware circuits, and other suitable hardware configured to perform the various functions described in this disclosure.

[0073] Processor 810 can execute software. Software should be broadly interpreted as instructions, instruction sets, code, code segments, program code, programs, subroutines, software modules, application programs, software applications, software packages, routines, subroutines, objects, executable files, execution threads, procedures, functions, etc., regardless of whether it is referred to as software, firmware, middleware, microcode, hardware description languages, or otherwise. The software may reside on memory 820.

[0074] Memory 820 may be a non-transitory computer-readable medium. Non-transitory computer-readable media include, for example, magnetic storage devices (e.g., hard disks, floppy disks, magnetic stripes), optical disks (e.g., optical discs (CDs) or digital versatile optical discs (DVDs)), smart cards, flash memory devices (e.g., cards, memory cards, or key drives), random access memory (RAM), read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, removable disks, and any other suitable medium for storing software and / or instructions that can be accessed and read by a computer. Memory 820 may reside in processor 810, be external to processor 810, or be distributed across multiple entities including processor 810. Memory 820 may be embodied in a computer program product. For example, a computer program product may include a computer-readable medium in packaging material. Those skilled in the art will recognize how the functionality described throughout this disclosure can be implemented based on the specific application and overall design constraints imposed on the overall system.

[0075] Furthermore, according to another embodiment of this disclosure, a computer program product is disclosed. As an example, the computer program product includes a non-transitory computer-readable storage medium containing program instructions executable by a processor. When executed, the program instructions cause the processor to perform one or more of the processes described above; details are omitted here for brevity.

[0076] This invention can be a system, method, and / or computer program product at any possible level of integration technical detail. The computer program product may include computer-readable program instructions for causing a processor to perform various aspects of this disclosure.

[0077] Unless otherwise stated, an element mentioned in the singular is not intended to mean "one and only one," but rather "one or more." Similarly, a plural reference to an element does not mean "more than one," but rather "one or more," unless otherwise stated or contradicting description elsewhere. Terms such as "if," "when," and "although" should be interpreted as "under the condition of," rather than implying an immediate temporal relationship or response. That is, these phrases, such as "when," do not imply an immediate action in response to an action occurring or during an action, but merely imply that an action will occur if the condition is met, but does not require a specific or immediate time constraint for the action to occur. Combinations, such as "at least one of A, B, or C," "one or more of A, B, or C," "at least one of A, B, and C," "one or more of A, B, and C," and "A, B, C, or any combination thereof," include any combination of A, B, and / or C, and may include multiple A, multiple B, or multiple C. Combinations such as “at least one of A, B or C”, “one or more of A, B or C”, “at least one of A, B and C”, “one or more of A, B and C” and “A, B, C or any combination thereof” can be only A, only B, only C, A and B, A and C, B and C or A, B and C, wherein any such combination may contain one or more members of A, B or C.

[0078] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible structures, functions, and operations of the methods and apparatus according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, a program segment, or a portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative embodiments, the functions described in a block may occur in a different order than those described in the accompanying drawings. For example, two blocks shown consecutively may actually be executed in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware system that performs the specified function or operation, or by a combination of dedicated hardware and computer instructions.

[0079] The various embodiments described in this disclosure are for illustrative purposes and are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described embodiments. The terminology used herein is chosen to best explain the principles of the embodiments, their practical application, or improvements to techniques found in the market, or to enable those skilled in the art to understand the embodiments disclosed herein.

[0080] Throughout the description and claims of this specification, the word “comprising” and variations thereof, such as “comprising” and “including,” means “including, but not limited to,” and are not intended to exclude, for example, other additives, components, integers, or steps. “Exemplary” means “an example of a preferred or ideal implementation and is not intended to convey its indication.” “Like” is not used in a limiting sense but for interpretative purposes.

[0081] As used in this disclosure, the term "determine" can include a variety of operations. For example, "determine," calculation, operation, processing, derivation, investigation, search (e.g., searching in a table, database, or other data structure), and ascertainment are all considered "determine." Additionally, "determine" also refers to receiving (e.g., receiving information), sending (e.g., sending information), inputting, outputting, and accessing (e.g., accessing data in memory). Furthermore, "determine" can also refer to parsing, selecting, picking, building, and comparing. In other words, several actions can be considered "determine."

[0082] As used in this disclosure, terms such as “connection,” “coupling,” or any variations thereof refer to any direct or indirect connection or combination between two or more units, which may include situations where one or more intermediate units exist between two units that are “connected” or “coupled” to each other. The coupling or connection between units may be physical or logical, or a combination of both. As used in this disclosure, two units may be considered electrically connected by means of one or more wires, cables, and / or printing, and as numerous non-limiting and non-exhaustive examples, may be “connected” or “coupled” to each other by means of electromagnetic energy in the radio frequency region, microwave region, and / or light (visible and invisible) region, etc.

[0083] The present disclosure has been described in detail above, but it will be apparent to those skilled in the art that the present disclosure is not limited to the embodiments described herein. The present disclosure can be implemented in modified and altered forms without departing from the spirit and scope of the present disclosure as defined by the claims. Therefore, the description in this disclosure is illustrative and has no limiting effect on the present disclosure.

Claims

1. A method for configuring a gateway device, performed by a gateway device, comprising: In response to the gateway device being in a configuration state, a broadcast message is sent through the Bluetooth module of the gateway device. The broadcast message includes the identification information of the gateway device so that the terminal device can identify the gateway device based on the identification information. In response to the terminal device establishing a Bluetooth connection with the gateway device based on the identification information, the terminal device receives configuration parameters sent by the terminal device via the Bluetooth link. The configuration parameters include parameters determined by the terminal device through interaction with the cloud platform via the Internet connection. as well as Configure the gateway device based on the configuration parameters.

2. The method according to claim 1, further comprising: After the configuration of the gateway device is completed, the management channel between the gateway device and the terminal device is switched from the Bluetooth link to a cloud management channel via the Internet connection between the gateway device and the cloud platform, or a local management channel via the local wireless LAN.

3. The method according to claim 2, wherein, Switching the management channel to the local management channel includes: In response to the creation of the local wireless local area network during the configuration of the gateway device based on the configuration parameters, the terminal device is guided to access the local wireless local area network to switch the management channel to the local management channel.

4. The method according to claim 1, wherein receiving the configuration parameters via a Bluetooth link comprises: After establishing the Bluetooth connection with the terminal device, an encrypted communication session is established within the Bluetooth link with the terminal device; as well as The configuration parameters are received via the encrypted communication session.

5. The method according to claim 1, wherein, The identification information includes at least one of the following: the physical address of the gateway device, the device model, and the device name.

6. The method according to claim 1, wherein, The identification information includes a preset flag bit, which is used to indicate that the identification information is the identification information of the device to be identified.

7. The method according to claim 1, further comprising: The identification information is displayed through the screen module of the gateway device.

8. The method according to claim 7, further comprising: The configuration progress is displayed via the screen module.

9. The method according to claim 1, wherein the Bluetooth connection is a Bluetooth Low Energy connection.

10. A method for configuring a gateway device, executed by a terminal device, comprising: A Bluetooth connection is established with the gateway device based on the identification information of the gateway device, wherein the identification information is included in the broadcast information sent by the gateway device through the Bluetooth module of the gateway device when it is in the configuration state; The parameters used to configure the gateway device are determined by interacting with a cloud platform via an internet connection; and Configuration parameters, including the parameters, are sent to the gateway device via a Bluetooth link.

11. The method of claim 10, further comprising: After the gateway device completes the configuration based on the configuration parameters, the management channel between the terminal device and the gateway device is switched from the Bluetooth link to a cloud management channel via the Internet connection between the gateway device and the cloud platform, or a local management channel via the local wireless LAN.

12. The method according to claim 11, wherein, Switching the management channel to the local management channel includes: During the process of the gateway device creating the local wireless LAN based on the configuration parameters, in response to the guidance of the gateway device, the device accesses the local wireless LAN to switch the management channel to the local management channel.

13. The method according to claim 10, wherein, Sending the configuration parameters includes: After establishing the Bluetooth connection with the gateway device, an encrypted communication session is established within the Bluetooth link with the gateway device; and The configuration parameters are sent via the encrypted communication session.

14. The method of claim 10, wherein, The identification information includes at least one of the following: the physical address of the gateway device, the device model, and the device name.

15. The method according to claim 10, wherein, The identification information includes a preset flag bit, which is used to indicate that the identification information is the identification information of the device to be identified.

16. The method of claim 15, further comprising, before establishing the Bluetooth connection with the gateway device: The terminal device displays one or more device identification information entries, including the preset flag bit, on its display interface based on device identification information obtained from multiple received broadcast messages, for user selection; and The identification information of the gateway device is determined based on the device identification information selected by the user.

17. The method according to claim 16, wherein, Displaying the one or more device identification information on the display interface includes: The display order of the one or more device identification information is determined based on the signal strength of the corresponding one or more broadcast information, including the one or more device identification information; and The device identification information of one or more devices is displayed in the specified display order.

18. The method according to claim 10, wherein the terminal device is a mobile terminal device.

19. A gateway device, comprising: One or more processors; The processor's memory is coupled to the processor; and A set of computer program instructions stored in the memory, which, when executed by a processor in the processor, perform the method according to any one of claims 1-9.

20. A terminal device, comprising: One or more processors; The processor's memory is coupled to the processor; and A set of computer program instructions stored in the memory, which, when executed by a processor in the processor, perform the method according to any one of claims 10-18.