Enable and add wifi AP from filesystem Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Tiwenty
Posts: 5
Joined: Tue Mar 17, 2020 6:18 pm

Enable and add wifi AP from filesystem

Post by Tiwenty »

Hello everyone!

I've been using DietPi on my RPI4 only with ethernet and therefore disabled the wifi module. I brought it with me somewhere else but I don't have an ethernet cable and wanted to reactivate the wifi module and add an AP. I have access to the root filesystem on my Linux machine easily, and been toying with network/interfaces file and wpa_supplicant.conf, to no avail.

Here is my /etc/network/interfaces file:

Code: Select all

# 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/*

# Local
auto lo
iface lo inet loopback

# Ethernet
allow-hotplug eth0
iface eth0 inet dhcp
address 192.168.1.28
netmask 255.255.255.0
gateway 192.168.1.1
#dns-nameservers 192.168.1.1

# WiFi
#allow-hotplug wlan0
iface wlan0 inet dhcp
address 192.168.1.27
netmask 255.255.255.0
gateway 192.168.1.1
#dns-nameservers 192.168.1.1
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
My /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="my_ssid"
scan_ssid=1
key_mgmt=WPA-PSK
psk="my_pass"
}
I tried setting "wireless-power on" and uncommenting the allow-hotplug command. After different tries, I've came to the conclusion that wifi is disabled somewhere else.

How can I enable the wifi and add an AP by just accessing the filesystem? Thanks!
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable and add wifi AP from filesystem

Post by Joulinar »

Hi,

did you tried to go to dietpi-config and active the WiFi device?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Tiwenty
Posts: 5
Joined: Tue Mar 17, 2020 6:18 pm

Re: Enable and add wifi AP from filesystem

Post by Tiwenty »

Thanks for your answer! I forgot to add, I can't use the RPI because I don't have a screen. :(
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable and add wifi AP from filesystem

Post by Joulinar »

hi,

this all is working headless. So you can run dietpi-config within a SSH session ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Tiwenty
Posts: 5
Joined: Tue Mar 17, 2020 6:18 pm

Re: Enable and add wifi AP from filesystem

Post by Tiwenty »

But I can't access it by SSH as I don't have an ethernet cable and it isn't connected to the wifi. Or is there another solution to SSH into it? :)
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable and add wifi AP from filesystem

Post by Joulinar »

So you removed the SD card from you Pi and plug it into your computer. And than try to change config files to enable WiFi?

One question: what is the target you are trying to achieve? I mean even if you will get Wifi working, you will not be able to install the hotspot components like DHCP server or hotspots without internet connection. Next to that, are you sure you still have WiFi packages on your system? Because there is an option to purge WiFi packages if you disable the adapter on dietpi-config.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Tiwenty
Posts: 5
Joined: Tue Mar 17, 2020 6:18 pm

Re: Enable and add wifi AP from filesystem

Post by Tiwenty »

That's what I did. But you're making a good point, there is a possibility that those packages are uninstalled. Guess I'll go find an ethernet cable and reactivate the wifi via SSH. Thanks!
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable and add wifi AP from filesystem

Post by Joulinar »

if the WiFi packages are purged, you would need internet connection to get them back
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Tiwenty
Posts: 5
Joined: Tue Mar 17, 2020 6:18 pm

Re: Enable and add wifi AP from filesystem

Post by Tiwenty »

No problem, I just went home due to the virus and thought I had an ethernet cable available. But i just used temporarily the one from the home computer to reenable all wifi modules. Thanks for your help!
User avatar
Joulinar
Posts: 2091
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable and add wifi AP from filesystem

Post by Joulinar »

ok than it was an easy fix ;)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply