Issues with peripheral_mds with CONFIG_MEMFAULT_NCS_DEVICE_ID_RUNTIME=y

I am trying to test with Dynamic device ID at run time and The chunks are not uploaded to memfault cloud  through anroid nrf memfault application (See the attached screenshot). Things are working fine with if statice Device ID  is used.

following are the logs from the NRF52840DK (As seen in the logs chunks are sent successfully)

uart:~$ *** Booting nRF Connect SDK v3.5.99-ncs1-1 ***
Starting Bluetooth Memfault example
Bluetooth initialized
Advertising successfully started


[00:00:00.005,950] <inf> mflt: Reset Reason, RESETREAS=0x1
[00:00:00.006,011] <inf> mflt: Reset Causes:
[00:00:00.006,042] <inf> mflt: Pin Reset
[00:00:00.006,988] <inf> mflt: GNU Build ID: d701d1cef41e4674fd3393ea0e8d881a5aea868b
[00:00:00.037,109] <err> settings: set-value failure. key: bt/name error(-2)
uart:~$ Connected 98:0D:6F:A9:25:CA (public)
Security changed: 98:0D:6F:A9:25:CA (public) level 2
[00:00:20.576,171] <dbg> mds: data_export_ccc_changed: MDS Data Export CCCD changed, handle: 31, value: 0x0001
[00:00:22.076,049] <dbg> mds: device_identifier_read: MDS Device Identifier characteristic read, handle: 24, conn: 0x20002740
[00:00:22.196,075] <dbg> mds: data_uri_read: MDS Data URI characteristic read, handle: 26, conn: 0x20002740
[00:00:22.285,919] <dbg> mds: authorization_read: MDS Authorization characteristic read, handle: 28, conn: 0x20002740
[00:00:22.406,097] <dbg> mds: data_export_write: MDS Data Export characteristic write, handle 30, conn: 0x20002740
[00:00:22.406,738] <dbg> mds: mds_data_send: Memfault diagnostic data chunk 0 successfully sent

Android App screenshot below

Code diff is given below:

C:\Users\mahes\git\ws\nrf\samples>git diff
diff --git a/samples/bluetooth/peripheral_mds/prj.conf b/samples/bluetooth/peripheral_mds/prj.conf
index e4cbed98f..ba7904afe 100644
--- a/samples/bluetooth/peripheral_mds/prj.conf
+++ b/samples/bluetooth/peripheral_mds/prj.conf
@@ -37,12 +37,15 @@ CONFIG_HEAP_MEM_POOL_SIZE=256

CONFIG_MEMFAULT=y
CONFIG_MEMFAULT_SHELL=y
+CONFIG_MEMFAULT_NCS_PROJECT_KEY=""

-CONFIG_MEMFAULT_NCS_PROJECT_KEY=""
-CONFIG_MEMFAULT_NCS_DEVICE_ID=""
-
+#CONFIG_MEMFAULT_NCS_DEVICE_ID="NRF52840DK"
+CONFIG_MEMFAULT_NCS_DEVICE_ID_RUNTIME=y
CONFIG_MEMFAULT_NCS_BT_METRICS=y

+CONFIG_MEMFAULT_LOG_LEVEL_DBG=y
+CONFIG_MEMFAULT_NCS_LOG_LEVEL_DBG=y
+
# Enable bonding
CONFIG_BT_SETTINGS=y
CONFIG_FLASH=y
@@ -53,3 +56,4 @@ CONFIG_SETTINGS=y

# This example requires more stack
CONFIG_MAIN_STACK_SIZE=1152
+CONFIG_BT_MDS_LOG_LEVEL_DBG=y
diff --git a/samples/bluetooth/peripheral_mds/src/main.c b/samples/bluetooth/peripheral_mds/src/main.c
index bbbc08957..685949274 100644
--- a/samples/bluetooth/peripheral_mds/src/main.c
+++ b/samples/bluetooth/peripheral_mds/src/main.c
@@ -20,6 +20,7 @@
#include <memfault/core/trace_event.h>

#define DEVICE_NAME CONFIG_BT_DEVICE_NAME
+//#define DEVICE_NAME "DBG-MEMFAULT"
#define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1)

#define RUN_STATUS_LED DK_LED1
@@ -324,7 +325,6 @@ int main(void)
return 0;
}
}
-
err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad),
sd, ARRAY_SIZE(sd));
if (err) {
diff --git a/samples/matter/lock/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay b/samples/matter/lock/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay
index 69bf97573..9ded0688d 100644
--- a/samples/matter/lock/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay
+++ b/samples/matter/lock/child_image/mcuboot/boards/nrf52840dk_nrf52840.overlay
@@ -9,3 +9,4 @@
nordic,pm-ext-flash = &mx25r64;
};
};
+
\ No newline at end of file
diff --git a/samples/matter/lock/prj.conf b/samples/matter/lock/prj.conf
index 0d717cd98..28e1a948b 100644
--- a/samples/matter/lock/prj.conf
+++ b/samples/matter/lock/prj.conf
@@ -29,10 +29,9 @@ CONFIG_THREAD_NAME=y
CONFIG_MPU_STACK_GUARD=y
CONFIG_RESET_ON_FATAL_ERROR=n
CONFIG_CHIP_LIB_SHELL=y
-
# Reduce application size
CONFIG_USE_SEGGER_RTT=n

# Enable Factory Data feature
CONFIG_CHIP_FACTORY_DATA=y
-CONFIG_CHIP_FACTORY_DATA_BUILD=y
+#CONFIG_CHIP_FACTORY_DATA_BUILD=y

Appreciate if you can help with this quickly

Thanks,

Mahesh

Related