A kind of smart machine WiFi connected system based on intelligent gateway and methodTechnical field
The invention belongs to smart machine wireless connections field, be specifically related to a kind of smart machine WiFi connected system based on intelligent gateway and method.
Background technology
Along with the develop rapidly of raising and the technology of Internet of things day by day of people's living standard, people more and more pay attention to intellectuality and the safe of domestic environment.At present, people can carry out Long-distance Control and centralized management to various electric equipments such as the air-conditioning system in family or in building, safety-protection system, illuminator or audio-video systems easily by intelligent domestic system.But, during wireless network in smart machine access intelligent domestic system, there is complex operation, large, the consuming time length of normal user operation difficulty and the not easily problem such as realization.
Summary of the invention
In order to solve the problems referred to above that prior art exists, the invention provides a kind of the smart machine WiFi connected system based on intelligent gateway and the method that can access family wireless network fast.
The technical solution adopted in the present invention is: a kind of smart machine WiFi connected system based on intelligent gateway comprises gtw gprs, have the mobile terminal of WiFi communication module and have the smart machine of WiFi communication module; Described gtw gprs accessing Internet, described gtw gprs, mobile terminal and smart machine are in same local area network (LAN), all communicate to connect between described gtw gprs and mobile terminal and between described gtw gprs and smart machine; Described gtw gprs comprises virtual WiFiAP channel generation module and WiFi communication module, described mobile terminal controls described virtual WiFiAP channel generation module and generates interim WiFiAP channel, described smart machine 3 is by interim WiFiAP channel access family WiFi network, and obtain WiFi signal and the encrypted message of described gtw gprs, make described smart machine access family's WiFi network.
Further, also protocol conversion module is provided with in described smart machine WiFi connected system, described protocol conversion module comprises uplink communication module and downlink communication module, described uplink communication module and described gtw gprs communicate to connect, and described downlink communication module is connected with described smart device communication.
Further, described uplink communication module adopts ethernet communication module, and described downlink communication module adopts short-range wireless communication module or wire communication module.
Preferably, described short-range wireless communication module adopts ZigBee communication module, bluetooth communication or WiFi communication module.
Further, described virtual WiFiAP channel generation module sends local area network (LAN) broadcast message by described WiFi communication module to described smart machine, to determine whether described gtw gprs and described smart machine are in same local area network (LAN), if described virtual WiFiAP channel generation module receives the feedback information of described smart machine, then judge that described gtw gprs and smart machine are in same local area network (LAN).
Adopt the smart machine WiFi method of attachment based on intelligent gateway of smart machine WiFi connected system, it comprises the following steps: 1) mobile terminal starts the virtual WiFiAP channel generation module on virtual radio intelligent gateway; 2) virtual WiFiAP channel generation module generates interim WiFiAP channel, and the SSID of this channel is IOTXBCONNECTSSID; 3) smart machine connects interim WiFiAP channel to gtw gprs request, and obtains IP address configuration information; 4) smart machine is by UDP/TCP agreement, adopts the device type of Json protocol data encapsulation oneself, manufacturer and version information, connects gtw gprs to virtual WiFiAP channel generation module request; 5) virtual WiFiAP channel generation module has smart machine request to connect family's WiFi network by WiFi communication module notice mobile terminal; 6) mobile terminal sends to gtw gprs the signal that accepts request, the SSID of gtw gprs and key are fed back to smart machine by WI-Net agreement by virtual WiFiAP channel generation module, family's WiFi network of smart machine access gtw gprs, after completing network insertion, virtual WiFiAP channel auto-destruct.
Further, described step 6) in the particular content of WI-Net agreement be: the SSID of router opened by PC, and router opens wireless network, smart machine connection route device, and sends to router the request of networking; Router by networking request forward to PC, permission or refusal networking signal are sent to router by PC, networked information or refusal inbound information are sent to smart machine by router, object information is sent to router by smart machine, object information is transmitted to PC by router, and PC cuts out the SSID of router.
Owing to adopting above technical scheme, beneficial effect of the present invention is: the present invention enables the simple, fast access family wireless network of home intelligent equipment, complex operation when solving the access of smart machine in prior art family wireless network, uses the problem of difficulty; The present invention can make smart machine and intelligent use integrate the most rapidly, thus reduces time cost, improves integration efficiency and reliability.
Accompanying drawing explanation
Fig. 1 is the schematic network structure of the smart machine WiFi connected system that the present invention is based on intelligent gateway;
Fig. 2 is the flow chart of the smart machine WiFi method of attachment that the present invention is based on intelligent gateway;
Fig. 3 adopts WI-Net agreement to carry out the process schematic communicated in the present invention.
In figure: 1, gtw gprs; 2, mobile terminal; 3, smart machine; 4, protocol conversion module; 11, virtual WiFiAP channel generation module; 12, WiFi communication module.
Embodiment
As shown in Figure 1, the invention provides a kind of smart machine WiFi connected system based on intelligent gateway, it smart machine 3 comprising gtw gprs 1, there is the mobile terminal 2 of WiFi communication module and there is WiFi communication module.Gtw gprs 1 accessing Internet, gtw gprs 1, mobile terminal 2 and smart machine 3 are in same local area network (LAN), all communicate to connect between gtw gprs 1 and mobile terminal 2 and between gtw gprs 1 and smart machine 3.Gtw gprs 1 comprises virtual WiFiAP channel generation module 11 and WiFi communication module 12.Mobile terminal 2 controls virtual WiFiAP channel generation module 11 and generates interim WiFiAP channel, smart machine 3 is by interim WiFiAP channel access family WiFi network, and obtain WiFi signal and the encrypted message of gtw gprs 1, make smart machine 3 can access family's WiFi network fast.Further, space size environmentally, can arrange multiple gtw gprs 1, for covering multiple smart machine 3.
In a preferred embodiment, be also provided with protocol conversion module 4 based in the smart machine WiFi connected system of intelligent gateway, protocol conversion module 4 communicates to connect with gtw gprs 1 and smart machine 3 respectively.Protocol conversion module 4 comprises uplink communication module and downlink communication module, and uplink communication module and gtw gprs 1 communicate to connect, and downlink communication module and smart machine 3 communicate to connect.Uplink communication module adopts ethernet communication module, and downlink communication module adopts short-range wireless communication module or the wire communication module such as ZigBee communication module, bluetooth communication or WiFi communication module.
In a preferred embodiment, virtual WiFiAP channel generation module 11 sends local area network (LAN) broadcast message by WiFi communication module 11 to smart machine 3, to determine whether gtw gprs 1 and smart machine 3 are in same local area network (LAN).If virtual WiFiAP channel generation module 11 receives the feedback information of smart machine 3, then judge that gtw gprs 1 and smart machine 3 are in same local area network (LAN).
Based on the smart machine WiFi connected system based on intelligent gateway that the present invention proposes, the invention allows for a kind of smart machine WiFi method of attachment based on intelligent gateway, it comprises the following steps:
1) mobile terminal 2 starts the virtual WiFiAP channel generation module 11 on virtual radio intelligent gateway 1.
2) virtual WiFiAP channel generation module 11 generates interim WiFiAP channel, and the SSID of this channel is IOTXBCONNECTSSID
3) smart machine 3 asks to connect interim WiFiAP channel to gtw gprs 1, and obtains the configuration informations such as IP address.
4) smart machine 3 is by UDP/TCP agreement, adopts the information such as device type, manufacturer, version of Json protocol data encapsulation oneself, asks to connect gtw gprs 1 to virtual WiFiAP channel generation module 11.
5) by WiFi communication module 12, virtual WiFiAP channel generation module 11 notifies that mobile terminal 2 has smart machine 3 to ask to connect family's WiFi network.
6) mobile terminal 2 sends to gtw gprs 1 signal that accepts request, the SSID of gtw gprs 1 and key are fed back to smart machine 3 by WI-Net agreement by virtual WiFiAP channel generation module 11, smart machine 3 accesses family's WiFi network of gtw gprs 1 fast, after completing network insertion, virtual WiFiAP channel auto-destruct.
As shown in Figure 3, above-mentioned steps 6) in, the particular content of WI-Net agreement is: the SSID of router opened by PC, and router opens wireless network, smart machine connection route device, and sends to router the request of networking.Router by networking request forward to PC, permission or refusal networking signal are sent to router by PC, networked information or refusal inbound information are sent to smart machine by router, object information is sent to router by smart machine, object information is transmitted to PC by router, and PC cuts out the SSID of router.
The present invention is not limited to above-mentioned preferred forms; anyone can draw other various forms of products under enlightenment of the present invention; no matter but any change is done in its shape or structure; every have identical with the application or akin technical scheme, all drops within protection scope of the present invention.