Hi,
This string is defined by "CONFIG_BT_DIS_FW_REV_STR". Is there any API that can modify it?
Hi,
This string is defined by "CONFIG_BT_DIS_FW_REV_STR". Is there any API that can modify it?
Hi,
Try to set
VERSION_MAJOR = 1
VERSION_MINOR =23
Kind regards,
Andreas
Hi,
It's format is not what I expected because its default format is "0.0.0+0".
The format I want is "0.00"(VERSION_MAJOR.VERSION_MINOR).
So I hope to modify the BLE information through API.
SunHuang said:So I hope to modify the content of "CONFIG_BT_DIS_FW_REV_STR" by writing a string.
Could you clarify if you mean "to modify the config during runtime" or to "modify it as a string before building"?
SunHuang said:Can you tell me what is the API to modify BLE GATT?
I'm not sure what you're referring to, but here is the API for bt_gatt: https://docs.nordicsemi.com/bundle/nrf-apis-latest/page/group_bt_gattp.html
Kind regards,
Andreas
Hi,
This link is the same as my need.
Because VERSION_MAJOR ang VERSION_MINOR are numerical , setting it directly in Kconfig will get the result of v"space"."space"
So now I plan to use ""to modify the config during runtime"" to change the Firmware Revision String.
But I can't use this API.
Hi again,
Thank you for clarifying! This configuration is set during build time. Where did you see that you can change this during run time?
Regarding the build error you're showing it seems to me that the function is not declared before you call it.
Kind regards,
Hi,
I first tried to use "modify it as a string before building" and found that the displayed results were not as expected.
So I go with the "to modify the config during runtime" approach, which I think has been declared.
Can you tell me where I made a mistake?
From the picture I can't state if you've declared it or not unfortunately. The only thing I can see is that settings_runtime_set() is a function you've written, (or rather, I assume so). If this is the case, the error is that Sunion::AppTask::StartApp() function does not know that this function exists before you're calling settings_runtime_set().
You need to declare it before you call it. See https://www.tutorialspoint.com/cplusplus/cpp_functions.htm
Kind regards,
Andreas
From the picture I can't state if you've declared it or not unfortunately. The only thing I can see is that settings_runtime_set() is a function you've written, (or rather, I assume so). If this is the case, the error is that Sunion::AppTask::StartApp() function does not know that this function exists before you're calling settings_runtime_set().
You need to declare it before you call it. See https://www.tutorialspoint.com/cplusplus/cpp_functions.htm
Kind regards,
Andreas
Hi,
My project does not contain this file(C:\ncs\v2.6.1\zephyr\subsys\settings\src\settings_runtime.c)
How do I modify "CMakeLists.txt" to include this file?
Hi,
I have configured "CONFIG_SETTINGS_RUNTIME" and executed
Can you give me some suggestions?
Hi,
Modifying the string during runtime is not supported since it is set during build as I suggested previously, but I'm not sure I understand what you're aiming to do now.
In the image you posted, you clearly see that you've included settings.h and are calling the function that is unreferenced. Where did you get this part from? Is it from another sample, is it present in the NCS v2.6.1 sample that you're using or elsewhere?
Kind regards,
Andreas
Hi,
I want to get result like this:
The "V1.0.2" will be displayed on "Firmware Revision String".
No matter use "tmodify the config during runtime" or "modify it as a string before building" , only I need is to fulfill this function.
VERSION_MAJOR = 1 VERSION_MINOR = 0 PATCHLEVEL = 2 VERSION_TWEAK = 0 EXTRAVERSION =