When you install Ubuntu via rpi-imager, did you setup the Wireless setting? If yes did you use the wrong SSID or password or something?
Try these steps:
- Reflash a copy of Ubuntu server for Raspberry Pi
- In the settings, do not fill in your wifi details.
- Insert the microsd into the Pi
- Connect a network cable from your router straight to the Pi. Your router should have DHCP server running. This DHCP server will give an IP address to your Pi. Without a IP address your Pi will not be able to connect to the Internet. Double check your router that it is giving out a DHCPv4 address. (It may be possible you are using IPv6 only over at your place).
- Power on the Pi.
- Wait a few minutes and make sure the LED lights on the Pi is lit up. If the LED lights are up, then you will at least rule out physical connectivity problems.
- Log in to your router, and look under your LAN (Local Area Network) settings. You should see a list of clients and your RPi must be in it.
If you followed the above, your network configuration (/etc/netplan/50-cloud-init.yaml) should look like this:
# 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
So what this configuration is saying is I want to use eth0 (wired Ethernet), and it will get a IP automatically from a DHCP server.
Technically if you modify this file and use the above settings, your Pi will be connected to the Internet (bar some weird hardware failure).