Hi, basically I want to expose my firmware's version through the GATT DIS (Device Information Service) to client applications.
I have gone through:
And they were both useful: I have a DIS service up and running but I wish to generate the Firmware Revision String characteristics's value from the VERSION file. The documentation says for use in kconfig files, the following variables are available:
My question is: can I use these in the prj.conf file (since it is a Kconfig fragment), where I already have the configuration options for DIS:
CONFIG_BT_DIS=y CONFIG_BT_DIS_SETTINGS=y CONFIG_BT_DIS_STR_MAX=21 CONFIG_BT_DIS_PNP=n CONFIG_BT_DIS_MODEL="TODO" CONFIG_BT_DIS_MANUF="TODO" CONFIG_BT_DIS_SERIAL_NUMBER=y CONFIG_BT_DIS_FW_REV=y CONFIG_BT_DIS_HW_REV=y CONFIG_BT_DIS_SERIAL_NUMBER_STR="TODO" CONFIG_BT_DIS_FW_REV_STR=$(VERSION_MAJOR).$(VERSION_MINOR) CONFIG_BT_DIS_HW_REV_STR="TODO"
As per my requirments, I can only provide a major.minor version string but the above causes a build time failure. Can Kconfig variables be used in prj.conf files? If I can somehow use these variables in my prj.conf I can populate my DIS's firmware string revision characteristic using my VERSION file which would be very convenient.