0

I'm trying to configure wifi on my Raspberry Pi 4b. I use ssh connection and I have already enter my wi-fi SSID and password in raspi-config utilite. But wifi didn't turn on, so I decided to look at wlan connection:

pi@raspberrypi:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:5f:01:0b:3e:e4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.17/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
       valid_lft 85795sec preferred_lft 74995sec
    inet6 fe80::220f:8f7b:1157:8bf9/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether e4:5f:01:0b:3e:e6 brd ff:ff:ff:ff:ff:ff

Where I noticed that wlan0 is down. Then I google how to set it up and use:

pi@raspberrypi:~ $ sudo ip link set wlan0 up
pi@raspberrypi:~ $ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether e4:5f:01:0b:3e:e4 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.17/24 brd 192.168.0.255 scope global dynamic noprefixroute eth0
       valid_lft 85783sec preferred_lft 74983sec
    inet6 fe80::220f:8f7b:1157:8bf9/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether e4:5f:01:0b:3e:e6 brd ff:ff:ff:ff:ff:ff

As you can see, it makes nothing. How can I change wlan state to UP and configure wifi connection? Thank you!

UPD: As @milliways asked, here is systemctl status dhcpcd output

pi@raspberrypi:~ $ systemctl status dhcpcd
● dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/dhcpcd.service.d
           └─wait.conf
   Active: active (running) since Mon 2021-04-05 22:07:42 BST; 1 day 17h ago
 Main PID: 573 (dhcpcd)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/dhcpcd.service
           ├─475 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
           └─573 /sbin/dhcpcd -q -w

Apr 05 22:07:34 raspberrypi dhcpcd[378]: eth0: adding address fe80::220f:8f7b:1157:8bf9
Apr 05 22:07:34 raspberrypi dhcpcd[378]: eth0: rebinding lease of 192.168.0.17
Apr 05 22:07:34 raspberrypi dhcpcd[378]: eth0: soliciting an IPv6 router
Apr 05 22:07:37 raspberrypi dhcpcd[378]: eth0: probing address 192.168.0.17/24
Apr 05 22:07:42 raspberrypi dhcpcd[378]: eth0: leased 192.168.0.17 for 86400 seconds
Apr 05 22:07:42 raspberrypi dhcpcd[378]: eth0: adding route to 192.168.0.0/24
Apr 05 22:07:42 raspberrypi dhcpcd[378]: eth0: adding default route via 192.168.0.1
Apr 05 22:07:42 raspberrypi dhcpcd[378]: forked to background, child pid 573
Apr 05 22:07:42 raspberrypi systemd[1]: Started dhcpcd on all interfaces.
Apr 05 22:07:47 raspberrypi dhcpcd[573]: eth0: no IPv6 Routers available

UPD-2: wpa_supplicant.conf file:

pi@raspberrypi:/etc/wpa_supplicant $ cat wpa_supplicant.conf 
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=RU

network={
    ssid="RT-WIFI-4741"
    psk="pa55c0de"
}
6
  • 1
    It is unclear WHAT you have done. "set up wifi ESSID and password in raspi-config" is vague. What does systemctl status dhcpcd show? ip link set wlan0 up won't do anything useful. – Milliways Apr 5 at 23:40
  • @Milliways Thank you! I've updated my question – DKay Apr 7 at 14:44
  • 1
    The listing looks normal, but is not finding a wireless network. You need to check the contents of /etc/wpa_supplicant/wpa_supplicant.conf (the ` Drop-In: /etc/systemd/system/dhcpcd.service.d` looks suspicious so you need to clarify anything else you have done) – Milliways Apr 8 at 0:38
  • @Milliways, Thank you, I added the information to the question (and ofc changed my passcode). – DKay Apr 8 at 11:56
  • @Milliways, Damn, sorry, I enter the wrng SSID, it's actually RT-WiFi-4741, not RT-WIFI-4741. Thank you for helping! – DKay Apr 8 at 12:27
1

As you can see, it makes nothing.

Because the interface is already up!

3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
      This is what 'ip link set' controls ^^                         Not this ^^^^

What toggling the first one actually means may depend on the interface type1, but one thing in practical terms is that you can configure an interface in an "UP" state (eg., give it an IP address -- but that does not mean the IP will work for anything just by doing so), which you cannot do to one which is "DOWN".

So having the first one "UP" is pre-requisite to getting the second one so (which indicates actual network connectivity), but all by itself generally not sufficient to do so.


  1. Eg., You may see "LOWER_UP" there for some things which I think indicates an L1 (physical layer) state.
1
  • Thank you, it's clear for me now! – DKay Apr 8 at 12:43

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