Required Information
-
DietPi version
G_DIETPI_VERSION_CORE=8
G_DIETPI_VERSION_SUB=15
G_DIETPI_VERSION_RC=2
G_GITBRANCH=‘master’
G_GITOWNER=‘MichaIng’
G_LIVE_PATCH_STATUS[0]=‘not applicable’ -
Distro version
bullseye 1 -
Kernel version
Linux DietPi 6.1.19+ #1637 Tue Mar 14 11:01:56 GMT 2023 armv6l GNU/Linux -
SBC model
RPi B (armv6l) -
Power supply used | (EG: 5V 1A RAVpower)
Generic 5V 1A -
SD card used
Toshiba SD - K16G (16Gigs)
Steps to reproduce
- Turn on DietPi and Wi-Fi is connected. Reboot the Pi and after boot up, Wi-Fi will not connect to modem/router (the only one in the apartment) for some reason.
- Perform a clean shutdown from the terminal (after connecting keyboard) and booting up again solves the issue. Wi-Fi is up again!
Expected behaviour
Wi-Fi should be up whether it’s from a restart or shutdown.
Actual behaviour
Wi-Fi will connect back only after a clean shutdown.
Extra details
Yes!
Logs after reboot:
ifup wlan0
root@DietPi:/home/dietpi# ifup_wlan0
ifup: interface wlan0 already configured
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:19:86:11:93:37
Sending on LPF/wlan0/00:19:86:11:93:37
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
dietpi-wifi-monitor
root@DietPi:/home/dietpi# systemctl status dietpi_wifi_monitor
● dietpi-wifi-monitor.service - DietPi-WiFi_Monitor
Loaded: loaded (/etc/systemd/system/dietpi-wifi-monitor.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-03-27 14:28:54 PDT; 2min 25s ago
Main PID: 478 (dietpi-wifi-mon)
Tasks: 9 (limit: 876)
CPU: 4.821s
CGroup: /system.slice/dietpi-wifi-monitor.service
├─478 /bin/bash /var/lib/dietpi/services/dietpi-wifi-monitor.sh
├─863 ifup wlan0
├─876 /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
├─880 /bin/sh -c CLIENT="-i"; /sbin/dhclient -4 -v $CLIENT -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases -I -df /var/lib/dhcp/dhclient6.wlan0.leases wlan0
├─881 /sbin/dhclient -4 -v -i -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases -I -df /var/lib/dhcp/dhclient6.wlan0.leases wlan0
└─882 /sbin/dhclient -4 -v -i -pf /run/dhclient.wlan0.pid -lf /var/lib/dhcp/dhclient.wlan0.leases -I -df /var/lib/dhcp/dhclient6.wlan0.leases wlan0
Mar 27 14:30:46 DietPi wpa_supplicant[876]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="XXXXXXXX" auth_failures=2 duration=20 reason=CONN_FAILED
Mar 27 14:30:54 DietPi dhclient[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
Mar 27 14:30:54 DietPi dietpi-wifi-monitor.sh[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
Mar 27 14:31:01 DietPi dhclient[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
Mar 27 14:31:01 DietPi dietpi-wifi-monitor.sh[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
Mar 27 14:31:07 DietPi wpa_supplicant[876]: wlan0: CTRL-EVENT-SSID-REENABLED id=0 ssid="XXXXXXX"
Mar 27 14:31:07 DietPi wpa_supplicant[876]: wlan0: SME: Trying to authenticate with d4:86:60:ae:b5:1d (SSID='XXXXXXX' freq=2412 MHz)
Mar 27 14:31:08 DietPi wpa_supplicant[876]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="XXXXXXXX" auth_failures=3 duration=30 reason=CONN_FAILED
Mar 27 14:31:10 DietPi dhclient[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
Mar 27 14:31:10 DietPi dietpi-wifi-monitor.sh[882]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
lsusb:
root@DietPi:/home/dietpi# lsusb
Bus 001 Device 005: ID 0bda:818b Realtek Semiconductor Corp. RTL8192EU 802.11b/g/n WLAN Adapter
Bus 001 Device 004: ID 045e:07b2 Microsoft Corp. 2.4GHz Transceiver v8.0 used by mouse Wireless Desktop 900
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
RTL8192EU Driver:
root@DietPi:/home/dietpi# dmesg -T | grep -i rtl
[Thu Mar 23 11:34:30 2023] usb 1-1.3: rtl8192eu_parse_efuse: dumping efuse (0x200 bytes):
[Thu Mar 23 11:34:30 2023] usb 1-1.3: RTL8192EU rev D (SMIC) 2T2R, TX queues 3, WiFi=1, BT=0, GPS=0, HI PA=0
[Thu Mar 23 11:34:30 2023] usb 1-1.3: RTL8192EU MAC: 00:19:86:11:93:37
[Thu Mar 23 11:34:30 2023] usb 1-1.3: rtl8xxxu: Loading firmware rtlwifi/rtl8192eu_nic.bin
[Thu Mar 23 11:34:31 2023] usbcore: registered new interface driver rtl8xxxu
interfaces:
root@DietPi:/home/dietpi# cat /etc/network/interfaces
# Location: /etc/network/interfaces
# Please modify network settings via: dietpi-config
# Or create your own drop-ins in: /etc/network/interfaces.d/
# Drop-in configs
source interfaces.d/*
# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
#gateway .1
#dns-nameservers
# WiFi
allow-hotplug wlan0
iface wlan0 inet dhcp
#gateway .1
#dns-nameservers
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
I haven’t included wpa-supplicant as I know the problem does not lie there. Also, I only performed an ifup after doing an ifdown. I’m not a network wizard, but it seems to me that the Pi is unable to re-register its MAC address with the AP and therefore the connection fails. But I cannot understand why it’s able to do it after a clean shutdown
Thanks a lot for your input guys! Much appreciated