-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(ble): fix race condition for MAC addr device ID in sample #24
base: main
Are you sure you want to change the base?
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
7ef3b8b
to
3c26787
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about this more, and I think I've sadly come to the conclusion that we just shouldn't try to use this for the BLE MAC case. I think that IMEI and network MAC are fine to keep in. Maybe we add a little blurb to the Kconfig to indicate this is for a network MAC (ie nrf7002).
Also I realized that the device serial isn't needed for reboot events 😑 should have remembered that. There's a Memfault config to include device serial with events but it's disabled by default because nearly all devices use the device serial in the chunks POST url.
To clarify -- you're thinking we remove the example of using the BLE MAC addr for the device id? |
8e5a36d
to
1132580
Compare
1132580
to
5c83056
Compare
@ejohnso49 This is back on my radar and I applied your suggestions -- let me know what you think! |
### 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 ```
5c83056
to
80ce6da
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tackling this, at least we won't have blank device serial's by default
Summary
The device ID when using the BLE MAC address is
Unknown
after the systemboots because the device has not been given a MAC address yet at the
time the device ID is set (system init). This change fixes that by setting a
static device id for the
peripheral_mds
sample app.Bonus - enabled logging at the
INFO
level on theperipheral_mds
app so we can run commands like
mflt get_device_info
and get print-outs.Test Plan
Resolves: MCU-433