Package ieee80211_channels :: Module channels :: Class IEEE80211_Channels
[frames] | no frames]

Class IEEE80211_Channels

source code

This class implements IEEE802.11 frequency <---> (channel, band) mapping.

Static Methods
string
get_band_from_freq(freq)
Retrieves the band a frequency belongs to.
source code
int
get_channel(freq)
Returns the channel number corresponding to a frequency.
source code
long
get_freq(channel, band)
Returns the frequency corresponding to a given channel and band.
source code
Class Variables
  BAND_2400_MHz = '2400MHz band'
2.4GHz band
  BAND_3600_MHz = '3600MHz band'
3.6GHz band
  BAND_5000_MHz = '5000MHz band'
5GHz band
  BAND_UNKNOWN = 'Unknown band'
unknown band
Method Details

get_band_from_freq(freq)
Static Method

source code 

Retrieves the band a frequency belongs to.

Parameters:
  • freq (long) - the frequency in Hz
Returns: string
the frequency band (see the class constants)

get_channel(freq)
Static Method

source code 

Returns the channel number corresponding to a frequency.

Parameters:
  • freq (long) - the frequency in Hz
Returns: int
channel number or -1 if the frequency is not a valid IEEE802.11 channel

get_freq(channel, band)
Static Method

source code 

Returns the frequency corresponding to a given channel and band.

Parameters:
  • channel (int) - the channel number
  • band (string) - the frequency band (one of the class defined constants should be given)
Returns: long
frequency in Hz or -1 if the (channel, band) combination is not valid