-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ArduinoOTA interferes with hardware serial #3881
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
WOW I try it and now it work like a charm. Before it failed 50% of the time or more. Now this is my setupOTA function:
|
Could you please try again with latest git and without onStart's Serial.end() ? |
For me with latest git today and hand fixing #4086 (index problem and int<-> char warning), it work fine without Serial.end(). Tested many times successfully. Regards |
Ok, relevant PRs are merged. Please retest. |
Working OK for me, uploading sketch and SPIFFS image. Only sometimes it remains as "Uploading" and after a while the message "An error occurred while sending the sketch" appears, but I remember that this was a problem of the Arduino IDE. However, the sketch has been sent correctly if we look at the serial output. Tested with Arduino IDE 1.8.3 and 1.8.5. |
@djdehaan will you be testing this as well? |
@devyte I will, I hope to find time this weekend. |
@devyte I have a test-setup, however, I do not know how to download your upgraded lib. I did in GitGui a Remote / FetchFrom / Origin, that does update something but not ArduinoOTA. When running a test (with serial.end removed) it goes wrong again. To be expected with the old libs. How do I get your new libs? |
@djdehaan I'm not sure about gitgui, I didn't even know it existed. I use git from (linux) command line. |
@devyte Indeed, ESP8266 is not installed via board manager. But following the (Windows) instructions: git clone https://github.com/esp8266/Arduino.git esp8266 So I deleted the entire directory and reinstalled ESP8266. It will not do OTA without Serial.end();
|
Does this bug happen too with the example Files/Examples/ArduinoOTA/BasicOTA, |
There is no working MCVE, and there were some big changes to the uart infrastructure and OTA (including re-enabling interrupts while flash is being written which allows serial comms even during the long flash ops you'd see in OTA, and uart logic corrected to not write out of bounds in overflow conditions) in 2.5.0. Please try the latest 2.5.0 release and open a new issue w/MCVE if there is still an issue. |
Hi all,
Not a question, but a tip for others who struggle. I use a Wemos D1 with a GPS receiver and SD-card. And I did not get the ArduinoOTA function to work. IT started uploading but after 10 or 12 or 8 bullets appearing in the IDE it stopped uploading. After long searching I found the reason.
Earlier, I found it most stable if I address that GPS using hardware serial, meaning I connect it on the RX/TX pins. Appearantly, that interferes with the upload process. When I add the following code in the Setup() routine, the upload works like a charm:
Maybe this is completely logic, but it took me some time to find out and I did not find similar cases online.
The text was updated successfully, but these errors were encountered: