Open mondalaci opened 10 months ago
Hi @mondalaci! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
Hi @mondalaci, what makes you think the message is a warning? It's an "info" message, since it's critical that the app calls settings_load()
when CONFIG_BT_SETTINGS
is enabled. Some functions of the stack might work without an identity address, but many will not work. The message is basically a reminder to app-developers that if they build with such a configuration they need to remember to call settings_load(). The stack cannot know in advance if the app will or will not call settings_load()
after bt_enable()
so it always prints this reminder message. How would you propose to change the message to make it look less than a warning? If you would completely remove it, how would you instead give an indication to app-developers when their app exhibits mysterious behaviour because the Bluetooth stack is only partially initialised (because settings_load() was never called)?
Hi @jhedberg, sorry, I mean an info message, not a warning. But I think it's a good idea only to display messages when really justified, regardless.
Alternatively, how about displaying this info message when the functions that only work with an identity address are called and when previously, settings_load()
wasn't called?
Hi @jhedberg, sorry, I mean an info message, not a warning. But I think it's a good idea only to display messages when really justified, regardless.
Alternatively, how about displaying this info message when the functions that only work with an identity address are called and when previously,
settings_load()
wasn't called?
Why should overhead be added to every function that uses settings?
Any way to implement my suggestion with some kind of preprocessor magic? That'd involve no runtime overhead.
Any way to implement my suggestion with some kind of preprocessor magic? That'd involve no runtime overhead.
No
While I find the info message that gets displayed even if the API is used correctly annoying, if no good solution exists, I don't want to push this too hard, and feel free to close this issue.
I get the following warning in the console:
I: No ID address. App must call settings_load()
According to https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/bluetooth-arch.html#persistent-storage :
My code works as suggested:
If I reverse the order of the above function calls, I get:
This warning message always appears, even if I use the API as suggested, so I think it's rather disturbing and should be removed.