mini Lab, more of a warm up Lab
WLAN Pi comes with a small CLI tool called wifichannel
This tool began as a simple conversion utility, for switching between channel numbers and centre frequencies.
Query wifichannel
with the command
The output gives you information about channel 7
Band: 2.4 GHz Channel: 6 Center freq: 2437 MHz``
Recommended: Yes
Band: 6 GHz Channel: 17 Center freq: 6035 MHz``
PSC: No
``Lower 6 GHz
Band: 5 GHz Channel: 60``
Center freq: 5300
``MHz U-NII-2A
Band: 6 GHz``
Channel: 21
``PSC: Yes Lower 6 GHz
This command will help you if you are ever in doubts:
Note the Lower 6 GHz and Upper 6 GHz channels.
In the FCC regulatory domain, we can use the entire band including the lower and upper 6 GHz channels.
In the ETSI and Ofcom regulatory domains, they can only use the Lower 6 GHz channels.
You can filter the output of most command line utilities to make the output more efficient.
How many channels in the 2.4 GHz band are 'recommended'?
First, run the command to display all 2.4 GHz channels:
You could count the lines manually, but there is no need. Computers can already do that, really fast.
Using a Linux utility called grep
we can filter the output to only include lines that match an expression (a particular string or pattern):
Be precise with your search terms (strings), capitalisation matters.
Finally, we can simply count the number of lines returned by the command using word count, that command looks like this:
The wc
command has nothing to do with restrooms 😉
It stands for "word count" and the "l"
argument stands signifies lines.
3
You already knew that... right.
but... this filtering allows you to quickly get an answer from the output of command line tools.
If you would like, you can install wifichannel on your laptop and use it even more often. Here are the instructions.