Skip to content

Conversation

@noahp
Copy link
Contributor

@noahp noahp commented Oct 29, 2025

Set the default Memfault Device Serial to use the hw_id library. The
available options for built-in Memfault Device Serial are now:

  • CONFIG_MEMFAULT_NCS_DEVICE_ID_HW_ID (new, and default) - Use
    hw_id provided device ID, which is also what nRF Cloud uses for
    device identity. See the :ref:lib_hw_id library for options for
    device ID source.
  • CONFIG_MEMFAULT_NCS_DEVICE_ID_STATIC - Used to set a custom
    build-time defined static device ID, primarily useful for testing.
  • CONFIG_MEMFAULT_NCS_DEVICE_ID_RUNTIME - Use a runtime-applied device
    ID, commonly used when the serial number of the device is written into
    settings at manufacturing time, for example.
  • CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI (deprecated) - Use the LTE modem
    IMEI as the device ID.
  • CONFIG_MEMFAULT_NCS_DEVICE_ID_NET_MAC (deprecated) - Use the network
    interface MAC address as the device ID.

@NordicBuilder NordicBuilder added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Oct 29, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 29, 2025

CI Information

To view the history of this post, click the 'edited' button above
Build number: 18

Inputs:

Sources:

sdk-nrf: PR head: 9e29a26b845624af50ae5d90fac5a37016062a05

more details

sdk-nrf:

PR head: 9e29a26b845624af50ae5d90fac5a37016062a05
merge base: e306a6262a51932957d82d55d4cfc6205447aff7
target head (main): 7a762b56f289684e7d8140f43d75ed46611a8212
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (8)
doc
│  ├── nrf
│  │  ├── releases_and_maturity
│  │  │  ├── migration
│  │  │  │  │ migration_guide_3.2.rst
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
modules
│  ├── memfault-firmware-sdk
│  │  ├── Kconfig
│  │  │ memfault_integration.c
samples
│  ├── bluetooth
│  │  ├── peripheral_mds
│  │  │  │ prj.conf
│  ├── cellular
│  │  ├── modem_shell
│  │  │  │ overlay-memfault.conf
│  ├── debug
│  │  ├── memfault
│  │  │  ├── boards
│  │  │  │  ├── nrf9151dk_nrf9151_ns.conf
│  │  │  │  │ thingy91x_nrf9151_ns.conf

Outputs:

Toolchain

Version: df3cc9d822
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:df3cc9d822_e595b21c39

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 911
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-ble_samples
    • ✅ test-fw-nrfconnect-nrf-iot_samples
    • ⚠️ test-fw-nrfconnect-nrf_lrcs_mosh
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • desktop52_verification
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps-main
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread-main
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from d598ab4 to 413d137 Compare October 30, 2025 14:05
@github-actions
Copy link

github-actions bot commented Oct 30, 2025

@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 413d137 to 28da197 Compare November 6, 2025 16:44
Copilot AI review requested due to automatic review settings November 6, 2025 16:44
@NordicBuilder NordicBuilder added doc-required PR must not be merged without tech writer approval. and removed changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. labels Nov 6, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR simplifies the Memfault device ID configuration by consolidating the device ID source options and improving defaults based on system configuration.

  • Replaced separate CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI and CONFIG_MEMFAULT_NCS_DEVICE_ID_NET_MAC options with a unified CONFIG_MEMFAULT_NCS_DEVICE_ID_HW_ID that uses the hw_id library
  • Set intelligent defaults for the HW ID source based on available hardware (IMEI for modem-equipped devices, BLE MAC for Bluetooth devices, network MAC for specific boards)
  • Deprecated the old CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI option while maintaining backward compatibility

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
samples/debug/memfault/boards/thingy91x_nrf9151_ns.conf Removed explicit CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI configuration as it's now automatically selected based on NRF_MODEM_LIB
samples/debug/memfault/boards/nrf9151dk_nrf9151_ns.conf Removed explicit CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI configuration as it's now automatically selected based on NRF_MODEM_LIB
samples/cellular/modem_shell/overlay-memfault.conf Removed explicit CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI configuration as it's now automatically selected based on NRF_MODEM_LIB
samples/bluetooth/peripheral_mds/prj.conf Removed hardcoded device ID as BLE MAC will now be used automatically based on BT being enabled
modules/memfault-firmware-sdk/memfault_integration.c Updated preprocessor conditions to use new CONFIG_MEMFAULT_NCS_DEVICE_ID_HW_ID alongside deprecated IMEI option
modules/memfault-firmware-sdk/Kconfig Introduced CONFIG_MEMFAULT_NCS_DEVICE_ID_HW_ID as the new default, deprecated IMEI option, and added intelligent HW ID source defaults
doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst Documented the device ID configuration changes and new default behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings November 6, 2025 16:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 87a9436 to 10e5533 Compare November 6, 2025 16:55
Copilot AI review requested due to automatic review settings November 6, 2025 18:51
@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 10e5533 to 94e9e1a Compare November 6, 2025 18:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 94e9e1a to a22afd5 Compare November 6, 2025 19:00
@noahp noahp marked this pull request as ready for review November 6, 2025 19:15
Copilot AI review requested due to automatic review settings November 6, 2025 19:15
@noahp noahp requested review from a team as code owners November 6, 2025 19:15
@noahp noahp requested review from jtguggedal and philips77 November 6, 2025 19:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* Removed a metric for the tracking Bluetooth TX thread unused stack ``ncs_bt_tx_unused_stack``.
The thread in question was removed in Zephyr v3.7.0.

* Simplified the options for ``CONFIG_MEMFAULT_NCS_DEVICE_ID_*``, which sets the Memfault Device Serial:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comprehensive description of the changes is good, but just wondering if most of this should be in the migration guide instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agree. Would the below look better?

In the changelog, provide the below details:

  • Simplified the options for CONFIG_MEMFAULT_NCS_DEVICE_ID_*, which sets the Memfault Device Serial.
    Additionally, when using hw_id as the Memfault Device Serial source, the default hw_id source is modified depending on the system configuration
    See Migration guide for nRF Connect SDK v3.2.0_ for more details.

The above could be moved under the updated heading and this whole section could be moved to the 3.2 migration guide - https://github.com/nrfconnect/sdk-nrf/blob/main/doc/nrf/releases_and_maturity/migration/migration_guide_3.2.rst.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, I'll make this change! thanks both <3

# the nRF7002 DK
default HW_ID_LIBRARY_SOURCE_NET_MAC if BOARD_NRF7002DK_NRF5340_CPUAPP
# And finally, use the BLE MAC address if Bluetooth is enabled
default HW_ID_LIBRARY_SOURCE_BLE_MAC if BT
Copy link
Contributor Author

@noahp noahp Nov 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this is actually not ideal under certain conditions- it uses bt_le_oob_get_local(), which will generate a new Private Resolvable Address :(. It may be better to use UID instead, @maxd-nordic can you comment?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be a mistake in my hwid implementation then :o

Copilot AI review requested due to automatic review settings November 13, 2025 16:49
@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 87c8de2 to 2582eca Compare November 13, 2025 16:49
Copilot finished reviewing on behalf of noahp November 13, 2025 16:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

noahp added a commit to noahp/sdk-nrf that referenced this pull request Nov 13, 2025
Rename the option and the name string to adhere to Bluetooth naming
convention.

See original suggestion here:

nrfconnect#25313 (comment)

Signed-off-by: Noah Pendleton <[email protected]>
@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from 2582eca to c6e8ee5 Compare November 13, 2025 17:52
noahp added a commit to noahp/sdk-nrf that referenced this pull request Nov 13, 2025
Rename the option and the name string to adhere to Bluetooth naming
convention.

See original suggestion here:

nrfconnect#25313 (comment)

Signed-off-by: Noah Pendleton <[email protected]>
noahp added a commit to noahp/sdk-nrf that referenced this pull request Nov 13, 2025
Rename the option and the name string to adhere to Bluetooth naming
convention.

See original suggestion here:

nrfconnect#25313 (comment)

Signed-off-by: Noah Pendleton <[email protected]>
@grochu grochu self-requested a review November 14, 2025 11:20
Copilot AI review requested due to automatic review settings November 14, 2025 13:49
@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from c6e8ee5 to fb123cc Compare November 14, 2025 13:49
@noahp
Copy link
Contributor Author

noahp commented Nov 14, 2025

This is now ready for final review, appreciate all the excellent review feedback!

Copilot finished reviewing on behalf of noahp November 14, 2025 13:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

noahp added a commit to noahp/sdk-nrf that referenced this pull request Nov 14, 2025
Rename the option and the name string to adhere to Bluetooth naming
convention.

See original suggestion here:

nrfconnect#25313 (comment)

Signed-off-by: Noah Pendleton <[email protected]>
Copilot AI review requested due to automatic review settings November 17, 2025 15:51
Set the default Memfault Device Serial to use the `hw_id` library. The
available options for built-in Memfault Device Serial are now:

- `CONFIG_MEMFAULT_NCS_DEVICE_ID_HW_ID` (new, and default) - Use
  ``hw_id`` provided device ID, which is also what nRF Cloud uses for
  device identity. See the :ref:`lib_hw_id` library for options for
  device ID source.
- `CONFIG_MEMFAULT_NCS_DEVICE_ID_STATIC` - Used to set a custom
  build-time defined static device ID, primarily useful for testing.
- `CONFIG_MEMFAULT_NCS_DEVICE_ID_RUNTIME` - Use a runtime-applied device
  ID, commonly used when the serial number of the device is written into
  settings at manufacturing time, for example.
- `CONFIG_MEMFAULT_NCS_DEVICE_ID_IMEI` (deprecated) - Use the LTE modem
  IMEI as the device ID.
- `CONFIG_MEMFAULT_NCS_DEVICE_ID_NET_MAC` (deprecated) - Use the network
  interface MAC address as the device ID.

Signed-off-by: Noah Pendleton <[email protected]>
@noahp noahp force-pushed the noahp/memfault-device-id-is-hw-id branch from f96885f to 9e29a26 Compare November 17, 2025 15:52
Copilot finished reviewing on behalf of noahp November 17, 2025 15:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@gminn gminn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great clean up. I have a few non-blocking questions on defaults!

@jtguggedal jtguggedal merged commit ed8374d into nrfconnect:main Nov 21, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-required PR must not be merged without tech writer approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.