A kind of method that quick distributions of WIFI and equipment are bound with userTechnical field
The present invention relates to the WIFI network communications field, the side that particularly a kind of quick distributions of WIFI and equipment are bound with userMethod.
Background technology
The equipment of wireless network is accessed generally without display screen or keyboard entry function currently with WIFI, allows these equipmentThe information of quick obtaining wireless network access point turns into the urgent problem for solving.
And during the use of equipment, need just facilitate user in software end after binding before user and equipmentOperated.Current most of apparatus bound requirementss of process use LAN to interact, and such as equipment sends parameter by udp broadcastTo software end, once the UDP functional labilities of equipment, cause software end not receive, apparatus bound failure is easily caused.
The content of the invention
To overcome the deficiencies in the prior art, it is an object of the invention to provide a kind of quick distributions of WIFI and equipment and userThe method of binding.
The present invention solves the technical scheme that is used of its problem:
A kind of quick distributions of WIFI and equipment and the method for user's binding, comprise the following steps:
The packet that S1, equipment enter during distribution pattern receives wireless environment, software end is connected to target wireless access points and leads toCross high in the clouds and obtain session identification code;
Service set, password, session identification code are carried out coding composition packet by S2, software end, then packet is sent into nothingIn thread environment;
After S3, equipment obtain service set, password, session identification code from the packet for receiving, WAP is connected,Complete distribution;
Set up with high in the clouds after S4, the upper WAP of equipment connection and be connected, send EIC equipment identification code and session identification code;
Be associated for equipment and software end according to EIC equipment identification code and session identification code, and send result to set by S5, high in the cloudsIt is standby, complete binding;
The equipment that S6, software end obtain new binding under current sessions identification code to high in the clouds.
Further, in the step S1, equipment enters distribution pattern and receives wireless environment by periodically switching channelIn packet, channel includes channel 1 to channel 14.
Further, in the step S1, software end passes through to call the interface login high in the clouds for obtaining session identification codeSession identification code is got, and sets up the corresponding relation of user and parameter set beyond the clouds.
Further, in the step S2, service set, password, session identification code are encoded to one group of group by software endIn broadcasting hardware address, then by coded data to periodically sending multicast information in wireless environment.
Further, in the step S3, equipment is to parse service set, close from the hardware address in packetCode, session identification code.
Further, in the step S4, the connection that equipment is set up with high in the clouds is to be based on transmission control protocol, and beyond the cloudsSet up the corresponding relation of equipment and parameter set.
Further, in the step S5, high in the clouds associates the consistent user of parameter set and equipment, and user is to equipmentIt is possessed of control power.
Further, in the step S6, software end is called the interface for obtaining newly added equipment to obtain and is newly tied up to high in the cloudsFixed equipment, and display device is online.
Further, the session identification code is generated at random by high in the clouds.
Further, the equipment preserves service set and password after completing distribution, when logging on high in the cloudsDistribution pattern need not be entered.
The beneficial effects of the invention are as follows:The side that a kind of quick distributions of WIFI and equipment that the present invention is used are bound with userMethod, the process of equipment distribution and apparatus bound is combined together, and simplifies the operating procedure of user, and by needed for bindingSession identification is piled up in the transmission of distribution stage, improves the success rate of distribution, improves Consumer's Experience.
Brief description of the drawings
Fig. 1 is steps flow chart block diagram of the present invention;
Fig. 2 is implementing procedure figure of the present invention.
Specific embodiment
The invention will be further described with example below in conjunction with the accompanying drawings.
As shown in figure 1, a kind of method that the present invention provides quick distributions of WIFI and equipment and user's binding, including it is as followsStep:
The packet that S1, equipment enter during distribution pattern receives wireless environment, software end is connected to target wireless access points and leads toCross high in the clouds and obtain session identification code;
Service set, password, session identification code are carried out coding composition packet by S2, software end, then packet is sent into nothingIn thread environment;
After S3, equipment obtain service set, password, session identification code from the packet for receiving, WAP is connected,Complete distribution;
Set up with high in the clouds after S4, the upper WAP of equipment connection and be connected, send EIC equipment identification code and session identification code;
Be associated for equipment and software end according to EIC equipment identification code and session identification code, and send result to set by S5, high in the cloudsIt is standby, complete binding;
The equipment that S6, software end obtain new binding under current sessions identification code to high in the clouds.
During specific implementation, as shown in Fig. 2 equipment enters distribution pattern, periodically switching channel 1 is received to channel 14Wireless data packet on channel.APP(Software end)GetPINcode interfaces are called to obtain PINcode from high in the clouds(Session identificationCode), session identification code is generated at random by high in the clouds, while setting up user and parameter set beyond the clouds (i.e. (eip+SSID+PINcode)<-->Uid corresponding relation).APP is by SSID (service set), Password (password), PINcode(Session identification code)CompileCode is to one group of multicast mac address(Hardware address)In, composition data bag is sent in wireless environment.Equipment is from the packet for receivingIn MAC Address parse SSID, Password and PINcode.Equipment is complete according to router in SSID and Password connectionsInto distribution.And preserve service set and password after equipment completion distribution, even if need not enter during next power-off restartingEnter distribution pattern, but the SSID and Password preserved before connection, devLogin interfaces are then directly invoked to step onRecord high in the clouds.
Then equipment sets up TCP with high in the clouds(Transmission control protocol)Connection, equipment calls devBind interfaces are built in distal endErect standby and parameter set (i.e. (eip+SSID+PINcode)<-->DevTid corresponding relation).Now high in the clouds is by parameter set oneThe user of cause and equipment are associated, and complete binding.
After binding, user is possessed of control power to equipment.APP can be called after packet has been sentGetNewDeviceList interfaces go to high in the clouds to obtain the newly added equipment of this binding.High in the clouds is by returning to newly added equipment information, APPUpper display newly added equipment is in presence.
The above, simply presently preferred embodiments of the present invention, the invention is not limited in above-mentioned implementation method, as long asIt reaches technique effect of the invention with identical means, should all belong to protection scope of the present invention.