RichardS wrote:I wrote an example to prove the issue.
1. Start CMD on windows machine and issue ping 192.168.4.1 -t
2. Change "your-ssid" and "your-password" to reflect your network.... then Run the sketch
3. find "myhost" in your wireless AP settings on the PC and log in.... (do it quickly you have 20 seconds)
4. you will see ping working
5. in 20 seconds the code will attempt to log onto an AP that does not exist....
6. the ping will start failing.....
WHY?
RichardS
From 1-4 I assume you are connecting your PC via WiFi to the esp-AP (usually on 192.168.4.x).
If you were connected via your home WiFi ping to 192.168.4.x wouldn't work (assuming your home WiFi is not 192.168.4.x).
If you now change the ssid of the esp-AP the PC looses WiFi connection and therefor ping stops working.
to prove my assumptions: skip step 1/3 and find IP of esp on your home WiFi via router status (or print local STA-IP in sketch), ping this IP.
This "problem" should be the same on esp8266 and esp32.