Ok, so I set to install a server on a laptop and had a few glitches! Like disabling laptop sleep and then connecting to Wi-Fi via CLI!
I would also Disable waiting for Eth0 Connection @ boot It waits 2 Minutes before timing out, slowing boot WAY down.
It can be a bit fussy if you have Eht0 set to static. Currently the best option is to set static IP in router and set server to DHCP.
Notes: Eth0 will work if plugged in @ boot, but if you plug it in after boot you will need to either shut down wlan0 and restart eth0 or reboot.
BUT if Eht0 is plugged in @ boot, it will not connect to Wi-Fi.
Wlan0 to connect to my home network if available first, then search for my personal hotspot and finally any open Wi-Fi.
Note: I believe it try's to connect to WiFi networks in order based upon wpa_supplicant.conf so arrange accordingly. IE: Home @ top etc etc.
To get PSK value for WPA2 AES use
Then copy the PSK and paste into conf WITHOUT QUOTES.
You basically need to modify two files
If you see that, but ifconfig shows no private ip or ping fails. Then you have a DHCP issue.
Will fix this, but you will want to figure out your configuration error!
This will connect via wpa_supplicant.conf directly and output debug info. Very usefull.
-d = debug/verbose -dd == super verbose
-D = driver
wext = "catch-all driver"
I tested with phone via hotspot which is PERFECT because it tells you when a client connects. I also turned off HotSpot and it reconnected when it turned back on! Only down side is if you are in a populated area, like my testing environment, it connected to "Xfinity-Wifi" which is open and then I had to reboot then it seemed to go with my hotspot due to it being a stronger signal. But once it was on XFinity it would not leave it unless I specified the Open Network SSID inside of the wpa_supplicant.conf OR rebooted.