Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

OTA update no longer working for non-commercial use during development?

Tried to update firmware on one of our devices remotely - got the following error message:

Error: remote error -1: Free version of OTA library can only perform OTA from mongoose-os.com - please use https://mongoose-os.com/docs/reference/dashboard.html. For commercial version, please contact https://mongoose-os.com/contact.html

This is a bit of a nuisance since we are still in development mode and the device and developer are in different locations. Am I right in assuming that I can no longer work remotely?

Comments

  • You can use https://github.com/mongoose-os-libs/ota-http-server and push the update like this:

    curl -X POST -H "Content-Type: multipart/form-data"   -F "data=@build/fw.zip" http://<device_ip>/update
    

    assuming you are running the command in the aplication's directory.

    Thanked by 1ulso
  • lsmlsm Dublin, Ireland
    edited November 2017

    @ulso if you want to update from the remote server, please use mongoose-os.com/dashboard
    To update locally - what Liviu said.

  • ulsoulso Stockholm
    edited November 2017

    That's the way I update my local development device, but that doesn't work when I want to update the device at my customer's location.

    I used to follow the procedure shown in the following blog post https://goo.gl/eio6fA, especially part 2 of that demo with the alias example.

    Then I just issue the following command to update remotely:
    mos1 call OTA.Update ...

    That doesn't seem to work any longer. Why not?

    We are using AWS IoT btw, so I guess using mongoose-os.com/dashboard is out of the question?

  • lsmlsm Dublin, Ireland

    We have restricted OTA functionality for the free usage.

    @ulso, If your product is commercial, either become our customer and get the unrestricted functionality, or open your product's sources, per GPLv2 license.

  • ulsoulso Stockholm

    I understand that. Our product will hopefully be commercial at some point. At the moment it's still under development, and the newly added restriction on the use of OTA.Update is really annoying for remote development. I would have thought that the OTA.Update was nearly the whole point of using mongoose-os?

    BTW, not that it will happen, but how would opening up the products sources give me back the OTA.Update functionality?

  • lsmlsm Dublin, Ireland
    edited November 2017

    Opening product sources won't give you unrestricted functionality.
    For development though, using the dashboard is more than enough IMO.
    Using it together with the AWS IoT is perfectly fine.

    Thanked by 1ulso
  • ulsoulso Stockholm

    Ok thanks. I'll have to read up on how to use the dashboard with AWS IoT then.

  • nliviunliviu Romania
    edited November 2017

    If you forward the http port of your device in the remote router, you will be able to push the update.
    PS. Did not test, but something like this should work.

    curl -X POST -H "Content-Type: multipart/form-data"   -F "data=@build/fw.zip" http://<remote_ip>:<port>/update
    
    Thanked by 1mookiedog
  • SergeySergey Dublin, Ireland
    Thanked by 1ulso
  • @cpq You're welcome :smiley:

  • ulsoulso Stockholm

    Thanks @cpq, seems to be the way to go.

  • ulsoulso Stockholm

    So, I registered a device on the dashboard and uploaded a new firmware, all according to the instructions. When I try to perform the update I get the following error message in the log:

    [1970-01-18 12:01:49] updater_context_crea Starting update (timeout 300)
    [1970-01-18 12:01:49] sl_set_ssl_opts      CA_FILE_NAME ca.der -> 0
    [1970-01-18 12:01:49] updater_finish       Finished: -1 Update failed
    [2017-11-11 02:11:40] --- RPC command response ---- 
    undefined
    
Sign In or Register to comment.