5

My current /etc/netplan/wifi.yaml looks like this:

network:
  version: 2
  renderer: networkd
  wifis:
    wlan0:
      dhcp4: yes
      optional: true
      access-points:
        "myssid":
          "mypw"

Then netplan generate produces /run/netplan/wpa-wlan0.conf:

ctrl_interface=/run/wpa_supplicant

network={ ssid="myssid" key_mgmt=WPA-PSK psk="mypw" }

How to add country=NL to it without losing it after the next netplan generate?

Or is there another way to specify the Wi-Fi region?

I'm running Ubuntu 20.10 on Raspberry Pi 4 64-bit, if it matters.

rustyx
  • 1,066
  • 15
  • 17

2 Answers2

2

Netplan supports a regulatory-domain: NL setting, as of v0.105, so you should be able to adopt your configuration to something like this:

network:
  version: 2
  renderer: networkd
  wifis:
    wlan0:
      regulatory-domain: "NL"
      dhcp4: yes
      optional: true
      access-points:
        "myssid":
          "mypw"

See: https://netplan.io/reference#properties-for-device-type-wifis

Slyon
  • 462
-1

Just try the iw reg way:

iw reg set

from: https://wiki.archlinux.org/title/Network_configuration/Wireless#Device_driver