I have a project where the ESP32 is going to be difficult to access once finished (its a hanging Starship Enterprise model)
So, OTA would be handy in case I need to adjust any code/settings.
Here is the code for the project... I have removed the main loop stuff and other bits that make reading it difficult.
I removed the same from my code to try and find the issue, but this seems to be an OTA problem.
It creates the AP fine. And I can select it in the IDE (v1.8.9). But it then fails and says 'No response from device
'
Ideas?
I am not sure whether you have removed the code or forgot to post it, but this sentence is, at best, unclear. You obviously understand what is going on but because detail is lacking, we are left somewhat guessing.
I am assuming that the AP is working fine but you then say you can select "it" in the IDE. Is this the IP address of the ESP in the ports list in the IDE? You next say "But then it fails". What fails? Are we talking about the OTA update? Any other error messages during the upload?
How much program memory does your code take? You need at least that much free memory for the OTA upload to succeed. I.e. the amount of available free memory must be able to accommodate another compiled copy of the program.
What partition scheme are you using?
Once the OTA upload completes there will be a pause while the update is copied into place and the ESP reboots, but assuming there is enough memory, the upload should complete. If there us insufficient memory, it will fail, but console messages should perhaps indicate that.
Since the port is showing up then mDns appears to be working and therefore presumably the ESP is on the same subnet as the computer that the update is being sent from?
Can you ping the ESP?
Can you access http://hostname/update ?
where hostname is the host name assigned to the ESP.
Well, I think the entire thing is flawed.
Turn off the ESP32 and it still shows in the IDE as an available port.
Only way to correct that is to constantly keep shutting down the IDE and then rebooting.
I spent 2 days on this. Never got it working.
Tried literally everything I could possibly think of.
Followed that (and a few other) tutorials...
Got ChatGPT onboard and ran through all possible options there as well. I never got it to connect.
The ESP was receiving and could be pinged, but just would not complete the connection.
Tried different laptop, updating libraries, rolling back libraries, no Win defender, no anti-virus, command prompt checks, AP mode, local network mode, different IDE versions, different ports .... I ran out of things to check
The fact that there seems to be a pile of people with the same issue and non of them ever resolved it says a lot
Found out the ArduinoOTA OTAWebUpdater.ino example uses JQuery in the OTAForm.
When you are in AP mode you lack access to the internet. Then the example won't work.
When using a simple form from ESP8266 day's then it also works fine in AP mode.