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

Use the WiFi Nina module for storing the OTA image #145

Merged
merged 6 commits into from
Jul 9, 2020
Merged

Conversation

aentinger
Copy link
Collaborator

@aentinger aentinger commented Jun 26, 2020

In order to enable OTA you need to extend your sketch the following way:

#include <SNU.h>
#include <utility/ota/OTAStorage_Nina.h>
/* ... */
static OTAStorage_Nina ota_storage;
/* ... */
void setup()
{
  ArduinoCloud.begin(ArduinoIoTPreferredConnection, "mqtts-sa.iot.oniudra.cc");
  ArduinoCloud.setOTAStorage(ota_storage);
  /* ... */

Furthermore you have to enable the NiNa as OTA storage module by editing ArduinoIoTCloud_Config.h

-  #define OTA_STORAGE_NINA        (0)
+  #define OTA_STORAGE_NINA        (1)

This requires to load the latest nina firmware from nina-fw:master as well as the latest WiFiNiNa library from WiFiNINA:master.

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2020

Codecov Report

Merging #145 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #145   +/-   ##
=======================================
  Coverage   95.61%   95.61%           
=======================================
  Files          29       29           
  Lines        1004     1004           
=======================================
  Hits          960      960           
  Misses         44       44           

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 6db4c11...b00964e. Read the comment docs.

@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jul 9, 2020
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jul 9, 2020
@arduino-libraries arduino-libraries deleted a comment from github-actions bot Jul 9, 2020
@aentinger
Copy link
Collaborator Author

Successfully tested with MKR WiFi 1010 on DEV ✔️
wifi1010-ota-bin.zip

@github-actions
Copy link

github-actions bot commented Jul 9, 2020

Memory usage change @b00964effd7e852de0ece1cd1406a4e89eafe6b5

FQBN Flash Usage RAM For Global Variables
arduino:samd:mkr1000 0 0
arduino:samd:mkrgsm1400 0 0
arduino:samd:mkrnb1500 0 0
arduino:samd:mkrwan1300 0 0
arduino:samd:mkrwifi1010 🔺 +18896 🔺 +320
arduino:samd:nano_33_iot 🔺 +18892 🔺 +316
esp8266:esp8266:huzzah 0 0

@aentinger aentinger merged commit a93b4e2 into master Jul 9, 2020
@aentinger aentinger deleted the ota-nina branch July 9, 2020 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants