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 HTTP client out to lunch

I am getting the following error when trying to update firmware via ota-http-client libraries. I have been trying to debug this all morning and was hoping you could point me in the right direction:

updater_context_crea Starting update (timeout 300)
[Nov 16 08:20:30.499] mgos_ota_http_start Update URL: https://s3.amazonaws.com/mybucket/myfirmware.zip, ct: 600, isv? 0
[Nov 16 08:21:00.652] Task watchdog got triggered. The following tasks did not feed the watchdog in time:
[Nov 16 08:21:00.696] - mgos (CPU 0), backtrace: 0x40084a86 0x40084ba5 0x40083411 0x4011e847 0x40123899 0x4011b2bd 0x4000bd83 0x4000117d 0x400592fe 0x4005937a 0x40058ca4 0x4011559d 0x401607a2 0x401607cd 0x4012562f 0x401318e2 0x401305da 0x40130a2d 0x4012d109 0x4012ad7a 0x4012bd76 0x4012e7b2 0x4012eb34 0x4012873a 0x40120a2c 0x4008368e 0x4012446f

Something seems to go wrong with the following command in the library (line 170). When I comment it out the cpu never crashes:
struct mg_connection *c = mg_connect_http_opt(
mgos_get_mgr(), fw_download_handler, ctx, opts, url, extra_headers, NULL);

It seems to go out to lunch and I never reach the fw_download_handler

Comments

  • rojerrojer Dublin, Ireland

    well, obviously if http connection is never started, it never crashes.

    can you please set debug.level=3 and post the log here?

    Thanked by 1jonw
  • Sorry I was just trying to narrow down which part of the OTA process was getting hung up (whether if it was crashing somewhere in the handler or if it was the HTTP API itself that was getting hung up). Now for some reason, after updating to mos 1.20.1, it is working. I also updated my libraries last night, however it did not look like there was any update to that specific library. I have not touched my code just rebuilt with new version of mos. At any rate, it seemed to fix itself. Thanks for the reply.

  • SergeySergey Dublin, Ireland

    Did you try https://github.com/mongoose-os-libs/ota-aws-shadow as I have suggested in the chat ?

    Thanked by 1jonw
  • jonwjonw USA
    edited November 2017

    I am already using a modified version of the source from that library for my own shadow implementation. I didn't want the restrictions on the shadow format in that library. It all seems to be working consistently now. I am not sure what changed since yesterday, but I was always told not to fix something that isn't broken. Thanks for the responses.

Sign In or Register to comment.