Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, embodiment of the present invention is described further in detail below in conjunction with accompanying drawing.
Referring to Fig. 1, the embodiment of the invention provides a kind of multiple terminals control method based on wifi, comprising:
Step 101: portable terminal receives the SSID (Service Set Identifier, service set) of AP (Access Point, WAP (wireless access point));
Step 102: if comprise the control sign among this SSID, then portable terminal accesses the corresponding AP of this SSID according to the wifi agreement, and obtains control information by the AP of access.
Wherein, present embodiment need to be applied to a large amount of portable terminals of control to carry out the scene of unified operation, for example, need can be applied to a large amount of portable terminals of control to carry out the scene of updating operation.
In embodiments of the present invention, portable terminal receives the SSID of AP, if comprise the control sign among this SSID, then accesses the corresponding AP of this SSID according to the wifi agreement, and obtains control information by the AP of access.So, portable terminal improves the efficient of control portable terminal and guarantees normally to control portable terminal according to wifi agreement access AP and automatic acquisition control information.
The embodiment of the invention provides a kind of multiple terminals control method based on wifi.Wherein, the method need to be applied to a large amount of portable terminals of control to carry out the scene of unified operation, for example, this scene can be controlled the scene that a large amount of portable terminals carry out updating operation for needs, and present embodiment is controlled scene that a large amount of portable terminals carry out updating operation take needs and is described as example, be that present embodiment is controlled a large amount of portable terminals by the method and carried out updating operation, referring to Fig. 2, the method comprises:
Step 201: upgrading AP broadcasting upgrading SSID, upgrading SSID comprises control sign and control information broadcast mode, and this control information broadcast mode is multicast mode;
Wherein, the upgrading SSID of upgrading AP can identify a upgrading AP uniquely, and upgrading AP gives portable terminal to be upgraded at default frequency broadcasting upgrading SSID.Wherein, in the present embodiment, the technical staff arranges one or more upgrading AP, when needs are upgraded to portable terminal, start the upgrading AP that arranges, upgrading AP generation comprises the upgrading SSID of control sign and control information broadcast mode, and then the upgrading SSID in default frequency broadcasting generation gives portable terminal to be upgraded.
Wherein, present embodiment is applied to the network architecture as shown in Figure 3, and this network architecture comprises upgrade server and upgrading AP, and upgrading AP is used for upgrading portable terminal to be upgraded; Upgrade server links to each other with upgrading AP, and portable terminal to be upgraded can be connected on the upgrading AP according to the wifi agreement; Upgrade server can link to each other with upgrading AP by wired mode or wireless mode, and for example upgrade server can be connected on the upgrading AP by netting twine or USB line.
Wherein, upgrading SSID is individual 32 character string, upgrading SSID comprises that three parts are respectively first, second portion and third part, wherein, first can be used for comprising the control sign, second portion can be used for comprising the control information broadcast mode, and third part can be used for comprising the index of controlling AP.
Step 202: portable terminal to be upgraded is from the SSID of default frequency reception AP, if comprise upgrading SSID among the SSID that receives, then execution in step 203;
Particularly, portable terminal to be upgraded receives the SSID of the AP transmission that can cover its position from default frequency, check and whether comprise the control sign among each SSID of reception, if view the SSID that comprises the control sign, the SSID that then comprises the control sign is upgrading SSID, and determine accordingly and comprise upgrading SSID among the SSID of reception and determine and can upgrade, then trigger and carry out follow-up upgrading flow process.If do not comprise upgrading SSID among the SSID that receives, then do not trigger the upgrading flow process.
Wherein, in the present embodiment, the frequency of presetting among default frequency and the upgrading AP in the portable terminal to be upgraded is identical.
Wherein, in some scene, the quantity of portable terminal to be upgraded is more, the technical staff can start a plurality of upgrading AP simultaneously, then the upgrading SSID of each upgrading AP broadcasting self gives portable terminal to be upgraded, so portable terminal to be upgraded may receive a plurality of upgrading SSID that comprise the control sign.
Wherein, in the present embodiment, adopt multicast mode that portable terminal to be upgraded is upgraded; And default multicast address in each portable terminal to be upgraded, this multicast address is the address of upgrade server; In addition, comprise upgrading data packet in the upgrade server, upgrade server can be given the upgrade data multicast that comprises in this upgrading data packet each multicast member in its corresponding multicast group.
Step 203: if the quantity of upgrading SSID greater than 1, then portable terminal to be upgraded is selected a upgrading AP according to the signal quality of upgrading AP corresponding to upgrading SSID from upgrading AP corresponding to upgrading SSID;
Particularly, portable terminal to be upgraded is selected a best upgrading AP of signal quality from upgrading AP corresponding to upgrading SSID; Perhaps, from upgrading AP corresponding to upgrading SSID, determine signal quality greater than the upgrading AP of predetermined threshold value, from the upgrading AP that determines, select at random a upgrading AP.
Wherein, if the quantity of upgrading SSID is 1, then portable terminal to be upgraded is directly selected upgrading AP corresponding to this upgrading SSID, and then execution in step 204.
Step 204: portable terminal to be upgraded according to the wifi agreement set up with the upgrading AP that selects between wireless connections, the upgrading AP that selects with access, and from the upgrading SSID of the upgrading AP that selects extraction control information broadcast mode;
Step 205: portable terminal to be upgraded judges the control information broadcast mode that extracts, if be multicast mode, then by with the upgrading AP that selects between wireless connections add multicast group corresponding to the multicast address preset;
Wherein, portable terminal to be upgraded can be according to default multicast address, and by with the upgrading AP that selects between wireless connections send multicast and join request to upgrade server corresponding to default multicast address, and this multicast sign of carrying portable terminal to be upgraded in joining request; Upgrade server receives this multicast and joins request, and according to this multicast sign of carrying portable terminal to be upgraded that joins request portable terminal to be upgraded is joined in its corresponding multicast group.
Wherein, comprise the upgrade data that comprises in the upgrading data packet in the upgrade server, upgrade server can ceaselessly be packaged into the upgrade data that comprises in the upgrading data packet corresponding one or more packets and multicast to the multicast member in its corresponding multicast group.Wherein, the version number that comprises upgrading data packet in the packet of upgrade server multicast.
Wherein, in the present embodiment, portable terminal to be upgraded can be carried out first the process of extracting the control information broadcast mode and the control information broadcast mode being judged from the upgrading SSID of the upgrading AP that selects, and then carries out the process of setting up and upgrading the wireless connections between the AP; Perhaps, portable terminal to be upgraded can carry out first set up with upgrading AP between the process of wireless connections, and then the process of carrying out from the upgrading SSID of the upgrading AP that selects extraction control information broadcast mode and the control information broadcast mode being judged; Perhaps, portable terminal to be upgraded also can be carried out above-mentioned two processes simultaneously.
Step 206: portable terminal to be upgraded is according to the upgrade data of default multicast address receiving group, when receiving complete upgrading data packet, the upgrading data packet that receives is stored in the local memory space, wherein, this upgrading data packet is the control information that portable terminal to be upgraded need to obtain.
Wherein, optionally, portable terminal to be upgraded is when beginning to receive a packet corresponding to upgrade data, from this packet, extract the version number of upgrading data packet, and with the version number of the upgrading data packet of self storage relatively, if both are different, then continue the packet corresponding to upgrade data of receiving group, and when receiving complete upgrading data packet, the upgrading data packet that receives is stored in the local memory space; If both are identical, then determining does not need to proceed upgrading, stops to continue the packet corresponding to upgrade data of receiving group.
Further, optionally, portable terminal to be upgraded is received after the complete upgrading data packet, can also pass through CRC (Cyclical Redundancy Check, CRC) mechanism and judge whether the upgrading data packet of reception is correct, if correct, upgrading data packet then is installed realizes upgrading, if incorrect, then determine and successfully do not receive upgrading data packet, portable terminal to be upgraded restarts, and returns step 202 begin to carry out after startup.
Wherein, if portable terminal to be upgraded does not successfully receive upgrading data packet, then portable terminal to be upgraded restarts, portable terminal to be upgraded in the process that restarts can abandon the data such as upgrading data packet that received, and after restarting, portable terminal to be upgraded receives the SSID of AP again, select upgrading AP and obtain the operation such as upgrading data packet, a unusual program so can not need to be set in portable terminal to be upgraded come when successfully not receiving upgrading data packet, to carry out abnormality processing, reduce upgrade cost.
Wherein, optional, after updating mobile terminal to be upgraded is finished, withdraw from multicast group corresponding to default multicast address, and the wireless connections between release and the upgrading AP.
In embodiments of the present invention, upgrading AP broadcasting upgrading SSID give portable terminal to be upgraded, portable terminal to be upgraded receives the SSID of AP, if comprise the upgrading SSID of the AP that upgrades among the SSID that receives, then determine and to upgrade, if a plurality of upgrading SSID are arranged, then from upgrading AP corresponding to upgrading SSID, select a upgrading AP according to the signal quality of upgrading AP corresponding to upgrading SSID, if a upgrading SSID is arranged, then directly select upgrading AP corresponding to this upgrading SSID, according to the wireless connections between the upgrading AP of the foundation of wifi agreement and selection, add default multicast group corresponding to multicast address by these wireless connections, and receive the upgrading data packet of upgrade server multicast.Portable terminal so to be upgraded can be linked into upgrading AP and automatically upgrades according to the mode of wifi agreement by wireless connections, so improves upgrading efficient and guarantees normal upgrading.
The embodiment of the invention provides a kind of multiple terminals control method based on wifi.Wherein, the method need to be applied to a large amount of portable terminals of control to carry out the scene of unified operation, for example, this scene can be controlled the scene that a large amount of portable terminals carry out updating operation for needs, and present embodiment is controlled scene that a large amount of portable terminals carry out updating operation take needs and is described as example, be that present embodiment is controlled a large amount of portable terminals by the method and carried out updating operation, referring to Fig. 4, the method comprises:
Step 301: upgrading AP broadcasting upgrading SSID, upgrading SSID comprises control sign and control information broadcast mode, and this control information broadcast mode is mode of unicast;
Wherein, the upgrading SSID of upgrading AP can identify a upgrading AP uniquely, and upgrading AP gives portable terminal to be upgraded at default frequency broadcasting upgrading SSID.Wherein, in the present embodiment, the technical staff arranges one or more upgrading AP, when needs are upgraded to portable terminal, start the upgrading AP that arranges, upgrading AP generation comprises the upgrading SSID of the control information broadcast mode of control sign, and then the upgrading SSID in default frequency broadcasting generation gives portable terminal to be upgraded.
Wherein, present embodiment is applied to the network architecture as shown in Figure 3, and this network architecture comprises upgrade server and upgrading AP, and upgrading AP is used for upgrading portable terminal to be upgraded; Upgrade server links to each other with upgrading AP, and portable terminal to be upgraded can be connected on the upgrading AP according to the wifi agreement; Upgrade server can link to each other with upgrading AP by wired mode or wireless mode, and for example upgrade server can be connected on the upgrading AP by netting twine or USB line.
Wherein, the upgrading SSID of upgrading AP is individual 32 character string, upgrading SSID comprises that three parts are respectively first, second portion and third part, wherein, first can be used for comprising the control sign, second portion can be used for comprising the control information broadcast mode, and third part can be used for comprising the index of the AP that upgrades.
Step 302: portable terminal to be upgraded, is then determined and need to be upgraded if comprise upgrading SSID among the SSID that receives from the SSID of default frequency reception AP, and execution in step 303;
Particularly, portable terminal to be upgraded receives the AP Broadcast SSIDs that can cover its position from default frequency, check and whether comprise the control sign among each SSID of reception, if view the SSID that comprises the control sign, the SSID that then comprises the control sign is upgrading SSID, then determine and comprise upgrading SSID among the SSID of reception and determine and to upgrade, then trigger and carry out follow-up upgrading flow process.If do not have upgrading SSID among the SSID that receives, then do not trigger the upgrading flow process.
Wherein, in the present embodiment, the frequency of presetting among default frequency and the upgrading AP in the portable terminal to be upgraded is identical.
Wherein, in some scene, the quantity of portable terminal to be upgraded is more, and the technical staff can start a plurality of upgrading AP simultaneously, then the upgrading SSID of each upgrading AP broadcasting self gives portable terminal to be upgraded, so standby communication terminal may receive a plurality of upgrading SSID that comprise the control sign.
Wherein, in the present embodiment, adopt mode of unicast that portable terminal to be upgraded is upgraded; And the address of default upgrade server in each portable terminal to be upgraded.
Step 303: if the quantity of upgrading SSID greater than 1, then portable terminal to be upgraded is selected a upgrading AP according to the signal quality of upgrading AP corresponding to upgrading SSID from upgrading AP corresponding to upgrading SSID;
Particularly, portable terminal to be upgraded is selected a best upgrading AP of signal quality from upgrading AP corresponding to upgrading SSID; Perhaps, from upgrading AP corresponding to upgrading SSID, determine signal quality greater than the upgrading AP of predetermined threshold value, from the upgrading AP that determines, select at random a upgrading AP.
Wherein, if the quantity of upgrading SSID is 1, then portable terminal to be upgraded is directly selected upgrading AP corresponding to this upgrading SSID, and then execution in step 304.
Step 304: portable terminal to be upgraded according to the wifi agreement set up with the upgrading AP that selects between wireless connections, the upgrading AP that selects with access, and from the upgrading SSID of the upgrading AP that selects extraction control information broadcast mode;
Step 305: portable terminal to be upgraded judges the control information broadcast mode that extracts, if be mode of unicast, then with the upgrading AP that selects between wireless connections foundation and upgrade server between be connected;
Particularly, portable terminal to be upgraded is judged the control information broadcast mode that extracts, if be mode of unicast, then according to the address of default upgrade server, with the upgrading AP that selects between wireless connections set up with upgrade server between be connected.
Wherein, in the present embodiment, portable terminal to be upgraded can be carried out first the process of extracting the control information broadcast mode and the control information broadcast mode being judged from the upgrading SSID of the upgrading AP that selects, and then carries out the process of setting up and upgrading the wireless connections between the AP; Perhaps, portable terminal to be upgraded can carry out first set up with upgrading AP between the process of wireless connections, and then the process of carrying out from the upgrading SSID of the upgrading AP that selects extraction control information broadcast mode and the control information broadcast mode being judged; Perhaps, portable terminal to be upgraded also can be carried out above-mentioned two processes simultaneously.
Step 306: portable terminal to be upgraded by with upgrade server between be connected and from upgrade server, obtain upgrading data packet, the upgrading data packet of obtaining is stored in the local memory space, wherein, this upgrading data packet is the control information that portable terminal to be upgraded need to obtain.
Wherein, optional, portable terminal to be upgraded set up with upgrade server between be connected after, from upgrade server, obtain the version number of upgrading data packet, and with the version number of the upgrading data packet of self storage relatively, if both are different, then continue to carry out this step, to obtain upgrading data packet; If both are identical, then determining does not need to proceed upgrading, stops to carry out this step.
Further, optionally, after the complete upgrading data packet of acquisition for mobile terminal to be upgraded, can also judge whether the upgrading data packet of obtaining is correct by CRC mechanism, if correct, upgrade data then be installed realized upgrading, if incorrect, then determine and successfully do not get access to upgrading data packet, portable terminal to be upgraded restarts, and returns step 302 begin to carry out after startup.
Wherein, if portable terminal to be upgraded does not successfully get access to upgrading data packet, then portable terminal to be upgraded restarts, portable terminal to be upgraded in the process that restarts can abandon the data such as upgrading data packet that received, and after restarting, portable terminal to be upgraded receives the SSID of AP again, select upgrading AP and obtain the operation such as upgrading data packet, a unusual program so can not need to be set in portable terminal to be upgraded come when successfully not getting access to upgrading data packet, to carry out abnormality processing, reduce upgrade cost.
Wherein, alternatively, after updating mobile terminal to be upgraded is finished, the wireless connections between release and the upgrading AP.
In embodiments of the present invention, upgrading AP broadcasting upgrading SSID give portable terminal to be upgraded, portable terminal to be upgraded receives the SSID of AP, if comprise the upgrading SSID of the AP that upgrades among the SSID that receives, then determine and to upgrade, if a plurality of upgrading SSID are arranged, then from upgrading AP corresponding to upgrading SSID, select a upgrading AP according to the signal quality of upgrading AP corresponding to upgrading SSID, if a upgrading SSID is arranged, then directly select upgrading AP corresponding to this upgrading SSID, according to the wireless connections between the upgrading AP of the foundation of wifi agreement and selection, by being connected between this wireless connections foundation and the upgrade server, and by with upgrade server between be connected and from upgrade server, obtain upgrading data packet, to finish upgrading.Portable terminal so to be upgraded can be linked into upgrading AP and automatically upgrades according to the mode of wifi agreement by wireless connections, so improves upgrading efficient and guarantees normal upgrading.
Referring to Fig. 5, the embodiment of the invention provides a kind of multiple terminals control appliance based on wifi, comprising:
Receiver module 401 is for the SSID that receives AP;
Access module 402 comprises the control sign if be used for this SSID, then accesses the corresponding AP of this SSID according to the wifi agreement;
Acquisition module 403 is used for obtaining control information by this AP.
Wherein, access module 402 comprises:
The first access unit is if the SSID that is used for comprising the control sign, then selects a best AP access of signal quality more than 1 from the corresponding AP of SSID that respectively comprises the control sign; Perhaps,
The second access unit is used for determining signal quality greater than the AP of predetermined threshold value from the corresponding AP of SSID that respectively comprises the control sign, selects at random an AP access from the AP that determines.
Wherein, comprise among the SSID that controls sign and also comprise the control information broadcast mode, if this control information broadcast mode is clean culture, then acquisition module 403, concrete body is used for the address according to default server, by with this AP between wireless connections foundation and server between be connected, obtain control information from this server.
Wherein, comprise among the SSID that controls sign and also comprise the control information broadcast mode, if the control information broadcast mode is multicast, then acquisition module 402, concrete being used for according to default multicast address, by with this AP between wireless connections add corresponding multicast group, the control information of receiving group server multicast.
Further, this equipment also comprises,
Cut off module, after being used for acquisition module 403 and obtaining control information, cut off the wireless connections with this AP.
Wherein, the control information of obtaining is the software upgrade package of portable terminal,
Further, this equipment also comprises, the upgrading module is used for carrying out this AKU, carries out software upgrading.
In embodiments of the present invention, portable terminal receives the SSID of AP, if comprise the control sign among this SSID, then accesses the corresponding AP of this SSID according to the wifi agreement, and obtains control information by the AP of access.So, portable terminal so improves the efficient of control portable terminal and guarantees normally to control portable terminal according to wifi agreement access AP and automatic acquisition control information.
The all or part of step that one of ordinary skill in the art will appreciate that realization above-described embodiment can be finished by hardware, also can come the relevant hardware of instruction to finish by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be read-only memory, disk or CD etc.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.