esp32FOTA icon indicating copy to clipboard operation
esp32FOTA copied to clipboard

Semantic versioning, certificates and authorization

Open kiliw opened this issue 3 years ago • 1 comments

I- Arduino board: ESP32 WROOM 32

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.6

  • List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too):

Thanks for the great repo and examples. I used your https without root cert as a base to start working on. I now have a couple of questions, though. Performing updates from version 1 > 2 and further worked fine. Since semantic versioning is supported I thought I might switch to "0.0.1" > "0.0.2" which also worked, but now from "0.0.2" > "0.0.3" it says no update available. I double-checked that I had a new bin file and also updated the json file Would it do an update if the json states a new version but the bin is still the old?

version 0.0.2

esp32FOTA esp32FOTA("esp32-fota-http", "0.0.2", false, true);
{
  "type": "esp32-fota-http",
  "version": "0.0.2",
  "url": "https://raw.githubusercontent.com/user/repo/main/firmware.bin"
}

version 0.0.3

esp32FOTA esp32FOTA("esp32-fota-http", "0.0.3", false, true);
{
  "type": "esp32-fota-http",
  "version": "0.0.3",
  "url": "https://raw.githubusercontent.com/user/repo/main/firmware.bin"
}

Is there any more information about the versioning? Any limits? And would it be possible to start back at version "0.0.1" after some upgrades for testing?

  1. Question Is there a way to download the firmware from a private repo on GitHub or, in general, any server where you have to perform some authorization?

  2. Question Do you maybe have some instructions on getting those certificate files and how you include them in your examples?

Thanks a lot and also again for the lib. If I now get it to work every time, I'm completely happy. :)

kiliw avatar Jun 02 '22 15:06 kiliw

mhm now I can't even get the versions 1 > 2 working... My understanding so far was, and please correct me if I'm wrong. The json file states a version and the location to this versions .bin file. So whenever the esp starts and checks for updates and finds a version number greater than it's current one e.g the 2 here

esp32FOTA esp32FOTA("esp32-fota-http", 2, false, true);

it should performe an update? or does it compare somehow the bin file with its existing code?

kiliw avatar Jun 02 '22 20:06 kiliw