Method for fast connecting wireless local area networkTechnical Field
The invention relates to the internet technology, in particular to a method for quickly connecting a wireless local area network.
Background
The local area network in the current market is generally set by downloading a third party application program through a terminal such as a mobile phone or a home computer to perform networking, and connecting products, such as a millet intelligent home set. After the network information is accessed through the gateway, other devices need to pair products one by one through an application program and can be used after network names and keys are manually input.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method and a system for matching a wireless connection local area network, which reduce manual input at least to a certain extent.
In order to solve the above technical problem, the present invention provides a method for fast connecting to a wireless local area network, comprising the following steps: A) setting a local area network by using a user terminal and writing a network identifier of the local area network into a storage medium; B) reading a network identifier to be added into the local area network by the sub-equipment in the local area network area, and adding the network identifier into the local area network; C) the local area network wirelessly sends the local area network name and the secret key to the sub-equipment, and the sub-equipment is automatically matched and connected with the local area network after receiving the local area network name and the secret key.
Further, in the step A), a channel number and a network identifier are selected through a ZigBee coordinator in a gateway to establish a local area network, and the network identifier is written into a storage medium; the storage medium is a mifare card.
Further, in the step B), the sub device includes a Mifare card reader, and the Mifare card reader of the sub device is close to the Mifare card of the gateway and reads the network identifier in the Mifare card, so that the sub device is consistent with the network identifier of the gateway to join the local area network where the gateway is located.
Further, the sub-equipment comprises an alarm and a sensor.
Further, in the step C), the gateway of the lan wirelessly sends the lan name and the key to the kid device through zigbee, sub1G or bluetooth technology.
Further, the user terminal is a home computer or a mobile phone.
The invention also discloses a system for quickly connecting the wireless local area network, which comprises: the network setting unit comprises a user terminal and a storage medium, and is used for setting a local area network by using the user terminal and writing a network identifier of the local area network into the storage medium; the network matching unit comprises a sub-device with a network identifier reading device, and the sub-device in the local area network area reads the network identifier to be added into the local area network and adds the network identifier into the local area network; and the network connection unit comprises a wireless transmission subunit, the wireless transmission subunit transmits the local area network name and the key to the sub-equipment, and the sub-equipment is automatically matched and connected with the local area network after receiving the local area network name and the key.
Further, the network setting unit further comprises a ZigBee coordinator in the gateway, wherein the ZigBee coordinator selects the channel number and the network identifier to establish a local area network and writes the network identifier into a storage medium; the storage medium is a mifare card.
Further, the network identifier reading device is a Mifare card reader, and the Mifare card reader is close to a Mifare card of the gateway and reads a network identifier in the Mifare card, so that the sub-device is consistent with the network identifier of the gateway to join a local area network where the gateway is located.
Further, the wireless transmitting subunit is a zigbee, sub1G, or a bluetooth device.
According to the invention, through the wireless touch of the sub-equipment and the wireless local area network, the mifare card of the local area network gateway is matched with the card reader in the product, the network name and the key information are automatically acquired, and the operation and configuration of a mobile phone or other software are not needed, so that the method is simple and convenient.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a schematic diagram of the working principle of the present invention.
Detailed Description
The present invention is further described below in conjunction with the following figures and specific examples so that those skilled in the art may better understand the present invention and practice it, but the examples are not intended to limit the present invention.
As shown in fig. 1, the method for fast connecting to a wireless local area network of the present invention includes the following steps:
s1, setting LAN by user terminal and writing network identifier (PANID) of LAN into storage medium;
s2, the sub-device in the LAN area reads the network identifier to be added into the LAN, and adds into the LAN;
and S3, the local area network sends the local area network name and the key to the sub-equipment in a wireless mode, and the sub-equipment is automatically matched and connected with the local area network after receiving the local area network name and the key.
In a preferred embodiment, the established local area network is a ZigBee local area network, that is, a wireless local area network established by a ZigBee module is used for a gateway, a sub-device can search the wireless local area network through the ZigBee module and read information (including a network identifier) in the wireless local area network, ZigBee is an inexpensive and low-power-consumption short-range wireless networking communication technology, and is a wireless network protocol for low-speed short-range transmission, and the ZigBee protocol is, from bottom to top, a physical layer, a media access control layer, a transport layer, a network layer, an application layer, and the like, where the physical layer and the media access control layer conform to the provisions of the IEEE 802.15.4 standard. In a preferred embodiment, step S1 may select a channel number and a network identifier through a ZigBee coordinator in the gateway to establish a local area network, and write the network identifier into a storage medium; the storage medium is a mifare card. mifare cards, also known as contactless smart cards, inductive IC cards or radio frequency IC cards, successfully combine the radio frequency identification technology with the IC card technology, solve the technical problems of passive (no power supply in the card) and contactless, adopt an open architecture, have a memory function, and can store/read data information after being matched with a processor. In step S2, the child device includes a Mifare card reader, where the Mifare card reader of the child device is approximately 20 centimeters close to the Mifare card of the gateway and reads the network identifier in the Mifare card, so that the child device and the network identifier of the gateway are consistent to join the local area network where the gateway is located. In step S3, the gateway of the lan wirelessly transmits the lan name and the key to the child device via zigbee, sub1G or bluetooth technology.
The invention relates to a system for fast connecting wireless local area network, comprising: the network setting unit comprises a user terminal and a storage medium, and is used for setting a local area network by using the user terminal and writing a network identifier of the local area network into the storage medium; the network matching unit comprises a sub-device with a network identifier reading device, and the sub-device in the local area network area reads and reads the network identifier to be added into the local area network and adds the network identifier into the local area network; and the network connection unit comprises a wireless transmission subunit, the wireless transmission subunit transmits the local area network name and the key to the sub-equipment, and the sub-equipment is automatically matched and connected with the local area network after receiving the local area network name and the key.
In a preferred embodiment, the local area network is a ZigBee local area network, the network setting unit further includes a ZigBee coordinator in the gateway, the ZigBee coordinator selects a channel number and a network identifier to establish the local area network, and writes the network identifier in the storage medium; the storage medium is a mifare card. Preferably, the network identifier reading device is a Mifare card reader, which is approximately 20 cm close to the Mifare card of the gateway and reads the network identifier in the Mifare card, so that the sub-device is consistent with the network identifier of the gateway to join the local area network where the gateway is located. Still preferably, the wireless transmitting unit is a zigbee, sub1G or bluetooth device.
The invention does not need to configure products one by one, only needs to configure information to the gateway through a user terminal such as a mobile phone or a home computer, and other equipment can complete the pairing mode only by touching the gateway.
To explain the working principle of the present invention more fully with reference to fig. 2, first, the ZigBee coordinator in the gateway selects a channel number and a PANID (Personal Area Network ID) to establish a local Area Network, and writes the PANID into the mifare card. And secondly, reading the PANID in the mifare card by a card reader in the sub-equipment to ensure that the network identifier of the sub-equipment is consistent with the network identifier to be added into the local area network, so that a terminal node or a router in the sub-equipment can be added into the designated ZigBee local area network through the designated PANID. Specifically, if the network identifier in the child device is consistent with the identifier of the network established by the gateway, the child device sends a command to the gateway to apply for joining the network, so that the child device is connected to the local area network. Finally, the ZigBee coordinator of the gateway sends an SSID (Service Set Identifier, local area network name) and a KEY to a terminal node or a router in the child device through wireless (2.4G), so that the child device can establish connection with the local area network and connect to the internet through the local area network. After the sub-equipment receives the SSID and the KEY sent by the gateway, the sub-equipment can be provided with an internal WIFI module to establish connection with the wireless router, so that the sub-equipment can be connected to the Internet.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.