-
Notifications
You must be signed in to change notification settings - Fork 13.3k
[Arduino OTA] Python consuming 25% of an I5 processor - Showing error in IDE after upload #4966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Note, the python version I installed was the 2.7.10 (x64) I saw now that has version 2.7.15, I'll try: https://www.python.org/downloads/ |
Hi rteck, I, too, am having this issue; though at 15% cpu per instance. Using an EPS-201 off e-bay here but hangs most of the time after an OTA. Hopefully there will be a solution soon. Thanks, |
Hi, Now I'm using Linux instead of Windows, it's faster for builds and I did not have that problem with phyton until now. Using Lubuntu 18.04 running in a VirtualBox. I'm also using the Arduino Pro Mini instead of ESP8266, I'm using ESP8266 with "esp-link" just to reprogram the Arduino flash memory. https://github.com/jeelabs/esp-link Operating in similar way to Arduino UNO Wifi: https://github.com/jeelabs/esp-link/issues/394 Sometimes the IDE, the PING command, and the browser do not quickly find the ESP8266. But I can see in the settings of my router the IP address of the ESP8266. Maybe mDNS or another service is not working very well yet (This happens in Windows and Linux, however it seems that in Linux it solves a little faster). Thanks. |
Can you try with #5135 ? |
I am experiencing a very similar issue. I am running Windows 7 with PlatformIO and NodeMCU ESP8266 (ESP-12E). The OTA update is completes successfully, but espota.py simply times out while waiting for the result. I ran WireShark on my PC and can see that no TCP packet with "OK" message from the OTA client gets to my PC. I can see all of the earlier ones saying how many bytes were received. I tried adding #5135 in WifiClient.cpp but it didn't help. (In fact, I already tried doing flush() between client.print("OK") and client.stop() in ArduinoOTA.cpp before looking here for help!) |
I have just found that putting delay(1000) between client.print("OK") and client.stop() in ArduinoOTA.cpp makes it work. I guess the Wifi module was not getting a chance to get the data out. |
Could you make another tcpdump so we can check on the real delay ? |
This fixes the issue, however the OTA update is much slower. Perhaps the timeout is being triggered before stop()? |
I could reproduce and this is fixed by |
Perfect! That does fix everything. Will the client.setNoDelay(true) be included in the master version? |
Should we understand that you tried again #5089 and got success ? |
Yes, I tried #5089 and added client.setNoDelay(true) AFTER client.connect() in ArduinoOTA::runUpdate() This makes the update work at normal speed AND the “OK” message is successfully sent to PC. |
This was fixed with the referenced PR #5089 . |
Hello,
I'm trying the Arduino OTA (built-in - Arduino IDE 1.8.5), and at some point I can note that after the upload is done, python gets stuck. The esp8266 program works normally, but the IDE returns error after a while.
When the Arduino IDE informs that the upload was done correctly, in the task manager (Win7 x64) I can see that python was consuming little processing, about 1% (of the Intel I5 processor). And after the IDE shows the upload completion message, python exits.
But when the IDE does not show the completion message as soon as the upload is done, then by looking at the task manager, I can see python consuming about 25% processing.
And after a long time the IDE shows an error, then the processor is released and I can notice that until the ventilation returns to the normal state.
When python is consuming 25% of processing, if I terminate the python process in the task manager, everything returns to normal, but the IDE shows error.
Is this problem caused in python or in IDE?
How does this interaction between IDE and Python work?
Thank you.
The text was updated successfully, but these errors were encountered: