Skip to content

Commit e8b1544

Browse files
simensrostadrlubos
authored andcommitted
net: lib: nrf_cloud: Fix SDK version string
Set SDK version string reported to the cloud to the correct value. Previously the app version retreived from the modem info library was used. Signed-off-by: Simen S. Røstad <[email protected]>
1 parent 47e8c4a commit e8b1544

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
#include <zephyr/sys/util.h>
2424
#include <zephyr/logging/log.h>
2525
#include <modem/modem_info.h>
26+
#include <ncs_version.h>
27+
#include <ncs_commit.h>
2628
#include "cJSON_os.h"
2729

2830
LOG_MODULE_REGISTER(nrf_cloud_codec_internal, CONFIG_NRF_CLOUD_LOG_LEVEL);
2931

32+
#define SDK_VERSION NCS_VERSION_STRING "-" NCS_COMMIT_STRING
33+
3034
/** @brief How the control section is handled when either a trimmed shadow
3135
* or a delta shadow is received.
3236
*/
@@ -1391,7 +1395,7 @@ static int encode_modem_info_device(struct device_param *device, cJSON *json_obj
13911395
return -ENOMEM;
13921396
}
13931397

1394-
if (json_add_str_cs(json_obj, "sdkVer", device->app_version)) {
1398+
if (json_add_str_cs(json_obj, "sdkVer", SDK_VERSION)) {
13951399
return -ENOMEM;
13961400
}
13971401

0 commit comments

Comments
 (0)