CN117896794A - Channel automatic selection method, device, AP equipment and storage medium - Google Patents

Channel automatic selection method, device, AP equipment and storage medium Download PDF

Info

Publication number
CN117896794A
CN117896794A CN202410302459.0A CN202410302459A CN117896794A CN 117896794 A CN117896794 A CN 117896794A CN 202410302459 A CN202410302459 A CN 202410302459A CN 117896794 A CN117896794 A CN 117896794A
Authority
CN
China
Prior art keywords
channel
candidate
list
channels
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410302459.0A
Other languages
Chinese (zh)
Other versions
CN117896794B (en
Inventor
黄江华
李铮铮
田野
刘兴立
丘晓阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Langli Semiconductor Co ltd
Original Assignee
Shanghai Langli Semiconductor Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Langli Semiconductor Co ltd filed Critical Shanghai Langli Semiconductor Co ltd
Priority to CN202410302459.0A priority Critical patent/CN117896794B/en
Publication of CN117896794A publication Critical patent/CN117896794A/en
Application granted granted Critical
Publication of CN117896794B publication Critical patent/CN117896794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application provides a channel automatic selection method, a device, AP equipment and a storage medium, which are applied to the technical field of communication and are used for receiving configuration parameters corresponding to a target working channel through a configuration interface; determining a channel list candidate set to be scanned based on parameters such as country codes in configuration parameters, and carrying out radar detection on each candidate channel according to the sequence from low frequency to high frequency corresponding to the channel; removing a channel list candidate set from the corresponding candidate channel list under the condition that the radar detection result indicates that the candidate channel is not available; under the condition that the candidate channel is available, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter; and determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set according to the channel scores. The channel automatic selection method provided by the application can increase the flexibility and applicability of the channel automatic selection method when the speed of channel automatic selection is increased.

Description

Channel automatic selection method, device, AP equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and apparatus for automatically selecting a channel, an AP device, and a storage medium.
Background
Channel selection in a wireless local area network is important, and in a multi-channel mobile communication system, the situation of inter-channel interference or communication congestion may exist, and selecting a proper channel can reduce signal interference and improve network quality. To solve this problem, an automatic channel selection (Automatic Channel Selection, abbreviated ACS) method can automatically select the best channel as the working channel of the AP (Wireless Access Point ).
In the prior art, ACS is usually implemented by hostapd software located in a user space, firstly, content (including hardware supporting characteristics, scanning times, etc.) in a corresponding configuration file (hostapd. Conf) is read, then, all channels under characteristics (such as IEEE 802.11B/G/a) supported by hardware are counted to obtain a channel list, channel scanning is performed based on the channel list, and the scanning times are specified by configuration of the configuration file. The surveydata is obtained by channel scanning, including a value of a channel noise floor (chan_nf), a last received minimum channel noise floor as a minimum noise floor (min_nf), a total time spent by the RF component on the channel (channel_time), a channel busy time (channel_time_busy), a channel receive time (channel_time_rx), a channel transmit time (channel_time_tx), and the like, and then the channel interference factor (interference factor) is calculated from these values. It is then checked whether the respective channels under each characteristic are suitable as primary channels, whether adjacent channels exist, whether its overlay data exist, whether it is suitable for a specific bandwidth, etc. After the inspection is passed, the interference factors of the channels are respectively calculated according to the operation bandwidth to obtain total interference factor values (total interference factor) under the bandwidth, and the channel with the minimum total interference factor value is selected as the optimal target working channel.
However, in the method for implementing ACS by hostapd, parameter adjustment needs to be performed based on a configuration file, so that a user is not supported to flexibly adjust configuration parameters such as a channel scanning mode, dynamic bandwidth selection and the like; in addition, the hostapd method has the defects of relatively complex and lacking flexibility in the flow of determining the target working channel, reading the configuration file of the hostapd, generating a channel set by combining various constraint conditions, and sending a netlink message to a driving layer of the kernel space to execute corresponding channel selection operation, and has the defect of relatively low automatic channel selection speed.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, apparatus, AP device, and storage medium for automatically selecting a channel, which can increase flexibility and applicability of the method for automatically selecting a channel while increasing the speed of automatic channel selection. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for automatically selecting a channel, where the method includes:
s1, receiving configuration parameters corresponding to a target working channel through a configuration interface;
s2, determining a channel list candidate set to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter, wherein the channel list candidate set is a set of channel lists matched with the configuration parameter;
S3, according to the sequence from low frequency to high frequency of the channels, radar detection is carried out on each candidate channel in the candidate channel list, and a corresponding radar detection result is obtained;
s4, removing the candidate channel list corresponding to the candidate channel from the channel list candidate set under the condition that the radar detection result indicates that the candidate channel is unavailable;
s5, calculating a channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter under the condition that the radar detection result indicates that the candidate channel is available;
and S6, determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
Further, before step S1, the method further includes:
the configuration interface sends the channel automatic selection transfer processing identification to the hostapd;
the configuration interface is a CLI command line interface, and step S1 of receiving configuration parameters through the configuration interface includes:
and receiving the configuration parameters through the CLI command line interface.
Further, the determining the candidate set of the channel list to be scanned in step S2 based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter includes:
Determining a channel availability range based on the country code;
and creating a channel list candidate set based on the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter within the channel available range, wherein the channel list candidate set comprises a plurality of candidate channel lists, and at least one of frequency bands, bandwidths, channel scanning modes and dynamic bandwidth opening states of the plurality of candidate channel lists are different.
Further, the candidate channels include at least one basic channel, the basic channel is a channel with a frequency of 20MHz, and the radar detection is performed on each candidate channel in the candidate channel list according to the order of the frequencies corresponding to the channels from low to high, so as to obtain a corresponding radar detection result, which includes:
detecting whether the basic channel is a radar channel or not to obtain a channel detection result;
if the channel detection result indicates that the basic channel is a non-radar channel, the radar detection result corresponding to the candidate channel is marked as available;
under the condition that the channel detection result indicates that the basic channel is a radar channel, radar signal detection is carried out on the basic channel;
In the event that a radar signal is detected in the fundamental channel, identifying the radar detection as unavailable;
detecting a setting state of the basic channel in the case that no radar signal is detected in the basic channel;
and under the condition that the setting state of the basic channel is a forbidden state, the radar detection result corresponding to the candidate channel is marked as unavailable, otherwise, the radar detection result is marked as available.
Further, the candidate channels include at least one base channel, the base channel being a channel with a frequency of 20MHz, and the calculating a channel score for the candidate channel based on the channel scan interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameter if the radar detection result indicates that the candidate channel is available comprises:
calculating the channel busy proportion corresponding to the basic channel based on the basic channel busy/idle reading period and the channel scanning interval time;
acquiring beacon information, beacon receiving times and received signal strength of a neighboring cell of the basic channel;
linearly summing the received signal strength and the beacon receiving times to obtain the total power corresponding to the basic channel;
Calculating a channel score corresponding to the basic channel based on the total power and the channel duty cycle calculation parameter;
and summing the channel scores of all the basic channels included in the candidate channels to obtain the channel scores of the candidate channels.
Further, the determining, based on the channel score, a target working channel from a plurality of candidate channels corresponding to the candidate set of channel lists includes:
under the condition that the channel scanning mode in the configuration parameters is a full-scale automatic scanning mode, determining the candidate channel with the highest channel score in the channel list candidate set as the target working channel;
the configuration parameters further include: and determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel score threshold, including:
under the condition that the channel scanning mode is a rapid automatic scanning mode and/or a specified channel non-automatic mode, comparing the channel score corresponding to the current candidate channel for channel scanning with the channel score threshold value to obtain a score comparison result;
Determining the current candidate channel as a working channel under the condition that the score comparison result indicates that the channel score of the current candidate channel is greater than or equal to the channel score threshold value;
and under the condition that the score comparison result indicates that the channel score of the current candidate channel is smaller than the channel score threshold value, removing the candidate set of the channel list from the candidate channel list corresponding to the current candidate channel, and jumping to the step of carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency corresponding to the channel.
Further, the target working channel includes at least one fundamental channel, the fundamental channel is a channel with a frequency of 20MHz, and after step S3, the method further includes:
determining the target working channel as a primary channel in the case that the target working channel contains only one of the base channels;
under the condition that the target working channel comprises two basic channels, respectively calculating channel scores of the two basic channels to determine a main channel and an auxiliary channel based on the channel scores of the two basic channels;
calculating channel scores of all the basic channels in the case that the target working channel comprises more than two basic channels, so as to determine a main channel and a central channel based on the channel scores of all the basic channels;
Further, the configuration parameters further include: a power type for constraining a signal transmission power, the method further comprising, after step S3:
and performing power configuration on the target working channel based on the power type.
In another aspect, an embodiment of the present application provides an apparatus for automatically selecting a channel, where the apparatus includes:
the parameter sending module is used for receiving configuration parameters corresponding to the target working channel through the configuration interface;
the candidate determining module is used for determining a channel list candidate set to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter, wherein the channel list candidate set is a set of channel lists matched with the configuration parameter;
the radar detection module is used for carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency of the corresponding channel to obtain a corresponding radar detection result;
a channel screening module, configured to remove the candidate channel list corresponding to the candidate channel from the channel list candidate set when the radar detection result indicates that the candidate channel is unavailable;
A channel scoring module that calculates a channel score for the candidate channel based on the channel scan interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameter if the radar detection result indicates that the candidate channel is available;
and the channel determining module is used for determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
In another aspect, an embodiment of the present application provides an AP device, where the AP device includes a processor and a memory; the memory stores at least one instruction for execution by the processor to implement the channel automatic selection method as described in the above aspects.
In another aspect, embodiments of the present application provide a computer readable storage medium having at least one program stored therein, the at least one program being loaded and executed by a processor to implement the channel automatic selection method as described in the above aspect.
Compared with the prior art, the beneficial effects that above-mentioned at least one technical scheme that this description embodiment adopted can reach include at least:
1. The channel automatic selection method is applied to a driving layer of AP equipment, firstly, the driving layer receives configuration parameters corresponding to a target working channel through a configuration interface, then, the driving layer determines a channel list candidate set to be scanned based on country codes, bandwidth configuration parameters, a channel scanning mode and dynamic bandwidth opening parameters in the configuration parameters, wherein the channel list candidate set is a set of channel lists matched with the configuration parameters, and because a user can flexibly change the configuration parameters through the configuration interface, in the process, the user can freely select the country and region corresponding to the working channel by adjusting the country codes, expand the selectable channels through the channel scanning mode and expand the selectable channels through the dynamic bandwidth mode, and accordingly, the channel list candidate set can meet the requirements of the configuration parameters. According to the sequence of the frequencies corresponding to the channels from low to high, radar detection is carried out on each candidate channel in the candidate channel list, a corresponding radar detection result is obtained, and when the AP equipment is arranged near radar facilities, the automatic selection of the channels to interfere with radar operation can be avoided. And before further evaluating the channel quality, judging whether the candidate channel is available or not, and improving the efficiency of channel scanning. If the candidate channel is unavailable, removing the candidate set of the channel list from the corresponding candidate channel list, and if the candidate channel is available, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter, and further determining a more accurate and better-applicable target working channel from a plurality of candidate channels corresponding to the candidate set of the channel list based on the channel score. In addition, the method and the device realize automatic channel selection at the driving layer, reduce interaction between hostapd and the driving layer and improve the speed of automatic channel selection.
2. The channel availability range is determined based on the country code, thereby creating a channel list candidate set based on the bandwidth configuration parameter, the channel scan mode, and the dynamic bandwidth on parameter. The channel list candidate set is a set of channel lists matched with configuration parameters and comprises a plurality of candidate channel lists, at least one of frequency bands, bandwidths, channel scanning modes and dynamic bandwidth opening states of the candidate channel lists are different, the channel sets in all scenes are saved in an array mode through setting the candidate set, and convenience is provided for determining target working channels for subsequent channel scanning, so that the flow of automatic channel selection is simplified, and the speed of automatic channel selection is improved.
3. The candidate channels comprise at least one basic channel, the channel busy proportion corresponding to the basic channel is calculated based on the busy and idle reading period of the basic channel and the channel scanning interval time, the received signal intensity corresponding to the basic channel can be obtained by linearly summing the beacon information and the beacon receiving times, and finally, the channel score corresponding to the more accurate basic channel can be obtained according to the received signal intensity and the channel busy and idle degree calculation parameters in such a way, the channel score of the more accurate candidate channel is further obtained by summing, the appropriate target working channel can be conveniently determined according to the channel score of the candidate channel, and the accuracy of automatic channel selection is improved.
4. The channel scanning modes in the configuration parameters can be divided into: and setting different channel scoring judgment standards according to different channel scanning modes in configuration parameters in a comprehensive automatic scanning mode, a rapid automatic scanning mode and a specified channel non-automatic mode so as to screen out the most suitable target working channel. The method comprises the steps of determining a candidate channel with the highest channel score in a channel list candidate set as a target working channel in a comprehensive automatic scanning mode; in the fast automatic scanning mode and/or the non-automatic mode of the designated channel, the channel score corresponding to the current candidate channel for channel scanning needs to be compared with the channel score threshold value to determine whether the current candidate channel can be determined as the target working channel.
5. According to the condition that the target channel comprises the number of basic channels, determining a main channel, an auxiliary channel, a main channel and a central channel corresponding to the target channel based on the channel scores of the basic channels, and improving the signal transmission efficiency through reasonable channel setting.
6. The configuration parameters further include: the power type is used for restraining the signal transmitting power, after the target working channel is determined, the method further comprises the step of carrying out power configuration on the target working channel based on the power type, and the signal coverage penetrating power with different degrees can be achieved according to the power parameter configuration, so that WiFi coverage requirements and energy consumption saving in different building spaces can be met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of automatic channel selection provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart for determining a target channel list provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a schematic diagram of determining a channel availability range provided by an exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of channel scanning provided by an exemplary embodiment of the present application;
FIG. 5 illustrates a flow diagram of channel scanning provided by an exemplary embodiment of the present application;
FIG. 6 is a flow chart illustrating automatic channel selection provided in one exemplary embodiment of the present application;
fig. 7 is a block diagram illustrating a channel automatic selection apparatus according to an exemplary embodiment of the present application;
fig. 8 illustrates a schematic structural diagram of an AP device according to an exemplary embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
Other advantages and effects of the present application will become apparent to those skilled in the art from the present disclosure, when the following description of the embodiments is taken in conjunction with the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. The present application may be embodied or carried out in other specific embodiments, and the details of the present application may be modified or changed from various points of view and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims and drawings of the present invention are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
In the following description, fig. 1 is a schematic flow chart of a method for automatically selecting a channel according to an embodiment of the present invention, where the method includes steps according to the embodiment or the flowchart, but may include more or less steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. When the actual signal automatically selects the device product to execute, the methods illustrated in the embodiments or the drawings may be executed sequentially or in parallel (e.g., in a parallel processor or a multi-threaded processing environment). As shown in fig. 1, the method may include:
s1, receiving configuration parameters corresponding to a target working channel through a configuration interface.
In some embodiments, the configuration interface may be a command line interface, and the driving layer receives, through the command line interface, configuration parameters corresponding to the target working channel, where the configuration parameters include, but are not limited to, country code, bandwidth configuration parameters, channel scanning mode, dynamic bandwidth opening parameters, channel scanning interval time, channel duty cycle reading period, and channel duty cycle calculation parameters.
S2, determining a channel list candidate set to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter.
In some embodiments, the channel list candidate set is a set of channel lists matched with the configuration parameters, the user can flexibly adjust the configuration parameters through the configuration interface, the country and the region corresponding to the working channel are freely selected through the setting of the country code, the channel range where the target working channel is located is specified, the selectable channels are expanded through a dynamic bandwidth mode, and the channel scanning mode and the bandwidth configuration parameters are used as constraint conditions, so that the channel list candidate set meeting the requirements of the configuration parameters is screened out, and the target working channel is determined based on the channel list candidate set.
In a specific embodiment, the operating system part in the AP device may pre-configure the channel signal to be 0, to indicate that the channel automatic selection function is turned on, then execute the WiFi up command, send the instruction to hostapd to start WiFi, and send the information to start channel automatic selection to the driving layer after the hostapd receives the instruction, so that the driving layer performs the channel automatic selection operation, that is, in the case that the driving layer receives the information to start channel automatic selection, determine the candidate set of the channel list to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameters.
S3, according to the sequence from low frequency to high frequency of the channels, radar detection is carried out on each candidate channel in the candidate channel list, and a corresponding radar detection result is obtained.
In a possible implementation manner, the candidate channels include at least one basic channel, the basic channel is a channel with the frequency of 20MHz, the frequencies corresponding to the candidate channels are different according to the difference of the number of the basic channels included in the candidate channels, and radar detection can be performed on each candidate channel according to the order of the frequencies corresponding to the channels from low to high. Specifically, radar detection is performed on the candidate channels, that is, radar detection is performed on all basic channels included in the candidate channels, whether the basic channels are radar channels is judged, if the candidate channels include basic channels used as radar channels, a candidate channel list corresponding to the candidate channels is removed from the channel list candidate set.
And S4, removing the candidate channel list corresponding to the candidate channel from the channel list candidate set under the condition that the radar detection result indicates that the candidate channel is unavailable.
In some embodiments, the radar detection result indicates that there may be two cases where one is that the basic channel in the candidate channels is a radar channel, that is, the candidate channel list corresponding to the candidate channel is removed from the candidate channel list candidate set, and the other is that the basic channel in the candidate channels is a radar channel but no radar signal is detected, where the candidate channel list corresponding to the candidate channel is still kept in the candidate channel list set, and only if the basic channel in the candidate channel is a radar channel and a radar signal is detected, the candidate channel list corresponding to the candidate channel is removed from the candidate channel list candidate set.
And S5, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter under the condition that the radar detection result indicates that the candidate channel is available.
In some embodiments, where the radar detection indicates that a candidate channel is available, a preliminary channel scan may be performed on all channels in the target channel list, and then the individual channels contained in the target channel list may be scored based on the channel scan interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameters in the configuration parameters.
S6, determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
In some embodiments, the channel with the highest channel score in the target channel list may be selected and determined to be the target working channel.
According to the embodiment of the application, the channel automatic selection method is applied to the driving layer of the AP equipment, interaction between hostapd and the driving layer is reduced, the speed of channel automatic selection can be improved, the driving layer receives configuration parameters corresponding to a target working channel through a configuration interface, then a channel list candidate set to be scanned is determined according to country codes, bandwidth configuration parameters, channel scanning modes and dynamic bandwidth opening parameters in the configuration parameters, finally radar detection is carried out on each candidate channel in the candidate channel list according to the sequence of frequencies corresponding to the channels from low to high, a corresponding radar detection result is obtained, and when the AP equipment is arranged near radar facilities, the channel automatic selection can be avoided from interfering with radar work. And before further evaluating the channel quality, judging whether the candidate channel is available or not, and improving the efficiency of channel scanning. If the candidate channel is unavailable, removing the candidate set of the channel list from the corresponding candidate channel list, and if the candidate channel is available, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter, and further based on the channel score, thereby obtaining a target working channel with higher accuracy and better applicability.
In some embodiments, prior to step S1, the configuration interface may send a channel auto-selection transfer process identification to hostapd for subsequent execution of the corresponding function of channel auto-selection by the driver layer instead of hostapd.
In a specific embodiment, the configuration interface may send the identification information of the channel automatic selection transferred to the driving layer to hostapd in the user space, and then send the relevant configuration parameters of the channel automatic selection to the driving layer, so that the driving layer stores the configuration parameters.
The configuration interface may be a CLI command line interface, and the driving layer receives the configuration parameters through the CLI command line interface.
In some embodiments, the target operating channel comprises at least one fundamental channel, the fundamental channel being a channel of frequency 20MHz, after step S3:
1. in the case where the target working channel contains only one basic channel, the target working channel may be determined as the main channel.
I.e. for a target operating channel of 20MHz bandwidth, the channel itself may be the primary channel.
2. In the case where the target working channel includes two basic channels, channel scores of the two basic channels are calculated, respectively, to determine the main channel and the auxiliary channel based on the channel scores of the two basic channels.
That is, for a target working channel with a bandwidth of 40MHz, where the channel with the higher base channel score is used as the primary channel and the other channel is used as the secondary channel, the channel score can be calculated according to the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter in the configuration parameters. Such as: and selecting the [1,5] of the 2.4GHz frequency band as an operating channel, wherein the channel score of the channel 1 is higher than that of the channel 5, so that the channel 1 is a main channel and the channel 5 is an auxiliary channel, otherwise, if the channel score of the channel 5 is higher than that of the channel 1, the channel 5 is a main channel and the channel 1 is an auxiliary channel. For the 5GHz band, the processing method is the same.
3. In the case that the target working channel includes more than two basic channels, the channel scores of all basic channels are calculated to determine the main channel and the center channel based on the channel scores of all basic channels, so that the signal transmission efficiency is improved through reasonable channel setting.
It may be the case that the target operating channel comprises more than two fundamental channels, that the target operating channel bandwidth is 80MHz or 160MHz.
For an operating channel with the bandwidth of 80MHz, the channel with the highest basic channel score is taken as a main channel, and the channel with the central frequency of the operating channel is taken as a central channel. Such as: the 80MHz bandwidth operating channel is [36, 40, 44, 48], if the highest scoring fundamental channel is channel 36, then the primary channel is channel 36 and the center channel of the operating channel is channel 42; if the highest scoring fundamental channel is channel 40, then the primary channel is channel 40 and the center channel of the working channel is channel 42; if the highest scoring fundamental channel is channel 44, then the primary channel is channel 44 and the center channel of the working channel is channel 42; if the highest scoring fundamental channel is channel 48, then the primary channel is channel 48 and the center channel of the working channel is channel 42.
For an operating channel with 160MHz bandwidth, the determination method of the main channel and the center channel is the same as that of the 80MHz bandwidth. Such as: the 160MHz bandwidth operating channel is [100, 104, 108, 112, 116, 120, 124, 128], if the highest scoring fundamental channel is channel 100, then the primary channel is channel 100 and the center channel of the operating channel is channel 114; if the highest scoring fundamental channel is channel 104, then the primary channel is channel 104, and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 108, then the primary channel is channel 108 and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 112, then the primary channel is channel 112 and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 116, then the primary channel is channel 116 and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 120, then the primary channel is channel 120, and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 124, then the primary channel is channel 124, and the center channel of the working channel is channel 114; if the highest scoring fundamental channel is channel 128, then the primary channel is channel 128 and the center channel of the working channel is channel 114.
Corresponding government agency legislation is constrained for WiFi transmit power in different countries or regions, and in some embodiments, the configuration parameters further include: the power type is used for restraining the signal transmitting power, and after the step S3, the power configuration can be carried out on the target working channel based on the power type, so that the purposes of realizing different degrees of signal coverage penetration capacity according to the power parameter configuration and meeting WiFi coverage requirements and energy consumption saving in different building spaces are achieved.
In a specific embodiment, the power configuration mode is illustrated by taking a chinese country code as an example, as shown in the following table:
in the table, in the strong coverage mode, according to the two wall standards of signal penetrability, the signal coverage is 10m, and the RcvRSSI-65dBm (RcvRSSI is the intensity of the received signal) calculates the corresponding transmitting power; in a conventional mode, according to a wall standard that a signal can penetrate, the signal coverage is 10m, and the RcvRSSI-65dBm calculates the corresponding transmitting power; the energy-saving mode, according to the Line of Sight (LoS) standard, covering 10m, and calculating the corresponding transmitting power of RcvRSSI-65 dBm; EIRP represents Effective Isotropic Radiated Power, meaning effective omni-directional radiated power, also referred to as equivalent omni-directional radiated power.
Fig. 2 illustrates a flowchart for determining a target channel list provided by an exemplary embodiment of the present application. The embodiment describes the method for an AP device as an example, and the method includes the following steps.
S201, determining a channel availability range based on the country code.
The regulations for the division and use of frequency resources vary from country to country, so that the available range of a channel is determined according to country codes, as shown in fig. 3, fig. 3 shows a schematic diagram for determining the available range of a channel according to an exemplary embodiment of the present application, and in some embodiments, the maximum available range of a target working channel is determined by country codes, and then the available range is divided according to frequency bands.
For example, when the country code is China, the corresponding usable range (i.e., the channel number range) is 1-13 in the frequency band of 2.4GHz, and the corresponding usable ranges (i.e., the channel number range) are 36-64 and 149-165 in the frequency band of 5 GHz.
S202, creating a channel list candidate set based on the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the channel available range.
In some embodiments, the candidate set of channel list includes a plurality of candidate channel lists, and at least one of a frequency band, a bandwidth, a channel scanning mode and a dynamic bandwidth on state of the candidate channel lists is different among the candidate channel lists.
Taking country code as an example, the bandwidth configuration parameters include: 20MHz, 40MHz, 80MHz, 1600MHz, channel scanning modes include: the fast automatic scanning (FastFirst) mode, the full automatic scanning (Best) mode, the designated channel non-automatic mode, the dynamic bandwidth on state includes: on and off, enumerating the individual candidate channel lists contained in the created candidate set of channel lists.
(1) The frequency band is 2.4GHz,20MHz bandwidth, the non-automatic mode of the appointed channel:
the channel list is the designated channel, and is: 1-13.
(2) The frequency band is 2.4GHz,20MHz bandwidth, fastFirst automatic mode:
the list of channels is: 1,6, 11
(3) The frequency band is 2.4GHz,20MHz bandwidth, best automatic mode:
the list of channels is: 1,6, 11
(4) The frequency band is 2.4GHz,40MHz bandwidth, the non-automatic mode of the appointed channel:
the channel list is the designated channel, and is: [6, 10].
(5) The frequency band is 2.4GHz,40MHz bandwidth, fastFirst automatic mode:
the list of channels is: [1,5],[4,8],[7, 11]
(6) The frequency band is 2.4GHz,40MHz bandwidth, best automatic mode, dynamic bandwidth indication is closed:
the list of channels is: [1,5],[4,8],[7, 11]
(7) The frequency band is 2.4GHz,40MHz bandwidth, best automatic mode, dynamic bandwidth indication is opened:
the list of channels is: [1,5],[4,8],[7, 11].
If the subsequent channel auto-selection process results in no channel with the desired 40MHz bandwidth, then an attempt is made to find a channel with the desired 20MHz bandwidth.
(8) The frequency band is 5GHz and 20MHz bandwidth, and the non-automatic mode of the designated channel is as follows:
the channel list is the designated channel, and is: 36-64, 149-165.
(9) The frequency band is 5GHz,20MHz bandwidth, fastFirst automatic mode:
the list of channels is: 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165
(10) The frequency band is 5GHz,20MHz bandwidth, best automatic mode:
the list of channels is: 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165
(11) The frequency band is 5GHz,40MHz bandwidth, the non-automatic mode of appointed channel:
the channel list is the designated channel, and is: [36, 40],[44, 48],[52, 56],[60, 64],[149, 153],[157, 161].
(12) The frequency band is 5GHz,40MHz bandwidth, fastFirst automatic mode:
the list of channels is: [36, 40],[44, 48],[52, 56],[60, 64],[149, 153],[157, 161]
(13) The frequency band is 5GHz,40MHz bandwidth, best automatic mode, dynamic bandwidth indication is closed:
the list of channels is: [36, 40],[44, 48],[52, 56],[60, 64],[149, 153],[157, 161]
(14) The frequency band is 5GHz,40MHz bandwidth, best automatic mode, dynamic bandwidth indication is opened:
the list of channels is: [36, 40],[44, 48],[52, 56],[60, 64],[149, 153],[157, 161]
If the subsequent channel auto-selection process results in no channel with the desired 40MHz bandwidth, then an attempt is made to find a channel with the desired 20MHz bandwidth.
(15) The frequency band is 5GHz,80MHz bandwidth, the non-automatic mode of appointed channel:
the channel list is the designated channel, and is: [36, 40, 44, 48],[52, 56, 60, 64],[149, 153, 157, 161].
(16) The frequency band is 5GHz,80MHz bandwidth, fastFirst automatic mode:
the list of channels is: [36, 40, 44, 48],[52, 56, 60, 64],[149, 153, 157, 161]
(17) The frequency band is 5GHz,80MHz bandwidth, best automatic mode, dynamic bandwidth indication is closed:
the list of channels is: [36, 40, 44, 48],[52, 56, 60, 64],[149, 153, 157, 161]
(18) The frequency band is 5GHz,80MHz bandwidth, best automatic mode, dynamic bandwidth indication is opened:
The list of channels is: [36, 40, 44, 48],[52, 56, 60, 64],[149, 153, 157, 161]
If the processing result of the subsequent automatic channel selection cannot find the channel with the bandwidth of 80MHz meeting the requirement, then the channel with the bandwidth of 40MHz meeting the requirement is tried to be found, and the channel with the bandwidth of 40MHz meeting the requirement is not found, then the channel with the bandwidth of 20MHz meeting the requirement is tried to be found.
(19) The frequency band is 5GHz,160MHz bandwidth, the non-automatic mode of appointed channel:
the channel list is the designated channel, and is: [36, 40, 44, 48, 52, 56, 60, 64].
(20) The frequency band is 5GHz,160MHz bandwidth, fastFirst automatic mode:
the list of channels is: [36, 40, 44, 48, 52, 56, 60, 64]
(21) The frequency band is 5GHz,160MHz bandwidth, best automatic mode, dynamic bandwidth indication is closed:
the list of channels is: [36, 40, 44, 48, 52, 56, 60, 64]
(22) The frequency band is 5GHz,160MHz bandwidth, best automatic mode, dynamic bandwidth indication is opened:
the list of channels is: [36, 40, 44, 48, 52, 56, 60, 64]
If the processing result of the subsequent automatic channel selection cannot find the channel with the 160MHz bandwidth meeting the requirement, then trying to find the channel with the 80MHz bandwidth meeting the requirement, then trying to find the channel with the 40MHz bandwidth meeting the requirement, and then trying to find the channel with the 20MHz bandwidth meeting the requirement.
In the above embodiment, by setting the candidate set of the channel list, the channel set in each scene may be saved by means of an array, so as to facilitate the subsequent channel scanning to determine the target working channel, thereby simplifying the flow of automatic channel selection, improving the speed of automatic channel selection, and eliminating the need for various checks and judgments of the existing method of hostapd, for example, when using 40MHz bandwidth in the 2.4GHz band, the channel set in which the channels do not overlap may be selected, and the existing method of hostapd requires the calculation of overlap judgments by a design program.
Fig. 4 shows a flowchart of channel scanning provided in an exemplary embodiment of the present application, the method comprising the following steps.
S401, according to the sequence from low frequency to high frequency of the channels, radar detection is carried out on each candidate channel in the candidate channel list, and a corresponding radar detection result is obtained.
In some embodiments, the candidate channels include at least one basic channel, the basic channel is a channel with a frequency of 20MHz, corresponding frequencies are different according to the difference of the number of basic channels included in the candidate channels, and radar detection can be performed on each candidate channel according to the order of the frequencies corresponding to the channels from low to high by adopting the following method:
1. And detecting whether the basic channel is a radar channel or not to obtain a channel detection result.
2. And in the case that the channel detection result indicates that the basic channel is a non-radar channel, identifying the radar detection result corresponding to the candidate channel as available.
3. And under the condition that the channel detection result indicates that the basic channel is a radar channel, radar signal detection is carried out on the basic channel.
4. In the event that radar signals are detected in the fundamental channel, identifying radar detection results as unavailable;
5. detecting a setting state of the basic channel under the condition that the radar signal is not detected in the basic channel;
6. and under the condition that the setting state of the basic channel is the forbidden state, the radar detection result corresponding to the candidate channel is marked as unavailable, otherwise, the radar detection result is marked as available.
The above method requires radar detection for each fundamental channel that the candidate channel contains.
S402, removing a candidate channel list corresponding to the candidate channel from the channel list candidate set when the radar detection result indicates that the candidate channel is unavailable.
In some embodiments, when the radar detection result indicates that the candidate channel is not available, the channel is indicated to be used for transmitting the radar signal and is not suitable for occupying the channel, the candidate channel list corresponding to the candidate channel is discarded from the whole candidate set of the channel list, and other candidate channels meeting the condition and the corresponding candidate channel list are continuously searched.
S403, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameters under the condition that the radar detection result indicates that the candidate channel is available.
In some embodiments, the channel score may be calculated by:
1. and calculating the channel busy proportion corresponding to the basic channel based on the basic channel busy/idle reading period and the channel scanning interval time.
In a specific embodiment, the channel busy duration is read according to the busy information reading period of the basic channel, and divided by the channel scanning interval duration, so as to obtain the channel busy proportion chnBusy level.
2. And acquiring the beacon information and the beacon receiving times of the adjacent cells of the basic channel.
In a specific embodiment, the beacon information (beacon) of the neighbor cell is monitored, and the corresponding beacon reception times (bcnNum) and the received signal strength (RcvRSSI) are recorded.
3. And linearly summing the received signal strength and the beacon receiving times to obtain the total power corresponding to the basic channel.
In a specific embodiment, the received bcnnnum rcv rssis are linearly summed to obtain a total power, the linearly summed total power value is converted into dBm, the value is denoted as RcvRSSI (dBm), and then the rcvRssiLevel value is obtained according to the following correspondence table:
4. And calculating to obtain a channel score corresponding to the basic channel based on the received signal strength and the channel duty cycle calculation parameter.
In a specific embodiment, the score chnScore of the 20MHz base channel is calculated by combining the scale factor value in the configuration parameter and the channel duty cycle calculation parameter, and the calculation formula is as follows:
wherein, the scale factor value in the alpha, beta and gamma configuration parameters is chnBusy level which is the channel duty cycle calculation parameter.
5. And summing the channel scores of all the basic channels included in the candidate channels to obtain the channel scores of the candidate channels.
In one possible implementation, it is assumed that a candidate channel includes N20 MHz base channels, and the channel score (total candidate channel score) of the candidate channel is calculated as follows:
where totalScore is the channel score of the candidate channel (total score of candidate channels), f (BW) represents the bandwidth-related factor: the larger the bandwidth, the larger the overall interference, and the smaller the actual throughput is than the capacity improvement caused by the bandwidth increase. The values of f (BW) are shown in the following table:
s404, determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
Different channel scoring judgment standards can be set according to different channel scanning modes in the configuration parameters so as to screen out the most suitable target working channel. In some embodiments, the target operating channel may be determined by:
in one possible implementation, in the case that the channel scanning mode in the configuration parameter is the full-scale automatic scanning mode, the candidate channel with the highest channel score in the channel list candidate set is determined as the target working channel.
In one possible implementation, the configuration parameters further include: and the channel scoring threshold value can compare the channel score corresponding to the current candidate channel for channel scanning with the channel scoring threshold value to obtain a scoring comparison result under the condition that the channel scanning mode is a rapid automatic scanning mode and/or a designated channel mode.
1. And determining the current candidate channel as the working channel in the case that the score comparison result indicates that the channel score of the current candidate channel is greater than or equal to the channel score threshold.
2. And under the condition that the score comparison result indicates that the channel score of the current candidate channel is smaller than the channel score threshold value, removing the candidate channel list candidate set from the candidate channel list corresponding to the current candidate channel, and jumping to the step of carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency corresponding to the channel.
The hostapd scheme performs radar signal detection after selecting the best channel through signal scanning, scoring and other processes, and if the radar signal is found, the current channel needs to be discarded and the next channel needs to be scanned again. Meanwhile, according to the sequence of the frequencies corresponding to the channels from low to high, radar detection is carried out on each candidate channel in the candidate channel list, so that a corresponding radar detection result is obtained, and when the AP equipment is arranged near radar facilities, the automatic selection of the channels to interfere with radar operation can be avoided.
Referring to fig. 5, fig. 5 shows a schematic flow chart of channel scanning provided by an exemplary embodiment, in which a driving layer inputs a candidate set of channel lists (i.e., a candidate measurement set in the figure), where the candidate set includes a plurality of candidate channel lists, and each channel list includes a plurality of candidate channels, and since the candidate channels may be formed by one or more 20MHz basic channels, the corresponding frequencies are also different, and thus the candidate channels are scanned in order from low frequency to high frequency. In actual operation, channel scanning is sequentially performed on each basic channel in the candidate channels, whether the current 20MHz basic channel belongs to a radar channel specified by regulations is firstly judged, if the current 20MHz basic channel is the radar channel, radar signal detection is required, and otherwise, the radar signal detection step is directly skipped. If the channel is a radar channel and radar signals are detected in the channel, discarding candidate channels corresponding to the current basic channel and a candidate signal list thereof, and selecting a candidate channel in a candidate signal list of the next channel for reprocessing; if no radar signal is detected in the channel, it is checked whether the basic channel is set to a Disabled state (Disabled). If the state is disabled, discarding the candidate channel list corresponding to the current basic channel, and selecting the candidate channel in the next candidate channel list for reprocessing. And carrying out channel busy detection under the condition that the candidate channel is available so as to calculate a channel Score (Score) of the candidate channel, and confirming the candidate channel as a target working channel under the condition that the channel Score meets the condition, otherwise, putting the candidate channel into a working candidate set, and continuing to scan other candidate channels in a candidate measurement set (channel list candidate set).
When all the candidate measurement sets (channel list candidate sets) are scanned, the candidate channel with the highest channel score in the working candidate set is selected as the working channel.
In one possible implementation scenario, as shown in fig. 6, fig. 6 is a schematic flow chart of automatic channel selection provided in an exemplary embodiment.
The AP devices are divided into an operating system, a configuration interface, hostapd, a driver layer, and underlying software, in one possible implementation, the operating system is OpenWrt.
Firstly, an AP system is started to finish various initialization works of software and hardware; then, the configuration interface transfers the automatic channel selection function to the driving process, and can set WPA_DRIVER_FLAGS_ACS_OFFLOAD for the iface- > drv_flag of hostapd; the configuration interface sends the automatic channel selection parameters (configuration parameters) to the driving layer; the driving layer stores configuration parameters; the system configuration signal is 0, and a WiFi up command is executed; transmitting the starting WiFi information to hostapd, and transmitting an automatic channel selection starting message to the driving layer by hostapd so as to enable the driving layer to create a channel candidate list; then sequentially performing channel scanning, radar channel detection, forbidden channel detection, channel scoring (generating channel scores) and channel score checking (screening candidate channels based on the channel scores), and circularly executing the steps until a channel candidate list is ended; after that, the driving layer determines a working channel and determines a primary and secondary channel based on the working channel; the driving layer sends the main and auxiliary channel information to the hostapd; then, carrying out power configuration on the driving layer and the bottom layer software; the final configuration AP device operates on the selected channel (target operating channel).
Fig. 7 is a block diagram of an apparatus for automatically selecting signals according to an exemplary embodiment of the present application, the apparatus including:
a parameter sending module 701, configured to receive, through a configuration interface, a configuration parameter corresponding to a target working channel;
a candidate determining module 702, configured to determine a candidate set of channel lists to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter, where the candidate set of channel lists is a set of channel lists matched with the configuration parameter;
the radar detection module 703 is configured to perform radar detection on each candidate channel in the candidate channel list according to the order of the frequencies corresponding to the channels from low to high, so as to obtain a corresponding radar detection result;
a channel screening module 704, configured to remove, if the radar detection result indicates that the candidate channel is not available, a candidate channel list corresponding to the candidate channel from the channel list candidate set;
a channel scoring module 705, configured to calculate a channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameter, in a case where the radar detection result indicates that the candidate channel is available;
the channel determination module 706 determines a target working channel from among a plurality of candidate channels corresponding to the candidate set of channel list based on the channel score. Optionally, the apparatus further includes an identifier sending module, configured to:
The configuration interface sends the channel auto-select transfer process identification to hostapd.
Optionally, the parameter sending module 701 is further configured to:
configuration parameters are received via the CLI command line interface.
Optionally, the candidate determining module 702 is further configured to:
determining a channel availability range based on the country code;
and creating a channel list candidate set based on the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the available channel range, wherein the channel list candidate set comprises a plurality of candidate channel lists, and at least one of the frequency band, the bandwidth, the channel scanning mode and the dynamic bandwidth opening state of the plurality of candidate channel lists is different.
Optionally, the candidate channels include at least one fundamental channel, where the fundamental channel is a channel with a frequency of 20MHz, and the radar detection module 703 is further configured to:
detecting whether the basic channel is a radar channel or not to obtain a channel detection result;
under the condition that the channel detection result indicates that the basic channel is a non-radar channel, the radar detection result corresponding to the candidate channel is identified as available;
under the condition that the channel detection result indicates that the basic channel is a radar channel, radar signal detection is carried out on the basic channel;
in the event that radar signals are detected in the fundamental channel, identifying radar detection results as unavailable;
Detecting a setting state of the basic channel under the condition that the radar signal is not detected in the basic channel;
and under the condition that the setting state of the basic channel is the forbidden state, the radar detection result corresponding to the candidate channel is marked as unavailable, otherwise, the radar detection result is marked as available.
Optionally, the candidate channels include at least one basic channel, the basic channel being a channel with a frequency of 20MHz, and the channel scoring module 705 is further configured to:
calculating the channel busy proportion corresponding to the basic channel based on the basic channel busy/idle reading period and the channel scanning interval time;
acquiring beacon information, beacon receiving times and received signal strength of a neighbor cell of a basic channel;
linearly summing the received signal strength and the beacon receiving times to obtain the total power corresponding to the basic channel;
calculating a channel score corresponding to the basic channel based on the total power and the channel duty cycle calculation parameters;
and summing the channel scores of all the basic channels included in the candidate channels to obtain the channel scores of the candidate channels.
Optionally, the channel determining module 706 is further configured to:
under the condition that the channel scanning mode in the configuration parameters is a comprehensive automatic scanning mode, determining a candidate channel with the highest channel score in the channel list candidate set as a target working channel;
The configuration parameters further include: a channel scoring threshold, based on the channel score, determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set, comprising:
under the condition that the channel scanning mode is a rapid automatic scanning mode and/or a designated channel mode, comparing the channel score corresponding to the current candidate channel for channel scanning with a channel score threshold value to obtain a score comparison result;
determining the current candidate channel as a working channel under the condition that the score comparison result indicates that the channel score of the current candidate channel is greater than or equal to the channel score threshold value;
and under the condition that the score comparison result indicates that the channel score of the current candidate channel is smaller than the channel score threshold value, removing the candidate channel list candidate set from the candidate channel list corresponding to the current candidate channel, and jumping to the step of carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency corresponding to the channel.
Optionally, the apparatus further includes a primary and secondary channel determining module configured to:
in the case where the target working channel contains only one basic channel, determining the target working channel as a main channel;
under the condition that the target working channel comprises two basic channels, respectively calculating channel scores of the two basic channels to determine a main channel and an auxiliary channel based on the channel scores of the two basic channels;
In the case where the target working channel includes more than two base channels, the channel scores of all base channels are calculated to determine the main channel and the center channel based on the channel scores of all base channels.
Optionally, the configuration parameters further include: the apparatus further comprises a power configuration module for:
the target operating channel is power configured based on the power type.
In summary, in the embodiment of the present application, the method for automatically selecting a channel is applied to a driving layer of an AP device, so that interaction between hostapd and the driving layer is reduced, and the speed of automatically selecting a channel can be increased. And before further evaluating the channel quality, judging whether the candidate channel is available or not, and improving the efficiency of channel scanning. If the candidate channel is unavailable, removing the candidate set of the channel list from the corresponding candidate channel list, and if the candidate channel is available, calculating the channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter, and further determining a more accurate and better-applicable target working channel from a plurality of candidate channels corresponding to the candidate set of the channel list based on the channel score. .
It should be noted that: the apparatus provided in the above embodiment is only exemplified by the division of the above functional modules, and in practical application, the above functional allocation may be performed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules, so as to perform all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and detailed implementation processes of the method embodiments are described in the method embodiments, which are not repeated herein.
Referring to fig. 8, a schematic structural diagram of an AP device according to an exemplary embodiment of the present application is shown, and as shown in fig. 8, the AP device 800 includes a processor 801 and a memory 802, where the processor 801 and the memory 802 may be connected to each other through a communication bus 803. The communication bus 803 may be an ARM AMBA (Advanced Microcontroller Bus Architecture) based bus or the like. The communication bus 803 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus. The memory 802 is used for storing a computer program comprising program instructions, the processor 801 being configured to invoke the program instructions, the program comprising steps for performing part or all of the methods shown in fig. 1-6. The processor 801 may be a general purpose Central Processing Unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the above-described program. Memory 802 includes, but is not limited to, a storage device that can store static information and instructions, and random access memory (Random Access Memory, RAM) or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory may be stand alone and coupled to the processor via a bus. The memory may also be integrated with the processor.
The AP device 800 may further include general components such as a communication interface, an antenna, and the like, which are not described in detail herein.
The embodiment of the application also provides a computer readable storage medium, wherein at least one instruction is stored in the readable storage medium, and the at least one instruction is loaded and executed by a processor to implement the channel automatic selection method described in the above embodiment.
Alternatively, the computer-readable storage medium may include: NAND or NOR Flash, RAM, etc. The RAM may be dynamic random access memory (DRAM, dynamic Random Access Memory), among others.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the channel automatic selection method described in the above embodiment.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
In this specification, identical and similar parts of the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the description is relatively simple for the embodiments described later, and reference is made to the description of the foregoing embodiments for relevant points.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions easily conceivable by those skilled in the art within the technical scope of the present application should be covered in the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A method for automatically selecting a channel, the method being applied to a driver layer of an AP device, the method comprising:
s1, receiving configuration parameters corresponding to a target working channel through a configuration interface;
s2, determining a channel list candidate set to be scanned based on a country code, a bandwidth configuration parameter, a channel scanning mode and a dynamic bandwidth opening parameter in the configuration parameter, wherein the channel list candidate set is a set of channel lists matched with the configuration parameter, and comprises at least one candidate channel list;
S3, according to the sequence from low frequency to high frequency of the channels, radar detection is carried out on each candidate channel in the candidate channel list, and a corresponding radar detection result is obtained;
s4, removing the candidate channel list corresponding to the candidate channel from the channel list candidate set under the condition that the radar detection result indicates that the candidate channel is unavailable;
s5, calculating a channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period and the channel duty cycle calculation parameter under the condition that the radar detection result indicates that the candidate channel is available;
and S6, determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
2. The method according to claim 1, characterized in that before step S1, the method further comprises:
the configuration interface sends the channel automatic selection transfer processing identification to the hostapd;
the configuration interface is a CLI command line interface, and step S1 of receiving configuration parameters through the configuration interface includes:
and receiving the configuration parameters through the CLI command line interface.
3. The method according to claim 1, wherein the determining the candidate set of channel list to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode, and the dynamic bandwidth opening parameter in the configuration parameter in step S2 includes:
determining a channel availability range based on the country code;
and creating a channel list candidate set based on the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter within the channel available range, wherein the channel list candidate set comprises a plurality of candidate channel lists, and at least one of frequency bands, bandwidths, channel scanning modes and dynamic bandwidth opening states of the plurality of candidate channel lists are different.
4. The method according to claim 1, wherein the candidate channels include at least one basic channel, the basic channel is a channel with a frequency of 20MHz, and the radar detection is performed on each candidate channel in the candidate channel list in order of frequencies corresponding to the channels from low to high, to obtain a corresponding radar detection result, including:
detecting whether the basic channel is a radar channel or not to obtain a channel detection result;
If the channel detection result indicates that the basic channel is a non-radar channel, the radar detection result corresponding to the candidate channel is marked as available;
under the condition that the channel detection result indicates that the basic channel is a radar channel, radar signal detection is carried out on the basic channel;
in the event that a radar signal is detected in the fundamental channel, identifying the radar detection as unavailable;
detecting a setting state of the basic channel in the case that no radar signal is detected in the basic channel;
and under the condition that the setting state of the basic channel is a forbidden state, the radar detection result corresponding to the candidate channel is marked as unavailable, otherwise, the radar detection result is marked as available.
5. The method of claim 1, wherein the candidate channels include at least one base channel, the base channel being a channel having a frequency of 20MHz, the calculating a channel score for the candidate channel based on the channel scan interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameter if the radar detection indicates that the candidate channel is available, comprising:
Calculating the channel busy proportion corresponding to the basic channel based on the basic channel busy/idle reading period and the channel scanning interval time;
acquiring beacon information, beacon receiving times and received signal strength of a neighboring cell of the basic channel;
linearly summing the received signal strength and the beacon receiving times to obtain the total power corresponding to the basic channel;
calculating a channel score corresponding to the basic channel based on the total power and the channel duty cycle calculation parameter;
and summing the channel scores of all the basic channels included in the candidate channels to obtain the channel scores of the candidate channels.
6. The method of claim 1, wherein determining a target working channel from a plurality of the candidate channels corresponding to the candidate set of channel lists based on the channel scores comprises:
under the condition that the channel scanning mode in the configuration parameters is a full-scale automatic scanning mode, determining the candidate channel with the highest channel score in the channel list candidate set as the target working channel;
the configuration parameters further include: and determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel score threshold, including:
Under the condition that the channel scanning mode is a rapid automatic scanning mode and/or a specified channel non-automatic mode, comparing the channel score corresponding to the current candidate channel for channel scanning with the channel score threshold value to obtain a score comparison result;
determining the current candidate channel as a working channel under the condition that the score comparison result indicates that the channel score of the current candidate channel is greater than or equal to the channel score threshold value;
and under the condition that the score comparison result indicates that the channel score of the current candidate channel is smaller than the channel score threshold value, removing the candidate set of the channel list from the candidate channel list corresponding to the current candidate channel, and jumping to the step of carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency corresponding to the channel.
7. The method of claim 1, wherein the target operating channel comprises at least one fundamental channel, the fundamental channel being a channel having a frequency of 20MHz, and wherein after step S3 the method further comprises:
determining the target working channel as a primary channel in the case that the target working channel contains only one of the base channels;
Under the condition that the target working channel comprises two basic channels, respectively calculating channel scores of the two basic channels to determine a main channel and an auxiliary channel based on the channel scores of the two basic channels;
in the case where the target working channel includes two or more of the base channels, channel scores of all of the base channels are calculated to determine a main channel and a center channel based on the channel scores of all of the base channels.
8. The method of claim 1, wherein the configuration parameters further comprise: a power type for constraining a signal transmission power, the method further comprising, after step S3:
and performing power configuration on the target working channel based on the power type.
9. An apparatus for automatically selecting a channel, the apparatus comprising:
the parameter sending module is used for receiving configuration parameters corresponding to the target working channel through the configuration interface;
the candidate determining module is used for determining a channel list candidate set to be scanned based on the country code, the bandwidth configuration parameter, the channel scanning mode and the dynamic bandwidth opening parameter in the configuration parameter, wherein the channel list candidate set is a set of channel lists matched with the configuration parameter;
The radar detection module is used for carrying out radar detection on each candidate channel in the candidate channel list according to the sequence from low frequency to high frequency of the corresponding channel to obtain a corresponding radar detection result;
a channel screening module, configured to remove, when the radar detection result indicates that the candidate channel is unavailable, a candidate channel list corresponding to the candidate channel from the channel list candidate set;
a channel scoring module, configured to calculate a channel score of the candidate channel based on the channel scanning interval time, the channel duty cycle reading period, and the channel duty cycle calculation parameter, if the radar detection result indicates that the candidate channel is available;
and the channel determining module is used for determining a target working channel from a plurality of candidate channels corresponding to the channel list candidate set based on the channel scores.
10. An AP device, comprising:
a processor and a memory having stored therein at least one instruction, at least one program, code set or instruction set that is loaded and executed by the processor to implement the channel automatic selection method according to any one of claims 1 to 8.
11. A computer readable storage medium having stored therein at least one instruction that is loaded and executed by a processor to implement the channel automatic selection method of any of claims 1 to 8.
CN202410302459.0A 2024-03-18 2024-03-18 Channel automatic selection method, device, AP equipment and storage medium Active CN117896794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410302459.0A CN117896794B (en) 2024-03-18 2024-03-18 Channel automatic selection method, device, AP equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410302459.0A CN117896794B (en) 2024-03-18 2024-03-18 Channel automatic selection method, device, AP equipment and storage medium

Publications (2)

Publication Number Publication Date
CN117896794A true CN117896794A (en) 2024-04-16
CN117896794B CN117896794B (en) 2024-05-28

Family

ID=90652142

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410302459.0A Active CN117896794B (en) 2024-03-18 2024-03-18 Channel automatic selection method, device, AP equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117896794B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151137A1 (en) * 2003-01-30 2004-08-05 Atheros Communications, Inc. Methods for implementing a dynamic frequency selection (DFS) feature for WLAN devices
US20170181178A1 (en) * 2015-12-22 2017-06-22 Airties Kablosuz Iletism Sanayi Ve Disticaret As Dynamic channel selection and dfs re-entry
CN107395297A (en) * 2017-07-07 2017-11-24 广州视源电子科技股份有限公司 A kind of channel selecting method of Wi-Fi hotspot, system and storage medium
US20180288614A1 (en) * 2017-03-30 2018-10-04 Intel Corporation WiFi PROTECTED ACCESS 2 (WPA2) PASS-THROUGH VIRTUALIZATION PARTITION
US20200100144A1 (en) * 2018-09-20 2020-03-26 Zih Corp. Systems and methods for dynamically adjusting scan algorithms
CN111935754A (en) * 2020-08-31 2020-11-13 广州朗国电子科技有限公司 AP hot spot channel automatic selection method, device, storage medium and terminal equipment
CN113453364A (en) * 2021-06-29 2021-09-28 展讯通信(天津)有限公司 Communication method, chip and electronic device
CN114423057A (en) * 2022-02-10 2022-04-29 Oppo广东移动通信有限公司 Channel switching method and device, AP (access point) equipment and storage medium
US20230299841A1 (en) * 2022-03-21 2023-09-21 Skydio, Inc. Dynamic Channel Selection For Unmanned Aerial Vehicles
CN117042093A (en) * 2023-09-06 2023-11-10 东南大学 WLAN heterogeneous terminal access control method based on Thompson sampling

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151137A1 (en) * 2003-01-30 2004-08-05 Atheros Communications, Inc. Methods for implementing a dynamic frequency selection (DFS) feature for WLAN devices
US20170181178A1 (en) * 2015-12-22 2017-06-22 Airties Kablosuz Iletism Sanayi Ve Disticaret As Dynamic channel selection and dfs re-entry
US20180288614A1 (en) * 2017-03-30 2018-10-04 Intel Corporation WiFi PROTECTED ACCESS 2 (WPA2) PASS-THROUGH VIRTUALIZATION PARTITION
CN107395297A (en) * 2017-07-07 2017-11-24 广州视源电子科技股份有限公司 A kind of channel selecting method of Wi-Fi hotspot, system and storage medium
US20200100144A1 (en) * 2018-09-20 2020-03-26 Zih Corp. Systems and methods for dynamically adjusting scan algorithms
CN111935754A (en) * 2020-08-31 2020-11-13 广州朗国电子科技有限公司 AP hot spot channel automatic selection method, device, storage medium and terminal equipment
CN113453364A (en) * 2021-06-29 2021-09-28 展讯通信(天津)有限公司 Communication method, chip and electronic device
CN114423057A (en) * 2022-02-10 2022-04-29 Oppo广东移动通信有限公司 Channel switching method and device, AP (access point) equipment and storage medium
US20230299841A1 (en) * 2022-03-21 2023-09-21 Skydio, Inc. Dynamic Channel Selection For Unmanned Aerial Vehicles
CN117042093A (en) * 2023-09-06 2023-11-10 东南大学 WLAN heterogeneous terminal access control method based on Thompson sampling

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BEHNAM DEZFOULI: "A Review of Software-Defined WLANs: Architectures and Central Control Mechanisms", IEEE COMMUNICATIONS SURVEYS & TUTORIALS, vol. 21, no. 1, 31 March 2019 (2019-03-31) *
秦国栋;: "基于ZigBee无线网络的农村地区沼气抄表系统研究", 黑龙江农业科学, no. 02, 10 February 2016 (2016-02-10) *

Also Published As

Publication number Publication date
CN117896794B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
US20220346001A1 (en) Dwelling cell method, terminal, and non-transitory storage medium
CN113170385B (en) Method and device for searching cell
US9113399B2 (en) Method for searching for a radio cell and mobile terminal
EP2632206B1 (en) Parallel Multi-Rat PLMN Search
US9510275B2 (en) Multi-RAT band scan
EP2965452B1 (en) Channel estimation for interference cancellation
CN103636276A (en) Control channel information sending method and device based on common cell networking
CN114423057B (en) Channel switching method, device, AP equipment and storage medium
JP2007116561A (en) Cell search method and mobile communication terminal
CN112333794B (en) Network connection method and device
CN117896794B (en) Channel automatic selection method, device, AP equipment and storage medium
CN111479213B (en) Evaluation method and device for position recommendation
CN112243272B (en) Pilot frequency switching method and device
CN111970750A (en) Multi-frequency WiFi identification method and device
CN114339807B (en) Cell selection reselection method, device, terminal and readable storage medium
CN113273249A (en) System and method for cell selection and reselection
CN112235848B (en) Network searching method, device, terminal and storage medium
CN112512099B (en) Cell residence method, terminal and storage medium
CN115278755A (en) Terminal static state determination method, device, chip, terminal and storage medium
CN112188573B (en) Cell residence processing method and device, terminal equipment and readable storage medium
CN117356142A (en) Network access method, parameter configuration method, device, equipment and storage medium
CN112203288B (en) SUL network planning method, device, equipment and storage medium
CN111543075B (en) Frequency band selection method and device
CN107466058B (en) Method and device for improving LTE base station residence ratio
Takeuchi et al. Radio environment prediction for cognitive radio

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant