Abstract:
A method for selecting one channel from a plurality of channels in a wireless network system is disclosed. The channels include at least one in-use channel, a first idle channel, and a second idle channel. The method includes comparing the frequency band of the in-use channel with the frequency band of the first idle channel and the second idle channel to determine a first reference value for the first idle channel and a second reference value for the second idle channel, and comparing the first reference value with the second reference value to select one from the first idle channel and the second idle channel.

Description:
BACKGROUND OF INVENTION 
   1. Field of the Invention 
   The present invention relates to wireless networks, and more specifically, to a method for selecting a channel in a wireless network. 
   2. Description of the Prior Art 
   Wireless networks are a popular field under development in modern technology. In a wireless network, a frequency band for receiving and transmitting signals can be divided into channels. For instance, a communication frequency band is divided into 12 channels according to the IEEE 802.11a standard, or into 14 channels according to the IEEE 802.11b standard. 
   A wireless network system generally includes more than one access point (AP), and each AP uses at least one channel. When an AP is turned on, it is required to search for at least one idle channel (i.e. a channel not being used by other APs) in the wireless network system in which it is located. 
   However in a wireless network system, channels generally overlap each other, so that a channel being used may interfere with neighboring idle channels. If the wireless network system has a plurality of idle channels, different channels may suffer from interferences of different degrees causing different APs to have different communication quality. Therefore, it is desirable to select an idle channel providing better communication quality among a plurality of idle channels. 
   Conventionally a method to select an idle channel involving detecting the interference on the idle channel is provided, in order to determine a communication quality value for the selected idle channel. If the quality value exceeds a predetermined threshold, the AP uses the corresponding idle channel to transmit signals, and if the quality value does not exceed the predetermined threshold, the AP continues detecting other idle channels until an idle channel having a communication quality value exceeding the threshold is found. 
   However, the aforementioned operation requires time for searching. In other words, the idle channel to be used cannot be determined immediately. 
   SUMMARY OF INVENTION 
   It is therefore one of the many objectives of the present invention to provide a method for selecting a channel in a wireless network system. 
   According to embodiments of the present invention, a method for selecting one channel from a plurality of channels in a wireless network system is disclosed. The channels include at least one in-use channel, a first idle channel, and a second idle channel. The method includes comparing the frequency band of the in-use channel with the frequency band of the first idle channel and the second idle channel to determine a first reference value for the first idle channel and a second reference value for the second idle channel, and comparing the first reference value with the second reference value to select one from the first idle channel and the second idle channel. 
   According to embodiments of the present invention, a method used in a wireless network system is disclosed, which includes detecting the status of a plurality of channels in the wireless network system to divide the channels into at least one in-use channel, a first idle channel, and a second idle channel, and comparing the frequency band of the in-use channel with the frequency band of the first idle channel and the second idle channel to determine a first reference value for the first idle channel and a second reference value for the second idle channel. 
   According to embodiments of the present invention, A method for selecting a channel from a plurality of channels in a wireless network system is disclosed. The channels comprise at least one in-use channel and at least one idle channel. The method comprises determining a reference value for each idle channel according to the distribution of the at least one in-use channel among the channels; and selecting a channel from the at least one idle channel according to the at least one reference value. 
   These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the embodiments that is illustrated in the various figures and drawings. 

   
     BRIEF DESCRIPTION OF DRAWINGS 
       FIG. 1  is a flowchart of the method according to an embodiment of the present invention. 
   

   DETAILED DESCRIPTION 
   As described above, in a wireless network system, channels often overlap with other channels. That is, a channel being used interferes with neighboring idle channels. Additionally, the closer a channel being used is to an idle channel (i.e. the smaller the frequency difference between the two channels), the more serious the interference on the idle channel. 
   According to the IEEE 802.11b standard in which 14 channels are provided, assuming that the 14 channels are C 1 , C 2 , C 3 , . . . C 12 , C 13 , C 14  (where frequency increases in sequence with the channel subscript number), if channel C 5  is being used, the interference on channel C 4  is more serious than the interference on channel C 3 . Similarly, the interference on channel C 6  is more serious than the interference on channel C 7 . Accordingly, an embodiment of the present invention provides a mathematical algorithm to determine a reference value representing communication quality for each channel allowing one from a plurality of idle channels to be selected. 
   Please refer to  FIG. 1  showing a flowchart of the method according to an embodiment of the present invention as follows: 
   Step  110 : Detect the status of channels in a wireless network system using an AP to divide the channels into “in-use channels” and “idle channels”. 
   Step  120 : Determine a reference value for each idle channel according to the distribution of the in-use channels using mathematical calculation. 
   Step  130 : Compare the reference values of the idle channels to select one channel for the AP to use. 
   Using the IEEE 802.11b standard as an example, assume that channel C 2  and channel C 10  are channels being used by other APs. In Step  110 , channels C 2  and C 10  are classified as “in-use channels”, and the remaining channels C 1 , C 3 , C 4 , C 5 , C 6 , C 7 , C 8 , C 9 , C 11 , C 12 , C 13 , C 14  are classified as “idle channels.” In Step  120 , the reference value (R n ) is determined for each idle channel (C n ). Weighted calculation is hereby taken as an example, without limitation, as follows: 
                     R   1     =       4   ⁢   x   ⁢           ⁢     c   2       +     3   ⁢           ⁢   x   ⁢           ⁢     c   3       +     2   ⁢   x   ⁢           ⁢     c   4       +     1   ⁢   x   ⁢           ⁢     c   5       +     0   ⁢   x   ⁢           ⁢     c   6       +     0   ⁢   x   ⁢           ⁢     c   7       +     0   ⁢   x   ⁢           ⁢     c   8       +     0   ⁢   x   ⁢           ⁢     c   9       +     0   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       0   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   3     =       3   ⁢   x   ⁢           ⁢     c   1       +     4   ⁢           ⁢   x   ⁢           ⁢     c   2       +     4   ⁢   x   ⁢           ⁢     c   4       +     3   ⁢   x   ⁢           ⁢     c   5       +     2   ⁢   x   ⁢           ⁢     c   6       +     1   ⁢   x   ⁢           ⁢     c   7       +     0   ⁢   x   ⁢           ⁢     c   8       +     0   ⁢   x   ⁢           ⁢     c   9       +     0   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       0   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   4     =       2   ⁢   x   ⁢           ⁢     c   1       +     3   ⁢           ⁢   x   ⁢           ⁢     c   2       +     4   ⁢   x   ⁢           ⁢     c   3       +     4   ⁢   x   ⁢           ⁢     c   5       +     3   ⁢   x   ⁢           ⁢     c   6       +     2   ⁢   x   ⁢           ⁢     c   7       +     1   ⁢   x   ⁢           ⁢     c   8       +     0   ⁢   x   ⁢           ⁢     c   9       +     0   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       0   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   5     =       1   ⁢   x   ⁢           ⁢     c   1       +     2   ⁢           ⁢   x   ⁢           ⁢     c   2       +     3   ⁢   x   ⁢           ⁢     c   3       +     4   ⁢   x   ⁢           ⁢     c   4       +     4   ⁢   x   ⁢           ⁢     c   6       +     3   ⁢   x   ⁢           ⁢     c   7       +     2   ⁢   x   ⁢           ⁢     c   8       +     1   ⁢   x   ⁢           ⁢     c   9       +     0   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       0   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   6     =       0   ⁢   x   ⁢           ⁢     c   1       +     1   ⁢           ⁢   x   ⁢           ⁢     c   2       +     2   ⁢   x   ⁢           ⁢     c   3       +     3   ⁢   x   ⁢           ⁢     c   4       +     4   ⁢   x   ⁢           ⁢     c   5       +     4   ⁢   x   ⁢           ⁢     c   7       +     3   ⁢   x   ⁢           ⁢     c   8       +     2   ⁢   x   ⁢           ⁢     c   9       +     1   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       0   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   7     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     1   ⁢   x   ⁢           ⁢     c   3       +     2   ⁢   x   ⁢           ⁢     c   4       +     3   ⁢   x   ⁢           ⁢     c   5       +     4   ⁢   x   ⁢           ⁢     c   6       +     4   ⁢   x   ⁢           ⁢     c   8       +     3   ⁢   x   ⁢           ⁢     c   9       +     2   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       1   ⁢   x   ⁢           ⁢     c   11       +     0   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   8     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     1   ⁢   x   ⁢           ⁢     c   4       +     2   ⁢   x   ⁢           ⁢     c   5       +     3   ⁢   x   ⁢           ⁢     c   6       +     4   ⁢   x   ⁢           ⁢     c   7       +     4   ⁢   x   ⁢           ⁢     c   9       +     3   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       2   ⁢   x   ⁢           ⁢     c   11       +     1   ⁢   x   ⁢           ⁢     c   12       +     0   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   9     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     0   ⁢   x   ⁢           ⁢     c   4       +     1   ⁢   x   ⁢           ⁢     c   5       +     2   ⁢   x   ⁢           ⁢     c   6       +     3   ⁢   x   ⁢           ⁢     c   7       +     4   ⁢   x   ⁢           ⁢     c   8       +     4   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       3   ⁢   x   ⁢           ⁢     c   11       +     2   ⁢   x   ⁢           ⁢     c   12       +     1   ⁢   x   ⁢           ⁢     c   13       +     0   ⁢   x   ⁢           ⁢     c   14                         R   11     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     0   ⁢   x   ⁢           ⁢     c   4       +     0   ⁢   x   ⁢           ⁢     c   5       +     0   ⁢   x   ⁢           ⁢     c   6       +     1   ⁢   x   ⁢           ⁢     c   7       +     2   ⁢   x   ⁢           ⁢     c   8       +     3   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       4   ⁢   x   ⁢           ⁢     c   10       +     4   ⁢   x   ⁢           ⁢     c   12       +     3   ⁢   x   ⁢           ⁢     c   13       +     2   ⁢   x   ⁢           ⁢     c   14                         R   12     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     0   ⁢   x   ⁢           ⁢     c   4       +     0   ⁢   x   ⁢           ⁢     c   5       +     0   ⁢   x   ⁢           ⁢     c   6       +     0   ⁢   x   ⁢           ⁢     c   7       +     1   ⁢   x   ⁢           ⁢     c   8       +     2   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       3   ⁢   x   ⁢           ⁢     c   10       +     4   ⁢   x   ⁢           ⁢     c   11       +     4   ⁢   x   ⁢           ⁢     c   13       +     3   ⁢   x   ⁢           ⁢     c   14                         R   13     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     0   ⁢   x   ⁢           ⁢     c   4       +     0   ⁢   x   ⁢           ⁢     c   5       +     0   ⁢   x   ⁢           ⁢     c   6       +     0   ⁢   x   ⁢           ⁢     c   7       +     0   ⁢   x   ⁢           ⁢     c   8       +     1   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       2   ⁢   x   ⁢           ⁢     c   10       +     3   ⁢   x   ⁢           ⁢     c   11       +     4   ⁢   x   ⁢           ⁢     c   12       +     4   ⁢   x   ⁢           ⁢     c   14                         R   14     =       0   ⁢   x   ⁢           ⁢     c   1       +     0   ⁢           ⁢   x   ⁢           ⁢     c   2       +     0   ⁢   x   ⁢           ⁢     c   3       +     0   ⁢   x   ⁢           ⁢     c   4       +     0   ⁢   x   ⁢           ⁢     c   5       +     0   ⁢   x   ⁢           ⁢     c   6       +     0   ⁢   x   ⁢           ⁢     c   7       +     0   ⁢   x   ⁢           ⁢     c   8       +     0   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       1   ⁢   x   ⁢           ⁢     c   10       +     2   ⁢   x   ⁢           ⁢     c   11       +     3   ⁢   x   ⁢           ⁢     c   12       +     4   ⁢   x   ⁢           ⁢     c   13                     
wherein the parameters c 1  through c 14  correspond to channel C 1  through C 14 , respectively. In this embodiment, the parameters indicate the status of their corresponding channels, respectively.
 
   Since channel C 2  and channel C 10  are in-use channels and channels C 1 , C 3 , C 4 , C 5 , C 6 , C 7 , C 8 , C 9 , C 11 , C 12 , C 13 , C 14  are idle channels, parameters c 2  and c 10  can be determined as 1, and parameters c 1 , c 3 , c 4 , c 5 , c 6 , c 7 , c 8 , c 9 , c 11 , c 12 , c 13 , c 14  can be determined as 0. After calculation, the reference values are as follows: R 1 =4, R 3 =4, R 4 =3, R 5 =5, R 6 =2, R 7 =2, R 8 =3, R 9 =4, R 11 =4, R 12  =3, R 13  =2, R 14 =1. Therefore, channel C 14  is the one least interfered with by the in-use channels because it has the smallest reference value. In this way, in Step  130 , channel C 14  is selected. 
   Please note that when calculating the reference values, formulae, parameters, and coefficients can be properly designed by system designers. For instance, the farther an idle channel is from an in-use channel, the smaller the interference on the idle channel by the in-use channel. Therefore, accumulating the intervals between an idle channel and all the in-use channels may also be used to determine the reference value of the idle channel. In the following embodiment, if the interval is longer than a certain level, the interval between the idle channel and the in-use channel is then set to be a fixed value. For instance, the interval over 4 is set to be 5 in the following description. By doing so, the degree of interference in the idle channel can also be determined, wherein the larger the reference value is, the better the communication quality the idle channel provides. Here is an example of such calculation: 
                     R   1     =       1   ⁢   x   ⁢           ⁢     c   2       +     2   ⁢   x   ⁢           ⁢     c   3       +     3   ⁢   x   ⁢           ⁢     c   4       +     4   ⁢   x   ⁢           ⁢     c   5       +     5   ⁢   x   ⁢           ⁢     c   6       +     5   ⁢   x   ⁢           ⁢     c   7       +     5   ⁢   x   ⁢           ⁢     c   8       +     5   ⁢   x   ⁢           ⁢     c   9       +     5   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       5   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   3     =       2   ⁢   x   ⁢           ⁢     c   1       +     1   ⁢           ⁢   x   ⁢           ⁢     c   2       +     1   ⁢   x   ⁢           ⁢     c   4       +     2   ⁢   x   ⁢           ⁢     c   5       +     3   ⁢   x   ⁢           ⁢     c   6       +     4   ⁢   x   ⁢           ⁢     c   7       +     5   ⁢   x   ⁢           ⁢     c   8       +     5   ⁢   x   ⁢           ⁢     c   9       +     5   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       5   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   4     =       3   ⁢   x   ⁢           ⁢     c   1       +     2   ⁢           ⁢   x   ⁢           ⁢     c   2       +     1   ⁢   x   ⁢           ⁢     c   3       +     1   ⁢   x   ⁢           ⁢     c   5       +     2   ⁢   x   ⁢           ⁢     c   6       +     3   ⁢   x   ⁢           ⁢     c   7       +     4   ⁢   x   ⁢           ⁢     c   8       +     5   ⁢   x   ⁢           ⁢     c   9       +     5   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       5   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   5     =       4   ⁢   x   ⁢           ⁢     c   1       +     3   ⁢           ⁢   x   ⁢           ⁢     c   2       +     2   ⁢   x   ⁢           ⁢     c   3       +     1   ⁢   x   ⁢           ⁢     c   4       +     1   ⁢   x   ⁢           ⁢     c   6       +     2   ⁢   x   ⁢           ⁢     c   7       +     3   ⁢   x   ⁢           ⁢     c   8       +     4   ⁢   x   ⁢           ⁢     c   9       +     5   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       5   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   6     =       5   ⁢   x   ⁢           ⁢     c   1       +     4   ⁢           ⁢   x   ⁢           ⁢     c   2       +     3   ⁢   x   ⁢           ⁢     c   3       +     2   ⁢   x   ⁢           ⁢     c   4       +     1   ⁢   x   ⁢           ⁢     c   5       +     1   ⁢   x   ⁢           ⁢     c   7       +     2   ⁢   x   ⁢           ⁢     c   8       +     3   ⁢   x   ⁢           ⁢     c   9       +     4   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       5   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   7     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     4   ⁢   x   ⁢           ⁢     c   3       +     3   ⁢   x   ⁢           ⁢     c   4       +     2   ⁢   x   ⁢           ⁢     c   5       +     1   ⁢   x   ⁢           ⁢     c   6       +     1   ⁢   x   ⁢           ⁢     c   8       +     2   ⁢   x   ⁢           ⁢     c   9       +     3   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       4   ⁢   x   ⁢           ⁢     c   11       +     5   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   8     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     4   ⁢   x   ⁢           ⁢     c   4       +     3   ⁢   x   ⁢           ⁢     c   5       +     2   ⁢   x   ⁢           ⁢     c   6       +     1   ⁢   x   ⁢           ⁢     c   7       +     1   ⁢   x   ⁢           ⁢     c   9       +     2   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       3   ⁢   x   ⁢           ⁢     c   11       +     4   ⁢   x   ⁢           ⁢     c   12       +     5   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   9     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     5   ⁢   x   ⁢           ⁢     c   4       +     4   ⁢   x   ⁢           ⁢     c   5       +     3   ⁢   x   ⁢           ⁢     c   6       +     2   ⁢   x   ⁢           ⁢     c   7       +     1   ⁢   x   ⁢           ⁢     c   8       +     1   ⁢   x   ⁢           ⁢     c   10       +       ⁢                               ⁢       2   ⁢   x   ⁢           ⁢     c   11       +     3   ⁢   x   ⁢           ⁢     c   12       +     4   ⁢   x   ⁢           ⁢     c   13       +     5   ⁢   x   ⁢           ⁢     c   14                         R   11     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     5   ⁢   x   ⁢           ⁢     c   4       +     5   ⁢   x   ⁢           ⁢     c   5       +     5   ⁢   x   ⁢           ⁢     c   6       +     4   ⁢   x   ⁢           ⁢     c   7       +     3   ⁢   x   ⁢           ⁢     c   8       +     2   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       1   ⁢   x   ⁢           ⁢     c   10       +     1   ⁢   x   ⁢           ⁢     c   12       +     2   ⁢   x   ⁢           ⁢     c   13       +     3   ⁢   x   ⁢           ⁢     c   14                         R   12     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     5   ⁢   x   ⁢           ⁢     c   4       +     5   ⁢   x   ⁢           ⁢     c   5       +     5   ⁢   x   ⁢           ⁢     c   6       +     5   ⁢   x   ⁢           ⁢     c   7       +     4   ⁢   x   ⁢           ⁢     c   8       +     3   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       2   ⁢   x   ⁢           ⁢     c   10       +     1   ⁢   x   ⁢           ⁢     c   11       +     1   ⁢   x   ⁢           ⁢     c   13       +     2   ⁢   x   ⁢           ⁢     c   14                         R   13     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     5   ⁢   x   ⁢           ⁢     c   4       +     5   ⁢   x   ⁢           ⁢     c   5       +     5   ⁢   x   ⁢           ⁢     c   6       +     5   ⁢   x   ⁢           ⁢     c   7       +     5   ⁢   x   ⁢           ⁢     c   8       +     4   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       3   ⁢   x   ⁢           ⁢     c   10       +     2   ⁢   x   ⁢           ⁢     c   11       +     1   ⁢   x   ⁢           ⁢     c   12       +     1   ⁢   x   ⁢           ⁢     c   14                         R   14     =       5   ⁢   x   ⁢           ⁢     c   1       +     5   ⁢           ⁢   x   ⁢           ⁢     c   2       +     5   ⁢   x   ⁢           ⁢     c   3       +     5   ⁢   x   ⁢           ⁢     c   4       +     5   ⁢   x   ⁢           ⁢     c   5       +     5   ⁢   x   ⁢           ⁢     c   6       +     5   ⁢   x   ⁢           ⁢     c   7       +     5   ⁢   x   ⁢           ⁢     c   8       +     5   ⁢   x   ⁢           ⁢     c   9       +       ⁢                               ⁢       4   ⁢   x   ⁢           ⁢     c   10       +     3   ⁢   x   ⁢           ⁢     c   11       +     2   ⁢   x   ⁢           ⁢     c   12       +     1   ⁢   x   ⁢           ⁢     c   13                     
wherein the parameters c 1  through c 14  correspond to channel C 1  through C 14 , respectively. Similar to the previous embodiment, the parameters herein indicate the status of their corresponding channels, respectively.
 
   Similarly, since channel C 2  and channel C 10  are in-use channels and channels C 1 , C 3 , C 4 , C 5 , C 6 , C 7 , C 8 , C 9 , C 11 , C 12 , C 13 , C 14  are idle channels, parameters c 2  and c 10  can be determined as 1, and parameters c 1 , c 3 , c 4 , c 5 , c 6 , c 7 , c 8 , c 9 , c 11 , c 12 , c 13 , c 14  can be determined as 0. After calculation, the reference values are as follows: R 1 =6, R 3 =6, R 4 =7, R 5 =8, R 6 =8, R 7 =8, R 8 =7, R 9 =6, R 11 =6, R 12 =7, R 13 =8, R 14 =9. Therefore, channel C 14  is the channel least interfered with by in-use channels because it has the largest reference value, so that in Step  130 , channel C 14  is selected. 
   The method according to embodiments of the present invention utilizes a mathematical calculation to determine a reference value for each idle channel according to the distribution of the in-use channels in order to select an optimal idle channel by comparing the reference values. 
   Those skilled in the art will readily observe that numerous modifications and alterations of the device may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.