Echo example of class C devices receiving downlink and sending as next uplink

Dependencies:   libmDot-mbed5 ISL29011

Revision:
9:72d3203279b2
Parent:
5:97ed5f2f099e
Child:
12:ec9768677cea
diff -r e667f4a507b1 -r 72d3203279b2 examples/src/ota_example.cpp
--- a/examples/src/ota_example.cpp	Fri Oct 07 15:31:03 2016 -0500
+++ b/examples/src/ota_example.cpp	Fri Oct 07 15:48:23 2016 -0500
@@ -57,6 +57,12 @@
     // network KEY = cmac(network passphrase)
     update_ota_config_name_phrase(network_name, network_passphrase, frequency_sub_band, public_network, ack);
     //update_ota_config_id_key(network_id, network_key, frequency_sub_band, public_network, ack);
+    
+    // save changes to configuration
+    logInfo("saving configuration");
+    if (!dot->saveConfig()) {
+        logError("failed to save configuration");
+    }
 
     // restore the saved session if the dot woke from deepsleep mode
     // useful to use with deepsleep because session info is otherwise lost when the dot enters deepsleep
@@ -64,7 +70,7 @@
         logInfo("restoring network session from NVM");
         dot->restoreNetworkSession();
     }
-    
+
     // display configuration
     display_config();