Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Dot-Examples libxDot-mbed5 ISL29011
Fork of Dot-Examples by
Diff: examples/src/ota_example.cpp
- Revision:
- 15:364df461110f
- Parent:
- 14:19fae4509473
- Child:
- 16:a3832552dfe1
diff -r 19fae4509473 -r 364df461110f examples/src/ota_example.cpp
--- a/examples/src/ota_example.cpp Tue Oct 11 13:53:32 2016 -0500
+++ b/examples/src/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
@@ -70,6 +70,13 @@
// 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);
+
+ // 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");
