Page 3 of 3

Re: Need help with OTA [Solved]

Posted: Mon Apr 30, 2018 1:17 am
by sellonoid
That's very helpful to know. I had that all wrong.

One more question and then I will check into MQTT and everything else you mentioned, and get more familiar with the log.

Does this (small sample) part of the log file actually indicate that it transferred the blink program via WiFi / OTA, even though the operation was a USB flash operation?

Code: Select all

I (4079) ota: Have written image length 1785
I (4079) ota: Have written image length 2321
I (4089) ota: Have written image length 2857
I (4099) ota: Have written image length 3393
I (4109) ota: Have written image length 3929
I (4109) ota: Have written image length 4465
I (4119) ota: Have written image length 5001
I (4119) ota: Have written image length 5537
I (4129) ota: Have written image length 6073

Re: Need help with OTA [Solved]

Posted: Mon Apr 30, 2018 2:18 pm
by fly135
That's very helpful to know. I had that all wrong.

One more question and then I will check into MQTT and everything else you mentioned, and get more familiar with the log.

Does this (small sample) part of the log file actually indicate that it transferred the blink program via WiFi / OTA, even though the operation was a USB flash operation?

Code: Select all

I (4079) ota: Have written image length 1785
I (4079) ota: Have written image length 2321
I (4089) ota: Have written image length 2857
I (4099) ota: Have written image length 3393
I (4109) ota: Have written image length 3929
I (4109) ota: Have written image length 4465
I (4119) ota: Have written image length 5001
I (4119) ota: Have written image length 5537
I (4129) ota: Have written image length 6073
Like I said before, once you successfully burn an OTA partition, as your previous boot log indicated has happened, then USB "make flash" operations don't do anything other than burn to a non-bootable partition. The log text you presented here is an OTA update burning to an OTA partition. i.e. it's an OTA update in progress. It is not indicative of a USB burn. In fact, all the USB burns that you have been doing aren't really accomplishing anything useful once the device is booting from an OTA partition.

Also, I wasn't suggesting that you use MQTT to start an update. I was just listing examples of ways that it could be initiated. You could FTP to an online server and just check to see if a newer bin file is there and start an update.

John A

Re: Need help with OTA [Solved]

Posted: Mon Apr 30, 2018 2:42 pm
by fly135
Also I would suggest that in the section that reads past the HTTP header you parse out "Content-Length:xxxxx" to get the length of the file you are downloading. And before you complete the OTA update you ensure the correct amount of bytes were programmed.

John A

Re: Need help with OTA [Solved]

Posted: Mon Apr 30, 2018 11:38 pm
by sellonoid
I obviously need to become way more familiar with the contents of the log. I can probably answer some of my questions by digging in and making sense of it.

By the way. Are you a part 135 pilot?

Thanks,
Jim

Re: Need help with OTA [Solved]

Posted: Tue May 01, 2018 4:08 pm
by fly135
By the way. Are you a part 135 pilot?
No, but I get asked that every now and then. FLY135 was the model of a Liquid Force wakeboard that I owned in the 90's when I adopted that moniker.

John A