I am trying to create a hub using dietpi on my pi zero. I want dietpi configured pi to act as hotspot and broadcasting its SSID. This SSID will be connected using my app on mobile device and I will have the option to enter SSID and password of my wifi router which dietpi will receive and write into its wifi credentials file.
App side I have the code ready. On the pi side as well, I have the code to receive the credentials from app once connected using hotspot. I need 2 things:
1. Make pi act as hotspot to connect using my mobile device.
2. Configure wifi credentials for my dietpi from inside pi using a script.
This I was able to achieve on my raspbian using the following code, but on dietpi, I have to go through dietpi-config to do the same.
Code: Select all
sudo sed -i -e "s/#nohook wpa_supplicant/nohook wpa_supplicant/g" -e "s/#interface wlan0/interface wlan0/g" -e "s/#static ip/static ip/g" /etc/dhcpcd.conf sleep 1s sudo systemctl enable hostapd sleep 1s sudo systemctl enable dnsmasq sleep 1s sudo systemctl start hostapd sleep 1s sudo reboot
Any help would be appreciated!