Linux – How to connect to a specific Wi-Fi band (2.4 GHz or 5 GHz) or channel from wpa_cli or wpa_supplicant in Linux

linuxwireless-networkingwpa-supplicant

I am using the Wi-Fi chip on my board. I've successfully connected to Wi-Fi in the 2.4 GHz band, but for the 5 GHz Wi-Fi band I need to select the channel or band before connecting.

What extra arguments need to be given to the wpa_cli or wpa_supplicant utility so that it will connect to only the 5 GHz Wi-Fi band?

Best Answer

Tobi's answer is almost correct but they're the wrong way around, freq_list can be set outside the network block, but scan_freq can't: https://w1.fi/cgit/hostap/tree/wpa_supplicant/wpa_supplicant.conf#n861

Related Question