JAndrassy / ArduinoOTA

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

what if i reset? #175

Closed TheYigidOS closed 1 year ago

TheYigidOS commented 2 years ago

what if i rest after update (https://github.com/JAndrassy/ArduinoOTA/blob/master/examples/OTEthernet/OTEthernet.ino) keep updated firmware or download one more time on every update

JAndrassy commented 2 years ago

the library resets the MCU after applying the update. do you have some issue?

TheYigidOS commented 2 years ago

i mean if i dont call update function on start up. it runs nothing or use last updated firmware?

JAndrassy commented 2 years ago

there are never two sketches at once. an Arduino sketch is build for exact addresses in flash. it can only run if it is at required address in flash

TheYigidOS commented 2 years ago

i try to make ota trigger with mqtt. if message equals OTA_OK esp32 gets new firmware. but the message is not equal OTA_OK use old firmware. is it posible?

JAndrassy commented 2 years ago

I guess you don't use my library, but the library bundled with the esp32 platform

TheYigidOS commented 2 years ago

I haven't started trying because my Ethernet module hasn't arrived yet. i just want to know; Does the device download the file from the beginning every time it runs, or does it run the last file it received unless there is a new file?

JAndrassy commented 2 years ago

it is your running sketch which downloads and applies the new version. it is on you how your sketch determines if there is a new version to download

TheYigidOS commented 2 years ago

thank you