summaryrefslogtreecommitdiff
path: root/nrfdemo
diff options
context:
space:
mode:
authorMichal Hanus <hanus.michal@divelit.cz>2025-05-28 19:32:45 +0200
committerMichal Hanus <hanus.michal@divelit.cz>2025-05-28 19:32:45 +0200
commit8c735902fc372402c7c27d03fc8f77532fef542e (patch)
tree3879d4cf957cda7230fdaaa9f07f66cad594fb76 /nrfdemo
parentf4b199f60188733cb3bafeb199bdf6fe3758616e (diff)
posun
Diffstat (limited to 'nrfdemo')
-rw-r--r--nrfdemo/src/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/nrfdemo/src/main.c b/nrfdemo/src/main.c
index e44acaa..81f6654 100644
--- a/nrfdemo/src/main.c
+++ b/nrfdemo/src/main.c
@@ -78,7 +78,7 @@ static int modem_configure(void)
return err;
}
- err = lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_LTEM, LTE_LC_SYSTEM_MODE_PREFER_LTEM);
+ err = lte_lc_system_mode_set(LTE_LC_SYSTEM_MODE_NBIOT, LTE_LC_SYSTEM_MODE_PREFER_NBIOT);
if (err) {
LOG_ERR("Failed to set system mode LTE-M: %d", err);
return err;
@@ -97,7 +97,7 @@ static int modem_configure(void)
// Blink LED to indicate we connected to MQTT broker
dk_set_led_on(DK_LED1);
- k_msleep(2000);
+ k_msleep(1000);
dk_set_led_off(DK_LED1);
return 0;
@@ -357,9 +357,8 @@ int main(void)
do_connect:
if (connect_attempt++ > 0) {
- LOG_INF("Reconnecting in %d seconds...",
- 20);
- k_sleep(K_SECONDS(20));
+ LOG_INF("Reconnecting in %d seconds...", 2);
+ k_sleep(K_SECONDS(2)); // resleep
}
LOG_INF("Connection to broker using mqtt_connect");