Wifi not work Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
valdragas
Posts: 25
Joined: Sat Oct 03, 2020 1:14 pm

Wifi not work

Post by valdragas »

Hello, I am not able to get the Pi4 to connect via WIFI.

I have fixed the addressing statically in the file /etc/network/interfaces

Code: Select all

# WiFi
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.0.62
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 192.168.0.60
And configure file wpa_supplicant.conf (my network is hidden)

Code: Select all

root@DietPi:~# cat /etc/wpa_supplicant/wpa_supplicant.conf
# Grant all members of group "netdev" permissions to configure WiFi, e.g. via wpa_cli or wpa_gui
ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
# Allow wpa_cli/wpa_gui to overwrite this config file
update_config=1
network={
        ssid="WLAN_XXXX"
        scan_ssid=1
        proto=RSN
        key_mgmt=WPA-PSK
        psk="XXXXXXXXX"
}
But not connect.It only connects if I manually execute the command. With raspberry PI OS it connects perfectly following the same steps

Code: Select all

wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Wifi not work

Post by Joulinar »

Hi,

usually you would need to activate WiF first on dietpi-config. After a reboot, this as well would be the place to configure your WiFi connection
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
valdragas
Posts: 25
Joined: Sat Oct 03, 2020 1:14 pm

Re: Wifi not work

Post by valdragas »

Hello,

Thanks for the answer, what you say I have already done, and it indicates that the interface is ON but disconnected.

I have tried to leave only the wireless interface activated and to enter the data from dietpi-config but it still does not connect
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Wifi not work

Post by Joulinar »

can you reboot your system and have a look if the interface is started at all

Code: Select all

journalctl -u ifup*
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
valdragas
Posts: 25
Joined: Sat Oct 03, 2020 1:14 pm

Re: Wifi not work

Post by valdragas »

Code: Select all

root@DietPi:~# journalctl -u ifup*
-- Logs begin at Thu 2019-02-14 11:11:58 CET, end at Sun 2021-04-25 10:38:01 CEST. --
Apr 25 10:35:57 DietPi systemd[1]: Starting Helper to synchronize boot up for ifupdown...
Apr 25 10:35:57 DietPi systemd[1]: Started Helper to synchronize boot up for ifupdown.
Apr 25 10:35:59 DietPi systemd[1]: Starting ifup for wlan0...
Apr 25 10:35:59 DietPi systemd[1]: Starting ifup for eth0...
Apr 25 10:35:59 DietPi sh[359]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or addres
s
Apr 25 10:35:59 DietPi sh[359]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
Apr 25 10:35:59 DietPi sh[359]: ifup: failed to bring up wlan0
Apr 25 10:35:59 DietPi systemd[1]: ifup@wlan0.service: Main process exited, code=exited, status=1/FAILURE
Apr 25 10:35:59 DietPi systemd[1]: ifup@wlan0.service: Failed with result 'exit-code'.
Apr 25 10:35:59 DietPi systemd[1]: Failed to start ifup for wlan0.
Apr 25 10:35:59 DietPi sh[360]: eth0=eth0
Apr 25 10:35:59 DietPi ifup[455]: ifup: interface eth0 already configured
Apr 25 10:35:59 DietPi systemd[1]: Started ifup for eth0.
User avatar
Joulinar
Posts: 4536
Joined: Sat Nov 16, 2019 12:49 am

Re: Wifi not work

Post by Joulinar »

error seems to be with wpasupplicant as it is not able to print some messages.

Code: Select all

Apr 25 10:35:59 DietPi sh[359]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or address
can you have a look ls -l /dev/st*

just for testing, can you do ifup wlan0

@MichaIng
can you have a look as well pls
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
valdragas
Posts: 25
Joined: Sat Oct 03, 2020 1:14 pm

Re: Wifi not work

Post by valdragas »

Good,

As I was already bored with the topic, at the end I installed WICD and after configuring this everything works correctly.

Greetings
Post Reply