JAndrassy / ArduinoOTA

Arduino library to upload sketch over network to Arduino board with WiFi or Ethernet libraries
GNU Lesser General Public License v2.1
435 stars 89 forks source link

R4 Wifi upload fails with "Error flashing the sketch" #240

Closed MonkaKokosowa closed 7 months ago

MonkaKokosowa commented 7 months ago

So, after changing library to WiFiS3 in WiFi101_OTA and adding platform file I can't seem to be able to upload to the board via WiFi. It is connected to it without issues and IDE connects to the board (verifying the password) too, but fails the flashing step.

Only thing visible in the console is:

Uploading sketch ...  done
Flashing sketch ... Error flashing the sketch
Failed uploading: uploading error: exit status 1

Is there any good way to debug this issue?

JAndrassy commented 7 months ago

do you have verbose mode enabled in IDE Preferences?

could it be timeout of the upload tool? it is only 10 seconds. newer version of the arduinoOTA tool allows a timeout parameter https://github.com/arduino/arduinoOTA/releases replace the 1.3.0 exe and in platform.local.txt add the -t option in seconds

MonkaKokosowa commented 7 months ago

After setting timeout to 20 it works without issues. I guess my router might be a bit slow. Thanks a lot! <3

JAndrassy commented 7 months ago

the 10 secs for for AVR Uno for Arduino Yun. the sketch for Uno R4 is larger and the WiFiS3 library is not the fastes

BergHeisen commented 1 week ago

do you have verbose mode enabled in IDE Preferences?

could it be timeout of the upload tool? it is only 10 seconds. newer version of the arduinoOTA tool allows a timeout parameter https://github.com/arduino/arduinoOTA/releases replace the 1.3.0 exe and in platform.local.txt add the -t option in seconds

Well I did that, and uploading an example sketch like one of the LED Matrix works the first time, but the second time it just goes on indefinetly. I have ArduinoOTA.h and WiFiS3.h included at the top of the file, and upload using the Fake Programmer.

JAndrassy commented 1 week ago

I have ArduinoOTA.h and WiFiS3.h included at the top of the file

that is not enough