I would like to easily connect my raspberry to any wifi, without keyboard and screen.
I was thinking about create a small script which if no connection available turn on the ad hoc mode and start a http server to display a web page.
I will be able to access this page with my phone or computer and enter the wifi details.
Once new wifi credentials entered the raspberry switch the wifi mode and use the external wifi connection to access internet.
I am only finding heavy configuration to do so.
I tried with:
sudo ifconfig wlan0 down; sudo iwconfig wlan0 mode ad-hoc essid yourEssid sudo ifconfig wlan0 18.104.22.168 netmask 255.255.255.0 sudo ifconfig wlan0 up
sudo iwconfig wlan0 mode ad-hoc essid yourEssid is returning me an error
Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Device or resource busy.
I do not understand because I am running the down command before
Let me know if you have a better idea to configure the new wifi connection