802.11ac was supposed to be compatible with Pi 4, right? I recently tried using 802.11ac only to maximize the WiFi performance, but as soon as I did that, the Pi disconnected I have & to enable 802.11n in order for the Pi to connect to that SSID.

When I used nmcli dev wifi connect password I get the error saying "secrets were required but not provided", even with the --ask option.

I have Ubuntu Server 20.04 on my Raspberry Pi 4B 2GB, which I'm using as my AirPlay receiver.

I tried using Netplan based on this solution after reinstalling Ubuntu Server, but WiFi remained disconnected unless I reenable 802.11n.

  • The wifi chip may be potentially fried OR it may be a faulty chip James
    – James
    Oct 25, 2020 at 16:49
  • Ubuntu Server does not use Network Manager (unless you installed a Desktop), so nmcli won't help. You should ask on a Ubuntu site. Configuration using yaml should be independent of hardware (other than device names).
    – Milliways
    Oct 26, 2020 at 0:19

1 Answer 1


It seems you are not the only one:


The problem appears to be an incorrect country code in wpa_supplicant.conf. These are significant because of different national restrictions on available channels in the frequency range.

Here's a list of 802.11 country codes.

Ubuntu may not expose or intend you to edit wpa_supplicant.conf directly, but you should still be able to set the country code one way or another; see comments below.

  • AFAIK Ubuntu Server does not use wpa_supplicant although country code is probably the problem. It is possible to use wpa_supplicant with networkd-systemd but this differs from Raspbian setup.
    – Milliways
    Oct 26, 2020 at 0:15
  • I think it probably does (I do not think there are any options available besides iwd.wiki.kernel.org), but it may not expose the configuration the same way because it is integrated differently (the config is derived from the netplan yaml stuff).
    – goldilocks
    Oct 26, 2020 at 14:51
  • Hmm there is a (non-authoritative) note here about where to put the country code w/ netplan, in a Pi context: gist.github.com/Jiab77/76000284f8200da5019a232854421564 (search down for "country code"). It also mentions this is an issue there (the country code set incorrectly).
    – goldilocks
    Oct 26, 2020 at 14:55

Your Answer

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

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