I would appreciate some ideas on why I can’t get the OTA feature to work on this ESP8266 NodeMCU 12E. The sketch itself works fine and the OTA feature has worked before albeit sporadically. I use this device on an LED feature that is mounted remotely and the older I get, the harder it is to get to it. I change the firmware on this feature frequently and usually I have to access the device to change it. Here are the things that I know.
- The pc is an HP running Win10 Pro ver1903 (OS Build 18362.535)
- The router is a Greenwave supplied by Frontier (Verizon) FIOS.
- The OTA sketch came from various sources including Random Nerd Tutorials.
- This sketch includes the feature that allows resetting the esp device by entering the IP/”restart” in a browser, waiting for a response and then uploading the new sketch within a short specified time.
- This operation requires that the Arduino IDE receives the OTA port information.
- This is the trouble that I am having right now. I can’t get the network ports to show up in the IDE. And I don’t understand the process of getting the info to the IDE. If I understood that process, I might just have it working.
- I have reinstalled Python 2.7 as well as the current version of Bonjour.
- Currently I have a test board set up with a test sketch that I found on the RNT site. It is uploaded to the device. I check with the serial monitor and verify that the device returns the correct IP address.
- I then remove the usb cable and power the device with a power bank. I add several lines of code to the sketch, restart the IDE and then use the tools dropdown to make the port connection. No network ports are available.
- I then go to the pc command window and ping that I/P and get good response every time. I can do the same thing using a utility in the router.
- Using a different sketch I have checked the mDNS feature and it works fine.
- I have found a lot of info on the web regarding this issue but most of it three to four years old. There must be a tried and true way to check out the numerous parts of this operation.
- What am I missing?
KentM
Hi Kent,
I set up the ESP32 OTA from RN ESP32 course and it works great.
Are you using the IP address in your web browser, then seeing the web page from the ESP?
From there are you able to select the saved binary file, and load it?
Your version may be different from what is in the ESP32 course.
I am very happy with it for the same reason you are, some projects are in areas that are not easy to access for wired connection updates.
I am truly satisfied with the ESP32 Random Nerds course. The ESP32 is an amazing board; I love the fact I can use the Arduino IDE as I am most familiar with it.
Bob D
Bob, thanks for the reply. I have not moved on to the esp32 because I have too much invested in the 8266 boards. My sketches have the OTA parts from this website from the Home automation course. You enter the I/P of the device with /restart switch that restarts the esp and you have a fixed time period to click on the upload button of the IDE. That all works great except if the IDE doesn’t see the port, it will do nothing. I just can’t seem to find out how the IDE knows that there is a network port. As I said in the OP, I can ping that device and it works fine. I have spent so much time on this that I have just resolved that I will have to just access the device and do it manually. I have scoured the internet for this problem and found a lot of chatter but no real solution or troubleshooting guide. It seems that every solution that I find worked for one person but not the next
Thanks for the reply
KentM
Hi Kent.
I’m sorry for that issue with OTA.
For me, OTA works really strange. I remember when testing the same sketch with the same board, OTA worked in Rui’s computer and it didn’t work in my computer. Why? I still don’t know (probably because we had different version of Arduino IDE installed).
Some people complaint that it stopped working with some versions of Arduino IDE. I don’t know why that happens.
What version of Arduino IDE are you using?
I’ve read this on a forum “
- Arduino IDE versions 1.8.6, 1.8.7, 1.8.8 and 1.8.9 will NOT show my ESP8266 node in the network port list
- Arduino IDE versions 1.8.3 as well as 1.8.5 work correctly and instantly show the network port and are able to successfully perform an OTA upgrade” (April 2019)
https://forum.arduino.cc/index.php?topic=575560.15
I don’t know if this still applies, but it may be causing the issue.
Have you tried restarting your router? Sometimes that resolves the issue.
I’m sorry that I can’t help much.
Let me know if you were able to solve the issue.
Regards,
Sara
Hello Sara, Thanks for the reply. I got all excited about the older version possibility. I managed to get v1.8.5 loaded up on an old laptop. The first time I opened the IDE and went to set port, there was an external port staring me in the face. And it was one of my devices that just happened to be running at the time. I couldn’t believe it!!!! But the euphoria was was short lived as after that one time it never worked again. Even shutting the computer down and restarting did not bring it back. I have been following the
Re: OTA_Mode – No Network port is shown !
#29
site for some time and no one on there seems to have the answer. At least, there never seems to be two people who have the same problem. I don’t have the knowledge to know what takes place that tells the IDE that a port is there. Pinging doesn’t prove it and accessing via the web browser doesn’t do it either.
Moving on to something else… Does your course on the esp32 deal with OTA? If the esp32 was a stable answer, I would sure give it a try.
Regards
Kent
Hi Kent.
As you said, it is very difficult to understand what might be wrong.
We have an example in the ESP32 course for webOTA updates. We didn’t cover basic OTA, because at the time, it was not working properly.
But, maybe the issue is resolved now.
Anyway, if you have an ESP32 board, you can experiment the basic OTA examples and see how it behaves.
In the arduino IDE, go to File > Examples > ArduinoOTA and then experiment with the basicOTA and WebOTA examples.
Then, let me know how it went.
Regards,
Sara
Sara, I went ahead and ordered the esp32 course. Others have expressed their good results with the esp 32 so I am going to give a try. The course is great and I am enjoying it.
Kent