When we want the WLAN Pi to join a Wi-Fi network, we need to provide configuration details to wpa_supplicant, which is the software responsible for connecting the Pi as a client to Wi-Fi networks. The configuration file is located in /etc/wpa_supplicant/wpa_supplicant.conf.
We want to connect to our assigned SSID.
Either WLAN Pi 6 AP1 or WLAN Pi 6 AP2.
Modify the file configuration file using nano text editor (vi and vim are also present):
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Scroll to the bottom of the file, copy and paste the configuration below to the file.
Make sure you consciously configure the SSID you wish to attempt connection to!
In the SSID value below, change APX to your assigned AP.
sae_pwe=1
network={
ssid="WLAN Pi 6 APX"
psk="deep-dive"
key_mgmt=SAE
ieee80211w=2
}
Save changes by pressing Ctrl+o (that's letter "o"), then press Enter to confirm.
Exit the text editor using Ctrl+x.
To support the latest SAE configuration options (namely sae_pwe for H2E which is required in 6 GHz), wpa_supplicant 2.10 or newer is required. We've already preinstalled this for you.
There is a FPMS feature to verify Wi-Fi connectivity too. Use joystick to open menu, go to Network > WLAN Interfaces and you can see current SSID and channel there.
Step 3b: Ensure you have an IP address
To use the connection, the wlan0 interface needs to have an IP address.
Managing static IP addresses (not required in this lab)
In your real world applications, you may find that you need to manage a static IP. You can do this by editing the content of /etc/network/interfaces
In our lab we are using DHCP so the wlan0 configuration looks like this (Note static addresses are commented and not used)
We are using DHCP in the lab so wlan0 should automatically get an IP address. Note the configuration for wlan0 inet
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether e4:60:17:64:f5:23 brd ff:ff:ff:ff:ff:ff
inet 192.168.98.21/24 brd 192.168.98.255 scope global dynamic wlan0
If there is no IP address in the inet field you can run the following command to request an IP address for the wlan0 interface:
sudo dhclient -i wlan0 -v
You can check your IP address again using the ip a s wlan0 command, but you should be ready to go now.
Alternatively, use the on-screen menu Network > Interfaces to verify IP addresses assigned to all WLAN Pi interfaces.
Step 4: What is our Tx and Rx current data rate?
There is even a more aesthetically pleasing tool called wavemon
Execute it by entering the following command:
wavemon
Some of the information displated by this tool is incorrect. Please take channel number and some other details with a pinch of salt. The tool needs to be updated by its maintainer, but it still provides great value and shows live Wi-Fi details.
Step 5: 6 GHz channel math
How does channel number 69 relate to the lower 6 GHz (500 MHz) spectrum available in the ETSI and Ofcom regulatory domains? Let's use one of the CLI tools created by WLAN Pi to list all lower 6 GHz channels.
wifichannel -6 | grep Lower
The first part wifichannel -6 lists all 6 GHz channels and we "pipe" this output to grep, which then filters only Lower 6 GHz channels. Should produce an output like this:
Band: 6 GHz Channel: 1 Center freq: 5955 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 5 Center freq: 5975 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 9 Center freq: 5995 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 13 Center freq: 6015 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 17 Center freq: 6035 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 21 Center freq: 6055 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 25 Center freq: 6075 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 29 Center freq: 6095 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 33 Center freq: 6115 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 37 Center freq: 6135 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 41 Center freq: 6155 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 45 Center freq: 6175 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 49 Center freq: 6195 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 53 Center freq: 6215 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 57 Center freq: 6235 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 61 Center freq: 6255 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 65 Center freq: 6275 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 69 Center freq: 6295 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 73 Center freq: 6315 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 77 Center freq: 6335 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 81 Center freq: 6355 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 85 Center freq: 6375 MHz PSC: Yes Lower 6 GHz
Band: 6 GHz Channel: 89 Center freq: 6395 MHz PSC: No Lower 6 GHz
Band: 6 GHz Channel: 93 Center freq: 6415 MHz PSC: No Lower 6 GHz
How many channels are we talking? You could count them manually, orβ¦
wifichannel -6 | grep Lower | wc -l
Word count wc command with argument -l is a useful filter command, which counts the number of lines in our output.
How many upper channels are there which 500 MHz regdoms missing out on?
wifichannel -6 | grep Upper | wc -l
How many total 6 GHz channels are there?
wifichannel -6 | wc -l
Bonus: 6 GHz PSC channels
Can you use the above wifichannel command example to count the total number of PSCs (Preferred Scanning Channels) in the full 6 GHz Wi-Fi spectrum?
See the correct answer by clicking the second tab.