6

What is says in the topic: there's a Wireless N access point to which I'd like to connect using the 5 GHz band exclusively. How does one accomplish this? Using the directive band=a in the connection configuration file in /etc/NetworkManager/system-connections doesn't seem to affect anything (/var/log/syslog still shows attempts by wpa_supplicant to connect using the 2.4 GHz band), and running iwconfig wlan0 freq 5G per this question results in the following error:

Error for wireless request "Set Frequency" (8B04) :
    SET failed on device wlan0 ; Invalid argument.

[Edit] I'm hoping the answer won't depend on the hardware in use, but here's some information about the hardware, just in case:

System is an Asus ZenBook Prime UX31A-DB51, running Ubuntu 12.04.

lspci output:

00:00.0 Host bridge: Intel Corporation Ivy Bridge DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Ivy Bridge Graphics Controller (rev 09)
00:04.0 Signal processing controller: Intel Corporation Device 0153 (rev 09)
00:14.0 USB controller: Intel Corporation Panther Point USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation Panther Point MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation Panther Point High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation Panther Point PCI Express Root Port 2 (rev c4)
00:1d.0 USB controller: Intel Corporation Panther Point USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Panther Point LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation Panther Point 6 port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation Panther Point SMBus Controller (rev 04)
00:1f.6 Signal processing controller: Intel Corporation Panther Point Thermal Management Controller (rev 04)
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6235 (rev 24)

The driver for the wireless interface is iwlwifi.

cqcallaw
  • 1,113
  • This looks like something hardware specific, so what wireless card do you have, and what drivers do you have for it? – nanofarad Oct 17 '12 at 22:44
  • I'ld be looking at going around this one at setting the channel number instead to something only found in the 5Ghz band: http://en.wikipedia.org/wiki/List_of_WLAN_channels#5.C2.A0GHz_.28802.11a.2Fh.2Fj.2Fn.29.5B13.5D – RobotHumans Oct 18 '12 at 08:29
  • Related: https://askubuntu.com/questions/183525/how-to-set-wifi-driver-settings-to-prefer-5-ghz-channel-above-2-4-ghz – Gabriel Staples Sep 01 '20 at 06:01

1 Answers1

8

Using iwlwifi on 12.10,

iwconfig wlan0 channel 36

or

iwconfig wlan0 freq 5.18G

works

You MUST specify the channel (or exact corresponding frequency). Specfifying the frequency band (iow. just "5G") does not work.

Note that some dual-band/dual-radio access points (maybe only those of the "enterprise" category) can/should use "band steering" (aka. "frequency handoff"): the AP detects 5G-able clients and disconnect them from the 2.4G band to force them off to the 5G band. It may takes some time for this "trick" to take place, though.

  • of course, specify the channel/frequency that you have configured on your AP ;-) – Cédric D. Feb 26 '13 at 07:17
  • 2
    Does not work for me. I get SET failed on device wlp3s0 ; Device or resource busy. – Huygens Aug 28 '15 at 13:14
  • 1
    @Huygens bring your device down first ifconfig wlp3s0 down, set iwconfig, and bring it back up again – naisanza Oct 07 '17 at 18:19
  • 1
    @naisanza thanks. Since then I had a new laptop, a newer Ubuntu and a newer WiFi AP, I can't tell which of these change(s) did the trick but now most of the time I'm on the 5GHz band automatically. But thanks anyway for the feedback. – Huygens Oct 07 '17 at 19:03
  • Note that you can find out which channel is your 5GHz network with this: iwlist wlan0 scanning | grep -C5 -i '\"my_network_name\"'. 2.4GHz channels include 01, 02, 03, etc. through 11, and 5GHz channels are just 36, 40, 44, and 48. I first learned the iwlist command from here: https://askubuntu.com/a/631329/327339. – Gabriel Staples Sep 01 '20 at 06:17
  • Also, this answer doesn't work at all for me. Note that I'm on Ubuntu 20.04 and have also followed this answer here too to use iwd instead of wpa_supplicant so my 2.4Ghz would work at all on my new MU-MIMO EAP225-Outdoor long range wireless Access Point. – Gabriel Staples Sep 01 '20 at 06:21