RPC OTA returns an error

  1. My goal is to perform OTA over OTA.Update
  2. My actions are:
  • created mongoose http server and with browser http://localhost:8000 i can see all the files and directories
  • flashed esp32
  • included OTA libraries: rpc-service-ota, ota-http-client, ota-http-server
  • succesfully licensed device with mos license (bought from Mongoose license manager)
  1. When I want to do the OTA update the following error occurs

$ mos call OTA.Update ‘{“url”: “http://localhost:8000/Users/User/Documents/app43/build/fw.zip”, “commit_timeout”: “300”}’
Error: /private/tmp/mos-20211215-10794-1x3cumm/mos-0278853cf62da0c96ef239143243e854b2f611a8/cli/dev/dev_conn_impl.go:172: remote error -1: Failed to connect
/private/tmp/mos-20211215-10794-1x3cumm/mos-0278853cf62da0c96ef239143243e854b2f611a8/cli/dev/dev_conn_impl.go:181:
/private/tmp/mos-20211215-10794-1x3cumm/mos-0278853cf62da0c96ef239143243e854b2f611a8/cli/main.go:194: call failed
exit status 1

  1. Please provide direction what coul dbe the issue. As a next thing I am looking to store zip file in github or google cloude stroage bucket. What needs to be done in ortder to OTA.Update via HTTPS connection?

Managed to do the OTA.Update with RPC.call function within the program

    RPC.call(RPC.LOCAL, 'Ota.Update', {url: "http://192.168.2.101:8000/Users/User/Documents/app43/build/fw.zip"}, function (resp, ud){
      print ('Response:', JSON.stringify(resp));
  }, null);

you need to also include in mos.yml

However it does not work with HTTPS.
What do I need to do in order to be able to download fw.zip from github repository??