2

My Raspberry Pi 4 can access some wifi channels, but not all of them.

My question is: How can I get it to access all the wifi channels it is supposed to be able to use in Canada?

It is configured for Canada:

pi@octopi:~ $ sudo iw reg get
[sudo] password for pi: 
global
country CA: DFS-FCC
        (2402 - 2472 @ 40), (N/A, 30), (N/A)
        (5150 - 5250 @ 80), (N/A, 23), (N/A), NO-OUTDOOR, AUTO-BW
        (5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
        (5470 - 5600 @ 80), (N/A, 24), (0 ms), DFS
        (5650 - 5730 @ 80), (N/A, 24), (0 ms), DFS
        (5735 - 5835 @ 80), (N/A, 30), (N/A)

Canada allows the 5 GHz channels 32-165 (with a few exceptions). The Pi, however, is missing channels 68-144:

pi@octopi:~ $ sudo iwlist wlan0 channel
wlan0     24 channels in total; available frequencies :
          Channel 01 : 2.412 GHz
          Channel 02 : 2.417 GHz
          Channel 03 : 2.422 GHz
          Channel 04 : 2.427 GHz
          Channel 05 : 2.432 GHz
          Channel 06 : 2.437 GHz
          Channel 07 : 2.442 GHz
          Channel 08 : 2.447 GHz
          Channel 09 : 2.452 GHz
          Channel 10 : 2.457 GHz
          Channel 11 : 2.462 GHz
          Channel 36 : 5.18 GHz
          Channel 40 : 5.2 GHz
          Channel 44 : 5.22 GHz
          Channel 48 : 5.24 GHz
          Channel 52 : 5.26 GHz
          Channel 56 : 5.28 GHz
          Channel 60 : 5.3 GHz
          Channel 64 : 5.32 GHz
          Channel 149 : 5.745 GHz
          Channel 153 : 5.765 GHz
          Channel 157 : 5.785 GHz
          Channel 161 : 5.805 GHz
          Channel 165 : 5.825 GHz
          Current Frequency:5.765 GHz (Channel 153)

The channels that the RPI4 supports are exactly the ones that Wikipedia says are supported in Mainland China.

My /etc/wpa_supplicant/wpa_supplicant.conf:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CA

network={
        ssid="Printer"
        psk="************"
}

My /boot/octopi-wpa-supplicant.txt:

# Use this file to configure your wifi connection(s).
#
# Just uncomment the lines prefixed with a single # of the configuration
# that matches your wifi setup and fill in SSID and passphrase.
#
# You can configure multiple wifi connections by adding more 'network'
# blocks.
#
# See https://linux.die.net/man/5/wpa_supplicant.conf
# (or 'man -s 5 wpa_supplicant.conf') for advanced options going beyond
# the examples provided below (e.g. various WPA Enterprise setups).
#
# !!!!! HEADS-UP WINDOWS USERS !!!!!
#
# Do not use Wordpad for editing this file, it will mangle it and your
# configuration won't work. Use a proper text editor instead.
# Recommended: Notepad++, VSCode, Atom, SublimeText.
#
# !!!!! HEADS-UP MACOSX USERS !!!!!
#
# If you use Textedit to edit this file make sure to use "plain text format"
# and "disable smart quotes" in "Textedit > Preferences", otherwise Textedit
# will use none-compatible characters and your network configuration won't
# work!

## WPA/WPA2 secured
network={
  ssid="Printer"
  psk="**********"
}

## Open/unsecured
#network={
#  ssid="put SSID here"
#  key_mgmt=NONE
#}

## WEP "secured"
##
## WEP can be cracked within minutes. If your network is still relying on this
## encryption scheme you should seriously consider to update your network ASAP.
#network={
#  ssid="put SSID here"
#  key_mgmt=NONE
#  wep_key0="put password here"
#  wep_tx_keyidx=0
#}

# Uncomment the country your Pi is in to activate Wifi in RaspberryPi 3 B+ and above
# For full list see: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
#country=GB # United Kingdom
country=CA # Canada
#country=DE # Germany
#country=FR # France
#country=US # United States

### You should not have to change the lines below #####################

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
6
  • 5
    what is your question?
    – jsotola
    Commented Nov 8, 2020 at 20:40
  • 1
    Going by the system name are you running Octopi? If so a copy of the /boot/octopi-wpa-supplicant.txt will help (assuming v0.15 or above). I guess you have CN rather than CA somewhere... I'm not sure nationality was settable before v0.15
    – user115418
    Commented Nov 9, 2020 at 0:16
  • Some two years ago I bought a 2G/5G WiFi router but was very disappointed that Rpi4B could not use 5G. I googled and found linux experts reporting the same problem: 5G is not for Rpi buster (and some other linux variants). It seems to be a firmware setting problem and unsolvable. I reported this problem twice in this forum but nobody commented on it. So I have been using Rpi4B using 2.6GH but no 5GHz WiFi for two years. Anybody found a solution, please let me (@tlfong01) know, and I am glad to update my out of date info of No 5GHz WiFi for Rpi.. Much appreciated.
    – tlfong01
    Commented Nov 9, 2020 at 1:07
  • 1
    @tlfong01 On my Pi4 w/Buster, 5GHz WiFi worked out of the box. Could the problem be in your router? Commented Nov 10, 2020 at 10:34
  • @Dmitry Grigoryev, many thanks for confirming that Rpi4 w/Buster can do WiFi 5GHz out of the box. (1) As I mentioned in my comment, I encountered the No 5GHz problem and after struggling for one or two hours, I gave up and searched rpi.org forum where I found that the cause was related to linux kernel/driver setting and no linux expert/hacker could suggest any fix. (2) Anyway, I will later try again. If it works now, then it likely that the linux kernel/driver has updated (I am not surprised because everybody then was upset!). / to continue, ...
    – tlfong01
    Commented Nov 10, 2020 at 14:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.