php - Raspberry pi connect itself to wifi by running bash script
We have turned our raspberry pi into an access point and put some php and html pages on it.
Our goal is to make the raspberry pi to detect the WIFI and connect itself to the WIFI.
The html page takes wifi name and password, then the php triggers bash script file to connect Raspberry Pi to wifi.
Does this plan work? Just want to confirm since we are beginner of raspberry pi.
Answer
Solution:
That's not a good idea. You should use the wifi antenna; you can get one from sparkfun or amazon and configure it via the gui. That'll keep your raspberry pi connect automatically once it boots up to the os; then you can run any scripts or programs that requires internet connection.