Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logs on OTA process steps #282

Closed

Conversation

zmoog
Copy link

@zmoog zmoog commented Oct 25, 2021

Motivation

The current version of IoTCloudLibrary does not log every step involved in the Over-the-Air (OTA) update process, so it's not trivial do understand what's going on when something goes wrong.

Change description

These additional log statements highlight each step in the Over-the-Air (OTA) update process.

Additional Notes

Reviewer checklist

  • PR address a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in master.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.
  • History is clean, commit messages are meaningful (see CONTRIBUTING.md) and are well formatted.

These additional log statements highlight each step in the Over-the-Air (OTA) update process.
@CLAassistant
Copy link

CLAassistant commented Oct 25, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Maurizio Branca seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link

Codecov Report

Merging #282 (f98c0c6) into master (5e19f33) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #282   +/-   ##
=======================================
  Coverage   95.31%   95.31%           
=======================================
  Files          25       25           
  Lines         896      896           
=======================================
  Hits          854      854           
  Misses         42       42           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e19f33...f98c0c6. Read the comment docs.

@github-actions
Copy link

Memory usage change @ f98c0c6

Board flash % RAM for global variables %
arduino:mbed:envie_m4 🔺 +512 - +640 +0.05 - +0.06 0 - 0 0.0 - 0.0
arduino:mbed:envie_m7 🔺 +664 - +864 +0.08 - +0.11 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 🔺 +512 - +608 +0.2 - +0.23 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 🔺 +512 - +688 +0.2 - +0.26 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 🔺 +512 - +608 +0.2 - +0.23 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 🔺 +112 - +112 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 0 - +888 0.0 - +0.34 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 0 - +888 0.0 - +0.34 0 - 0 0.0 - 0.0
esp32:esp32:esp32 🔺 +668 - +724 +0.05 - +0.06 0 - 0 0.0 - 0.0
esp8266:esp8266:huzzah 🔺 +620 - +624 +0.06 - +0.06 🔺 +352 - +364 +0.43 - +0.44
Click for full report table
Board examples/ArduinoIoTCloud-Advanced
flash
% examples/ArduinoIoTCloud-Advanced
RAM for global variables
% examples/ArduinoIoTCloud-Basic
flash
% examples/ArduinoIoTCloud-Basic
RAM for global variables
% examples/utility/ArduinoIoTCloud_Travis_CI
flash
% examples/utility/ArduinoIoTCloud_Travis_CI
RAM for global variables
% examples/utility/Provisioning
flash
% examples/utility/Provisioning
RAM for global variables
% examples/utility/SelfProvisioning
flash
% examples/utility/SelfProvisioning
RAM for global variables
%
arduino:mbed:envie_m4 640 0.06 0 0.0 568 0.05 0 0.0 632 0.06 0 0.0 512 0.05 0 0.0
arduino:mbed:envie_m7 856 0.11 0 0.0 864 0.11 0 0.0 856 0.11 0 0.0 664 0.08 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkr1000 608 0.23 0 0.0 600 0.23 0 0.0 600 0.23 0 0.0 512 0.2 0 0.0
arduino:samd:mkrgsm1400 688 0.26 0 0.0 688 0.26 0 0.0 688 0.26 0 0.0 512 0.2 0 0.0
arduino:samd:mkrnb1500 608 0.23 0 0.0 600 0.23 0 0.0 600 0.23 0 0.0 512 0.2 0 0.0
arduino:samd:mkrwan1300 112 0.04 0 0.0 112 0.04 0 0.0 112 0.04 0 0.0
arduino:samd:mkrwifi1010 888 0.34 0 0.0 888 0.34 0 0.0 888 0.34 0 0.0 704 0.27 0 0.0 0 0.0 0 0.0
arduino:samd:nano_33_iot 888 0.34 0 0.0 888 0.34 0 0.0 888 0.34 0 0.0 704 0.27 0 0.0 0 0.0 0 0.0
esp32:esp32:esp32 724 0.06 0 0.0 668 0.05 0 0.0 716 0.05 0 0.0
esp8266:esp8266:huzzah 620 0.06 352 0.43 624 0.06 364 0.44 620 0.06 352 0.43
Click for full report CSV
Board,examples/ArduinoIoTCloud-Advanced<br>flash,%,examples/ArduinoIoTCloud-Advanced<br>RAM for global variables,%,examples/ArduinoIoTCloud-Basic<br>flash,%,examples/ArduinoIoTCloud-Basic<br>RAM for global variables,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>flash,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>RAM for global variables,%,examples/utility/Provisioning<br>flash,%,examples/utility/Provisioning<br>RAM for global variables,%,examples/utility/SelfProvisioning<br>flash,%,examples/utility/SelfProvisioning<br>RAM for global variables,%
arduino:mbed:envie_m4,640,0.06,0,0.0,568,0.05,0,0.0,632,0.06,0,0.0,512,0.05,0,0.0
arduino:mbed:envie_m7,856,0.11,0,0.0,864,0.11,0,0.0,856,0.11,0,0.0,664,0.08,0,0.0
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkr1000,608,0.23,0,0.0,600,0.23,0,0.0,600,0.23,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrgsm1400,688,0.26,0,0.0,688,0.26,0,0.0,688,0.26,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrnb1500,608,0.23,0,0.0,600,0.23,0,0.0,600,0.23,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrwan1300,112,0.04,0,0.0,112,0.04,0,0.0,112,0.04,0,0.0,,,,,,,,
arduino:samd:mkrwifi1010,888,0.34,0,0.0,888,0.34,0,0.0,888,0.34,0,0.0,704,0.27,0,0.0,0,0.0,0,0.0
arduino:samd:nano_33_iot,888,0.34,0,0.0,888,0.34,0,0.0,888,0.34,0,0.0,704,0.27,0,0.0,0,0.0,0,0.0
esp32:esp32:esp32,724,0.06,0,0.0,668,0.05,0,0.0,716,0.05,0,0.0,,,,,,,,
esp8266:esp8266:huzzah,620,0.06,352,0.43,624,0.06,364,0.44,620,0.06,352,0.43,,,,,,,,

@pennam
Copy link
Collaborator

pennam commented Oct 27, 2021

@zmoog a part from the qos thing that @aentinger already pointed out i would love to see this pr mainlined.

This will give the possibility to user to enable a more detailed log only setting setDebugMessageLevel(DEBUG_VERBOSE) in the sketch.

I think is worth to add the download start and reset information also for the portenta and the rp2040. See OTA-portenta-h7.cpp and OTA-nano-rp2040.cpp files.

@aentinger is there any particular reason why library is shipped with this line commented out?

@zmoog zmoog force-pushed the zmoog/more-logs-in-ota-process branch from 38e5ff7 to 441f6b8 Compare October 27, 2021 14:01
This was intended as as just test, back the the default value.
@zmoog
Copy link
Author

zmoog commented Oct 27, 2021

I think is worth to add the download start and reset information also for the portenta and the rp2040. See OTA-portenta-h7.cpp and OTA-nano-rp2040.cpp files.

I also added a few DEBUG_VERBOSE() for portenta h7 and rp2040 boards to mark download start/end and reboot.

@github-actions
Copy link

Memory usage change @ 614ebe6

Board flash % RAM for global variables %
arduino:mbed:envie_m4 🔺 +512 - +640 +0.05 - +0.06 0 - 0 0.0 - 0.0
arduino:mbed:envie_m7 🔺 +840 - +968 +0.11 - +0.12 0 - 0 0.0 - 0.0
arduino:mbed_nano:nanorp2040connect 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkr1000 🔺 +512 - +608 +0.2 - +0.23 0 - 0 0.0 - 0.0
arduino:samd:mkrgsm1400 🔺 +512 - +688 +0.2 - +0.26 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 🔺 +512 - +608 +0.2 - +0.23 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1300 🔺 +112 - +112 +0.04 - +0.04 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 🔺 0 - +888 0.0 - +0.34 0 - 0 0.0 - 0.0
arduino:samd:nano_33_iot 🔺 0 - +888 0.0 - +0.34 0 - 0 0.0 - 0.0
esp32:esp32:esp32 🔺 +668 - +724 +0.05 - +0.06 0 - 0 0.0 - 0.0
esp8266:esp8266:huzzah 🔺 +620 - +624 +0.06 - +0.06 🔺 +352 - +364 +0.43 - +0.44
Click for full report table
Board examples/ArduinoIoTCloud-Advanced
flash
% examples/ArduinoIoTCloud-Advanced
RAM for global variables
% examples/ArduinoIoTCloud-Basic
flash
% examples/ArduinoIoTCloud-Basic
RAM for global variables
% examples/utility/ArduinoIoTCloud_Travis_CI
flash
% examples/utility/ArduinoIoTCloud_Travis_CI
RAM for global variables
% examples/utility/Provisioning
flash
% examples/utility/Provisioning
RAM for global variables
% examples/utility/SelfProvisioning
flash
% examples/utility/SelfProvisioning
RAM for global variables
%
arduino:mbed:envie_m4 640 0.06 0 0.0 568 0.05 0 0.0 632 0.06 0 0.0 512 0.05 0 0.0
arduino:mbed:envie_m7 968 0.12 0 0.0 968 0.12 0 0.0 960 0.12 0 0.0 840 0.11 0 0.0
arduino:mbed_nano:nanorp2040connect 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkr1000 608 0.23 0 0.0 600 0.23 0 0.0 600 0.23 0 0.0 512 0.2 0 0.0
arduino:samd:mkrgsm1400 688 0.26 0 0.0 688 0.26 0 0.0 688 0.26 0 0.0 512 0.2 0 0.0
arduino:samd:mkrnb1500 608 0.23 0 0.0 600 0.23 0 0.0 600 0.23 0 0.0 512 0.2 0 0.0
arduino:samd:mkrwan1300 112 0.04 0 0.0 112 0.04 0 0.0 112 0.04 0 0.0
arduino:samd:mkrwifi1010 888 0.34 0 0.0 888 0.34 0 0.0 888 0.34 0 0.0 704 0.27 0 0.0 0 0.0 0 0.0
arduino:samd:nano_33_iot 888 0.34 0 0.0 888 0.34 0 0.0 888 0.34 0 0.0 704 0.27 0 0.0 0 0.0 0 0.0
esp32:esp32:esp32 724 0.06 0 0.0 668 0.05 0 0.0 716 0.05 0 0.0
esp8266:esp8266:huzzah 620 0.06 352 0.43 624 0.06 364 0.44 620 0.06 352 0.43
Click for full report CSV
Board,examples/ArduinoIoTCloud-Advanced<br>flash,%,examples/ArduinoIoTCloud-Advanced<br>RAM for global variables,%,examples/ArduinoIoTCloud-Basic<br>flash,%,examples/ArduinoIoTCloud-Basic<br>RAM for global variables,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>flash,%,examples/utility/ArduinoIoTCloud_Travis_CI<br>RAM for global variables,%,examples/utility/Provisioning<br>flash,%,examples/utility/Provisioning<br>RAM for global variables,%,examples/utility/SelfProvisioning<br>flash,%,examples/utility/SelfProvisioning<br>RAM for global variables,%
arduino:mbed:envie_m4,640,0.06,0,0.0,568,0.05,0,0.0,632,0.06,0,0.0,512,0.05,0,0.0
arduino:mbed:envie_m7,968,0.12,0,0.0,968,0.12,0,0.0,960,0.12,0,0.0,840,0.11,0,0.0
arduino:mbed_nano:nanorp2040connect,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:samd:mkr1000,608,0.23,0,0.0,600,0.23,0,0.0,600,0.23,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrgsm1400,688,0.26,0,0.0,688,0.26,0,0.0,688,0.26,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrnb1500,608,0.23,0,0.0,600,0.23,0,0.0,600,0.23,0,0.0,512,0.2,0,0.0,,,,
arduino:samd:mkrwan1300,112,0.04,0,0.0,112,0.04,0,0.0,112,0.04,0,0.0,,,,,,,,
arduino:samd:mkrwifi1010,888,0.34,0,0.0,888,0.34,0,0.0,888,0.34,0,0.0,704,0.27,0,0.0,0,0.0,0,0.0
arduino:samd:nano_33_iot,888,0.34,0,0.0,888,0.34,0,0.0,888,0.34,0,0.0,704,0.27,0,0.0,0,0.0,0,0.0
esp32:esp32:esp32,724,0.06,0,0.0,668,0.05,0,0.0,716,0.05,0,0.0,,,,,,,,
esp8266:esp8266:huzzah,620,0.06,352,0.43,624,0.06,364,0.44,620,0.06,352,0.43,,,,,,,,

@aentinger
Copy link
Collaborator

@aentinger is there any particular reason why library is shipped with this line commented out?

Yes. It consumes a lot of memory, since all debug strings are stored in flash. However, I think RP2040 and Portenta H7 can take the flash hit, SAMD based boards definitely shouldn't, Uno WiFi Rev. 2 couldn't 😉 Just keep this in the back of your mind.

@aentinger
Copy link
Collaborator

Addition: If you think some output is super-useful, you could upgrade it to DEBUG_INFO?

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Jun 28, 2023
@pennam
Copy link
Collaborator

pennam commented Apr 24, 2024

superseded by #449

@pennam pennam closed this Apr 24, 2024
@per1234 per1234 added the conclusion: duplicate Has already been submitted label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants