Hi!
I have to run my raspi on another wifi than currently configured inside my raspi.
Since I configured the raspi to wait for network during boot time I will have to apply the new WiFi configuration from the outside of my raspi by modifying the files on th sd card from my Windows machine.
Just editing the dietpi.txt obviously does not work (I assume that file is only being used at first-time boot of a new image, right?)
How can I apply a new WiFi config given the fact that the raspi will not boot to prompt?
Best regards,
Olaf
Configure WiFi from outside
Re: Configure WiFi from outside
Hi Olaf,
you are right that the WiFi settings within dietpi.txt are only applied on first run setup.
They are then added to /etc/network/interfaces, thus this is also the file you need too edit after first boot. At least the entries should be self explaining, but the problem is that Windows cannot natively access the ext4 file system.
You don't have a chance to edit this from within the old WiFi or via direct keyboard + monitor attached?
Anther linux system would be the alternative or use an ext4 driver for Windows, but I never found one that works really reliably.
This issue supports an open topic on GitHub, to allow preconfiguring multiple WiFi SSIDs and let the system choose the first or available: https://github.com/Fourdee/DietPi/issues/368
you are right that the WiFi settings within dietpi.txt are only applied on first run setup.
They are then added to /etc/network/interfaces, thus this is also the file you need too edit after first boot. At least the entries should be self explaining, but the problem is that Windows cannot natively access the ext4 file system.
You don't have a chance to edit this from within the old WiFi or via direct keyboard + monitor attached?
Anther linux system would be the alternative or use an ext4 driver for Windows, but I never found one that works really reliably.
This issue supports an open topic on GitHub, to allow preconfiguring multiple WiFi SSIDs and let the system choose the first or available: https://github.com/Fourdee/DietPi/issues/368
Re: Configure WiFi from outside
Thanks for your reply!
Unfortunately I do not have any chance to temporarily connect the raspi to the former WiFi. And since I configured it to wait for the network I cannot do anything from the console (or am I missing something...). During boot it says "Wainting for a valid connection, before continuing boot | Mode=2".
One option that I see is that I can edit the file you mentiones from my MacBook. Any experience if this will work properly with ext4 file system?
Best regards,
Olaf
Unfortunately I do not have any chance to temporarily connect the raspi to the former WiFi. And since I configured it to wait for the network I cannot do anything from the console (or am I missing something...). During boot it says "Wainting for a valid connection, before continuing boot | Mode=2".
One option that I see is that I can edit the file you mentiones from my MacBook. Any experience if this will work properly with ext4 file system?
Best regards,
Olaf
Re: Configure WiFi from outside
If I am not wrong, the system does not wait forever for network, max 1 minute or something.
And you should be able to disable waiting for network within dietpi.txt as well, which is not just applied on first run setup.
But let me recheck this.
€: Jep, waits for max 10 seconds you can as well completely disable via dietpi.txt
.
No idea if/how well MacOS/iOS supports ext4. Also worth to try if the above doesn't work out.
And you should be able to disable waiting for network within dietpi.txt as well, which is not just applied on first run setup.
But let me recheck this.
€: Jep, waits for max 10 seconds you can as well completely disable via dietpi.txt

No idea if/how well MacOS/iOS supports ext4. Also worth to try if the above doesn't work out.
Re: Configure WiFi from outside
Ok, I will check if the modification to the dietpi.txt regarding the wait time will work, later.
I'll keep you posted...
I'll keep you posted...
Re: Configure WiFi from outside
Switching to Mode 1 (wait for 10 seconds) works perfectly and logging in to the console either.
It's quite hard to understand which config settings from the dietpi.txt will be processed only once and which at every boot...
Nevertheless thanks for your support!
It's quite hard to understand which config settings from the dietpi.txt will be processed only once and which at every boot...
Nevertheless thanks for your support!
Re: Configure WiFi from outside
Can you pull the card and put into another linux machine
Edit
/etc/wpa_supplicant/wpa_supplicant.conf
change country to the country you are in
Then type sync...eject the volume, then boot the pi
Also might need to add the line
To either the /etc/network/interfaces line in the wlan0 section (look for the entry for your wlan0)
Edit
/etc/wpa_supplicant/wpa_supplicant.conf
Code: Select all
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Your SSID"
psk="YourWPAPassword"
key_mgmt=WPA-PSK
}
Then type sync...eject the volume, then boot the pi
Also might need to add the line
Code: Select all
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Re: Configure WiFi from outside
Good hint that wpa_supplicant needs to be changed as well for the credentials.
The wpa-conf line at least is present by default within interface file, but yeah double check doesn't hurt.
Great to hear that it worked now anyway on local console. So no manual adjustment needed anyway.
Jep makes sense so add info about with settings are applied just once and which lib every boot, or every time the related feature is outset respectively.
The wpa-conf line at least is present by default within interface file, but yeah double check doesn't hurt.
Great to hear that it worked now anyway on local console. So no manual adjustment needed anyway.
Jep makes sense so add info about with settings are applied just once and which lib every boot, or every time the related feature is outset respectively.
Re: Configure WiFi from outside
Hi,
Is it possible to add a command to get/connect to wifi ?
Or it already exists ?
Thanks
Is it possible to add a command to get/connect to wifi ?
Or it already exists ?
Thanks
Re: Configure WiFi from outside
Hi,
can you pls a little bit more specific on you request?
To connect to WiFi, you can use dietpi-config tool
can you pls a little bit more specific on you request?
To connect to WiFi, you can use dietpi-config tool
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team