πŸ“™
WLAN Pi Cookbook
2023 M4
2023 M4
  • 😎Getting Started
    • 🎁WLAN Pi M4
      • πŸ–¨οΈPhysical Case Design
    • πŸ“žHow to talk to your WLAN Pi
    • πŸ”ΌDisplay and Buttons (FPMS)
      • βš™οΈInitial setup items
    • πŸ•ΈοΈWebUI
    • πŸ§‘β€βœˆοΈCockpit
      • ⌨️Terminal
    • πŸ“ΊSoftware Update
    • πŸ“”Quick Reference
    • ⚑Powering Down
    • πŸ’¬Project Feedback & Documentation
  • πŸ”¦Wi-Fi Scanner
    • πŸͺŸWiFi Scanner (Windows)
    • 🍏Wi-Fi Explorer Pro 3 (macOS)
    • 🚨Kismet
      • πŸ§ͺKismet
  • πŸ“±Tailscale
    • 🌎Remote Access
  • πŸ€“Wi-Fi Frame Capture
    • βš™οΈSetup Instructions
      • πŸͺŸWindows Setup
        • 🦈Wireshark 3.x
          • 1️⃣ Python
          • 2️⃣ Wireshark 3.x (Windows)
        • 🚨Wireshark 4.0
      • 🍏macOS Setup
        • 1️⃣ Wireshark (macOS)
        • 2️⃣ Airtool 2
      • πŸ“±Bonus: iOS Setup
    • πŸ§ͺLabs
      • πŸͺŸWindows Capture Lab
      • 🍏macOS Capture Lab
    • 🦈Wireshark Resources
    • 🎁Password-less SSH
  • πŸ”Profiler
    • 🎁Extra Profiler tasks
  • πŸ”§Wi-Fi Channel Tool (wifichannel)
  • 6️⃣ Wi-Fi 6E Client
  • πŸ’»Wi-Fi Console Mode
  • ♨️Hotspot Mode
  • πŸ€·β€β™‚οΈServer Mode
Powered by GitBook
On this page
  • Channel maths
  • List all channels
  • Filter output with Linux filters (grep)

Was this helpful?

Export as PDF

Wi-Fi Channel Tool (wifichannel)

you can think of this as a warm up exercise

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.

Channel maths

Query wifichannel with the command

wifichannel 7

The output gives you information about channel 7

wifichannel 6

Band: 2.4 GHz Channel: 6 Center freq: 2437 MHz`` Recommended: Yes

wifichannel 17

Band: 6 GHz Channel: 17 Center freq: 6035 MHz`` PSC: No ``Lower 6 GHz

wifichannel 60

Band: 5 GHz Channel: 60`` Center freq: 5300 ``MHz U-NII-2A

wifichannel 6055

Band: 6 GHz`` Channel: 21 ``PSC: Yes Lower 6 GHz

List all channels

Display all 2.4 GHz channels:

wifichannel -2

Display all 5 GHz channels:

wifichannel -5

How would you display all 6 GHz channels?

This command will help you if you are ever in doubts:

wifichannel -h
wifichannel -6

Note the Lower 6 GHz and Upper 6 GHz channels. In Czech Republic and most of Europe, we can only use the Lower 6 GHz channels.

Filter output with Linux filters (grep)

You can filter the output of most command line utilities to make the output more efficient.

Example

How many channels in the 2.4 GHz band are 'recommended'?

First, run the command to display all 2.4 GHz channels:

wifichannel -2

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 contain "a particular string or pattern":

wifichannel -2 | grep "Recommended: Yes"

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:

wifichannel -2 | grep "Recommended: Yes" | wc -l

The wc command has nothing to do with restrooms πŸ˜‰ It stands for "word count" and its "l" parameter stands for lines.

3

You already knew that... right.

but... this filtering allows you to quickly get an answer from the output of command line tools.

PreviousExtra Profiler tasksNext6️⃣ Wi-Fi 6E Client

Last updated 7 months ago

Was this helpful?

πŸ”§