I recently installed Ubuntu Server 20.10 on my RPI 4B and cannot get wifi to work. I followed the instructions here, here, and here.
When I attempt to setup wifi via wpa_supplicant (the last link) with the command:
sudo wpa_supplicant -c /etc/wpa_supplicant.conf -i wlan0
I get the following:
Successfully initialized wpa_supplicant
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
wlan0: Failed to initiate sched scan
Upon checking the /etc/wpa_supplicant file I found that there is no wpa_supplicant.conf file and I cannot find instructions for creating one from scratch, or an example file. I think this is why I can't connect via wifi with my pi.
For setting up via netplan:
50-cloud-init.yaml file:
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eth0:
dhcp4: true
optional: true
version: 2
wifis:
wlan0:
access-points:
"XXXXXXXXX":
password: "XXXXXXXX"
dhcp4: true
optional: true
If it isn't the wpa_supplicant.conf file, I am out of ideas. It may be worth noting that I am trying to set this up with the ethernet cord attached because I am doing all this over ssh.
I tried the method shared by @tttapa in the comments I get the following output when I run sudo netplan --debug generate:
`DEBUG:command generate: running ['/lib/netplan/generate'] ** (generate:5090): DEBUG: 15:18:36.438: Processing input file /etc/netplan/10-my-config.yaml..
** (generate:5090): DEBUG: 15:18:36.439: starting new processing pass
** (generate:5090): DEBUG: 15:18:36.439: wlan0: adding wifi AP 'XXXXX'
** (generate:5090): DEBUG: 15:18:36.439: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:5090): DEBUG: 15:18:36.439: starting new processing pass
** (generate:5090): DEBUG: 15:18:36.439: wlan0: adding wifi AP ''
** (generate:5090): DEBUG: 15:18:36.439: We have some netdefs, pass them through a final round of validation
** (generate:5090): DEBUG: 15:18:36.439: wlan0: setting default backend to 1
** (generate:5090): DEBUG: 15:18:36.439: Configuration is valid
** (generate:5090): DEBUG: 15:18:36.439: eth0: setting default backend to 1
** (generate:5090): DEBUG: 15:18:36.439: Configuration is valid
** (generate:5090): DEBUG: 15:18:36.440: Generating output files..
** (generate:5090): DEBUG: 15:18:36.440: openvswitch: definition eth0 is not for us (backend 1)
** (generate:5090): DEBUG: 15:18:36.440: NetworkManager: definition eth0 is not for us (backend 1)
** (generate:5090): DEBUG: 15:18:36.440: Creating wpa_supplicant config
** (generate:5090): DEBUG: 15:18:36.440: wlan0: Creating wpa_supplicant configuration file run/netplan/wpa-wlan0.conf
ERROR: : ASCII passphrase must be between 8 and 63 characters (inclusive)`
It seems netplan is checking the 50-cloud-init.yaml, despite running the command sudo bash -c "echo 'network: {config: disabled}' > /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg" before executing the generate command and rebooting.