DietPi headless setup WITHOUT ethernet connection Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
kasus
Posts: 4
Joined: Mon Mar 08, 2021 9:37 am

DietPi headless setup WITHOUT ethernet connection

Post by kasus »

Hey everyone!

Been using RPI for quite a while, but only on raspbian. Decided to try DietPi - and struggling with it already for a couple of days!

The problem is - I cannot set rpi to connect at boot to wifi hotspot, though I have edited both dietpi.txt and dietpi-wifi.txt on boot partition of SD card (enabled wifi in first and added ssid/psk information in second). Rpi boots up and never connects to the hotspot.

Is there any way to set up headless rpi without having to connect it over ethernet? So far I have tried all advices I could find, but with no success...

P.S. before that I have setup my rpi devices on on raspbian many times without any problems just by adding wpa_supplicant.conf and ssh files to the boot partition - and it worked flawlessly without any problem at all, so I consider this is a pure DietPi problem.
kasus
Posts: 4
Joined: Mon Mar 08, 2021 9:37 am

Re: DietPi headless setup WITHOUT ethernet connection

Post by kasus »

Some more details, that are probably required:
RPI 3 B+, wifi hot spot 5GHz + 2.4GHz (tried both, it just does not connect). I have hdmi monitor connected and see it is booting and then waiting 10 sec for connection. Of course I do not have a usb keyboard, otherwise I would not have asked such stupid questions :)
kasus
Posts: 4
Joined: Mon Mar 08, 2021 9:37 am

Re: DietPi headless setup WITHOUT ethernet connection

Post by kasus »

Another update - this does not work with 32bit Image and Allo GUI image, but suddenly everything worked with 64 bit beta image.
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi headless setup WITHOUT ethernet connection

Post by Joulinar »

Hi,

I did a test on my RPi3B+, download fresh 32bit image and WiFi is working ootb on first Initial boot. The Pi is booting without Ethernet connected and is performing the setup. So it is not an issue in general. Are you able to share config files used? As well, can you connect your 32bit SD card to another Linux box and check WiFi config if they are fitting

Code: Select all

/etc/wpa_supplicant/wpa_supplicant.conf
as well you can have a look to DietPi logs created during first boot

Code: Select all

/var/tmp/dietpi/logs/dietpi-firstboot.log
/var/tmp/dietpi/logs/dietpi-firstrun-setup.log
Usually at the end of the dietpi-firstboot.log, you should have the WiFi connection request

Code: Select all

Initializing machine ID from random generator.
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 0 with SSID "My WLAN"
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 1 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 2 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 3 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 4 with SSID ""
[ SUB1 ] DietPi-Set_hardware > wificountrycode (de)
[  OK  ] DietPi-Set_hardware | Setting in /etc/default/crda adjusted: REGDOMAIN=DE
[  OK  ] DietPi-Set_hardware | Desired setting in /boot/dietpi.txt was already set: AUTO_SETUP_NET_WIFI_COUNTRY_CODE=DE
[  OK  ] wificountrycode DE | Completed
[ SUB1 ] DietPi-Set_hardware > enableipv6 (disable)
[  OK  ] DietPi-Set_hardware | Desired setting in /boot/dietpi.txt was already set: CONFIG_ENABLE_IPV6=0
[  OK  ] DietPi-Set_hardware | Setting in /boot/dietpi.txt adjusted: CONFIG_PREFER_IPV4=0
[  OK  ] enableipv6 disable | Completed
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/b8:xxx
Sending on   LPF/wlan0/b8:xxx
Sending on   Socket/fallback
Created duid "\000\001\000\001'\230s\340\270'\353\2034\037".
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPOFFER of 192.168.0.70 from 192.168.0.11
DHCPREQUEST for 192.168.0.70 on wlan0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.70 from 192.168.0.11
bound to 192.168.0.70 -- renewal in 35100 seconds.
Removed /etc/systemd/system/multi-user.target.wants/dietpi-firstboot.service.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
kasus
Posts: 4
Joined: Mon Mar 08, 2021 9:37 am

Re: DietPi headless setup WITHOUT ethernet connection

Post by kasus »

I confirm that 32 bit image works as well. Have not yet tested others.

As far as I understood the problem was due that I have first booted PI using fresh sd card and only then started to try connecting to wifi by altering *.txt files in boot partition.

I think that it should be emphasised that all changes to dietpi*.txt files should be done BEFORE first boot, otherwise they are useless.

Thank you!
User avatar
Joulinar
Posts: 4203
Joined: Sat Nov 16, 2019 12:49 am

Re: DietPi headless setup WITHOUT ethernet connection

Post by Joulinar »

Yes, WiFi settings would need to be set before first initial boot. This is as well describe on our online docs https://dietpi.com/docs/install/#2-flas ... etpi-image

WiFi config is done as last step on chapter 2 Flash the DietPi image and right before chapter 3 Prepare the first boot
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply