Skip to content

Commit 25b58ba

Browse files
tokangasnordicjm
authored andcommitted
samples: cellular: modem_shell: Improve LwM2M flagging
Made it possible to disable all nRF Cloud transports and REST client when CONFIG_MOSH_CLOUD_LWM2M is enabled. Signed-off-by: Tommi Kangas <[email protected]>
1 parent 35a6a72 commit 25b58ba

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

samples/cellular/modem_shell/src/gnss/gnss.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ BUILD_ASSERT(false, "nRF Cloud assistance and SUPL library cannot be enabled at
5656
#endif
5757

5858
#if defined(CONFIG_NRF_CLOUD_AGNSS) || defined(CONFIG_NRF_CLOUD_PGPS)
59-
/* Verify that MQTT, REST or COAP is enabled */
59+
/* Verify that nRF Cloud MQTT, REST or COAP, or LwM2M is enabled */
6060
BUILD_ASSERT(IS_ENABLED(CONFIG_NRF_CLOUD_MQTT) ||
6161
IS_ENABLED(CONFIG_NRF_CLOUD_REST) ||
62-
IS_ENABLED(CONFIG_NRF_CLOUD_COAP),
62+
IS_ENABLED(CONFIG_NRF_CLOUD_COAP) ||
63+
IS_ENABLED(CONFIG_MOSH_CLOUD_LWM2M),
6364
"CONFIG_NRF_CLOUD_MQTT, CONFIG_NRF_CLOUD_REST or CONFIG_NRF_CLOUD_COAP "
64-
"transport must be enabled");
65+
"transport, or CONFIG_MOSH_CLOUD_LWM2M must be enabled");
6566
#endif
6667

6768
#define GNSS_DATA_HANDLER_THREAD_STACK_SIZE 1536

samples/cellular/modem_shell/src/location/location_shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ static int location_cloud_send(char *body)
206206
} else {
207207
mosh_error("Failed to get device ID, error: %d", ret);
208208
}
209+
#else
210+
ret = -EOPNOTSUPP;
209211
#endif
212+
210213
return ret;
211214
}
212215

0 commit comments

Comments
 (0)