Set CONFIG_BT_DEVICE_NAME from CMakeLists?

Hello,

We are developing for the NRF5340 and Zephyr (SDK 2.5.0). As we approach the first preproduction run, we are realizing we need a better way to set device names than just editing CONFIG_BT_DEVICE_NAME  in the prj.conf file (and then waiting a few minutes for the entire project to build)

We had the thought that maybe we could edit it in the CMakeLists file, seeing as we are able to set other settings there.

Presently we have tried this:

set(CONFIG_BT_DEVICE_NAME "foo")

But it doesnt seem to work.

To ensure I wasnt having a caching issue with whatever was scanning the BLE, I added this code to our device to test with:

NUS_Send("main alive, time %u name %s \n",Get_Timer_Count(),CONFIG_BT_DEVICE_NAME);

And my output is always:

main alive, time 268335 name Zephyr

The time increments, but I always see the default name.

What am I doing wrong? Is this a viable approach?

Thanks for your time!

Parents Reply Children
No Data
Related