1

So I recently bought a raspberry pi, and I am trying to install ubuntu server 20.04 on it. I can't seem to configure wireless networking. I've tried editing the 50-cloud-init.yaml file and it doesn't seem to work. I've googled my issue and haven't been able to fix it.

50-cloud-init.yaml looks as follows

network:
   ethernets:
       eth0:
           dhcp4: true
           optional: true
       wlan0:
           access-points:
               "newgateway_5GHz":
                  password: "clearfield"
           version: 2

When I run sudo netplan --debug try I get the message /etc/netplan/50-cloud-init.yaml:12:13: Error in network definition: unknown key 'access-points' I've edited the file in many different ways, I've used sudo nano /etc/netplan/50-cloud-init.yaml to edit the file as well as after installing it, as well as opening the partition on the sd card and went to network-config and changed it that way.

I've googled my problem and I've had no, luck any ideas?

Barmann111
  • 13
  • 1
  • 5

1 Answers1

3

From the examples on netplan.io, I would assume your file should look something like this:

network:
    version: 2
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    wifis:
        wlan0:
            access-points:
                "my_ssid":
                    password: "my_password"
            dhcp4: true
            optional: true

3 obvious errors in your file was:

  1. that version: 2 had incorrect indentation,
  2. that you defined your AP under the ethernets section, where it should be under the wifis section, and
  3. that you missed the dhcp4: true statement for your wifi.

In addition, you might need to run these commands:

sudo systemctl enable wpa_supplicant
sudo systemctl start wpa_supplicant
sudo netplan generate
sudo netplan apply

I hope this works out.

Artur Meinild
  • 21,605
  • 21
  • 56
  • 89
  • I'm currently trying it but it's not looking good I've rebooted a couple of times and at boot, i get the message A start job is running for Wait for Network to be Configured. Then it fails – Barmann111 Mar 17 '21 at 14:11
  • Try adding `optional: true` to your wlan0 adapter as well. – Artur Meinild Mar 17 '21 at 14:14
  • Alternatively, there may be [other solutions here](https://askubuntu.com/questions/972215/a-start-job-is-running-for-wait-for-network-to-be-configured-ubuntu-server-17-1), for startup jobs waiting for network connection. – Artur Meinild Mar 17 '21 at 14:16
  • That fixed the stalled boot but still no wifi connection. – Barmann111 Mar 17 '21 at 14:31
  • Possibly see [this answer](https://askubuntu.com/questions/1291424/failed-to-start-netplan-wpa-wlan0-sevice-unit-netplan-wpa-wlan0-service-not-fou) for more troubleshooting with wpa_supplicant and netplan-wpa service. – Artur Meinild Mar 17 '21 at 14:35
  • okay I'll try that and get back to you, thanks for your help – Barmann111 Mar 17 '21 at 14:37
  • Running through that steps on that thread got it working thank you so much for your help – Barmann111 Mar 17 '21 at 14:52
  • Good to hear. I added those commands to my answer as well, so please accept it as solved. Thanks. – Artur Meinild Mar 17 '21 at 14:52
  • I'm new to this site how do I do that? – Barmann111 Mar 17 '21 at 15:21