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

Dependencies:   libmDot-mbed5 ISL29011

Revision:
15:364df461110f
Parent:
14:19fae4509473
Child:
16:a3832552dfe1
diff -r 19fae4509473 -r 364df461110f examples/src/auto_ota_example.cpp
--- a/examples/src/auto_ota_example.cpp	Tue Oct 11 13:53:32 2016 -0500
+++ b/examples/src/auto_ota_example.cpp	Tue Oct 11 16:33:45 2016 -0500
@@ -16,7 +16,7 @@
 static uint8_t network_key[] = { 0x1F, 0x33, 0xA1, 0x70, 0xA5, 0xF1, 0xFD, 0xA0, 0xAB, 0x69, 0x7A, 0xAE, 0x2B, 0x95, 0x91, 0x6B };
 static uint8_t frequency_sub_band = 0;
 static bool public_network = false;
-static uint8_t ack = 1;
+static uint8_t ack = 0;
 
 // deepsleep consumes slightly less current than sleep
 // in sleep mode, IO state is maintained, RAM is retained, and application will resume after waking up
@@ -72,6 +72,13 @@
         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);
     
+        // configure network link checks
+        // network link checks are a good alternative to requiring the gateway to ACK every packet and should allow a single gateway to handle more Dots
+        // check the link every count packets
+        // declare the Dot disconnected after threshold failed link checks
+        // for count = 3 and threshold = 5, the Dot will be considered disconnected after 15 missed packets in a row
+        update_network_link_check_config(3, 5);
+
         // save changes to configuration
         logInfo("saving configuration");
         if (!dot->saveConfig()) {