Skip to content

Commit 9707a66

Browse files
plskeggsnordicjm
authored andcommitted
samples: cellular: nrf_cloud_rest_fota: Update bad cred handling
Turn off network and halt for either type of bad credential failures. Jira: IRIS-9151 Signed-off-by: Pete Skeggs <[email protected]>
1 parent 6bf8fee commit 9707a66

File tree

1 file changed

+4
-1
lines changed
  • samples/cellular/nrf_cloud_rest_fota/src

1 file changed

+4
-1
lines changed

samples/cellular/nrf_cloud_rest_fota/src/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,9 @@ static void check_credentials(void)
473473
LOG_ERR("Required nRF Cloud credentials were not found");
474474
LOG_INF("Install credentials and then reboot the device");
475475
k_sleep(K_FOREVER);
476+
} else if (err == -ENOPROTOOPT) {
477+
LOG_ERR("Required root CA certificate is missing.");
478+
k_sleep(K_FOREVER);
476479
} else if (err) {
477480
LOG_ERR("nrf_cloud_credentials_configured_check() failed, error: %d", err);
478481
LOG_WRN("Continuing without verifying that credentials are installed");
@@ -552,7 +555,7 @@ int main(void)
552555
/* Wait for the configured duration or a button press */
553556
(void)nrf_cloud_rest_disconnect(&rest_ctx);
554557

555-
LOG_INF("Retrying in %d minute(s) or when button %d is pressed",
558+
LOG_INF("Checking for FOTA job in %d minute(s) or when button %d is pressed",
556559
fota_check_rate, CONFIG_REST_FOTA_BUTTON_EVT_NUM);
557560

558561
(void)k_sem_take(&button_press_sem, K_MINUTES(fota_check_rate));

0 commit comments

Comments
 (0)