WiFi signal relay method, system and storage medium
Technical Field
The present invention relates to the field of wireless relay technologies, and in particular, to a WiFi signal relaying method, system, and storage medium.
Background
Along with intelligent house, the rise of thing networking, can arrange wireless router and intelligent house controller in the current family usually, wireless router provides the wiFi signal for terminal equipment such as cell-phone, intelligent house controller provides the wiFi signal for intelligent house equipment in the family (like air conditioner, TV, camera etc.), because terminal equipment and intelligent house equipment are the overall arrangement dispersion at home, in order to make every terminal equipment and intelligent house equipment can both receive stronger wiFi signal, need relay the wiFi signal that wireless router and intelligent house controller provided and enlarge.
In the prior art, two WiFi amplifiers are adopted to respectively relay and amplify WiFi signals of a wireless router and an intelligent household controller, and the WiFi signal amplification mode needs to be provided with the two WiFi amplifiers at home, so that the occupied space is large and the cost is high.
Disclosure of Invention
The invention mainly provides a WiFi signal relay method which can solve the problems that two WiFi amplifiers are needed to be arranged in a household in the conventional mode of carrying out relay amplification on WiFi signals of a wireless router and an intelligent household controller, the occupied space is large and the cost is high.
In order to solve the technical problems, the invention adopts a technical scheme that: provided is a WiFi signal relaying method, including:
the amplifier is connected to a first wireless network of the wireless router according to first network information of the wireless router;
after the intelligent home controller is connected to the first wireless network according to the first network information, the amplifier is connected with the intelligent home controller;
the intelligent home controller sends second network information of a second wireless network of the intelligent home controller to the amplifier so that the amplifier is connected to the second wireless network according to the second network information;
and the amplifier relays and amplifies the WiFi signals of the first wireless network and the WiFi signals of the second wireless network according to the first network information and the second network information.
Preferably, after the step of connecting the smart home controller to the first wireless network according to the first network information, the method includes the following steps:
the intelligent home controller sends a device discovery broadcast message to the wireless router, and the wireless router forwards the device discovery broadcast message to the amplifier;
and when the amplifier monitors the equipment discovery broadcast message forwarded by the wireless router, the amplifier is connected with the intelligent home controller.
Preferably, the step of establishing connection between the amplifier and the smart home controller specifically includes:
the amplifier analyzes the monitored equipment discovery broadcast message to acquire the address information of the intelligent home controller;
and the amplifier establishes TCP connection with the intelligent home controller according to the address information.
Preferably, the address information of the smart home controller includes an IP address and a port number of the smart home controller.
Preferably, the first network information includes a network name and a login password of the first wireless network; the second network information includes a network name and a login password of the second wireless network.
Preferably, the step of connecting the amplifier to the first wireless network of the wireless router according to the first network information of the wireless router specifically includes:
the amplifier receives first network information of a first wireless network of the wireless router, which is sent by an intelligent terminal;
the amplifier is connected to the first wireless network according to the first network information.
Preferably, the step of connecting, by the smart home controller, to the first wireless network according to the first network information specifically includes:
the intelligent home controller receives first network information of a first wireless network of the wireless router, which is sent by an intelligent terminal;
and the intelligent home controller is connected to the first wireless network according to the first network information.
In order to solve the technical problem, the invention adopts another technical scheme that: the WiFi signal relay system comprises an amplifier, an intelligent household controller and a wireless router;
the amplifier is connected to a first wireless network of the wireless router according to first network information of the wireless router;
when the intelligent home controller is connected to the first wireless network according to the first network information, the amplifier is connected with the intelligent home controller;
the intelligent home controller sends second network information of a second wireless network of the intelligent home controller to the amplifier so that the amplifier is connected to the second wireless network according to the second network information;
and the amplifier relays and amplifies the WiFi signals of the first wireless network and the WiFi signals of the second wireless network according to the first network information and the second network information.
Preferably, the WiFi signal relay system further includes an intelligent terminal;
the intelligent terminal sends first network information of a first wireless network of the wireless router to the amplifier and the intelligent home controller;
the amplifier and the intelligent home controller are connected to the first wireless network according to the first network information.
In order to solve the technical problem, the invention adopts another technical scheme that: there is provided a storage medium having stored thereon a computer program which is executed by a processor to implement the WiFi signal relaying method described above.
The invention has the beneficial effects that: different from the situation of the prior art, in the WiFi signal relaying method provided by the invention, after the amplifier and the intelligent home controller are both connected to the first wireless network of the wireless router according to the first network information of the wireless router, the amplifier and the intelligent home controller can be connected, the intelligent home controller sends the second network information of the second wireless network to the amplifier, and then the amplifier can relay and amplify the WiFi signal of the first wireless network and the WiFi signal of the second wireless network according to the first network information and the second network information. In the invention, WiFi signals of the wireless router and the intelligent household controller can be amplified simultaneously by only one amplifier, so that the space occupied by equipment is reduced, and the cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without inventive efforts, wherein:
fig. 1 is a flowchart of a WiFi signal relaying method provided by an embodiment of the present invention;
fig. 2 is a flowchart of a WiFi signal relaying method provided by another embodiment of the present invention;
fig. 3 is a flowchart of a WiFi signal relaying method provided by another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a WiFi signal relay system provided by another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a storage medium according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a flowchart of a WiFi signal relaying method provided in an embodiment of the present invention, where an amplifier relays and amplifies WiFi signals of a wireless router and an intelligent home controller, the intelligent home controller is used to perform unified management and control on intelligent home devices in a home, and the WiFi signal relaying method includes step S100, step S200, step S300, and step S400.
Step S100: the amplifier is connected to the first wireless network of the wireless router according to the first network information of the wireless router.
Specifically, install amplifier APP on the intelligent terminal, the user can be at APP interface input wireless router's first network information, and intelligent terminal sends this first network information to the amplifier, and then the amplifier is connected to wireless router's first wireless network according to first network information. The wireless router provides a first wireless network, and the first network information comprises a network name and a login password of the first wireless network.
Step S200: and after the intelligent home controller is connected to the first wireless network according to the first network information, the amplifier is connected with the intelligent home controller.
Specifically, install intelligent house control APP on the intelligent terminal, the user can be at the first network information of APP interface input wireless router, and intelligent terminal sends this first network information to intelligent house controller, and then intelligent house controller is connected to the first wireless network of wireless router according to first network information. After the intelligent home controller is connected to the first wireless network, the intelligent home controller and the amplifier find each other, and then the amplifier is connected with the intelligent home controller. The amplifier and the intelligent home controller can establish TCP connection.
Step S300: the intelligent home controller sends the second network information of the second wireless network to the amplifier, so that the amplifier is connected to the second wireless network according to the second network information.
Specifically, after the amplifier is connected with the intelligent home controller, the intelligent home controller sends second network information of a second wireless network of the intelligent home controller to the amplifier, and the amplifier is connected to the second wireless network according to the second network information. The intelligent home controller provides a second wireless network, and the second network information comprises a network name and a login password of the second wireless network.
Step S400: the amplifier relays and amplifies the WiFi signals of the first wireless network and the WiFi signals of the second wireless network according to the first network information and the second network information.
Specifically, the amplifier relays and amplifies a WiFi signal of the first wireless network according to the first network information, and relays and amplifies a WiFi signal of the second wireless network according to the second network information. The intelligent home equipment in the family can be connected to the second wireless network after the relay amplification of the amplifier according to the second network information, and other intelligent terminal equipment can be connected to the first wireless network after the relay amplification of the amplifier according to the first network information.
In the embodiment of the invention, after the amplifier and the intelligent home controller are both connected to the first wireless network of the wireless router according to the first network information of the wireless router, the amplifier and the intelligent home controller can establish connection, the intelligent home controller sends the second network information of the second wireless network to the amplifier, and then the amplifier can relay and amplify the WiFi signal of the first wireless network and the WiFi signal of the second wireless network according to the first network information and the second network information. In the invention, WiFi signals of the wireless router and the intelligent household controller can be amplified simultaneously by only one amplifier, so that the space occupied by equipment is reduced, and the cost is reduced.
Example two
Fig. 2 is a flowchart of a WiFi signal relaying method according to another embodiment of the present invention, which further includes step S201 and step S202 after the step of connecting the smart home controller to the first wireless network according to the first network information.
Step S201: the intelligent home controller sends the device discovery broadcast message to the wireless router, and the wireless router forwards the device discovery broadcast message to the amplifier.
Specifically, after the smart home controller is connected to the first wireless network of the wireless router, the smart home controller joins the first wireless network and sends the device discovery broadcast packet to the wireless router, and the wireless router forwards the device discovery broadcast packet to the amplifier. The device finds that the broadcast message is a broadcast message sent by the intelligent home controller after the intelligent home controller is added to the first wireless network.
Step S202: when the amplifier monitors the equipment discovery broadcast message forwarded by the wireless router, the amplifier is connected with the intelligent home controller.
Specifically, the amplifier monitors a broadcast message forwarded by the wireless router and from the smart home controller, and when the amplifier monitors that the device finds the broadcast message, the amplifier establishes connection with the smart home controller.
Further specifically, the device finds that the broadcast message is a UDP message, the amplifier determines whether the received broadcast message is a broadcast message received by a preset port, and if so, determines that the broadcast message is the device found broadcast message, and then establishes a connection with the smart home controller.
In the embodiment of the invention, the amplifier monitors the broadcast message forwarded by the wireless router, and when the monitoring device finds the broadcast message, the amplifier is connected with the intelligent home controller.
EXAMPLE III
Fig. 3 is a flowchart of a WiFi signal relaying method according to another embodiment of the present invention, where the step of establishing connection between the amplifier and the smart home controller specifically includes step S203 and step S204.
Step S203: the amplifier analyzes the monitored equipment discovery broadcast message to acquire the address information of the intelligent home controller.
Specifically, address information of the smart home controller is analyzed from the monitored device discovery broadcast message.
Step S204: and the amplifier establishes TCP connection with the intelligent home controller according to the address information.
Specifically, the address information of the intelligent home controller includes an IP address and a port number of the intelligent home controller, and the amplifier establishes a TCP connection with the intelligent home controller according to the IP address and the port number of the intelligent home controller.
In the embodiment of the invention, the amplifier analyzes the IP address and the port number of the intelligent home controller according to the equipment discovery broadcast message, and establishes TCP connection with the intelligent home controller according to the IP address and the port number, so that the amplifier and the intelligent home controller can transmit information.
Example four
Fig. 4 is a schematic structural diagram of a WiFi signal relay system according to another embodiment of the present invention, where the WiFi signal relay system includes an amplifier 100, an intelligent home controller 200, and a wireless router 300.
The amplifier 100 is connected to the first wireless network of the wireless router 300 according to the first network information of the wireless router 300.
After the smart home controller 200 is connected to the first wireless network according to the first network information, the amplifier 100 establishes a connection with the smart home controller 200.
The smart home controller 200 transmits second network information of the second wireless network thereof to the amplifier 100, so that the amplifier 100 is connected to the second wireless network according to the second network information.
The amplifier 100 relays and amplifies WiFi signals of the first wireless network and WiFi signals of the second wireless network according to the first network information and the second network information.
The wireless router 300 provides a first wireless network, the smart home controller 200 provides a second wireless network, the first network information includes a network name and a login password of the first wireless network, and the second network information includes a network name and a login password of the second wireless network.
Preferably, the WiFi signal relay system further includes an intelligent terminal; the intelligent terminal sends first network information of a first wireless network of the wireless router to the amplifier and the intelligent home controller; the amplifier and the intelligent home controller are connected to the first wireless network according to the first network information.
The specific implementation of the WiFi signal relay system provided in the embodiment of the present invention is the same as the specific implementation of the WiFi signal relay method, and the specific implementation of the WiFi signal relay system may refer to the descriptions of the first to third embodiments, which are not described herein again.
In the embodiment of the invention, after the amplifier and the intelligent home controller are both connected to the first wireless network of the wireless router according to the first network information of the wireless router, the amplifier and the intelligent home controller can establish connection, the intelligent home controller sends the second network information of the second wireless network to the amplifier, and then the amplifier can relay and amplify the WiFi signal of the first wireless network and the WiFi signal of the second wireless network according to the first network information and the second network information. In the invention, WiFi signals of the wireless router and the intelligent household controller can be amplified simultaneously by only one amplifier, so that the space occupied by equipment is reduced, and the cost is reduced.
EXAMPLE five
Referring to fig. 5, fig. 5 is a schematic diagram of a storage medium according to another embodiment of the present invention, in which a computer program 400 is stored on the computer-readable storage medium, and the computer program 400 can be executed by a processor to implement the WiFi signal relaying method according to any one of the first to third embodiments.
Alternatively, the readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or may be a terminal device such as a computer, a server, a mobile phone, or a tablet.
In the invention, after the amplifier and the intelligent home controller are both connected to the first wireless network of the wireless router according to the first network information of the wireless router, the amplifier and the intelligent home controller can establish connection, the intelligent home controller sends the second network information of the second wireless network to the amplifier, and then the amplifier can relay and amplify the WiFi signal of the first wireless network and the WiFi signal of the second wireless network according to the first network information and the second network information. In the invention, WiFi signals of the wireless router and the intelligent household controller can be amplified simultaneously by only one amplifier, so that the space occupied by equipment is reduced, and the cost is reduced.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.