Skip to content

Commit 80ce6da

Browse files
committed
fix(ble): set device ID after BLE init when using MAC address
### Summary The device ID when using the MAC address was Unknown after the system booted because the device has not been given a MAC address yet at the time the device ID is set (system init). This change removes the option for using a MAC address as the device id for BLE devices, and sets a static device id for the BLE sample app. ### Test Plan - Tested on a nRF52840 DK with the peripheral_mds sample app ``` uart:~$ *** Booting nRF Connect SDK v3.5.99-ncs1-4965-g3733e7097909 *** Starting Bluetooth Memfault example Bluetooth initialized Advertising successfully started uart:~$ mflt get_device_info [00:00:03.995,544] <inf> mflt: S/N: nrf-ble-testdevice [00:00:03.995,605] <inf> mflt: SW type: nrf-ble-fw [00:00:03.995,666] <inf> mflt: SW version: 0.0.1+688c47 [00:00:03.995,727] <inf> mflt: HW version: nrf52840dk_nrf52840 ```
1 parent 6b6426a commit 80ce6da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samples/bluetooth/peripheral_mds/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ See `Memfault SDK`_ for more information.
133133

134134
To send data to the Memfault cloud through a Bluetooth gateway, you must configure a project key using the :kconfig:option:`CONFIG_MEMFAULT_NCS_PROJECT_KEY` Kconfig option.
135135
You can find your project key in the project settings at `Memfault Dashboards`_.
136-
You also need to set the :kconfig:option:`CONFIG_MEMFAULT_NCS_DEVICE_ID` static Kconfig option for this sample
136+
Use :kconfig:option:`CONFIG_MEMFAULT_NCS_DEVICE_ID` to set a static device ID. For this sample, the device id is ``ncs-ble-testdevice`` by default.
137137

138138
Building and running
139139
********************

samples/bluetooth/peripheral_mds/prj.conf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ CONFIG_HEAP_MEM_POOL_SIZE=256
3737

3838
CONFIG_MEMFAULT=y
3939
CONFIG_MEMFAULT_SHELL=y
40+
CONFIG_MEMFAULT_LOGGING_ENABLE=y
41+
CONFIG_MEMFAULT_LOG_LEVEL_INF=y
4042

4143
CONFIG_MEMFAULT_NCS_PROJECT_KEY=""
42-
CONFIG_MEMFAULT_NCS_DEVICE_ID=""
44+
CONFIG_MEMFAULT_NCS_DEVICE_ID="nrf-ble-testdevice"
4345

4446
CONFIG_MEMFAULT_NCS_BT_METRICS=y
4547

0 commit comments

Comments
 (0)