Control methods, devices, wireless gateways and media

By replacing the console interface of the wireless gateway with a serial port and establishing a communication connection between wpa_cli and wpa_supplicant, the problem that devices such as AR glasses cannot operate the WiFi module of the wireless gateway is solved, and convenient network communication expansion is achieved.

CN115633367BActive Publication Date: 2025-10-31GEER TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211154129.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-10-31
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

Smart devices such as AR glasses cannot operate the WiFi module of a wireless gateway via serial port using wpa_cli, which limits their ability to expand network performance.

Method used

Replace the console interface on the wireless gateway with the first serial port, and establish a communication connection between the wpa_cli program and the wpa_supplicant program while the wireless gateway is in the startup state. Connect the terminal device through the first serial port and send control commands to the WIFI module of the wireless gateway.

Benefits of technology

This invention enables the control of a WiFi module for a wireless gateway via a serial port, expanding the wireless network communication capabilities of terminal devices such as AR glasses and fully leveraging the technological advantages of next-generation wireless solutions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633367B_ABST
    Figure CN115633367B_ABST
Patent Text Reader

Abstract

This disclosure provides a control method, apparatus, wireless gateway, and medium. The control method includes: replacing the console interface on the wireless gateway with a first serial port on the wireless gateway; establishing a communication connection between the wpa_cli program and the wpa_supplicant program of the wireless gateway when the wireless gateway is in a startup state; connecting the terminal device to the terminal device so that the terminal device sends control commands to the wireless gateway; and the wpa_cli program sending the control commands to the WIFI module of the wireless gateway based on the communication connection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and more specifically, to a control method, apparatus, wireless gateway, and medium. Background Technology

[0002] A wireless gateway is a wireless access point (AP) that integrates simple routing functions. In other words, a wireless gateway can perform the functions of a wireless bridge and a wireless router through different settings, and can also directly connect to external networks such as WAN, thus realizing the AP function.

[0003] wpa_supplicant is a cross-platform WPA requester program that supports WEP, WPA, and WPA2 (IEEE 802.11i) and can be used on desktops, laptops, and even embedded systems. Furthermore, wpa_supplicant provides wpa_cli as a command-line interface for wireless network connectivity. Launching wpa_cli will open an interactive interface where you can enter a series of control commands.

[0004] However, because the wpa_cli's interactive mode relies on the console function on the wireless gateway, users can only run the various control commands provided by wpa_cli on the wireless gateway's console. AR glasses or other smart devices cannot use wpa_cli to operate the wireless gateway's WiFi module via serial port, which greatly limits the ability of AR glasses without high-speed network capabilities to extend their network performance using the wireless gateway. Summary of the Invention

[0005] The purpose of this disclosure is to provide a control method, apparatus, wireless gateway, and medium, wherein the method includes:

[0006] Replace the console interface on the wireless gateway with the first serial port on the wireless gateway;

[0007] When the wireless gateway is in the startup state, establish a communication connection between the wireless gateway's wpa_cli program and the wireless gateway's wpa_supplicant program;

[0008] Connect the terminal device to the first serial port so that the terminal device can send control commands to the wireless gateway;

[0009] The wpa_cli program sends the control commands to the WIFI module of the wireless gateway based on the communication connection.

[0010] Optionally, replacing the console interface on the wireless gateway with the first serial port on the wireless gateway includes:

[0011] Modify the wpa_cli tool code of the wireless gateway to obtain a first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway;

[0012] Compile the first code file;

[0013] Update the compiled first code file to the file system of the wireless gateway.

[0014] Optionally, before establishing the communication connection between the wpa_cli program and the wpa_supplicant program, the following steps are also included:

[0015] Add the first parameter to the startup parameters of the wpa_cli program;

[0016] The first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

[0017] Optionally, before connecting the terminal device to the first serial port, the method further includes:

[0018] Initialize the wireless gateway.

[0019] Optionally, the control commands include one of a scan command and a connect command.

[0020] According to a second aspect of this disclosure, a control device is provided, the device comprising:

[0021] A replacement module is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway.

[0022] A module is established to establish a communication connection between the wpa_cli program and the wpa_supplicant program of the wireless gateway when the wireless gateway is in the startup state.

[0023] A connection module is used to connect a terminal device to the first serial port so that the terminal device can send control commands to the wireless gateway.

[0024] A sending module is used by the wpa_cli program to send the control commands to the WIFI module of the wireless gateway based on the communication connection.

[0025] Optionally, the replacement module is specifically used for:

[0026] Modify the wpa_cli tool code of the wireless gateway to obtain a first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway;

[0027] Compile the first code file;

[0028] Update the compiled first code file to the file system of the wireless gateway.

[0029] Optionally, the device further includes an adding module for:

[0030] Add the first parameter to the startup parameters of the wpa_cli program;

[0031] The first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

[0032] According to a third aspect of this disclosure, a wireless gateway is provided, the wireless gateway comprising:

[0033] Memory is used to store executable computer instructions;

[0034] A processor, configured to execute the control method described in the first aspect above, under the control of the executable computer instructions.

[0035] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the control method described in the first aspect above.

[0036] One beneficial effect of this disclosure is that it can replace the console interface on the wireless gateway with the first serial port on the wireless gateway. When the wireless gateway is in the startup state, a communication connection is established between the wpa_cli program and the wpa_supplicant program of the wireless gateway. The terminal device is connected through the first serial port, enabling the terminal device to send control commands to the wireless gateway. The wpa_cli program then sends the control commands to the WiFi module of the wireless gateway based on the communication connection. In other words, this disclosure allows the console interface to be replaced with a regular serial port read / write interface, enabling interactive mode command input via the regular serial port for wpa_cli. This allows for control of the WiFi module of the wireless gateway via the serial port, conveniently expanding the wireless network communication capabilities of terminal devices such as AR glasses, and fully utilizing the technological advantages of next-generation wireless solutions.

[0037] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description

[0038] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of this specification and, together with their description, serve to explain the principles of this specification.

[0039] Figure 1 This is a schematic diagram of the hardware configuration of the control system according to an embodiment of the present disclosure;

[0040] Figure 2 This is a flowchart illustrating a control method according to an embodiment of the present disclosure;

[0041] Figure 3 This is a schematic block diagram of a control device according to an embodiment of the present disclosure;

[0042] Figure 4 This is a schematic block diagram of a wireless gateway according to an embodiment of the present disclosure. Detailed Implementation

[0043] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the embodiments of the present disclosure.

[0044] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0045] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0046] In all the examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0047] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0048] <Hardware Configuration>

[0049] Figure 1 This is a block diagram of the hardware configuration of a control system according to an embodiment of the present disclosure. Figure 1 As shown, the control system 10 includes a wireless gateway 1000 and a terminal device 2000, which are connected via a serial port.

[0050] like Figure 1 As shown, the wireless gateway 1000 refers to a wireless access point (AP) that integrates simple routing functions. That is, the wireless gateway can perform the functions of a wireless bridge and a wireless router through different settings, and can also directly connect to external networks such as WAN, while realizing the AP function.

[0051] In one embodiment, such as Figure 1 As shown, the wireless gateway 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, etc.

[0052] The processor 1100 may include, but is not limited to, a central processing unit (CPU) or a microprocessor (MCU). The memory 1200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk. The interface device 1300 includes, for example, various bus interfaces, such as serial bus interfaces (including USB interfaces) and parallel bus interfaces. The communication device 1400 is capable of wired or wireless communication. The display device 1500 is, for example, a liquid crystal display (LCD), an LED display, or an OLED (Organic Light-Emitting Diode) display. The input device 1600 includes, for example, a touchscreen, a keyboard, and a gamepad. The wireless gateway 1000 can output audio information via a speaker 1700 and acquire audio information via a microphone 1800.

[0053] Those skilled in the art should understand that, although in Figure 1 The wireless gateway 1000 is shown in the specification, but the wireless gateway 1000 of the embodiments in this specification may only involve some of the devices, or may also include other devices, which is not limited here.

[0054] In this embodiment, the memory 1200 of the wireless gateway 1000 is used to store instructions that control the processor 1100 to operate in order to implement or support the implementation of the control method according to any embodiment. Those skilled in the art can design instructions based on the scheme disclosed in this specification. How the instructions control the processor to operate is well known in the art and will not be described in detail here.

[0055] like Figure 1 As shown, the terminal device 1000 can be smart glasses, which can be AR glasses, or of course other devices. This disclosure does not limit the specific devices.

[0056] In one embodiment, such as Figure 1As shown, the terminal device 2000 may include a processor 2100, a memory 2200, an interface device 2300, a communication device 2400, a display device 2500, an input device 2600, a speaker 2700, a microphone 2800, etc.

[0057] The processor 2100 may include, but is not limited to, a central processing unit (CPU) or a microprocessor (MCU). The memory 2200 includes, for example, ROM (Read-Only Memory), RAM (Random Access Memory), and non-volatile memory such as a hard disk. The interface device 2300 includes, for example, various bus interfaces, such as serial bus interfaces (including USB interfaces) and parallel bus interfaces. The communication device 2400 is capable of wired or wireless communication. The display device 2500 is, for example, a liquid crystal display (LCD), an LED display, or an OLED (Organic Light-Emitting Diode) display. The input device 2600 includes, for example, a touchscreen, a keyboard, and a gamepad. The terminal device 2000 can output audio information via a speaker 2700 and acquire audio information via a microphone 2800.

[0058] Those skilled in the art should understand that, although in Figure 1 The terminal device 2000 is shown in the specification, but the terminal device 2000 in the embodiments of this specification may only involve some of the devices, or may also include other devices, which is not limited here.

[0059] It should be understood that, despite Figure 1 Only one wireless gateway 1000 and one terminal device 2000 are shown, but this does not mean that the number of each is limited. The control system 100 may contain multiple wireless gateways 1000 and multiple terminal devices 2000.

[0060] <Method Implementation>

[0061] Figure 2 An embodiment of the present disclosure illustrates a control method that can be implemented by a wireless gateway, or by a control device independent of the wireless gateway and the wireless gateway together, or by a cloud server and the wireless gateway together.

[0062] like Figure 2 As shown, the control method of this embodiment may include the following steps S2100 to S2400:

[0063] Step S2100: Replace the console interface on the wireless gateway with the first serial port on the wireless gateway.

[0064] A wireless gateway is a wireless access point (AP) that integrates simple routing functionality. Through different settings, a wireless gateway can function as a wireless bridge and a wireless router, and can also directly connect to external networks such as WANs, thus functioning as an AP. A wireless gateway typically has one 10Mbps or 10 / 100 / 1000Mbps WAN port, multiple (4–8) 10 / 100 / 1000Mbps LAN ports, a wireless LAN access point supporting IEEE 802.11a, b, g, n, ac, and ax standards, and hardware devices with Network Address Translation (NAT) functionality to enable shared Internet access for multiple users.

[0065] In one embodiment, step S2100, which replaces the console interface on the wireless gateway with the first serial port on the wireless gateway, may further include the following steps S2110 to S2130:

[0066] Step S2110: Modify the wpa_cli tool code of the wireless gateway to obtain the first code file.

[0067] The first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway. The console on the wireless gateway can be a Linux console.

[0068] Step S2120: Compile the first code file.

[0069] Step S2130: Update the compiled first code file to the file system of the wireless gateway.

[0070] Based on steps S2110 to S2130 above, by modifying the wpa_cli tool code of the wireless gateway and updating the compiled first code file to the wireless gateway's file system, the console interface can be replaced with a regular serial port read / write interface.

[0071] After performing step S2100 to replace the console interface on the wireless gateway with the first serial port on the wireless gateway, proceed to:

[0072] Step S2200: When the wireless gateway is in the startup state, establish a communication connection between the wpa_cli program and the wpa_supplicant program of the wireless gateway.

[0073] The wpa_supplicant program is a cross-platform WPA supplicant program that supports WEP, PA, and WPA2 (IEEE 802.11i) and can be used on desktops, laptops, and even embedded systems. wpa_supplicant is the IEEE 802.1X / WPA component used on the client side, supporting interaction with the WPA Authenticator to control IEEE 802.11 authentication and association for roaming and wireless driving.

[0074] The wpa_cli program is a command-line interface tool for wireless network connection. It needs to communicate with the wpa_supplicant program to control the WIFI module of the wireless gateway.

[0075] It is understandable that a communication connection between the wpa_supplicant and wpa_cli programs can only be established when both are running in the background. Typically, when the wireless gateway is running, the wpa_supplicant program runs in the background by default, while the wpa_cli program is stopped by default. Therefore, before establishing a communication connection between the wpa_cli and wpa_supplicant programs, a first parameter needs to be added to the startup parameters of the wpa_cli program. This first parameter indicates that the wpa_cli program should run in the background after the wireless gateway starts. In other words, by adding the first parameter to the startup parameters of the wpa_cli program, it ensures that the wpa_cli program also runs in the background when the wireless gateway is running, thus enabling the call to the wpa_cli_interactive function to establish a socket communication connection between the wpa_cli and wpa_supplicant programs.

[0076] After executing step S2200, which establishes a communication connection between the wireless gateway's wpa_cli program and wpa_supplicant program when the wireless gateway is in the startup state, proceed to:

[0077] Step S2300: Connect the terminal device to the first serial port so that the terminal device sends control commands to the wireless gateway.

[0078] Before performing step S2300 to connect the terminal device to the terminal device, the control method of this embodiment further includes the step of initializing the wireless gateway. For example, the wpa_cli program calls the start_edit function to initialize the user editing module and initialize the wireless gateway, waiting for the user to input control commands.

[0079] The control commands include one of a scan command and a connect command. The scan command instructs the wireless gateway's Wi-Fi module to scan for nearby Wi-Fi signals. The connect command instructs the terminal device to connect to a target Wi-Fi signal among the Wi-Fi signals detected by the wireless gateway's Wi-Fi module.

[0080] Of course, control commands may also include authentication commands and other commands, but this embodiment does not limit this.

[0081] For example, taking smart glasses, such as AR glasses, as the terminal device, the AR glasses can send a scanning command to the wireless gateway through the first serial port, so that the WIFI module of the wireless gateway can scan the surrounding WIFI signals.

[0082] For example, taking smart glasses, such as AR glasses, as the terminal device, the AR glasses can send a connection command to the wireless gateway through the first serial port, so that the WIFI module of the wireless gateway can control the AR glasses to connect with the target WIFI signal in the WIFI signals searched by the WIFI module.

[0083] After executing step S2300, which connects the terminal device via the first serial port to enable the terminal device to send control commands to the wireless gateway, the process proceeds to:

[0084] In step S2400, the wpa_cli program sends the control command to the WIFI module of the wireless gateway based on the communication connection.

[0085] Continuing the example above, the wpa_cli program reads the scan command received through the first serial port and sends it to the Wi-Fi module of the wireless gateway based on the communication connection with the wpa_supplicant program. After receiving the scan command, the Wi-Fi module scans for nearby Wi-Fi signals and displays the names of the found signals. Simultaneously, the Wi-Fi module can transmit the names of the found Wi-Fi signals to the AR glasses via the first serial port.

[0086] Continuing the example above, the wpa_cli program reads the connection command received through the first serial port and sends it to the Wi-Fi module of the wireless gateway based on the communication connection with the wpa_supplicant program. After receiving the connection command, the Wi-Fi module can connect the AR glasses to the target Wi-Fi signal among the searched Wi-Fi signals. The target Wi-Fi signal can be the highest quality Wi-Fi signal among the searched signals, or it can be a Wi-Fi signal specified by the AR glasses from the Wi-Fi signals searched by the wireless gateway.

[0087] According to embodiments of this disclosure, the console interface on the wireless gateway can be replaced with a first serial port on the wireless gateway. When the wireless gateway is in the startup state, a communication connection is established between the wpa_cli program and the wpa_supplicant program of the wireless gateway. A terminal device is connected via the first serial port, enabling the terminal device to send control commands to the wireless gateway. The wpa_cli program then sends the control commands to the WiFi module of the wireless gateway based on the communication connection. In other words, this disclosure allows the console interface to be replaced with a regular serial port read / write interface, enabling interactive mode command input via the regular serial port for wpa_cli. This allows for control of the WiFi module of the wireless gateway via the serial port, conveniently expanding the wireless network communication capabilities of terminal devices such as AR glasses, and fully utilizing the technological advantages of next-generation wireless solutions.

[0088] <Example>

[0089] The following example uses AR glasses as the terminal device to illustrate a control method, which includes:

[0090] Step S301: Modify the wpa_cli tool code of the wireless gateway to obtain the first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway.

[0091] Step S302: Compile the first code file and update the compiled first code file to the file system of the wireless gateway.

[0092] Step S303: Add a first parameter to the startup parameters of the wpa_cli program; wherein, the first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

[0093] Step S304: With the wireless gateway in the startup state, call the wpa_cli_interactive function to establish a communication connection between the wpa_cli program and the wpa_supplicant program.

[0094] In step S305, wpa_cli calls the start_edit function to initialize the user editing module and the serial port device, and waits for user input control commands.

[0095] Step S306: Connect the AR glasses to the first serial port. The AR glasses send control commands to the wireless gateway through the first serial port.

[0096] In step S307, the wpa_cli program, based on the communication connection with the wpa_supplicant program, sends control commands to the WIFI module of the wireless gateway, and returns the response instructions returned by the WIFI module based on the control commands to the AR glasses through the first serial port.

[0097] Based on this example, the problem of AR glasses being unable to manage and access the WiFi module of the wireless gateway can be solved. By controlling the WiFi module of the wireless gateway through the serial port, the wireless network communication capability of AR glasses can be conveniently expanded, making full use of the technological advantages brought by the next-generation wireless solution.

[0098] <Device Embodiment>

[0099] Figure 3 This is a schematic diagram of a control device according to one embodiment, with reference to... Figure 3 As shown, the device 300 includes a replacement module 310, an establishment module 320, a connection module 330, and a sending module 340.

[0100] Replacement module 310 is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway;

[0101] Establishment module 320 is used to establish a communication connection between the wpa_cli program and the wpa_supplicant program of the wireless gateway when the wireless gateway is in the startup state.

[0102] The connection module 330 is used to connect the terminal device to the first serial port so that the terminal device can send control commands to the wireless gateway.

[0103] The sending module 340 is used for the wpa_cli program to send the control commands to the WIFI module of the wireless gateway based on the communication connection.

[0104] In one embodiment, the replacement module 310 is specifically used for:

[0105] Modify the wpa_cli tool code of the wireless gateway to obtain a first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway;

[0106] Compile the first code file;

[0107] Update the compiled first code file to the file system of the wireless gateway.

[0108] In one embodiment, the device 300 further includes an adding module (not shown) for:

[0109] Add the first parameter to the startup parameters of the wpa_cli program;

[0110] The first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

[0111] In one embodiment, the device 300 further includes an initial module (not shown).

[0112] An initialization module is used to initialize the wireless gateway.

[0113] In one embodiment, the control command includes one of a scan command and a connect command.

[0114] According to embodiments of this disclosure, the console interface on the wireless gateway can be replaced with a first serial port on the wireless gateway. When the wireless gateway is in the startup state, a communication connection is established between the wpa_cli program and the wpa_supplicant program of the wireless gateway. A terminal device is connected via the first serial port, enabling the terminal device to send control commands to the wireless gateway. The wpa_cli program then sends the control commands to the WiFi module of the wireless gateway based on the communication connection. In other words, this disclosure allows the console interface to be replaced with a regular serial port read / write interface, enabling interactive mode command input via the regular serial port for wpa_cli. This allows for control of the WiFi module of the wireless gateway via the serial port, conveniently expanding the wireless network communication capabilities of terminal devices such as AR glasses, and fully utilizing the technological advantages of next-generation wireless solutions.

[0115] <Equipment Example>

[0116] Figure 4 This is a schematic diagram of the hardware structure of a wireless gateway according to one embodiment. Figure 4 As shown, the wireless gateway 400 includes a processor 410 and a memory 420.

[0117] The memory 420 can be used to store executable computer instructions.

[0118] The processor 410 can be used to execute the control method according to the method embodiments of this disclosure, under the control of the executable computer instructions.

[0119] The wireless gateway 400 can be as follows: Figure 1 The wireless gateway 1000 shown is not limited here.

[0120] In another embodiment, the wireless gateway 400 may include the control device 300 described above.

[0121] In one embodiment, each module of the control device 400 can be implemented by the processor 410 running computer instructions stored in the memory 420.

[0122] Computer-readable storage media

[0123] This disclosure also provides a computer-readable storage medium storing computer instructions thereon, which, when executed by a processor, perform the control method provided in this disclosure.

[0124] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0125] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0126] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0127] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0128] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0129] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0130] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0131] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially 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, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions. It will be known to those skilled in the art that implementation in hardware, implementation in software, and implementation in a combination of software and hardware are equivalent.

[0132] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of this disclosure is defined by the appended claims.

Claims

1. A control method, characterized in that, The method includes: Replace the console interface on the wireless gateway with the first serial port on the wireless gateway; When the wireless gateway is in the startup state, establish a communication connection between the wireless gateway's wpa_cli program and the wireless gateway's wpa_supplicant program; Connect the terminal device to the first serial port so that the terminal device can send control commands to the wireless gateway; The wpa_cli program sends the control commands to the WIFI module of the wireless gateway based on the communication connection.

2. The method according to claim 1, characterized in that, The step of replacing the console interface on the wireless gateway with the first serial port on the wireless gateway includes: Modify the wpa_cli tool code of the wireless gateway to obtain a first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway; Compile the first code file; Update the compiled first code file to the file system of the wireless gateway.

3. The method according to claim 1, characterized in that, Before establishing a communication connection between the wpa_cli and wpa_supplicant programs, the following steps are also included: Add the first parameter to the startup parameters of the wpa_cli program; The first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

4. The method according to claim 1, characterized in that, Before connecting the terminal device to the first serial port, the method further includes: Initialize the wireless gateway.

5. The method according to any one of claims 1-4, characterized in that, The control commands include either a scan command or a connect command.

6. A control device, characterized in that, The device includes: A replacement module is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway. A module is established to establish a communication connection between the wpa_cli program and the wpa_supplicant program of the wireless gateway when the wireless gateway is in the startup state. A connection module is used to connect a terminal device to the first serial port so that the terminal device can send control commands to the wireless gateway. A sending module is used by the wpa_cli program to send the control commands to the WIFI module of the wireless gateway based on the communication connection.

7. The apparatus according to claim 6, characterized in that, The replacement module is specifically used for: Modify the wpa_cli tool code of the wireless gateway to obtain a first code file; wherein, the first code file is used to replace the console interface on the wireless gateway with the first serial port on the wireless gateway; Compile the first code file; Update the compiled first code file to the file system of the wireless gateway.

8. The apparatus according to claim 6, characterized in that, The device further includes an adding module for: Add the first parameter to the startup parameters of the wpa_cli program; The first parameter is used to indicate that the wpa_cli program is running in the background after the wireless gateway is started.

9. A wireless gateway, characterized in that, The wireless gateway includes: Memory is used to store executable computer instructions; A processor configured to execute the control method according to any one of claims 1-5, under the control of the executable computer instructions.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the control method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Connection method for WIFI (Wireless Fidelity) hotspot, and intelligent terminal

    CN106793165A