1

In my environment two wifi channels are available but my Linux client is connect to 2.5 GHz channel only. Is there any solution to force the linux client to connect to 5 GHz channel only. If i disable the 2.5 GHz from Access point it works but i need any solution from Linux side? All the Access points have same SSID and we are not allowed to change it.

  • Maybe your network device supports only 2.4GHz – sticsk Jul 23 '18 at 10:44
  • if i disable the 2.4GHz it connects to 5GHz but some other devices available on same frequency so not possible to disable it. – TUX Jul 23 '18 at 10:49
  • Maybe this helps: How to disable “N” Wireless Mode RTL8192on a Thinkpad Edge 15 Core i5: but the question is old; not sure whether it still applies. – PerlDuck Jul 23 '18 at 10:51
  • @PerlDuck i check the link but the command "sudo iwconfig wlan0 modu 11g" not work on my system. Error "command not found" – TUX Jul 23 '18 at 10:55
1

Here is one possible solution, where you do not use network-manager anymore to manage your wireless interface, but you directly use wpa_supplicant. This means in Ubuntu you won't have the convenience anymore to use your GUI to select between networks.

Here is what you need to do:

1
Enter this to your /etc/network/interfaces file (replace wlan0 with the name of your wireless interface):

auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

This will cause network-manager not to manage the interface wlan0 anymore.
If you want to revert this behaviour, please simply comment out what you added in this file.

2 Create/edit the file /etc/wpa_supplicant/wpa_supplicant.conf with the following content:

ctrl_interface=/var/run/wpa_supplicant

network={
    ssid="Your_AP"
    psk="Your_Passphrase"
    freq_list=2412 2437 2462
}

The values after freq_list have to be adapted by you. They secify the center frequency of the allowed channels to which you want to connect. In the case of the above example, I have added the channels 1, 6 and 11 of the 2.4 GHz band. The center frequencies for the 5 GHz band can be found e.g. in Wikipedia.

  • I created the two differant SSID's for two band 1 for 2.4GHz and 1 for 5GHz. – TUX Aug 3 '18 at 3:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.