Summary of the invention
The embodiment of the present invention provides in a kind of wireless fidelity network and scans access point, channel selecting method, equipment and system, to improve scan efficiency.
First aspect, the embodiment of the present invention provides a kind of method that scans access point in Wireless Fidelity WiFi network, comprising:
Website is determined the 1st channel in described WiFi network according to the preset rules relevant to the service set SSID of target access AP;
Described website is in the enterprising line scanning of described the 1st channel, and when determining with described preset rules with the described target AP of box lunch and using described the 1st channel, described website scans described target AP.
In the possible implementation of the first, described preset rules is for determining the 1st channel to the n channel;
Described method also comprises:
If scanning, less than described target AP, is determined the n channel in described WiFi network by described preset rules on n-1 channel;
In the enterprising line scanning of described n channel, when determining and using described n channel with described preset rules with the described target AP of box lunch, scan described target AP; Or
Described method also comprises:
If scanning is less than described target AP on n-1 channel, in the enterprising line scanning of n channel of determining according to described preset rules; When determining and using described n channel with described preset rules with the described target AP of box lunch, scan described target AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of first aspect or first aspect, in the possible implementation of the second, the preset rules that described basis is relevant to the service set SSID of target access AP also comprises before determining the 1st channel in described WiFi network:
Obtain on-site national code information;
Correspondingly, the preset rules that described basis is relevant to the service set SSID of target access AP is determined the 1st channel in described WiFi network, comprising:
According to described national code information and described preset rules, determine described the 1st channel.
In conjunction with the possible implementation of the second of first aspect or first aspect, in the third possible implementation, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Wherein, described priority list is corresponding with the SSID of described target AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of first aspect, in the 4th kind of possible implementation, described preset rules is:
According to relative importance value order from high to low, determine successively the channel number of the 1st channel to the n channel;
The preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Describedly by described preset rules, determine that the n channel in described WiFi network is specially:
Determine in described priority list, except sequence number corresponding to the 1st channel to the n-1 channel, described n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network.
In conjunction with the possible implementation of the second of first aspect or first aspect, in the 5th kind of possible implementation, the relevant preset rules of SSID described and described target access is:
According to take function that SSID is independent variable, determine the channel designator of described the 1st channel;
The preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of function, as the channel designator of described the 1st channel.
In conjunction with the 5th kind of possible implementation of first aspect, in the 6th kind of possible implementation, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1;
Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In conjunction with the possible implementation of the first of first aspect, in the 7th kind of possible implementation, described preset rules is:
According to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel;
The preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of the 1st function, as the channel designator of described the 1st channel;
Describedly by described preset rules, determine that the n channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of n function, as the channel designator of described n channel.
In conjunction with the 7th kind of possible implementation of first aspect, in the 8th kind of possible implementation, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In conjunction with any possible implementation of first aspect or first aspect, in the 9th kind of possible implementation, on described the 1st channel, send the scan request frame of the SSID that carries described target AP;
Describedly scan described target AP and refer to: receive the scanning response frame to described scan request frame.
In conjunction with any possible implementation of first aspect or first aspect, in the tenth kind of possible implementation, describedly in the enterprising line scanning of described the 1st channel, be specially:
Described the 1st channel is monitored;
Describedly scan described target AP and refer to: the beacon frame that listens to the SSID that comprises described target AP on described the 1st channel.
Second aspect, the method for access point AP selective channel in a kind of Wireless Fidelity WiFi network of the embodiment of the present invention, comprising:
According to the relevant preset rules of the service set SSID to described AP, determine the 1st channel in described WiFi network;
Judge that whether described the 1st channel is available, if described the 1st channel can be used, use described the 1st channel, so that website when determining with described preset rules and scanning described the 1st channel, scans described AP.
In the possible implementation of the first, described preset rules is for determining the 1st channel to the n channel;
Described method also comprises:
If n-1 channel is unavailable, described AP determines the n channel in described WiFi network according to described preset rules;
Judge that whether described n channel is available, if available, use n channel, so that described website when determining and scanning described n channel with described preset rules, scans described AP; Or
Described method also comprises:
If n-1 channel is unavailable, judge that whether the n channel of determining according to described preset rules is available, if available, use n channel, so that website when determining and scanning described n channel with described preset rules, scans described AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of second aspect or second aspect, in the possible implementation of the second, the preset rules that described basis is relevant to the SSID of described AP also comprises before determining the 1st channel in described WiFi network:
Obtain on-site national code information;
Correspondingly, the preset rules that described basis is relevant to described SSID is determined the 1st channel in described WiFi network, comprising:
According to described national code information and described preset rules, determine described the 1st channel.
In conjunction with the possible implementation of the second of second aspect or second aspect, in the third possible implementation, the preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Wherein, described priority list is corresponding with the SSID of described AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of second aspect, in the 4th kind of possible implementation, according to relative importance value order from high to low, determine successively the channel number of the 1st channel to the n channel;
The preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Described AP determines that according to described preset rules the n channel in described WiFi network is specially:
Described AP determines in described priority list, except sequence number corresponding to the 1st channel to the n-1 channel, and described n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network.
In conjunction with the possible implementation of the second of second aspect or second aspect, in the 5th kind of possible implementation, the relevant preset rules of SSID described and described AP is:
According to take function that SSID is independent variable, determine the channel designator of described the 1st channel;
The preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of function, as the channel designator of described the 1st channel.
In conjunction with second aspect the 5th kind of possible implementation, in the 6th kind of possible implementation, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1;
Wherein, S
1it is the channel designator of the 1st channel; K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In conjunction with the possible implementation of the first of second aspect, in the 7th kind of possible implementation, described preset rules is:
According to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel;
The preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of the 1st function, as the channel designator of described the 1st channel;
Described AP determines that according to described preset rules the n channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of n function, as the channel designator of described n channel.
In conjunction with the 7th kind of possible implementation of second aspect, in the 8th kind of possible implementation, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
The third aspect, it is a kind of for scan the website of access point at Wireless Fidelity WiFi network that the embodiment of the present invention provides, and comprising:
The first determining unit, for determining the 1st channel of described WiFi network according to the preset rules relevant to the service set SSID of target access AP;
The first scanning element, in the enterprising line scanning of described the 1st channel, when determining with described preset rules with the described target AP of box lunch and using described the 1st channel, scans described target AP.
In the possible implementation of the first, described preset rules is for determining the 1st channel to the n channel;
Described website also comprises:
The second determining unit, if less than described target AP, determine the n channel in described WiFi network by described preset rules for scanning on n-1 channel;
The second scanning element, in the enterprising line scanning of described n channel, when determining and using described n channel with described preset rules with the described target AP of box lunch, scans described target AP; Or
Described website also comprises:
The 3rd scanning element, if for scanning less than described target AP, in the enterprising line scanning of n channel of determining according to described preset rules on n-1 channel; When determining and using described n channel with described preset rules with the described target AP of box lunch, scan described target AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of the third aspect or the third aspect, in the possible implementation of the second, described website also comprises:
The first acquiring unit, for obtaining on-site national code information;
Correspondingly, described the first determining unit is specifically for determining described the 1st channel according to described national code information and described preset rules.
In conjunction with the possible implementation of the second of the third aspect or the third aspect, in the third possible implementation, described website also comprises:
Memory cell, for the list of memory priority level, described priority list is corresponding with the SSID of described target AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network;
Described the first determining unit specifically for determining the highest channel designator of relative importance value from described priority list, and channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In conjunction with the possible implementation of third aspect the first, in the 4th kind of possible implementation, described website also comprises:
Memory cell, for the list of memory priority level, described priority list is corresponding with the SSID of described target AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network;
Described the first determining unit specifically for, from described priority list, determine the highest described the 1st channel corresponding to channel designator of relative importance value;
Described the second determining unit specifically for, the in the situation that on n-1 channel, scanning being less than described target AP, according to described priority list, from the channel designator except channel designator corresponding to the 1st channel to the n-1 channel, determine n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K.
In conjunction with the possible implementation of the second of the third aspect or the third aspect, in the 5th kind of possible implementation, the relevant preset rules of SSID described and described target access is:
According to take function that SSID is independent variable, determine the channel designator of described the 1st channel;
Described the first determining unit specifically for: will, during SSID that the value of described independent variable is described target access described in the value of function, as the channel designator of described the 1st channel.
In conjunction with the 5th kind of possible implementation of the third aspect, in the 6th kind of possible implementation, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1;
Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to the described SSID of described target AP is carried out to Hash operation; Mod is modulo operator.
In conjunction with the possible implementation of third aspect the first, in the 7th kind of possible implementation, described preset rules is: according to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel;
Described the first determining unit specifically for: will, during SSID that the value of described independent variable is described target access described in the value of the 1st function, as the channel designator of described the 1st channel;
Described the second determining unit is specifically for scanning on n-1 channel less than described target AP in the situation that, will, during SSID that the value of described independent variable is described target access described in the value of n function, as the channel designator of described n channel.
In conjunction with the 7th kind of possible implementation of the third aspect, in the 8th kind of possible implementation, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
Fourth aspect, the embodiment of the present invention provides the access point in a kind of Wireless Fidelity WiFi network, comprising:
The 3rd determining unit, for determining the 1st channel of described WiFi network according to the preset rules relevant to the service set SSID of described access point;
The first judging unit, whether available for judging described the 1st channel, if described the 1st channel can be used, use described the 1st channel, so that website when determining with described preset rules and scanning described the 1st channel, scans described access point.
In the possible implementation of the first, described preset rules is for determining the 1st channel to the n channel; Described access point also comprises:
The 4th determining unit, if unavailable for n-1 channel, determines the n channel in described WiFi network according to described preset rules;
The second judging unit, whether available for judging described n channel, if available, use n channel, so that described website when determining and scanning described n channel with described preset rules, scans described access point; Or
Described access point also comprises:
The 3rd judging unit, whether available for judging the n channel of determining according to described preset rules, if available, use n channel, so that website when determining and scanning described n channel with described preset rules, scans described AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
In conjunction with the possible implementation of the first of fourth aspect or fourth aspect, in the possible implementation of the second, described access point also comprises:
Second acquisition unit, for obtaining on-site national code information;
Correspondingly, described the 3rd determining unit is specifically for determining described the 1st channel according to described national code information and described preset rules.
In conjunction with the possible implementation of the second of fourth aspect or fourth aspect, in the third possible implementation, described access point also comprises:
Memory cell, for the list of memory priority level, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network;
Described the 3rd determining unit specifically for, from described priority list, determine the highest channel designator of relative importance value; Channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In conjunction with the possible implementation of the first of fourth aspect, in the 4th kind of possible implementation, described access point also comprises:
Memory cell, for the list of memory priority level, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network;
Described the 3rd determining unit specifically for, determine described the 1st channel corresponding to channel designator that in described priority list, relative importance value is the highest;
Described the 4th determining unit specifically for, in the disabled situation of n-1 channel, determine in described priority list, except channel designator corresponding to the 1st channel to the n-1 channel, n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K.
In conjunction with the possible implementation of the second of fourth aspect or fourth aspect, in the 5th kind of possible implementation, described the 3rd determining unit specifically for: will, the value of function during SSID that the value of independent variable is described target access, as the channel designator of described the 1st channel; Described function be take SSID as independent variable.
In conjunction with the 5th kind of possible implementation of fourth aspect, in the 6th kind of possible implementation, described function is: S
1=(hash (SSID) mod K)+1;
Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In conjunction with the possible implementation of the first of fourth aspect, in the 7th kind of possible implementation, described the 3rd determining unit specifically for: will, the value of the 1st function during SSID that the value of independent variable is described target access, as the channel designator of described the 1st channel; Described the 1st function be take SSID as independent variable;
Described the 4th determining unit specifically for: in the disabled situation of n-1 channel, will, the value of n function during SSID that the value of independent variable is described target access, as the channel designator of described n channel; Described n function be take SSID as independent variable;
Described pre-defined rule is specially: according to the 1st function to the n function, determine respectively the channel number of the 1st channel to the n channel.
In conjunction with the 7th kind of possible implementation of fourth aspect, in the 8th kind of possible implementation, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
The 5th aspect, the embodiment of the present invention provides a kind of Wireless Fidelity WiFi network access system, comprising:
The website that the embodiment of the present invention provides, and the access point that provides of the embodiment of the present invention.
As shown from the above technical solution, in the wireless fidelity network that the embodiment of the present invention provides, scan access point, channel selecting method, equipment and system, STA determines the 1st channel in WiFi network according to the preset rules relevant to the service set SSID of target access AP, in the enterprising line scanning of the 1st channel, when the target AP with box lunch with SSID is determined with preset rules and uses the 1st channel, scan target AP.Because STA determines the 1st channel according to the preset rules relevant to the SSID of target AP, this target AP is also determined the 1st channel according to SSID by identical preset rules when selective channel, when target AP is used the 1st channel, STA can arrive this target AP by rapid scanning when scan channel, scanning process is pointed, has greatly improved scan efficiency.
Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
In a kind of Wireless Fidelity WiFi network that Fig. 1 provides for the embodiment of the present invention, scan the method flow diagram of access point.As shown in Figure 1, the scanning access point method that the present embodiment provides specifically can be applied to the scanning process of site STA to access point AP in WiFi network.The method that scans access point in the Wireless Fidelity WiFi network that the present embodiment provides can be carried out by STA.
The method that scans access point in the Wireless Fidelity WiFi network that the present embodiment provides specifically comprises:
Steps A 10, website are determined the 1st channel in described WiFi network according to the preset rules relevant to the service set SSID of target access AP;
Steps A 20, described website are in the enterprising line scanning of described the 1st channel, and when determining with described preset rules with the described target AP of box lunch and using described the 1st channel, described website scans described target AP.
Particularly, WiFi network can be divided into a plurality of WiFi sub-networks, each WiFi sub-network has a SSID(Service Set Identifier, service set), the WiFi sub-network for example oneself arranging can called after Home, the WiFi sub-network that operator arranges can called after ChinaNet, and Home and ChinaNet are the SSID of WiFi sub-network.In each WiFi sub-network, can be provided with one or more AP, the SSID of AP that belongs to same WiFi sub-network is identical with the SSID of this WiFi sub-network.
STA is specifically as follows the terminal that is provided with WiFi module, and this terminal can be mobile phone, panel computer, notebook computer or personal computer etc.STA searches for this WiFi sub-network by the SSID of WiFi sub-network, and STA, in the process of search WiFi sub-network, need to scan the AP of this WiFi sub-network, and this AP is target AP.
The frequency range of WiFi network has two, and one is the frequency range of 2.4G, and one is the frequency range of 5G.Each frequency range is divided into again several channels according to the unified regulation of International Standards Organization, and each channel has a channel number to identify this channel.
The preset rules relevant to SSID is specifically as follows SSID and the 1st channel mapping relation, and the 1st channel that different SSID are corresponding can be different, by SSID, can determine the 1st channel.This preset rules can be also the corresponding relation of SSID and priority list, the channel designator and relative importance value corresponding to each channel designator that in relative importance value list, include K channel in WiFi network, can determine priority list according to SSID, and determine the 1st channel according to relative importance value, for example the highest channel of relative importance value is defined as to the 1st channel.This preset rules can also be preset algorithm, by this preset algorithm, SSID can be converted to channel number, and the channel that this channel number being converted to is corresponding is the 1st channel.
When construction network, AP determines the 1st channel according to the preset rules relevant to the SSID of self, and this preset rules determines that with STA the mode of the 1st channel is identical.AP judges that whether the 1st channel is available, if available, uses the 1st channel.When AP is used the 1st channel, STA, in the enterprising line scanning of the 1st channel, can scan this AP.STA scans after target AP on the 1st channel, can set up and being connected of this target AP.
In the Wireless Fidelity WiFi network that the present embodiment provides, scan the method for access point, STA determines the 1st channel in WiFi network according to the preset rules relevant to the service set SSID of target access AP, in the enterprising line scanning of the 1st channel, when the target AP with box lunch with SSID is determined with preset rules and uses the 1st channel, scan target AP.Because STA determines the 1st channel according to the preset rules relevant to the SSID of target AP, this target AP is also determined the 1st channel according to SSID by identical preset rules when selective channel, when target AP is used the 1st channel, STA can scan this target AP when scan channel for the first time, scanning process is pointed, has greatly improved scan efficiency.
In the another kind of Wireless Fidelity WiFi network that Fig. 2 provides for the embodiment of the present invention, scan the method flow diagram of access point.As shown in Figure 2, in the present embodiment, described preset rules is for determining the 1st channel to the n channel;
Described method also comprises:
If steps A 30 scans less than described target AP on n-1 channel, by described preset rules, determine the n channel in described WiFi network;
Steps A 40, in the enterprising line scanning of described n channel, when determining and using described n channel with described preset rules with the described target AP of box lunch, scan described target AP; Or
Described method also comprises:
If scanning is less than described target AP on n-1 channel, in the enterprising line scanning of n channel of determining according to described preset rules; When determining and using described n channel with described preset rules with the described target AP of box lunch, scan described target AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
Particularly, if STA scans fall short AP on n-1 channel, according to preset rules, determine n channel.During construction network, AP judges when n-1 channel is unavailable, also according to the preset rules relevant to the SSID of self, determines n channel.
STA determines that according to the preset rules relevant to the SSID of target AP the implementation of n channel can have multiple, can be in needs IMU cross preset rules and the SSID of target AP be converted to the channel number of n channel, also can obtain the priority list of keeping in advance according to the SSID of target AP, this priority list comprises channel designator and the relative importance value corresponding to each channel designator of a plurality of channels.For example, the relative importance value of the channel that channel designator is 6 is 1, and the relative importance value of the channel that channel designator is 10 is 2 etc.Can be according to the relative importance value of each channel in this priority list at definite n channel.For example, can select from high to low according to relative importance value.
This priority list can set in advance, and the corresponding relation of this priority list and SSID is stored.The corresponding relation of priority list and SSID can be stored in STA this locality, also can be stored in the webserver, and STA can get the priority list corresponding with this SSID by SSID.Priority list also can generate in advance according to preset algorithm, a parameter that can be using SSID as this preset algorithm, and the priority list generating according to different SSID is not identical yet.This priority list is preserved, so that IMU is crossed SSID and obtained when needing.In priority list, can comprise that relative importance value is the channel designator of 1 channel, the channel that this relative importance value is 1 is the 1st channel, and definite method of the 1st channel is same as the previously described embodiments.In list, also can not comprise that relative importance value is the channel designator of 1 channel, be in the of 2 from relative importance value, and relative importance value is that the channel of 2 beginnings is the 2nd channel.
STA determined after n channel, in the enterprising line scanning of this channel, if scan target AP, sets up and being connected of target AP.In actual application, if do not scan yet this target AP after all scanned on all channels in network, can scan failed indication information for user feedback target AP.STA also can, according to setting, while not scanning yet this target AP after the scan channel of predetermined number, stop determining and scanning the handling process of n channel.
At AP and STA, all according to SSID, obtain priority list, and according in the implementation of this priority list selective channel, when construction network, AP judges that n-1 channel is unavailable, AP determines n channel according to the priority list corresponding with self SSID.AP can select from high to low according to relative importance value in priority list, if the relative importance value of channel designator the 2nd channel that is 10 is for the highest, AP judges that this channel designator is whether 10 channel is available, if available, select and use this channel, if unavailable, then judge that whether the channel of the low one-level of relative importance value is available, by that analogy, until determine available channel.When STA scans this AP, first according to the relative importance value in the priority list corresponding with the SSID of this AP, select from high to low n channel, if the relative importance value of channel designator the 2nd channel that is 10 is for the highest, on the channel that STA is 10 in channel designator, scan, if scan this AP, connect with this AP, if scanning is less than this AP, by the enterprising line scanning of the channel in the low one-level of relative importance value, by that analogy, until scan this AP.
In actual applications, AP also can be shown to priority list the user that authority is configured AP, for user, according to this priority list, selects the channel of AP to be configured.
STA determines that the method for n channel determines that with AP the method for n channel is identical, makes STA pointed to the scanning process of AP, has further improved scan efficiency.
In the present embodiment, in steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP can also comprise before determining the 1st channel in described WiFi network:
Steps A 50, obtain on-site national code information;
Correspondingly, steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP is determined the 1st channel in described WiFi network, specifically can comprise:
According to described national code information and described preset rules, determine described the 1st channel.
Particularly, each country may be different in the use of channel, and for example, the quantity of channel is 14, and channel number is 1-14, and some countries may be used the channel that channel number is 1-13, and some countries may be used the channel that channel number is 1-11.For same SSID, the 1st channel that country variant is determined can be different.Using the factor of national code information institute's reference in determining the 1st channel procedure, when scanning, STA selective channel can avoid selecting the obsolete channel of this country, improved the definite accuracy of channel, further improved scan efficiency.
In the present embodiment, steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Wherein, described priority list is corresponding with the SSID of described target AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.
In the present embodiment, described preset rules is:
According to relative importance value order from high to low, determine successively the channel number of the 1st channel to the K channel;
Steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Wherein, described priority list is corresponding with the SSID of described target AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.
Particularly, can preset channel number and the mapping relations of channel designator, so that channel designator can be mapped to a channel.For example, can to map directly to channel number be 6 channel to channel designator 6.
In this city example, described preset rules is:
According to relative importance value order from high to low, determine successively the channel number of the 1st channel to the n channel;
Steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Steps A 30, describedly by described preset rules, determine that the n channel in described WiFi network is specially:
Determine in described priority list, except sequence number corresponding to the 1st channel to the n-1 channel, described n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network.
In the present embodiment, the relevant preset rules of SSID described and described target access is:
According to take function that SSID is independent variable, determine the channel designator of described the 1st channel;
Steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of function, as the channel designator of described the 1st channel.
Particularly, take function that SSID is independent variable can be as:
Wherein, a is default constant, and the span of a is according to the difference of K and different, when K=13, and 1≤a≤13 and a unequal to 12, (unequal to represents to be not equal to).
Particularly, Hash hash computing can be mapped as the binary value of random length the less binary value of regular length, and this binary value is called cryptographic Hash.MD5(Message-Digest Algorithm 5) being Message Digest 5, is a kind of of hash computing, by this MD5 computing, the character string of a random length can be transformed into the hexadecimal number word string of a fixed length.Conventionally the hexadecimal number word string of this fixed length is the hexadecimal number word string of 128.By MD5 computing, SSID can be converted to the hexadecimal number word string of 128.Mod is specially modulo operation.K is the quantity of the channel that uses of STA location.When SSID is processed by hash computing, can in advance SSID be converted to binary value.
In actual application, by MD5 computing, SSID can be converted to the hexadecimal number word string of 128, the hexadecimal number word string of 128 all can be calculated for above-mentioned formula, also can selection portion quantile calculate, for example select latter 64, or latter 32, or middle 64, or middle 32 etc.In above-mentioned computational process, except using MD5 computing, also can adopt other hash computings to realize.The present embodiment provides the method for the channel designator of a kind of calculating the 1st channel to the K channel, but those skilled in the art can realize by other algorithms, and the present invention is not as limit.
In the present embodiment, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1;
Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, described preset rules is:
According to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel;
Steps A 10, the preset rules that described basis is relevant to the service set SSID of target access AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of the 1st function, as the channel designator of described the 1st channel;
Steps A 30, describedly by described preset rules, determine that the n channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of n function, as the channel designator of described n channel.
In the present embodiment, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
For example, SSID is ChinaNet, and K is that 13, a is 5 o'clock, by above-mentioned formula, can obtain following result: S1=6; S2=12; S3=5; S4=11; S5=4; S6=10; S7=3; S8=9; S9=2; S10=8; S11=1; S12=7; S13=13.
In the present embodiment, described Hash operation is MD5, SHA(Secure Hash Algorithm, SHA) 1, SHA128 or SHA256 computing.
In the present embodiment, steps A 20, is describedly specially in the enterprising line scanning of described the 1st channel:
On described the 1st channel, send the scan request frame of the SSID that carries described target AP;
Describedly scan described target AP and refer to: receive the scanning response frame to described scan request frame.
Particularly, STA can carry out the scanning of AP in several ways, and in one implementation, STA can initiatively send scan request frame (probe request frame) at the 1st channel, carries the SSID of target AP in this scan request frame.While using the AP of the 1st channel to receive this scan request frame, judge that whether the SSID in this scan request frame is identical with the SSID of self, if identical, return to scanning response frame (probe response frame).When STA receives this scanning response frame, illustrate and scan this target AP, can connect with this AP.If STA does not receive scanning response frame, illustrate that using the AP of the 1st channel is not target AP.
In the present embodiment, steps A 20, is describedly specially in the enterprising line scanning of described the 1st channel:
Described the 1st channel is monitored;
Describedly scan described target AP and refer to: the beacon frame that listens to the SSID that comprises described target AP on described the 1st channel.
Described the 1st channel is monitored, when listening to the first beacon frame, judged that whether the SSID carrying in described the first beacon frame is identical with the SSID of described target AP, if identical, scan described target AP.
In another kind of implementation, STA monitors the 1st channel, use AP meeting periodic broadcast first beacon frame of the 1st channel, carry the SSID of the AP that sends this first beacon frame in this first beacon frame, STA is when listening to the first beacon frame of the AP transmission of using the 1st channel, STA extracts the SSID in the first beacon frame, judge that whether this SSID is the SSID of target AP, if so, illustrates that this AP is target AP, if not, illustrate that this AP is not target AP.Particularly, channel has certain frequency range, and the process that STA monitors the 1st channel can be the receiving course to the signal of this frequency range.
In actual applications, STA can, with reference to above-mentioned two kinds of modes, not repeat them here in the process of the enterprising line scanning of n channel yet.
In the present embodiment, steps A 50, described in obtain on-site national code information, specifically comprise:
Receive the second beacon frame that arbitrary AP sends, from described the second beacon frame, extract described national code information.
In beacon frame, can also carry national code information, STA can monitor on-site arbitrary AP, to obtain this national code information.
In actual applications, obtaining the mode of national code information can be for multiple.For example, when STA is mobile phone, can obtain this national code information by receiving the broadcast message that in Cellular Networks, base station sends.In STA, be provided with GPS(Global Positioning System, global positioning system) module, can obtain geographical location information by GPS module, then determine the country one belongs to according to this geographical location information, to obtain this national code information.User is the current positional information of input manually, so that STA obtains this national code information according to the positional information of this input.
In another Wireless Fidelity WiFi network that Fig. 3 provides for the embodiment of the present invention, scan the method flow diagram of access point.In conjunction with Fig. 3, the process of STA scanning target AP in WiFi network is described in detail.
First STA obtains on-site national code information, according to national information, determines i channel with the relevant preset rules of SSID to target AP, and i is from 1 to K, and K is the number of channel in WiFi network.STA scans on i channel, if scan target AP, connects with target AP, if scanning fall short AP adds 1 by the value of i, adds on the i channel after 1 and scans, until all scanned on K channel in the value of i.If scanned target AP that do not scan yet all on K channel, finishes this scanning process.
The method flow diagram of access point AP selective channel in a kind of Wireless Fidelity WiFi network that Fig. 4 provides for the embodiment of the present invention.As shown in Figure 4, the process of AP selective channel when the method for access point AP selective channel specifically can be applied to networking in the Wireless Fidelity WiFi network that the present embodiment provides, its specific implementation process, specifically can, with reference to the description of above-described embodiment, not repeat them here.In the Wireless Fidelity WiFi network that the present embodiment provides, the method for access point AP selective channel can be carried out by AP.
In the Wireless Fidelity WiFi network that the present embodiment provides, the method for access point AP selective channel specifically comprises:
Step B10, the basis preset rules relevant to the service set SSID of described AP are determined the 1st channel in described WiFi network;
Step B20, judge that whether described the 1st channel is available, if described the 1st channel can be used, use described the 1st channel, so that website when determining with described preset rules and scanning described the 1st channel, scans described AP.
The method of access point AP selective channel in the Wireless Fidelity WiFi network that the present embodiment provides, AP determines the 1st channel in WiFi network according to the preset rules relevant to the service set SSID of AP, judge that whether the 1st channel is available, if the 1st channel can be used, use the 1st channel.Because AP determines the 1st channel according to the preset rules relevant to the SSID of self when the selective channel, site STA is also determined the 1st channel according to the preset rules relevant to the SSID of AP, when target AP is used the 1st channel, STA can scan this target AP when scan channel for the first time, scanning process is pointed, has greatly improved scan efficiency.
The method flow diagram of access point AP selective channel in the another kind of Wireless Fidelity WiFi network that Fig. 5 provides for the embodiment of the present invention.As shown in Figure 5, in the present embodiment, described preset rules is for determining the 1st channel to the n channel;
Described method also comprises:
If step B30 n-1 channel is unavailable, described AP determines the n channel in described WiFi network according to described preset rules;
Step B40, judge that whether described n channel is available, if available, use n channel, so that described website when determining and scanning described n channel with described preset rules, scans described AP; Or
Described method also comprises:
If n-1 channel is unavailable, judge that whether the n channel of determining according to described preset rules is available, if available, use n channel, so that website when determining and scanning described n channel with described preset rules, scans described AP;
Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
Particularly, AP can judge that whether certain channel is available according to the situation that takies of this channel.For example on the 1st channel, listen to the signal of other AP or STA, thought that the 1st channel is occupied, started so to attempt the 2nd channel, by that analogy.Until find a unappropriated channel.If all channels are, take, use the lightest channel of occupied situation, or all channels are all occupied and to take situation all the same, use the 1st channel.Judge whether channel can it is also conceivable that the factors such as interference that are subject to other signals on this channel.The present invention is not specifically limited judging that whether channel is available, can judge according to prior art.
STA determines that the method for n channel can determine according to AP the method for n channel, makes STA pointed to the scanning process of AP, has further improved scan efficiency.
In the present embodiment, at step B10, the preset rules that described basis is relevant to the SSID of described AP can also comprise before determining the 1st channel in described WiFi network:
Step B50, obtain on-site national code information;
Correspondingly, step B10, the preset rules that described basis is relevant to described SSID is determined the 1st channel in described WiFi network, specifically can comprise:
According to described national code information and described preset rules, determine described the 1st channel.
Using the factor of national code information institute's reference in determining the 1st channel procedure, when AP selective channel, can avoid selecting the obsolete channel of this country, improved the definite accuracy of channel.
In the present embodiment, step B10, the preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Wherein, described priority list is corresponding with the SSID of described AP, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.
By the setting of priority list, can carry out easily determining of channel according to relative importance value.
In this city example, described preset rules is:
According to relative importance value order from high to low, determine successively the channel number of the 1st channel to the n channel;
Step B10, the preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is:
Channel corresponding to the channel designator that in priority list, relative importance value is the highest is defined as to described the 1st channel;
Step B30, described AP determines that according to described preset rules the n channel in described WiFi network is specially:
Described AP determines in described priority list, except sequence number corresponding to the 1st channel to the n-1 channel, and described n channel corresponding to channel designator that relative importance value is the highest;
Wherein, described priority list is corresponding with the SSID of described access point, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network.
In this city example, the relevant preset rules of SSID described and described AP is:
According to take function that SSID is independent variable, determine the channel designator of described the 1st channel;
Step B10, the preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of function, as the channel designator of described the 1st channel.
In the present embodiment, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1;
Wherein, S
1it is the channel designator of the 1st channel; K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, described preset rules is:
According to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel;
Step B10, the preset rules that described basis is relevant to the service set SSID of described AP determines that the 1st channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of the 1st function, as the channel designator of described the 1st channel;
Step B30, described AP determines that according to described preset rules the n channel in described WiFi network is specially:
Will, during SSID that the value of described independent variable is described target access described in the value of n function, as the channel designator of described n channel.
In the present embodiment, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1;
Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, at step B20, describedly judge that whether described the 1st channel is available, if described the 1st channel can be used, after using described the 1st channel, can also comprise:
The scan request frame of the SSID that carries target AP that step B60, receiving station STA send on described the 1st channel, judges that whether the SSID of described target AP and the SSID of described AP be identical, if identical, to described STA, sends scanning response frame.
After networking is good, AP has been used certain channel, for example, be the 1st channel.In the process of STA scanning target AP, STA initiatively sends scan request frame (probe request frame) on the 1st channel, carries the SSID of target AP in this scan request frame.When AP receives this scan request frame, judge that whether the SSID in this scan request frame is identical with the SSID of self, if identical, return to scanning response frame (probe response frame).When STA receives this scanning response frame, this AP is target AP, can connect with this target AP.If STA does not receive scanning response frame, illustrate that this AP is not target AP.
In an embodiment, at step B20, describedly judge that whether described the 1st channel is available, if described the 1st channel can be used, after using described the 1st channel, can also comprise:
Step B70, the beacon frame that carries the SSID of described AP is broadcasted on described the 1st channel, so that STA listens to described beacon frame.
After networking is good, AP has been used certain channel, for example, use the 1st channel.AP can broadcast the SSID beacon frame that carries self by the 1st channel.So that STA can monitor this beacon frame on the 1st channel, take and judge whether this AP is target AP.
It should be noted that step B60 and step B70 do not have inevitable sequential relationship.
The method flow diagram of access point AP selective channel in another Wireless Fidelity WiFi network that Fig. 6 provides for the embodiment of the present invention.In conjunction with Fig. 6, the process of AP selective channel in WiFi network is described in detail.
First AP obtains on-site national code information, according to national information, determines i channel with the relevant preset rules of SSID to self, and i is from 1 to K, and K is the number of channel in WiFi network.AP judges that whether i channel is available, if available, uses this channel, if unavailable, the value of i is added to 1, then judges that whether the i channel that the value of i adds after 1 is available, until all judged on K channel.If all unavailable on K channel, finish this channel and select flow process.Can be further according to the channel of the situation that the takies choice for use of K channel.
Fig. 7 for the embodiment of the present invention provide a kind of for scan the site structure schematic diagram of access point at Wireless Fidelity WiFi network.As shown in Figure 7, the site STA 81 that the present embodiment provides specifically can realize each step of the scanning access point method that any embodiment of the present invention provides, and its specific implementation process, does not repeat them here.The site STA 81 that the present embodiment provides specifically comprises the first determining unit 11 and the first scanning element 12.The first determining unit 11 is for determining the 1st channel of described WiFi network according to the preset rules relevant to the service set SSID of target access AP82.The first scanning element 12, in the enterprising line scanning of described the 1st channel, when determining with described preset rules and using described the 1st channel with the described target AP 82 of box lunch, scans described target AP 82.
Site STA 81, the first determining units 11 that the present embodiment provides are determined the 1st channel in WiFi network according to the preset rules relevant to the service set SSID of target access AP82.The first scanning element 12 is in the enterprising line scanning of the 1st channel, when the target AP 82 that has a SSID with box lunch is determined with preset rules and uses the 1st channel, scans target AP 82.Because STA81 determines the 1st channel according to the preset rules relevant to the SSID of target AP 82, this target AP 82 is also determined the 1st channel according to SSID by identical preset rules when selective channel, when target AP 82 is used the 1st channel, STA81 can scan this target AP 82 when scan channel for the first time, scanning process is pointed, has greatly improved scan efficiency.
The another kind that Fig. 8 provides for the embodiment of the present invention is for scanning the site structure schematic diagram of access point at Wireless Fidelity WiFi network.As shown in Figure 8, described preset rules is for determining the 1st channel to the n channel; Further, in the present embodiment, this site STA 81 can also comprise the second determining unit 13 and the second scanning element 14.If the second determining unit 13 less than described target AP 82, is determined the n channel in described WiFi network by described preset rules for scanning on n-1 channel.The second scanning element 14, in the enterprising line scanning of described n channel, when determining and using described n channel with described preset rules with the described target AP 82 of box lunch, scans described target AP 82.Or described site STA 81 also comprises the 3rd scanning element, if the 3rd scanning element for scanning less than described target AP 82 on n-1 channel, in the enterprising line scanning of n channel of determining according to described preset rules; When determining and using described n channel with described preset rules with the described target AP 82 of box lunch, scan described target AP 82, wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
STA81 determines that the method for n channel determines that with AP82 the method for n channel is identical, makes STA81 pointed to the scanning process of AP82, has further improved scan efficiency.
In the present embodiment, this site STA 81 can also comprise that the first acquiring unit 15, the first acquiring units 15 are for obtaining on-site national code information.Correspondingly, described the first determining unit 11 is specifically for determining described the 1st channel according to described national code information and described preset rules.Using the factor of national code information institute's reference in determining the 1st channel procedure, when scanning, STA81 selective channel can avoid selecting the obsolete channel of this country, improved the definite accuracy of channel, further improved scan efficiency.
In the present embodiment, this site STA 81 can also comprise memory cell 16, memory cell 16 is for the list of memory priority level, described priority list is corresponding with the SSID of described target AP 82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Described the first determining unit 11 specifically for determining the highest channel designator of relative importance value from described priority list, and channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In the present embodiment, this site STA 81 can also comprise memory cell 16, memory cell 16 is for the list of memory priority level, described priority list is corresponding with the SSID of described target AP 82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Described the first determining unit 11 specifically for determining the highest described the 1st channel corresponding to channel designator of relative importance value from described priority list.Described the second determining unit 13 is specifically for scanning on n-1 channel less than described target AP 82 in the situation that, according to described priority list, from the channel designator except channel designator corresponding to the 1st channel to the n-1 channel, determine n channel corresponding to channel designator that relative importance value is the highest.Wherein, described n, for being greater than 1, is less than or equal to the integer of K.
In the present embodiment, the relevant preset rules of SSID described and described target access AP82 is: according to take function that SSID is independent variable, determine the channel designator of described the 1st channel.Described the first determining unit 11 specifically for: will, during SSID that the value of described independent variable is described target access AP82 described in the value of function, as the channel designator of described the 1st channel.
In the present embodiment, describedly take function that SSID is independent variable as S
1=(hash (SSID) mod K)+1; Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to the described SSID of described target AP 82 is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, described preset rules is: according to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel.Described the first determining unit 11 specifically for: will, during SSID that the value of described independent variable is described target access AP82 described in the value of the 1st function, as the channel designator of described the 1st channel.Described the second determining unit 13 is specifically for scanning on n-1 channel less than described target AP 82 in the situation that, will, during SSID that the value of described independent variable is described target access AP82 described in the value of n function, as the channel designator of described n channel.
In the present embodiment, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1; Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, described the first scanning element 12 can comprise transmission subelement 121 and receive subelement 122.Send subelement 121 for send the scan request frame of the SSID that carries described target AP 82 on described the 1st channel.Receive subelement 122 for when receiving scanning response frame, scan described target AP 82.
In the present embodiment, described the first scanning element 12 can also, for described the 1st channel is monitored, when listening to the first beacon frame, judge that whether the SSID carrying in described the first beacon frame is identical with the SSID of described target AP 82, if identical, scan described target AP 82.
In the present embodiment, the second beacon frame that described the first acquiring unit 15 can also send for receiving arbitrary AP82 extracts described national code information from described the second beacon frame.
Fig. 9 provide for the embodiment of the present invention another for scan the site structure schematic diagram of access point at Wireless Fidelity WiFi network.As shown in Figure 9, this site STA 81 comprises: memory 32, for storing the preset rules relevant to the service set SSID of target access AP82;
Processor 31, for determining the 1st channel of WiFi network according to the preset rules of described memory stores;
Receiver 33, for passing through antenna 35 in the enterprising line scanning of described the 1st channel, when determining with described preset rules and using described the 1st channel with the described target AP 82 of box lunch, scans described target AP 82.
In one embodiment of the invention, also can be by transmitter 34 in the work of the enterprising line scanning of described the 1st channel, receiver 33 and antenna 35 complete.Also by transmitter 33, by antenna, sent the detecting information of the SSID that carries target AP 82, when receiver 33 receives the response of target AP 82 by antenna 35, show to scan described target AP 82.
In one embodiment of the invention, described preset rules is for determining the 1st channel to the n channel.If processor 31 less than described target AP 82, is determined the n channel in described WiFi network by described preset rules for scanning on n-1 channel.Receiver 33, for passing through antenna 35 in the enterprising line scanning of described n channel, when determining and using described n channel with described preset rules with the described target AP 82 of box lunch, scans described target AP 82.Or, if processor 31 for scanning less than described target AP 82 on n-1 channel, in the enterprising line scanning of n channel of determining according to described preset rules; When determining and using described n channel with described preset rules with the described target AP 82 of box lunch, scan described target AP 82; Wherein, described n, for being greater than 1, is less than or equal to the integer of K; Described K is the number of channel in described WiFi network.
In one embodiment of the invention, also can be by transmitter 34 in the work of the enterprising line scanning of described n channel, receiver 33 and antenna 35 complete.Also by transmitter 33, by antenna, sent the detecting information of the SSID that carries target AP 82, when receiver 33 receives the response of target AP 82 by antenna 35, show to scan described target AP 82.
In one embodiment of the invention, receiver 33 receives by antenna 35 the second beacon frame that arbitrary AP sends, processor 31 is for extracting national code information from described the second beacon frame, and determines described the 1st channel according to described national code information and described preset rules.
In one embodiment of the invention, also store priority list in memory 32, described priority list is corresponding with the SSID of described target AP 82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Processor 31 is for determining the highest channel designator of relative importance value from priority list, and channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In one embodiment of the invention, also store priority list in memory 32, described priority list is corresponding with the SSID of described target AP 82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Processor 31 is for determining the highest described the 1st channel corresponding to channel designator of relative importance value from described priority list, the in the situation that on n-1 channel, scanning being less than described target AP 82, according to described priority list, from the channel designator except channel designator corresponding to the 1st channel to the n-1 channel, determine n channel corresponding to channel designator that relative importance value is the highest; Wherein, described n, for being greater than 1, is less than or equal to the integer of the number of channel in described WiFi network.
In one embodiment of the invention, the relevant preset rules of SSID described and described target access AP82 is: according to take function that SSID is independent variable, determine the channel designator of described the 1st channel; Processor 31 specifically for will, during SSID that the value of described independent variable is described target access AP82 described in the value of function, as the channel designator of described the 1st channel.
In one embodiment of the invention, according to take the 1st function to the n function that SSID is independent variable, determine respectively the channel designator of the 1st channel to the n channel; Processor 31 specifically for: will, the value of the 1st function described in when the value of described independent variable is the SSID of described target access AP82, channel designator as described the 1st channel, the in the situation that on n-1 channel, scanning being less than described target AP 82, will, the value of n function described in when the value of described independent variable is the SSID of described target access AP82, as the channel designator of described n channel.
In one embodiment of the invention, processor 31 is specifically for according to formula S
1the channel designator of described the 1st channel is determined in=(hash (SSID) mod K)+1, the in the situation that on n-1 channel, scanning being less than described target AP 82, according to formula S
n=(S
n-1+ a) mod K+1 determines the channel designator of n channel.Wherein, S
1be the channel designator of the 1st channel, S
nbe the channel designator of n channel, S
n-1be the channel designator of n-1 channel, a is default constant; K is the channel number in described WiFi network; Described hash (SSID) refers to the described SSID of described target AP 82 is carried out to Hash operation; Mod is modulo operator.
Access point structures schematic diagram in a kind of Wireless Fidelity WiFi network that Figure 10 provides for the embodiment of the present invention.As shown in figure 10, the access point AP82 that the present embodiment provides specifically can realize each step of the channel selecting method of the access point that any embodiment of the present invention provides, does not repeat them here.The access point AP82 that the present embodiment provides specifically comprises the 3rd determining unit 21 and the first judging unit 22.The 3rd determining unit 21 is for determining the 1st channel of described WiFi network according to the preset rules relevant to the service set SSID of described AP82.Whether the first judging unit 22 is available for judging described the 1st channel, if described the 1st channel can be used, uses described the 1st channel, so that site STA 81 when determining with described preset rules and scanning described the 1st channel, scans described access point AP82.
The access point AP82 that the present embodiment provides, the 3rd determining unit 21 is determined the 1st channel in WiFi network according to the preset rules relevant to the service set SSID of AP82.The first judging unit 22 judges that whether the 1st channel is available, if the 1st channel can be used, uses the 1st channel.Because AP82 determines the 1st channel according to the preset rules relevant to the SSID of self when the selective channel, STA81 also determines the 1st channel according to the preset rules relevant to the SSID of AP82, when target AP 82 is used the 1st channel, STA81 can scan this target AP 82 when scan channel for the first time, scanning process is pointed, has greatly improved scan efficiency.
Access point structures schematic diagram in the another kind of Wireless Fidelity WiFi network that Figure 11 provides for the embodiment of the present invention.As shown in figure 11, in the present embodiment, in the present embodiment, described preset rules is for determining the 1st channel to the n channel; Described access point AP82 can also comprise the 4th determining unit 23 and the second judging unit 24.If the 4th determining unit 23 is unavailable for n-1 channel, according to described preset rules, determine the n channel in described WiFi network.Whether the second judging unit 24 is available for judging described n channel, if available, uses n channel, so that described site STA 81 when determining and scanning described n channel with described preset rules, scans described access point AP82.Or described access point AP82 also comprises the 3rd judging unit, whether the 3rd judging unit is available for judging the n channel of determining according to described preset rules, if available, use n channel, to when site STA 81 is determined and scans described n channel with described preset rules, scan described AP82.Wherein, described n, for being greater than 1, is less than or equal to the integer of the number of channel in described WiFi network.STA81 determines that the method for n channel can determine according to AP82 the method for n channel, makes STA81 pointed to the scanning process of AP82, has further improved scan efficiency.
In the present embodiment, this access point AP82 can also comprise second acquisition unit 25, and second acquisition unit 25 is for obtaining on-site national code information.Correspondingly, described the 3rd determining unit 21 is specifically for determining described the 1st channel according to described national code information and described preset rules.Using the factor of national code information institute's reference in determining the 1st channel procedure, when AP82 selective channel, can avoid selecting the obsolete channel of this country, improved the definite accuracy of channel.
In the present embodiment, this access point AP82 can also comprise memory cell 26.Described memory cell 26 is for the list of memory priority level, and described priority list is corresponding with the SSID of described access point AP82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Described the 3rd determining unit 21 specifically for determining the highest channel designator of relative importance value from described priority list; Channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In the present embodiment, this access point AP82 can also comprise memory cell 26.Described memory cell 26 is for the list of memory priority level, and described priority list is corresponding with the SSID of described access point AP82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Described the 3rd determining unit 21 is specifically for determining the highest described the 1st channel corresponding to channel designator of relative importance value in described priority list.Described the 4th determining unit, specifically in the disabled situation of n-1 channel, determines in described priority list, except channel designator corresponding to the 1st channel to the n-1 channel, and n channel corresponding to channel designator that relative importance value is the highest.Wherein, described n, for being greater than 1, is less than or equal to the integer of K.
In the present embodiment, described the 3rd determining unit 21 specifically for: will, the value of function during SSID that the value of independent variable is described target access AP82, as the channel designator of described the 1st channel; Described function be take SSID as independent variable.
In the present embodiment, described function is: S
1=(hash (SSID) mod K)+1; Wherein, K is the channel number in described WiFi network; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, described the 3rd determining unit 21 specifically for: will, the value of the 1st function during SSID that the value of independent variable is described target access AP82, as the channel designator of described the 1st channel; Described the 1st function be take SSID as independent variable.Described the 4th determining unit 23 specifically for: in the disabled situation of n-1 channel, will, the value of n function during SSID that the value of independent variable is described target access AP82, as the channel designator of described n channel; Described n function be take SSID as independent variable.Described pre-defined rule is specially: according to the 1st function to the n function, determine respectively the channel number of the 1st channel to the n channel.
In the present embodiment, described the 1st function is S
1=(hash (SSID) mod K)+1; Described n function is S
n=(S
n-1+ a) mod K+1; Wherein, S
n-1be n-1 function, a is default constant; Described hash (SSID) refers to SSID is carried out to Hash operation; Mod is modulo operator.
In the present embodiment, this access point AP82 can also comprise scan process unit 27, the scan request frame of the SSID that carries target AP 82 that scan process unit 27 sends on described the 1st channel for receiving station STA81, whether the SSID that judges described target AP 82 is identical with described self SSID, if identical, to described STA81, send scanning response frame.
In the present embodiment, access point AP82 can also comprise radio unit 28, and radio unit 28 is for broadcasting on described the 1st channel carrying described self the beacon frame of SSID, so that STA81 listens to described beacon frame.
Access point structures schematic diagram in another Wireless Fidelity WiFi network that Figure 12 provides for the embodiment of the present invention.As shown in figure 12, this access point AP82 comprises memory 52, for storing the preset rules relevant to the service set SSID of described access point AP82;
Processor 51, for determine the 1st channel of WiFi network according to the preset rules of described memory stores, judge that whether described the 1st channel is available, if described the 1st channel can be used, use described the 1st channel, to when site STA 81 is determined with described preset rules and scans described the 1st channel, scan described access point AP82.
In one embodiment of the invention, describedly judge that the whether available work of the 1st channel can be completed by processor 51, receiver 53 and antenna 55.Receiver 53 is monitored on described the 1st channel by antenna 55, and processor 51 judges that according to the signal listening to whether described the 1st channel is available.
In one embodiment of the invention, using the described AP82 of the 1st channel to be scanned process by STA81 can also be by transmitter 54, and receiver 53 and antenna 55 complete.Receiver 53 receives the detecting information of the SSID that carries target AP 82 of STA81 transmission by antenna 55, judge that whether this SSID is identical with the SSID of self, if identical, transmitter 54 sends response by antenna 55, shows that described AP82 is described target AP 82.
In one embodiment of the invention, described preset rules is for determining the 1st channel to the n channel, if processor 51 is unavailable for judging n-1 channel, according to described preset rules, determine the n channel in described WiFi network, judge that whether described n channel is available, if available, use n channel, so that when described site STA 81 is determined and scans described n channel with described preset rules, scan described access point AP82, or, whether processor 51 is available for judging the n channel of determining according to described preset rules, if available, use n channel, so that when site STA 81 is determined and scans described n channel with described preset rules, scan described AP82, wherein, described n, for being greater than 1, is less than or equal to the integer of K, described K is the number of channel in described WiFi network.
In one embodiment of the invention, receiver 53 receives by antenna 55 the second beacon frame that arbitrary AP sends, processor 51 is for extracting national code information from described the second beacon frame, and determines described the 1st channel according to described national code information and described preset rules.
In one embodiment of the invention, memory 52 is for the list of memory priority level, and described priority list is corresponding with the SSID of described access point AP82, preserves channel designator and the relative importance value corresponding to each channel designator of K channel in described WiFi network; Described K is the number of channel in described WiFi network.Processor 51 specifically for determining the highest channel designator of relative importance value from described priority list, and channel corresponding to channel designator that this relative importance value is the highest is described the 1st channel.
In one embodiment of the invention, memory 52 is for the list of memory priority level, described priority list is corresponding with the SSID of described access point AP82, channel designator and relative importance value corresponding to each channel designator of preserving K channel in described WiFi network, described K is the number of channel in described WiFi network.Processor 51 specifically for determining the highest described the 1st channel corresponding to channel designator of relative importance value from described priority list, and in the disabled situation of n-1 channel, according to described priority list, from the channel designator except channel designator corresponding to the 1st channel to the n-1 channel, determine n channel corresponding to channel designator that relative importance value is the highest, wherein, described n, for being greater than 1, is less than or equal to the integer of the number of channel in described WiFi network.
In one embodiment of the invention, processor 51 specifically for will, the value of function during SSID that the value of independent variable is described target access AP82, as the channel designator of described the 1st channel; Described function be take SSID as independent variable.
In one embodiment of the invention, processor 51 specifically for will, the value of the 1st function during SSID that the value of independent variable is described target access AP82, as the channel designator of described the 1st channel; Described the 1st function be take SSID as independent variable, in the disabled situation of n-1 channel, will, the value of n function during SSID that the value of independent variable is described target access AP82, as the channel designator of described n channel; Described n function be take SSID as independent variable; Described pre-defined rule is specially: according to the 1st function to the n function, determine respectively the channel number of the 1st channel to the n channel.
The Wireless Fidelity WiFi network access system structural representation that Figure 13 provides for the embodiment of the present invention.As shown in figure 13, the Wireless Fidelity WiFi network access system that the present embodiment provides specifically comprises the site STA 81 that any embodiment of the present invention provides, and the access point AP82 that provides of any embodiment of the present invention.
One of ordinary skill in the art will appreciate that: all or part of step that realizes said method embodiment can complete by the relevant hardware of program command, aforesaid program can be stored in a computer read/write memory medium, this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: various media that can be program code stored such as ROM, RAM, magnetic disc or CDs.
Finally it should be noted that: above embodiment only, in order to technical scheme of the present invention to be described, is not intended to limit; Although the present invention is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: its technical scheme that still can record aforementioned each embodiment is modified, or part technical characterictic is wherein equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.