Disclosure of Invention
The invention solves the problems that: in the existing network distribution method of the internet of things equipment, the AP network distribution needs the internet of things equipment to support the AP mode, and the process is complicated because part of mobile phones cannot switch hot spots; the failure rate of the one-key distribution network is high due to a distribution network mechanism, and the experience is poor; the third party module needs to be introduced into the distribution network modes such as Bluetooth, NFC, infrared, sound wave and voice, the cost is high, and the modules are only used when the distribution network is distributed in part of the distribution network modes, so that the utilization rate is low.
In order to solve the problems, the invention provides a network distribution method and terminal of internet of things equipment, the internet of things equipment and a network distribution system.
According to a first aspect of the present invention, a network distribution method for internet of things devices is provided, including:
the method comprises the steps that a terminal is networked, an information label of the Internet of things equipment is scanned to obtain an equipment unique identification code, and an identifiable AP hotspot name and a password are generated according to the equipment unique identification code;
the terminal is switched to an AP mode, and the hotspot is started according to the AP hotspot name;
after the Internet of things equipment is successfully connected with the AP hotspot of the terminal, the terminal prompts a user to input a WiFi name and a password which are required to be connected by the Internet of things equipment, and the WiFi name and the password are encrypted and then transmitted to the Internet of things equipment.
Firstly, the terminal and the Internet of things equipment are interconnected through an AP mode (wireless access point mode) of the terminal, then under the AP mode of the terminal, the interconnected terminal encrypts and transmits a WiFi name and a password which are input by a user and need to be connected to the Internet of things equipment, and the Internet of things equipment can be connected to a WiFi hotspot corresponding to the WiFi name and the password to realize networking. In the process that the terminal and the Internet of things device are interconnected through the AP mode of the terminal, the unique identification code of the device is acquired in the form that the terminal scans the information label, and the identifiable AP hotspot name and the password are generated according to the unique identification code of the device, so that the Internet of things device can be connected with the AP hotspot. According to the network distribution method, the Internet of things equipment only needs to switch networks in a Station mode, an AP hotspot of a terminal (such as a mobile phone app) is connected first, and then a WiFi hotspot is connected, and the networking module of the Internet of things equipment does not need to be switched to the AP mode.
In an embodiment of the present invention, the step of generating an identifiable AP hotspot name and password according to the device unique identification code includes: and directly taking the unique identification code of the equipment as the AP hotspot name and the password at the same time, or processing the unique identification code of the equipment according to a specific algorithm to generate the identifiable AP hotspot name and the password.
Although the safety is slightly worse in a mode of directly taking the unique identification code of the equipment as the AP hotspot name and the password, the method has the advantages of simple and efficient connection and can meet the general safety requirement; the method for generating the identifiable AP hotspot name and password by processing the unique identification code of the equipment according to the specific algorithm has the advantage of high safety, and the latter method can be adopted for scenes with high safety requirements. Illustratively, for example, the MAC address is used as a password of the terminal AP hotspot, a hash value algorithm such as MD5 or SHA-1 of the MAC data is used as an AP hotspot name (SSID), or a hash value of the MAC data takes a certain length as an SSID; or adding a specific value before or after the MAC data to form a new value as the AP hotspot name or password, for example, adding 112233 as the AP hotspot password after the MAC data, and using the MAC address as the terminal AP hotspot name. The generation mode can be expanded, and the specific generation algorithm is not limited to the above example.
In an embodiment of the present invention, the network distribution method further includes: after the Internet of things equipment is connected to the WiFi network, the terminal exits the AP mode and is connected to the WiFi network.
After the internet of things equipment is connected to the WiFi network, the server can communicate with the internet of things equipment. At this time, the terminal may exit the AP mode and connect to the WiFi network, thereby forming network communication between the internet of things device and the terminal and the server.
In an embodiment of the present invention, the information label includes information of the device unique identification code and information of the generation mode, and is presented in an encrypted mode.
The information label presents the information such as the unique identification code information of the equipment, the generation mode and the like in an encrypted mode, thereby being beneficial to improving the safety in the process of distribution network and avoiding being stolen by other irrelevant equipment.
In an embodiment of the invention, in the process of inputting the WiFi name and the password which are required to be connected by the internet of things device by the user, if the user inputs at least one of the WiFi name and the password incorrectly, and encrypts and transmits the incorrect WiFi name and the password to the internet of things device, the terminal receives a networking failure message sent by the internet of things device and prompts the user to recheck the input WiFi name and the password.
The embodiment considers the condition that a user has errors in the process of inputting the WiFi name and the password which are required to be connected by the Internet of things equipment, and provides a corresponding solution, the Internet of things equipment is switched to a network mode in a Station mode (site working mode), and the networking failure message is sent to the terminal, and after the terminal receives the networking failure message, the user is prompted to re-check the input WiFi name and the password, so that the successful realization of the distribution network is ensured.
According to a second aspect of the present invention, a network distribution method for internet of things devices is provided, including:
the method comprises the steps that the Internet of things equipment generates a name and a password for carrying out hotspot connection by using an equipment unique identification code in the same way as a terminal generates an identifiable AP hotspot name and password;
a networking module of the Internet of things equipment scans a channel and matches the name and the password of the hotspot connection with an AP hotspot of a terminal so as to realize connection with the terminal;
the Internet of things equipment receives the WiFi name and the password from the terminal and is connected to the WiFi network.
The unique identification code of the equipment is obtained by using a terminal, such as an information label of the thing networking equipment scanned by a mobile phone APP, and is the MAC information of the equipment networking module, the MAC information is the unique data which is burnt by each piece of equipment leaving a factory and corresponds to the equipment, the data is not generally modified and can be used as the identification of the equipment, and the thing networking equipment can obtain the MAC address of the thing networking equipment. The generation mode of generating the identifiable AP hotspot name and password at the terminal according to the equipment identification code is the same as the generation mode of the name and password for hotspot connection generated by the Internet of things equipment, so that the AP hotspot name (SSID) and password data generated by the terminal are effectively ensured to be matched with the name and password for hotspot connection generated by the Internet of things equipment, and the Internet of things equipment and the terminal can be connected. According to the network distribution method, the Internet of things equipment only needs to switch networks in the Station mode, the AP hotspot of the terminal (such as a mobile phone app) is connected firstly, then the WiFi hotspot is connected, the networking module of the Internet of things equipment does not need to be switched to the AP mode, the network distribution method supports the networking module which cannot be in the AP mode, the applicable scene is widened, the fixed SSID and password combination does not need to be solidified by the Internet of things equipment, the information label of the networking equipment is scanned by the mobile phone, the equipment can be successfully networked by sharing the specific network SSID (AP hotspot name) and the password generated according to the unique identification code of the equipment, and the connection request of other unrelated equipment can be rejected, so that the network distribution method has the advantages of high efficiency, safety and reliability.
In an embodiment of the present invention, in the network distribution method, a networking module of the internet of things device is in a Station mode.
In an embodiment of the invention, if the internet of things equipment cannot be networked due to errors in the WiFi name and the password received from the terminal, the internet of things equipment is switched from a network mode connected with a WiFi hotspot to a network mode connected with a mobile phone AP hotspot, and a networking failure message is sent to the terminal.
The embodiment considers the condition that a user has errors in the process of inputting the WiFi name and the password which are required to be connected by the Internet of things equipment, and provides a corresponding solution, the Internet of things equipment is switched to a network mode in a Station mode, and a networking failure message is sent to the terminal, and after the terminal receives the networking failure message, the user is prompted to re-check the input WiFi name and the password, so that the successful realization of the distribution network is ensured.
According to a third aspect of the present invention, there is provided a terminal for a distribution network, comprising: the networking module is used for enabling the terminal to be networked; the scanning identification module is used for acquiring the unique identification code of the equipment by scanning the information label of the Internet of things equipment; the AP hotspot generating module is used for generating an identifiable AP hotspot name and an identifiable password according to the unique identification code of the equipment; the mode switching module is used for switching the terminal from a networking mode to an AP mode and starting a hotspot according to the AP hotspot name; the networking information input module is used for prompting a user to input a WiFi name and a password which are required to be connected by the Internet of things equipment at the terminal after the Internet of things equipment is successfully connected with the AP hotspot of the terminal; and the data transmission module is used for encrypting the WiFi name and the password and transmitting the encrypted WiFi name and the encrypted password to the Internet of things equipment.
In an embodiment of the present invention, the AP hotspot generating module directly uses the unique device identifier as an AP hotspot name and a password at the same time, or processes the unique device identifier according to a specific algorithm to generate an identifiable AP hotspot name and password.
According to a fourth aspect of the present invention, there is provided an internet of things device for a distribution network, comprising: the hotspot connection generating module is used for generating a name and a password for hotspot connection by using the unique identification code of the equipment, and the generating mode is the same as the mode of generating the identifiable AP hotspot name and password by the terminal; the networking module is used for scanning a channel and matching the name and the password of the hotspot connection with the AP hotspot of the terminal so as to realize connection with the terminal; the networking module is also used for receiving the WiFi name and the password from the terminal and connecting the WiFi name and the password to the WiFi network.
In an embodiment of the present invention, in the internet of things device for a distribution network, a networking module of the internet of things device is in a Station mode.
According to a fifth aspect of the present invention, there is provided a distribution network system, comprising: terminal, wiFi hot spot equipment and thing networking device, its characterized in that, the terminal is used for: networking is carried out, an information label of the Internet of things equipment is scanned to obtain an equipment unique identification code, and an identifiable AP hotspot name and a password are generated according to the equipment unique identification code;
the Internet of things equipment is used for: generating a name and a password for carrying out hotspot connection by using the unique identification code of the equipment in the same way as that of generating an identifiable AP hotspot name and password by the terminal;
the networking module of the Internet of things equipment is used for scanning channels and matching the name and the password of the hotspot connection with the AP hotspot of the terminal so as to realize connection with the terminal;
after the Internet of things equipment is successfully connected with the AP hotspot of the terminal, the terminal is used for prompting a user to input a WiFi name and a password of WiFi hotspot equipment which needs to be connected with the Internet of things equipment, and the WiFi name and the password are encrypted and then transmitted to the Internet of things equipment;
the Internet of things equipment is used for receiving the WiFi name and the password from the terminal and connecting the WiFi name and the password to the WiFi network.
In an embodiment of the present invention, in the distribution network system, after the internet of things device is connected to the WiFi network, the terminal exits the AP mode and is connected to the WiFi network.
In an embodiment of the present invention, the terminal is a mobile phone client app; and/or the Internet of things equipment is an air conditioner.
In the terminal, the internet of things equipment and the distribution network system, the internet of things equipment only needs to switch networks in a Station mode, an AP hotspot of the terminal (such as a mobile phone app) is connected firstly, then a WiFi hotspot is connected, a networking module of the internet of things equipment does not need to be switched to the AP mode, the distribution network method supports the networking module which cannot be in the AP mode, the applicable scene is widened, the internet of things equipment does not need to solidify a fixed SSID and password combination, an information label of the internet of things equipment is scanned by a mobile phone, the equipment can be successfully networked by sharing a specific network SSID (AP hotspot name) and a password generated according to the unique identification code of the equipment, and the connection request of other unrelated equipment can be rejected, so that the distribution network has the advantages of high efficiency and safety.
Detailed Description
The AP distribution network comprises a device hotspot distribution network and a mobile phone hotspot distribution network.
In the mobile phone hotspot network distribution, the prior art mode generally adopts a fixed SSID and password combination for the hotspot opened by the mobile phone, and the mode has two obvious disadvantages:
1. the unified SSID and password information needs to be solidified in the Internet of things equipment module, and if an eavesdropper knows the SSID and the password, the information can be easily stolen, so that the network security problem is caused.
2. If different SSID and password information of thing networking equipment module internal solidification, this mode causes certain difficulty for production, needs constantly to revise firmware content, if the production procedure makes mistakes, causes the unable networking of thing networking equipment module in batches.
Based on the analysis, the invention provides a network distribution method and terminal of the internet of things equipment, the internet of things equipment and a network distribution system.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, specific embodiments accompanied with figures are described in detail below.
First embodiment
In a first exemplary embodiment of the invention, a network distribution method for internet of things equipment is provided.
Fig. 1 is a flow chart of a network distribution method of internet of things equipment according to an embodiment of the invention.
Referring to fig. 1, a distribution network method for internet of things devices according to this embodiment is described in terms of a whole information transfer process, and includes:
step S11: the method comprises the steps that a terminal is networked, an information label of the Internet of things equipment is scanned to obtain an equipment unique identification code, and an identifiable AP hotspot name and a password are generated according to the equipment unique identification code;
in step S11, the terminal may perform networking through traffic or connect with a WiFi hotspot, and the terminal may acquire the unique identifier of the device by scanning an information label of the internet of things device after networking.
In an embodiment of the present invention, the step of generating an identifiable AP hotspot name and password according to the device unique identification code includes: and directly taking the unique identification code of the equipment as the AP hotspot name and the password at the same time, or processing the unique identification code of the equipment according to a specific algorithm to generate the identifiable AP hotspot name and the password.
Although the safety is slightly worse in a mode of directly taking the unique identification code of the equipment as the AP hotspot name and the password, the method has the advantages of simple and efficient connection and can meet the general safety requirement; the method for generating the identifiable AP hotspot name and password by processing the unique identification code of the equipment according to the specific algorithm has the advantage of high safety, and the latter method can be adopted for scenes with high safety requirements. Illustratively, for example, the MAC address is used as a password of the terminal AP hotspot, a hash value algorithm such as MD5 or SHA-1 of the MAC data is used as an AP hotspot name (SSID), or a hash value of the MAC data takes a certain length as an SSID; or adding a specific value before or after the MAC data to form a new value as the AP hotspot name or password, for example, adding 112233 as the AP hotspot password after the MAC data, and using the MAC address as the terminal AP hotspot name. The generation mode can be expanded, and the specific generation algorithm is not limited to the above example.
The following describes how to generate an identifiable AP hotspot name and password from the device unique identification code in a specific example.
In general, the MAC address of an air conditioner is 48 bits (6 bytes) in length, and is usually expressed as 12 16-ary numbers, for example: 01-23-BB-C7-80-0A is a MAC address, which is unique in the world as long as the MAC address of the device is not changed. The MAC address is, in a descriptive sense, just like the identification card number on the identification card, and has uniqueness.
Example one:
the method comprises the steps that an AP hot spot with the SSID and the password being 0123BBC7800A is generated by utilizing MAC data (such as 01-23-BB-C7-80-0A) on an air conditioner to be connected with the Internet of things equipment, and the Internet of things equipment is connected with the hot spot through known MAC information of the Internet of things equipment.
| SSID | 0123BBC7800A | Mac address data |
| Cipher code | 0123BBC7800A | Mac address data |
Example two:
the MD5 hash value (MD 5: 8F03F0F0F807428F) of the MSC data is calculated by utilizing MAC data (such as 01-23-BB-C7-80-0A) on an air conditioner, the MD5 hash value is used as a hotspot SSID by a user mobile phone, MAC address data is used as a password, an AP hotspot is generated to be connected with equipment of the Internet of things, and the equipment of the Internet of things utilizes known MAC information of the equipment of the Internet of things to generate a name and a password for hotspot connection in the same way so as to connect the AP hotspot.
| SSID | 8F03F0F0F807428F | MD5 calculation |
| Cipher code | 0123BBC7800A | Mac address data |
Of course, the algorithm for generating is not limited to the hash algorithm, and may be other data processing algorithms, and the hash algorithm is not limited to the MD5 algorithm, and may be SHA-1 hash algorithm. In addition, the generated value may be obtained by a certain calculation, and the specific length is used as the SSID or the password, for example, the first 12 bits (8F03F0F 807) of the calculation-completed data are used as the AP hotspot address.
Example three: in this example, a number of bits of data are added to the MAC data, and then the whole data is processed by a specific algorithm, for example, in the manner shown in example two, and then used as the SSID or password.
Step S12: the terminal is switched to an AP mode, and the hotspot is started according to the AP hotspot name;
step S13: the method comprises the steps that the Internet of things equipment generates a name and a password for carrying out hotspot connection by using an equipment unique identification code in the same way as a terminal generates an identifiable AP hotspot name and password;
step S14: a networking module of the Internet of things equipment scans a channel and matches the name and the password of the hotspot connection with an AP hotspot of a terminal so as to realize connection with the terminal;
step S15-1: after the Internet of things equipment is successfully connected with the AP hotspot of the terminal, the terminal prompts a user to input a WiFi name and a password which are required to be connected by the Internet of things equipment, encrypts the WiFi name and the password and transmits the encrypted WiFi name and password to the Internet of things equipment;
step S16-1: the Internet of things equipment receives the WiFi name and the password from the terminal and is connected to the WiFi network.
In the network distribution method, the method further includes:
step S15-2: in the process that the user inputs the WiFi name and the password which are required to be connected by the Internet of things equipment, if the user inputs at least one of the WiFi name and the password by mistake, the WiFi name and the password which are wrong are encrypted and then transmitted to the Internet of things equipment, so that the Internet of things equipment cannot be networked, the Internet of things equipment is switched from a network mode connected with a WiFi hotspot to a network mode connected with a mobile phone AP hotspot, and a message of networking failure is sent to the terminal;
step S16-2: and the terminal receives a networking failure message sent by the Internet of things equipment and prompts the user to recheck the input WiFi name and password.
The embodiment considers the condition that a user has errors in the process of inputting the WiFi name and the password which are required to be connected by the Internet of things equipment, and provides a corresponding solution, the Internet of things equipment is switched to a network mode in a Station mode, and a networking failure message is sent to the terminal, and after the terminal receives the networking failure message, the user is prompted to re-check the input WiFi name and the password, so that the successful realization of the distribution network is ensured.
In an embodiment of the present invention, the terminal is a mobile phone; and/or the Internet of things equipment is an air conditioner.
In an embodiment, described from a terminal side, the network distribution method for the internet of things device includes:
the method comprises the steps that a terminal is networked, an information label of the Internet of things equipment is scanned to obtain an equipment unique identification code, and an identifiable AP hotspot name and a password are generated according to the equipment unique identification code;
the terminal is switched to an AP mode, and the hotspot is started according to the AP hotspot name;
after the Internet of things equipment is successfully connected with the AP hotspot of the terminal, the terminal prompts a user to input a WiFi name and a password which are required to be connected by the Internet of things equipment, and the WiFi name and the password are encrypted and then transmitted to the Internet of things equipment.
Firstly, the terminal and the Internet of things equipment are interconnected through the AP mode of the terminal, then under the AP mode of the terminal, the interconnected terminal encrypts and transmits the WiFi name and the password which are input by the user and need to be connected to the Internet of things equipment, and the Internet of things equipment can be connected to the WiFi hotspot corresponding to the WiFi name and the password to realize networking. In the process that the terminal and the Internet of things device are interconnected through the AP mode of the terminal, the unique identification code of the device is acquired in the form that the terminal scans the information label, and the identifiable AP hotspot name and the password are generated according to the unique identification code of the device, so that the Internet of things device can be connected with the AP hotspot. According to the network distribution method, the Internet of things equipment only needs to switch networks in the Station mode, the AP hotspot of the terminal (such as a mobile phone app) is connected firstly, then the WiFi hotspot is connected, the networking module of the Internet of things equipment does not need to be switched to the AP mode, the network distribution method supports the networking module which cannot be in the AP mode, the applicable scene is widened, the fixed SSID and password combination does not need to be solidified by the Internet of things equipment, the information label of the networking equipment is scanned by the mobile phone, the equipment can be successfully networked by sharing the specific network SSID (AP hotspot name) and the password generated according to the unique identification code of the equipment, and the connection request of other unrelated equipment can be rejected, so that the network distribution method has the advantages of high efficiency, safety and reliability.
In an embodiment of the present invention, the network distribution method further includes: after the Internet of things equipment is connected to the WiFi network, the terminal exits the AP mode and is connected to the WiFi network.
After the internet of things equipment is connected to the WiFi network, the server can communicate with the internet of things equipment. At this time, the terminal may exit the AP mode and connect to the WiFi network, thereby forming network communication between the internet of things device and the terminal and the server.
In an embodiment of the present invention, the information label includes information of the device unique identification code and information of the generation mode, and is presented in an encrypted mode.
For example, the information label is presented in a two-dimensional code or other display form, which is called "information label code" in fig. 1, and is a specific example of the information label.
The information label presents the information such as the unique identification code information of the equipment, the generation mode and the like in an encrypted mode, thereby being beneficial to improving the safety in the process of distribution network and avoiding being stolen by other irrelevant equipment.
In an embodiment of the invention, in the process of inputting the WiFi name and the password which are required to be connected by the internet of things device by the user, if the user inputs at least one of the WiFi name and the password incorrectly, and encrypts and transmits the incorrect WiFi name and the password to the internet of things device, the terminal receives a networking failure message sent by the internet of things device and prompts the user to recheck the input WiFi name and the password.
The embodiment considers the condition that a user has errors in the process of inputting the WiFi name and the password which are required to be connected by the Internet of things equipment, and provides a corresponding solution, the Internet of things equipment is switched to a network mode in a Station mode, and a networking failure message is sent to the terminal, and after the terminal receives the networking failure message, the user is prompted to re-check the input WiFi name and the password, so that the successful realization of the distribution network is ensured.
In an embodiment, described from the internet of things device side, the network distribution method for the internet of things device includes:
the method comprises the steps that the Internet of things equipment generates a name and a password for carrying out hotspot connection by using an equipment unique identification code in the same way as a terminal generates an identifiable AP hotspot name and password;
a networking module of the Internet of things equipment scans a channel and matches the name and the password of the hotspot connection with an AP hotspot of a terminal so as to realize connection with the terminal;
the Internet of things equipment receives the WiFi name and the password from the terminal and is connected to the WiFi network.
In an embodiment of the present invention, in the network distribution method, a networking module of the internet of things device is in a Station mode.
The unique identification code of the equipment is obtained by using a terminal, such as an information label of the thing networking equipment scanned by a mobile phone APP, and is the MAC information of the equipment networking module, the MAC information is the unique data which is burnt by each piece of equipment leaving a factory and corresponds to the equipment, the data is not generally modified and can be used as the identification of the equipment, and the thing networking equipment can obtain the MAC address of the thing networking equipment. The generation mode of generating the identifiable AP hotspot name and password at the terminal according to the equipment identification code is the same as the generation mode of the name and password for hotspot connection generated by the Internet of things equipment, so that the AP hotspot name (SSID) and password data generated by the terminal are effectively ensured to be matched with the name and password for hotspot connection generated by the Internet of things equipment, and the Internet of things equipment and the terminal can be connected.
In an embodiment of the invention, if the internet of things equipment cannot be networked due to errors in the WiFi name and the password received from the terminal, the internet of things equipment is switched from a network mode connected with a WiFi hotspot to a network mode connected with a mobile phone AP hotspot, and a networking failure message is sent to the terminal.
The embodiment considers the condition that a user has errors in the process of inputting the WiFi name and the password which are required to be connected by the Internet of things equipment, and provides a corresponding solution, the Internet of things equipment is switched to a network mode in a Station mode, and a networking failure message is sent to the terminal, and after the terminal receives the networking failure message, the user is prompted to re-check the input WiFi name and the password, so that the successful realization of the distribution network is ensured.
In summary, in the network distribution method of this embodiment, the internet of things device only needs to switch networks in the Station mode, and first connects an AP hotspot of a terminal (for example, a mobile app), and then connects a WiFi hotspot, without switching a networking module of the internet of things device to the AP mode, the network distribution method supports a networking module that cannot perform the AP mode, widens an applicable scenario, and the internet of things device does not need to solidify a fixed SSID and password combination, and shares a specific network SSID (AP hotspot name) and password generated according to the unique identifier of the device by scanning an information label of the internet of things device with a mobile phone, so that the device can be successfully networked, and connection requests of other unrelated devices can be rejected, thereby having the advantages of high efficiency and safety of network distribution.
Second embodiment
In a second exemplary embodiment of the invention, a terminal for a distribution network is provided.
The terminal for a distribution network of the embodiment includes: the networking module is used for enabling the terminal to be networked; the scanning identification module is used for acquiring the unique identification code of the equipment by scanning the information label of the Internet of things equipment; the AP hotspot generating module is used for generating an identifiable AP hotspot name and an identifiable password according to the unique identification code of the equipment; the mode switching module is used for switching the terminal from a networking mode to an AP mode and starting a hotspot according to the AP hotspot name; the networking information input module is used for prompting a user to input a WiFi name and a password which are required to be connected by the Internet of things equipment at the terminal after the Internet of things equipment is successfully connected with the AP hotspot of the terminal; and the data transmission module is used for encrypting the WiFi name and the password and transmitting the encrypted WiFi name and the encrypted password to the Internet of things equipment.
In an embodiment of the present invention, the AP hotspot generating module directly uses the unique device identifier as an AP hotspot name and a password at the same time, or processes the unique device identifier according to a specific algorithm to generate an identifiable AP hotspot name and password.
Third embodiment
In a third exemplary embodiment of the present invention, an internet of things device for a distribution network is provided.
In this embodiment, an internet of things device for joining in marriage net includes: the hotspot connection generating module is used for generating a name and a password for hotspot connection by using the unique identification code of the equipment, and the generating mode is the same as the mode of generating the identifiable AP hotspot name and password by the terminal; the networking module is used for scanning a channel and matching the name and the password of the hotspot connection with the AP hotspot of the terminal so as to realize connection with the terminal; the networking module is also used for receiving the WiFi name and the password from the terminal and connecting the WiFi name and the password to the WiFi network.
In an embodiment of the present invention, in the internet of things device for a distribution network, a networking module of the internet of things device is in a Station mode.
Fourth embodiment
In a fourth exemplary embodiment of the present invention, a distribution network system is provided.
Fig. 2 is a block diagram of a distribution network system according to an embodiment of the present invention.
Referring to fig. 2, the distribution network system of this embodiment includes: a terminal, a WiFi hotspot device and an Internet of things device, wherein,
the terminal is used for: networking is carried out, an information label of the Internet of things equipment is scanned to obtain an equipment unique identification code, and an identifiable AP hotspot name and a password are generated according to the equipment unique identification code;
the Internet of things equipment is used for: generating a name and a password for carrying out hotspot connection by using the unique identification code of the equipment in the same way as that of generating an identifiable AP hotspot name and password by the terminal;
the networking module of the Internet of things equipment is used for scanning channels and matching the name and the password of the hotspot connection with the AP hotspot of the terminal so as to realize connection with the terminal;
after the Internet of things equipment is successfully connected with the AP hotspot of the terminal, the terminal is used for prompting a user to input a WiFi name and a password of WiFi hotspot equipment which needs to be connected with the Internet of things equipment, and the WiFi name and the password are encrypted and then transmitted to the Internet of things equipment;
the Internet of things equipment is used for receiving the WiFi name and the password from the terminal and connecting the WiFi name and the password to the WiFi network.
In an embodiment of the present invention, in the distribution network system, after the internet of things device is connected to the WiFi network, the terminal exits the AP mode and is connected to the WiFi network.
In the distribution network system, the Internet of things equipment only needs to switch networks in the Station mode, the AP hotspot of the terminal (such as a mobile phone app) is connected firstly, and then the WiFi hotspot is connected, and the networking module of the Internet of things equipment does not need to be switched to the AP mode.
In summary, the invention provides a network distribution method, a terminal, an internet of things device and a network distribution system for the internet of things device, the terminal and the internet of things device are interconnected in an AP mode of the terminal, then in the AP mode of the terminal, the interconnected terminal encrypts and transmits a WiFi name and a password, which are input by a user and are required to be connected, to the internet of things device, and the internet of things device can be connected to a WiFi hotspot corresponding to the WiFi name and the password, so as to realize networking. According to the network distribution method, the Internet of things equipment only needs to switch networks in the Station mode, the AP hotspot of the terminal (such as a mobile phone app) is connected firstly, then the WiFi hotspot is connected, the networking module of the Internet of things equipment does not need to be switched to the AP mode, the network distribution method supports the networking module which cannot be in the AP mode, the applicable scene is widened, the fixed SSID and password combination does not need to be solidified by the Internet of things equipment, the information label of the networking equipment is scanned by the mobile phone, the equipment can be successfully networked by sharing the specific network SSID (AP hotspot name) and the password generated according to the unique identification code of the equipment, and the connection request of other unrelated equipment can be rejected, so that the network distribution method has the advantages of high efficiency, safety and reliability.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications may be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.