CN107071793B - Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment - Google Patents

Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment Download PDF

Info

Publication number
CN107071793B
CN107071793B CN201710480601.0A CN201710480601A CN107071793B CN 107071793 B CN107071793 B CN 107071793B CN 201710480601 A CN201710480601 A CN 201710480601A CN 107071793 B CN107071793 B CN 107071793B
Authority
CN
China
Prior art keywords
data packet
wifi
wifi equipment
distribution network
identification data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710480601.0A
Other languages
Chinese (zh)
Other versions
CN107071793A (en
Inventor
潘俭斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GD Midea Air Conditioning Equipment Co Ltd
Original Assignee
GD Midea Air Conditioning Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GD Midea Air Conditioning Equipment Co Ltd filed Critical GD Midea Air Conditioning Equipment Co Ltd
Priority to CN201710480601.0A priority Critical patent/CN107071793B/en
Publication of CN107071793A publication Critical patent/CN107071793A/en
Application granted granted Critical
Publication of CN107071793B publication Critical patent/CN107071793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W16/00Network planning, e.g. coverage or traffic planning tools; Network deployment, e.g. resource partitioning or cells structures
    • H04W16/18Network planning tools
    • H04W16/20Network planning tools for indoor coverage or short range network deployment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a network distribution method of WiFi equipment and related equipment, wherein the network distribution method of the WiFi equipment comprises the following steps: the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state; when a channel switching and scanning instruction is detected, setting and generating a delayed channel switching instruction; and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment. The invention solves the technical problems that the success rate of channel locking is low and the distribution efficiency is reduced in the distribution process of WiFi equipment.

Description

Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment
Technical Field
The invention relates to the technical field of wireless communication, in particular to a network distribution method of WiFi equipment and related equipment.
Background
When a WiFi device without a man-machine interaction screen or keyboard is rapidly distributed with a network, SSID and password information of a router are sent to the WiFi device through a mobile terminal in a wireless magnetic wave mode under a WiFi channel, before the SSID and the password information of the wireless router are sent by the mobile terminal, a plurality of identification data packets (called initial data packets) for identifying the start of distribution network are sent by the mobile terminal, and the WiFi device can lock the WiFi channel corresponding to the initial data packets if the initial data packets are identified to be effective distribution network initial identifications, so that the SSID and the password information of the router can be received.
When the WiFi module of the WiFi equipment receives the electromagnetic waves sent by the mobile terminal, the phenomenon that the channel needs to be switched at once after a certain channel receives a data packet for identifying the beginning of the distribution network easily occurs, namely the WiFi module needs to scan a round of channel again (namely after scanning 13 channels), and then the WiFi module can enter the channel used by the router of the actual distribution network again, namely the success rate of channel locking of the WiFi equipment in the process of the distribution network is low, and the efficiency of the distribution network is reduced.
Disclosure of Invention
The invention mainly aims to provide a network distribution method of WiFi equipment, the WiFi equipment, an air conditioner and a readable storage medium, and aims to solve the technical problems that in the prior art, the success rate of channel locking is low in the network distribution process of the WiFi equipment, and the network distribution efficiency is reduced.
In order to achieve the above object, the present invention provides a network distribution method for WiFi devices, where a network distribution packet includes a first identification packet, and the network distribution method for WiFi devices includes:
the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state;
when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction;
and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment.
Optionally, after the step of suspending switching of scanning channels by the WiFi device based on the delayed channel switching instruction, the method includes:
the WiFi equipment records the pause time after pausing the switching of the scanning channels;
and when the pause time is more than or equal to the preset scanning time, if the WiFi equipment does not receive a second identification data packet sent by the mobile terminal, resetting the WiFi equipment to an idle state.
Optionally, if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device enters a state of receiving a distribution network data packet, and completing the network access configuration of the WiFi device according to the received distribution network data packet includes:
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks a WiFi channel for receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
and if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to the preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet.
Optionally, the distribution network data packet includes a router service set identifier SSID and a password, and if the WiFi device receives the distribution network data packet, completing a network access configuration according to the distribution network data packet includes:
and if the WiFi equipment receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi equipment is connected with a corresponding router according to the received identifier SSID and the password of the router service set, and network access configuration is completed.
Optionally, the step of determining that the current state is the initial state when the WiFi device scans each channel and detects a first identification data packet which is sent by the mobile terminal and identifies the start of the distribution network, includes:
the WiFi equipment scans all channels, and if a first identification data packet which is sent by a mobile terminal and identifies the beginning of a distribution network is detected in any channel, the current state is determined to be an initial state, wherein the mobile terminal continuously sends the first identification data packet for preset times.
Optionally, when detecting, on any channel, a first identification data packet that identifies the start of the distribution network and is sent by the mobile terminal, the step of recording the current state as the starting state further includes:
in the initial state, if the first identification data packet is detected again, the WiFi device ignores the first identification data packet.
Optionally, the network distribution method for the WiFi device is applied to network access configuration of the WiFi device in an air conditioner.
Optionally, the network distribution method of the WiFi device includes:
the method comprises the steps that a mobile terminal sends a first identification data packet with preset times, a second identification data packet with preset times, a state reset data packet with preset times and a distribution network data packet to WiFi equipment on a preset WiFi channel according to a preset sequence, wherein the preset times are more than one time;
and after the mobile terminal finishes sending each data packet, the mobile terminal enters a detection state so as to determine whether the WiFi equipment finishes network access configuration.
The invention also provides a WiFi device, where the WiFi device distribution network apparatus is applied to a WiFi device, the WiFi device is applied to an air conditioner, the WiFi device is applied to the air conditioner, and the WiFi device includes:
the determining module is used for scanning each channel, and determining that the current state is an initial state if a first identification data packet which is sent by the mobile terminal and used for identifying the start of the distribution network is detected in any channel;
the setting module is used for setting and generating a delayed channel switching instruction when detecting a channel switching and scanning instruction in the initial state;
and the time delay switching module is used for suspending switching of scanning channels based on the time delay switching channel instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete network access configuration of the WiFi equipment according to the received distribution network data packet.
In addition, to achieve the above object, the present invention further provides a distribution network device of a WiFi device, where the distribution network device of the WiFi device includes: a memory, a processor, a communication bus, and a distribution network program for a WiFi device stored on the memory,
the communication bus is used for realizing communication connection between the processor and the memory;
the processor is used for executing a distribution network program of the WiFi equipment to realize the following steps:
the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state;
when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction;
and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment according to the received distribution network data packet.
Optionally, after the step of suspending switching of scanning channels by the WiFi device based on the delayed channel switching instruction, the method includes:
the WiFi equipment records the pause time after pausing the switching of the scanning channels;
and when the pause time is more than or equal to the preset scanning time, if the WiFi equipment does not receive a second identification data packet sent by the mobile terminal, resetting the WiFi equipment to an idle state.
Optionally, if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device enters a state of receiving a distribution network data packet, and completing the network access configuration of the WiFi device according to the received distribution network data packet includes:
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks a WiFi channel for receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
and if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to the preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet.
Optionally, the distribution network data packet includes a router service set identifier SSID and a password, and if the WiFi device receives the distribution network data packet, completing a network access configuration according to the distribution network data packet includes:
and if the WiFi equipment receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi equipment is connected with a corresponding router according to the received identifier SSID and the password of the router service set, and network access configuration is completed.
Optionally, the step of determining that the current state is the initial state when the WiFi device scans each channel and detects a first identification data packet which is sent by the mobile terminal and identifies the start of the distribution network, includes:
the WiFi equipment scans all channels, and if a first identification data packet which is sent by a mobile terminal and identifies the beginning of a distribution network is detected in any channel, the current state is determined to be an initial state, wherein the mobile terminal continuously sends the first identification data packet for preset times.
Optionally, when detecting, on any channel, a first identification data packet that identifies the start of the distribution network and is sent by the mobile terminal, the step of recording the current state as the starting state further includes:
in the initial state, if the first identification data packet is detected again, the WiFi device ignores the first identification data packet.
Optionally, the network distribution method for the WiFi device is applied to network access configuration of the WiFi device in an air conditioner.
And after the mobile terminal finishes sending each data packet, the mobile terminal enters a detection state so as to determine whether the WiFi equipment finishes network access configuration.
In addition, in order to achieve the purpose, the invention further provides an air conditioner which comprises the distribution network device of the WiFi equipment.
Further, to achieve the above object, the present invention also provides a readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for:
the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state;
when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction;
and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment according to the received distribution network data packet.
The WiFi equipment scans all channels, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state; when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction; and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment. Due to the fact that the WiFi equipment is set to generate the delayed channel switching instruction in the initial state, the probability that the WiFi equipment cannot receive the second identification data packet is reduced, namely the success rate of channel locking of the WiFi equipment is increased in the network distribution process, and the efficiency of network distribution is improved.
Drawings
Fig. 1 is a schematic flowchart of a network distribution method of a WiFi device according to a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a network distribution method of a WiFi device according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an apparatus architecture of a hardware operating environment to which a method of an embodiment of the invention relates;
fig. 4 is a scene schematic diagram of a network distribution method of a WiFi device of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a network distribution method for WiFi (wireless fidelity) equipment, which comprises the following steps of, in a first embodiment of the network distribution method for the WiFi equipment, referring to FIG. 1:
step S10, the WiFi equipment scans each channel, and if a first identification data packet which is sent by the mobile terminal and identifies the beginning of the distribution network is detected in any channel, the current state is determined to be an initial state;
the mobile terminal includes a mobile phone, a tablet and other intelligent terminals, the following embodiments are described by taking a mobile phone as an example, a WiFi device, such as an air conditioner, a refrigerator, a WiFi device built in an air purifier and the like, to which a WiFi (wireless network) module is connected, is called WiFi device for short, the WiFi device can only receive but not transmit data, the WiFi device needs to perform a fast network access configuration before using a WiFi function, the fast network access configuration is generally realized by sending a broadcast or multicast data packet on a fixed WiFi channel through a mobile phone APP, the WiFi device in a monitoring mode monitors and receives the broadcast or multicast data packet sent by the mobile phone APP on a corresponding WiFi channel, the WiFi device scans each channel during monitoring and receiving the broadcast or multicast data packet sent by the mobile phone APP on the corresponding WiFi channel, wherein the WiFi device scans each channel in a sequence that a first channel is scanned first and then a second channel is scanned, a third channel and a 13 th channel are scanned finally, or the scanning sequence may be a sequence of scanning a common channel first, for example, scanning a sixth channel first and then scanning other channels, when the WiFi device scans 1-13 channels, the WiFi device stays for a scanning time in each channel to receive SSID and password information of a wireless router sent by the mobile terminal in a radio magnetic wave form on the corresponding WiFi channel, and after receiving the corresponding radio electromagnetic wave, the WiFi module connects to the corresponding router device according to the SSID and password information carried in the electromagnetic wave to implement network configuration, as shown in fig. 4.
When the mobile terminal sends SSID and password information of a wireless router, a plurality of identification data packets (or called initial data packets) for identifying the start of a distribution network are sent first, wherein the identification data packets include feature codes agreed by WiFi equipment and the mobile terminal, the mobile terminal stores sent effective data or identification data packets on 3 hardware (mac) addresses of a multicast packet like a mobile phone, that is, each data packet can only carry 3 bytes of effective data, therefore, the mobile terminal generally sends 2 initial data packets, a first identification data packet and a second identification data packet, and after receiving a corresponding initial data packet, if the initial data packet is identified as an effective distribution network initial identification, a WiFi channel corresponding to the initial data packet can be locked and sent, and the mobile terminal enters a stage of receiving the distribution network data packet under the WiFi channel.
In this embodiment, if a first identification data packet sent by the mobile terminal and starting from the identification distribution network is detected on any channel, the current state is recorded as an initial state, wherein the mobile terminal continuously sends the first identification data packet for a preset number of times, the preset number of times is greater than one, optionally, the number of times that the mobile terminal sends the first identification data packet is 2 times, and the mobile terminal continuously sends 2 times, that is, the mobile terminal sends other data packets after sending the first identification data packet for 2 times, because the mobile terminal continuously sends the first identification data packet, the probability of losing the WiFi channel of the first identification data packet is reduced, if the WiFi device obtains the first identification data packet or captures the first identification data packet, if the WiFi device loses the current first identification data packet due to the mobile terminal sending the first identification data packet for multiple times, the WiFi device can continue to obtain the first identification data packet in the following process, the WiFi equipment is prevented from needing to rotate 13 scanning times and then being capable of capturing the first identification data packet.
Step S20, when the WiFi equipment detects a channel switching and scanning instruction in an initial state, setting and generating a delay channel switching instruction;
the WiFi equipment can not determine or lock a current channel when in an initial state, namely after the WiFi equipment acquires a first identification data packet, namely the WiFi equipment is still in a scanning state, because the WiFi equipment scans different channels at preset scanning time intervals, if the time point of scanning channel switching is reached, namely the WiFi equipment detects the scanning channel switching instruction, a delay channel switching instruction is set and generated, the corresponding program of the delay channel switching instruction is embedded in a distribution network program of a WiFi module, and the WiFi equipment suspends the switching of scanning channels based on the delay channel switching instruction, namely the WiFi equipment enters the switching state of the scanning channel suspending from the initial state.
Step S30, the WiFi device suspends switching of the scanning channel based on the delayed switching channel instruction to wait for receiving a second identification data packet, wherein if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device enters a state of receiving a state reset data packet and a state distribution network data packet to complete network access configuration of the WiFi device.
WiFi equipment is in the initial state, and WiFi equipment is after receiving first identification data package promptly, and current channel still can not be locked to WiFi equipment, if detect the second identification data package that mobile terminal sent, and WiFi equipment side can lock current scanning channel, WiFi equipment is after locking current scanning channel, other channels of pause scanning enter into the mode of receiving the distribution network data package that mobile terminal sent to accomplish the configuration of logging in, after accomplishing the configuration of logging in, mobile terminal can realize the control to WiFi equipment through APP or software like the cell-phone, like can set up the temperature of strange land WiFi equipment like the air conditioner on cell-phone APP, wind speed etc..
In this embodiment, through step S10, the WiFi device scans each channel, and determines that the current state is the initial state if a first identification packet, which is sent by the mobile terminal and identifies the start of the distribution network, is detected in any channel; step S20, the WiFi equipment sets and generates a delay channel switching instruction when detecting a channel switching and scanning instruction in the initial state; step S30, the WiFi device suspends switching of the scanning channel based on the delayed switching channel instruction to wait for receiving a second identification data packet, wherein if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device enters a state of receiving a distribution network data packet to complete network access configuration of the WiFi device. Due to the fact that the WiFi equipment is set to generate the delayed channel switching instruction in the initial state, the probability that the WiFi equipment cannot receive the second identification data packet is reduced, namely the success rate of channel locking of the WiFi equipment is increased in the network distribution process, and the efficiency of network distribution is improved.
Further, on the basis of the first embodiment of the network distribution method for the WiFi device in the present invention, a second embodiment of the network distribution method for the WiFi device is provided, and in the second embodiment, as shown in fig. 2, after the step of suspending the switching of the scanning channel by the WiFi device based on the delayed channel switching instruction, the method includes:
step S40, the WiFi equipment records the pause time after the scanning channel switching is paused;
step S50, when the suspension time is greater than or equal to the preset scanning time, if the WiFi device does not receive the second identification data packet sent by the mobile terminal, the WiFi device resets to the idle state.
The WiFi equipment records the pause time after the scanning channel is paused through a set delay counter, a variable pause time delayCount is set in the delay counter, if the pause time is longer than the preset scanning time, namely the WiFi equipment does not detect or receive a second identification data packet sent by the mobile terminal when the pause time of the current scanning channel is longer than or equal to one scanning time, the receiving is overtime, the WiFi equipment is reset to an idle state, the WiFi equipment in the idle state can receive the first identification data packet again on the current channel or recover the switching state of the scanning channel, namely the WiFi equipment starts to scan the next scanning channel corresponding to the current channel according to the preset sequence from the current channel.
In this embodiment, through step S40, the WiFi device records the suspension time after suspending scanning channel switching; step S50, when the suspension time is greater than or equal to the preset scanning time, if the WiFi device does not receive the second identification data packet sent by the mobile terminal, the WiFi device resets to the idle state. When the suspension time is greater than or equal to the preset scanning time, if the WiFi equipment does not receive the second identification data packet sent by the mobile terminal, the WiFi equipment resumes the state of switching the scanning channels, and the WiFi equipment does not infinitely suspend the switching of the scanning channels in the initial state, so that the phenomenon of distribution network failure caused by the fact that the WiFi equipment infinitely suspends the switching of the scanning channels can be effectively avoided.
Further, on the basis of the first embodiment of the network distribution method for the WiFi device in the present invention, a third embodiment of the network distribution method for the WiFi device is provided, in the third embodiment, if the WiFi device successfully receives the first identification packet and the second identification packet, the WiFi device enters a state of receiving a network distribution packet, so as to complete the network entry configuration step for the WiFi device according to the received network distribution packet, including:
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks a WiFi channel for receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
and if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to the preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet.
If the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks a WiFi channel for receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal, wherein the mobile terminal sends the state reset data packet and the distribution network data packet to the WiFi equipment on a preset WiFi channel for a preset number of times according to a preset sequence, if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet, if the WiFi equipment receives the state reset data packet, the state reset data packet enters a reset state of waiting for receiving the distribution network data packet again, the WiFi equipment records corresponding timeout time when the distribution network data packet is received again, and when the timeout time is greater than the preset time, the WiFi equipment enters a state of re-scanning each WiFi channel, and locking the preset WiFi channel of the WiFi equipment again, wherein the preset time is longer than the time for the WiFi equipment to receive any distribution network data packet.
In this embodiment, if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device locks a WiFi channel that receives the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by the mobile terminal; if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet; and if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to the preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet. Because the WiFi equipment can reset and re-receive the corresponding distribution network data packet after the distribution network data packet is not successfully received by the WiFi equipment, the receiving disorder state of the WiFi equipment is not caused, the fault-tolerant function of the WiFi equipment can be increased, and the success rate of distribution network is improved.
Further, on the basis of the third embodiment of the network distribution method for the WiFi device in the present invention, a fourth embodiment of the network distribution method for the WiFi device is provided, in the fourth embodiment, the network distribution packet includes a router service set identifier SSID and a password, and if the WiFi device receives the network distribution packet, completing a network entry configuration according to the network distribution packet includes:
and if the WiFi equipment receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi equipment is connected with a corresponding router according to the received identifier SSID and the password of the router service set, and network access configuration is completed.
If the WiFi equipment receives the distribution network data packet, namely after the WiFi equipment receives the router service set identifier SSID and the password sent by the mobile terminal, the WiFi equipment initiates a distribution network request to the router according to the received router service set identifier SSID and the password, completes distribution network, and sends prompt information of successful distribution network to the mobile terminal after completing distribution network, at the moment, the mobile terminal and the WiFi equipment realize two-way communication.
In this embodiment, if the WiFi device receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi device connects the corresponding router according to the received identifier SSID and the password of the router service set, completes network access configuration, and sends the prompt information of successful network distribution to the mobile terminal, so that the network distribution experience of the user is improved.
Further, on the basis of the first embodiment of the network distribution method for the WiFi device in the present invention, a fifth embodiment of the network distribution method for the WiFi device is provided, in the fifth embodiment, the step of scanning each channel by the WiFi device, and if a first identification packet identifying a start of a network distribution sent by a mobile terminal is detected on any channel, determining that a current state is an initial state includes:
the WiFi equipment scans all channels, and if a first identification data packet which is sent by a mobile terminal and identifies the beginning of a distribution network is detected in any channel, the current state is determined to be an initial state, wherein the mobile terminal continuously sends the first identification data packet for preset times.
The WiFi equipment scans each channel, and if a first identification data packet which is sent by the mobile terminal and used for identifying the beginning of the distribution network is detected on any channel, the current state is determined to be an initial state, wherein the mobile terminal continuously sends the first identification data packet for a preset number of times.
In this embodiment, each channel is scanned by the WiFi device, and if a first identification data packet that identifies the start of a distribution network and is sent by a mobile terminal is detected on any channel, the current state is determined to be an initial state, where the mobile terminal continuously sends the first identification data packet for a preset number of times. As the mobile terminal continuously sends the first identification data packet for the preset times, the WiFi equipment completes the enhancement of the fault-tolerant function in the network access configuration process.
Further, on the basis of the first embodiment of the distribution network method for WiFi devices in the present invention, a sixth embodiment of the distribution network method for WiFi devices is provided, where in the sixth embodiment, if a first identification packet identifying a start of distribution network sent by a mobile terminal is detected in any channel, the step of recording a current state as a start state further includes:
in the initial state, if the first identification data packet is detected again, the WiFi device ignores the first identification data packet.
The WiFi equipment and the mobile phone belong to one-way communication, namely the WiFi equipment cannot send data or information to the mobile phone terminal, so that in the initial state, if a first identification data packet sent by the mobile terminal and used for identifying the beginning of a distribution network is detected on any channel, the WiFi equipment cannot communicate with the mobile phone terminal, the mobile phone terminal can continue to send the first identification data packet after sending the first identification data packet for the first time until the preset times are reached, when the WiFi equipment receives the first identification data packet in the initial state, if the first identification data packet is detected again, the WiFi equipment does not receive the first identification data packet any more, and if the WiFi equipment receives the second identification data packet, if the second identification data packet is detected again, the WiFi equipment does not receive the second identification data packet any more.
In this embodiment, in the initial state, if the first identification packet is detected again, the WiFi device filters and does not receive the first identification packet any more. Therefore, the phenomenon of repeatedly receiving the data packet can be effectively avoided, and the waste of the memory of the WiFi equipment is avoided.
Further, on the basis of the first embodiment of the network distribution method for WiFi devices of the present invention, a seventh embodiment of the network distribution method for WiFi devices is provided.
In this embodiment, the WiFi device includes a WiFi module built in the air conditioning device, and sends a first identification data packet with a preset number of times to the air conditioning device through a mobile terminal, such as a mobile phone terminal, and if the air conditioning device detects and receives the first identification data packet sent by the mobile terminal and used for identifying the start of the distribution network at a corresponding channel, records a current state as an initial state, and sets and generates a delay channel switching instruction when detecting a scanning channel switching instruction, so that the air conditioning device detects and receives a second identification data packet sent by the mobile phone terminal with the preset number of times at the scanning channel, so as to lock the current scanning channel of the air conditioning device, and receive a router service set identifier SSID and a password sent by the mobile terminal, so as to complete network access configuration of the air conditioning device.
In this embodiment, the network distribution method of the WiFi device is applied to the network access configuration of the WiFi module in the air conditioner, so that the network access configuration of the air conditioner can be realized.
Further, the present invention also provides a WiFi device, including:
the determining module is used for scanning each channel, and determining that the current state is an initial state if a first identification data packet which is sent by the mobile terminal and used for identifying the start of the distribution network is detected in any channel;
the setting module is used for setting and generating a delayed channel switching instruction when detecting a channel switching and scanning instruction in the initial state;
and the time delay switching module is used for suspending switching of scanning channels based on the time delay switching channel instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete network access configuration of the WiFi equipment according to the received distribution network data packet.
The specific implementation of the WiFi device in this embodiment is substantially the same as the network distribution method of the WiFi device in the first embodiment, and is not described herein again.
Referring to fig. 3, fig. 3 is a schematic device structure diagram of a hardware operating environment related to the method according to the embodiment of the present invention.
The distribution network device based on the WiFi equipment in the embodiment of the invention can be a PC, and can also be a mobile terminal such as a smart phone, a tablet personal computer, an electronic book reader, an MP3(Moving Picture Experts Group Audio Layer III, dynamic video Experts compression standard Audio Layer 3) player, an MP4(Moving Picture Experts Group Audio Layer IV, dynamic video Experts compression standard Audio Layer 3) player, a portable computer and the like.
As shown in fig. 3, the distribution network apparatus based on WiFi devices may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used for realizing connection communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the distribution network apparatus based on the WiFi device may further include a user interface, a network interface, a camera, a RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. The user interface may comprise a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may also comprise a standard wired interface, a wireless interface. The network interface may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface).
Those skilled in the art will appreciate that the configuration of the WiFi device based distribution network apparatus shown in fig. 3 does not constitute a limitation of the WiFi device based distribution network apparatus, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a type of computer storage medium, may include an operating system, a network communication module, and a WiFi device based distribution network program. The operating system is a program for managing and controlling the hardware and software resources of the distribution network device of the WiFi equipment, and supports the operation of the distribution network program based on the WiFi equipment and other software and/or programs. The network communication module is used for realizing communication among components in the memory 1005 and communication with other hardware and software in the distribution network device based on the WiFi equipment.
In the distribution network apparatus based on WiFi device shown in fig. 3, the processor 1001 is configured to execute the distribution network program based on WiFi device stored in the memory 1005, and implement the following steps:
the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state;
when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction;
and the WiFi equipment suspends the switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, wherein if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete the network access configuration of the WiFi equipment according to the received distribution network data packet.
Further, the switching step of suspending scanning channels by the WiFi device based on the delayed channel switching instruction comprises:
the WiFi equipment records the pause time after pausing the switching of the scanning channels;
and when the pause time is more than or equal to the preset scanning time, if the WiFi equipment does not receive a second identification data packet sent by the mobile terminal, resetting the WiFi equipment to an idle state.
Further, if the WiFi device successfully receives the first identification data packet and the second identification data packet, the WiFi device enters a state of receiving a distribution network data packet, and the step of completing the network access configuration of the WiFi device according to the received distribution network data packet includes:
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks a WiFi channel for receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
and if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to the preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet.
Further, the distribution network data packet includes a router service set identifier SSID and a password, and if the WiFi device receives the distribution network data packet, completing a network access configuration according to the distribution network data packet includes:
and if the WiFi equipment receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi equipment is connected with a corresponding router according to the received identifier SSID and the password of the router service set, and network access configuration is completed.
Further, the step of determining that the current state is the initial state when the WiFi device scans each channel and detects a first identification data packet which is sent by the mobile terminal and identifies the start of the distribution network at any channel includes:
the WiFi equipment scans all channels, and if a first identification data packet which is sent by a mobile terminal and identifies the beginning of a distribution network is detected in any channel, the current state is determined to be an initial state, wherein the mobile terminal continuously sends the first identification data packet for preset times.
Further, if a first identification data packet which is sent by the mobile terminal and identifies the start of the distribution network is detected in any channel, the step of recording the current state as the initial state further comprises the following steps:
in the initial state, if the first identification data packet is detected again, the WiFi device ignores the first identification data packet.
Further, the network distribution method of the WiFi equipment is applied to network access configuration of the WiFi equipment in the air conditioner.
The specific implementation of the network distribution device based on the WiFi device of the present invention is substantially the same as the embodiments of the network distribution method of the WiFi device, and is not described herein again.
The invention provides a readable storage medium, which stores one or more programs, which are also executable by one or more processors for implementing the steps of the embodiments of the network distribution method for WiFi devices as described above.
The specific implementation of the readable storage medium of the present invention is substantially the same as that of each embodiment of the network distribution method of the WiFi device, and is not described herein again.
The above description is only a preferred 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, which are made by the contents of the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A network distribution method of WiFi equipment is characterized by comprising the following steps:
the WiFi equipment scans each channel, and if a first identification data packet which is sent by a mobile terminal and identifies the start of a distribution network is detected in any channel, the current state is determined to be an initial state;
when the WiFi equipment detects a channel switching and scanning instruction in the initial state, setting and generating a delayed channel switching instruction;
the WiFi equipment suspends switching of scanning channels based on the delayed channel switching instruction so as to wait for receiving a second identification data packet, and if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks the WiFi channels receiving the first identification data packet and the second identification data packet and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by a mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to a preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet;
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete network access configuration of the WiFi equipment.
2. The method for configuring network of WiFi device of claim 1, wherein said WiFi device switching step based on said delayed switching channel instruction suspend scanning channels comprises after:
the WiFi equipment records the pause time after pausing the switching of the scanning channels;
and when the pause time is more than or equal to the preset scanning time, if the WiFi equipment does not receive a second identification data packet sent by the mobile terminal, resetting the WiFi equipment to an idle state.
3. The network distribution method of the WiFi device of claim 1, wherein the distribution network data packet includes a router service set identifier SSID and a password, and the completing the network access configuration according to the distribution network data packet if the WiFi device receives the distribution network data packet includes:
and if the WiFi equipment receives the identifier SSID and the password of the router service set sent by the mobile terminal, the WiFi equipment is connected with a corresponding router according to the received identifier SSID and the password of the router service set, and network access configuration is completed.
4. The network distribution method for the WiFi devices of claim 1, wherein the mobile terminal continuously sends the first identification data packet to the WiFi devices for a preset number of times.
5. The network distribution method for WiFi devices of claim 1, wherein if a first identification data packet identifying a start of network distribution sent by a mobile terminal is detected on any channel, recording a current state as a start state further comprises:
in the initial state, if the first identification data packet is detected again, the WiFi device ignores the first identification data packet.
6. The network distribution method for the WiFi equipment in claim 1, wherein the network distribution method for the WiFi equipment is applied to network access configuration of the WiFi equipment in an air conditioner.
7. A WiFi device, comprising:
the determining module is used for scanning each channel, and determining that the current state is an initial state if a first identification data packet which is sent by the mobile terminal and used for identifying the start of the distribution network is detected in any channel;
the setting module is used for setting and generating a delayed channel switching instruction when detecting a channel switching and scanning instruction in the initial state;
the time delay switching module is used for suspending switching of scanning channels based on the time delay switching channel instruction so as to wait for receiving a second identification data packet, if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment locks the WiFi channels receiving the first identification data packet and the second identification data packet, and enters a state of waiting for receiving a state reset data packet and a distribution network data packet sent by the mobile terminal;
if the WiFi equipment receives the distribution network data packet, network access configuration is completed according to the distribution network data packet;
if the WiFi equipment receives the state reset data packet, entering a reset state for waiting for receiving the distribution network data packet again according to the state reset data packet, wherein the mobile terminal continues to send the state reset data packet and the distribution network data packet to the WiFi equipment according to a preset sequence when the WiFi equipment is determined not to finish network access configuration based on the distribution network data packet;
if the WiFi equipment successfully receives the first identification data packet and the second identification data packet, the WiFi equipment enters a state of receiving a distribution network data packet so as to complete network access configuration of the WiFi equipment according to the received distribution network data packet.
8. A distribution network device based on WiFi equipment is characterized in that the distribution network device based on the WiFi equipment comprises: memory, processor, communication bus, wherein:
the communication bus is used for realizing communication connection between the processor and the memory;
the memory is used for storing a distribution network program of the WiFi equipment;
the processor is configured to execute a distribution network program of the WiFi device to implement the steps of the distribution network method of the WiFi device of any of claims 1 to 6.
9. An air conditioner, comprising: the network distribution apparatus of WiFi devices of claim 8.
10. A readable storage medium, on which a distribution network program of a WiFi device is stored, which when executed by a processor implements the steps of the distribution network method of the WiFi device according to any of claims 1-6.
CN201710480601.0A 2017-06-21 2017-06-21 Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment Active CN107071793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710480601.0A CN107071793B (en) 2017-06-21 2017-06-21 Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710480601.0A CN107071793B (en) 2017-06-21 2017-06-21 Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment

Publications (2)

Publication Number Publication Date
CN107071793A CN107071793A (en) 2017-08-18
CN107071793B true CN107071793B (en) 2020-04-03

Family

ID=59595208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710480601.0A Active CN107071793B (en) 2017-06-21 2017-06-21 Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment

Country Status (1)

Country Link
CN (1) CN107071793B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109587703B (en) * 2017-09-28 2022-05-24 阿里巴巴集团控股有限公司 Channel optimization method and device
CN109640377A (en) * 2018-12-19 2019-04-16 深圳市金刚蚁机器人技术有限公司 The method that smart machine carries out networking operation is controlled by mobile terminal
CN109787843B (en) * 2019-03-14 2023-04-21 杭州涂鸦信息技术有限公司 Network distribution method, device and equipment of intelligent equipment and storage medium
CN110925983A (en) * 2019-12-16 2020-03-27 宁波奥克斯电气股份有限公司 Data processing method under different scenes
CN113852484B (en) * 2020-10-19 2024-03-22 广东朝歌智慧互联科技有限公司 Terminal equipment network distribution method, device, electronic equipment and computer readable medium
CN112738783B (en) * 2020-12-29 2023-09-15 锐迪科微电子科技(上海)有限公司 Equipment networking method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120507A (en) * 2015-08-12 2015-12-02 深圳市江波龙科技有限公司 Data packet monitoring method and system
CN106658671A (en) * 2017-01-11 2017-05-10 广东美的制冷设备有限公司 Wireless network connection method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102595558B (en) * 2011-01-11 2016-09-28 中兴通讯股份有限公司 The methods, devices and systems of via node access network
KR101813020B1 (en) * 2011-10-31 2017-12-29 삼성전자주식회사 Apparatus and method for configurating access in wireless network
CN104506360B (en) * 2014-12-26 2018-02-06 深圳市彩易生活科技有限公司 Networking collocation method, system and the relevant device of a kind of smart machine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120507A (en) * 2015-08-12 2015-12-02 深圳市江波龙科技有限公司 Data packet monitoring method and system
CN106658671A (en) * 2017-01-11 2017-05-10 广东美的制冷设备有限公司 Wireless network connection method and device

Also Published As

Publication number Publication date
CN107071793A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
CN107071793B (en) Network distribution method of WiFi (Wireless Fidelity) equipment and related equipment
US10728128B2 (en) Apparatus and method for detecting counterfeit advertiser in wireless communication system
CN110139271B (en) Method, system and device for configuring intelligent household equipment to access network in batch
CN111278001B (en) Terminal capability negotiation method, terminal equipment and network side equipment
CN107040934B (en) WiFi device network distribution method and related device
CN113038593B (en) Connection establishment method, device and user equipment
US10172031B2 (en) Wireless assistance method, apparatus and system
EP2387260A2 (en) System of wi-fi terminals and channel operation method for the same
JP2020517208A (en) Method, apparatus, user equipment and base station for requesting system information
JP2008061110A (en) Electronic device and device detection method
WO2020093705A1 (en) Data transmission method and device
CN114698071A (en) Energy supply method and device and communication equipment
CN104486816A (en) Quick automatic scanning method of Wifi (Wireless Fidelity) terminal equipment in multiple access points
CN111278172A (en) Indication method, terminal equipment and network side equipment
US8843629B2 (en) Method, apparatus, and computer program product for response criteria
CN114422094A (en) PDCP repeated configuration, activation or deactivation method and terminal
CN112469096A (en) Cell switching method and device
CN113965993A (en) Direct communication starting control method and related equipment
US8856311B2 (en) System coordinated WLAN scanning
WO2023011538A1 (en) Information reporting method, terminal and network side device
CN103747330A (en) Program monitoring method, apparatus and digital television receiving terminal
CN114339616A (en) Congestion control method, device and equipment for broadcast multicast service
CN112367181B (en) Camera network distribution method, device, equipment and medium
CN114928868B (en) Communication method, device, terminal and network equipment
WO2023274170A1 (en) Successful handover report (shr) processing method and apparatus, shr management method and apparatus, and shr control method and apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant