Bluetooth Mesh Light CTL (color tuned light) sample

Is there a sample app that uses the Zephyr Light CTL Bluetooth Mesh model?  I've tried to add that model to the light_ctrl sample app, but get a crash during configuration so I must be doing something wrong. 

The onoff_level_lighting_vnd app claims to support that model but it doesn't seem to be using the Zephyr lighting models. 

Thanks

  • Elfving,

    I made the conf changes you suggested with no change.  

    Here is the log for the event.  The error message appears as soon as I select device in the scanner page of the app.

    *** Booting Mesh Light Fixture v2.8.0-9913506ff072 ***
    *** Using nRF Connect SDK v2.8.0-a2386bfc8401 ***
    *** Using Zephyr OS v3.7.99-0bc3393fb112 ***
    Initializing...
    [00:00:00.009,002] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.009,033] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.009,033] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.009,185] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    fe 2c f9 6a 7f 36 22 2e a0 79 c0 40 be 2c 03 20 |.,.j.6". .y.@.,.
    40 c2 f3 32 |@..2
    [00:00:00.013,275] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.013,305] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.013,336] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 254.63788 Build 573996906
    [00:00:00.013,854] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:00.015,197] <wrn> bt_mesh_access: Unused space in relation list: 14
    [00:00:00.430,297] <inf> bt_hci_core: Identity: D4:B8:86:BC:1B:BE (random)
    [00:00:00.430,328] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x104e, manufacturer 0x0059
    [00:00:00.430,358] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x104e
    [00:00:00.435,852] <inf> bt_mesh_provisionee: Device UUID: 8d065d07-ab75-4658-b2f9-a2f8548ac9a7
    Mesh initialized
    [00:00:04.135,528] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    [00:00:04.135,589] <err> bt_adv: Failed to start advertiser
    [00:00:04.135,620] <err> bt_mesh_adv_ext: Advertising failed: err -12

    Thanks,

    Jack

    By the way, I can get another error without rebooting by backing out of the provisioning page and selecting the device from the scanner page again.  Apparently, the error isn't catastrophic.

    [00:00:00.015,197] <wrn> bt_mesh_access: Unused space in relation list: 14
    [00:00:00.430,297] <inf> bt_hci_core: Identity: D4:B8:86:BC:1B:BE (random)
    [00:00:00.430,328] <inf> bt_hci_core: HCI: version 6.0 (0x0e) revision 0x104e, manufacturer 0x0059
    [00:00:00.430,358] <inf> bt_hci_core: LMP: version 6.0 (0x0e) subver 0x104e
    [00:00:00.435,852] <inf> bt_mesh_provisionee: Device UUID: 8d065d07-ab75-4658-b2f9-a2f8548ac9a7
    Mesh initialized
    [00:00:04.135,528] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    [00:00:04.135,589] <err> bt_adv: Failed to start advertiser
    [00:00:04.135,620] <err> bt_mesh_adv_ext: Advertising failed: err -12
    [00:08:52.918,304] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    [00:08:52.918,365] <err> bt_adv: Failed to start advertiser
    [00:08:52.918,395] <err> bt_mesh_adv_ext: Advertising failed: err -12
    [00:09:08.785,827] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    [00:09:08.785,858] <err> bt_adv: Failed to start advertiser
    [00:09:08.785,888] <err> bt_mesh_adv_ext: Advertising failed: err -12

    45853.prj.conf

  • Could you check the value of CONFIG_BT_EXT_ADV_MAX_ADV_SET in the final generated .config file of the build. You can find it in /build/zephyr/.config.

    Regards,

    Elfving

  • Elfiving,

    Thank you for your continued support.

    <project>/build/zephyr/.config only contains entries of the form SB_CONFIG....  It doesn't have any text matching MAX_ADV_SET.

    When I add the suggested config variable to prj.conf (see below) nothing matching appears in .../.config

    When I grep the entire project, MAX_ADV_SET appears in:

    light_ctrl_sample/build/light_ctrl_sample/zephyr/misc/generated/configs.c

    light_ctrl_sample/build/light_ctrl_sample/zephyr/include/generated/zephyr/autoconf.h

    light_ctrl_sample/sysbuild/ipc_radio/prj.conf

    light_ctrl_sample/build/light_ctrl_sample/zephyr/misc/generated/syscalls_links/include_zephyr_bluetooth/bluetooth.h

    I don't believe the sysbuild/ipc_radio/prj.conf is being used in the build -- I inserted a syntax error into that file and the build proceeded without errors.

    autoconf.h contains the line:

    #define CONFIG_BT_EXT_ADV_MAX_ADV_SET 5

    configs.c contains the line:

    GEN_ABSOLUTE_SYM_KCONFIG(CONFIG_BT_EXT_ADV_MAX_ADV_SET, 5);

    Next, I added 

    CONFIG_BT_EXT_ADV_MAX_ADV_SET=10
    to the main prj.conf
    autoconf.h and configs.c changed accordingly.
    I compiled and ran, and got the same error.
    [00:00:22.033,569] <wrn> bt_hci_core: opcode 0x2039 status 0x0d
    [00:00:22.033,599] <err> bt_adv: Failed to start advertiser
    [00:00:22.033,630] <err> bt_mesh_adv_ext: Advertising failed: err -12

    Jack

  • Right, sorry about that. Sysbuild is a bit new to me. <project>/build/zephyr/.config contains configs for the entire build, while the configs I referred to can be found in <project>/build/<project>/zephyr/.config. Check there.

    ji_584 said:
    I don't believe the sysbuild/ipc_radio/prj.conf

    Good. You having a sysbuild folder there surprised me a bit, as that is something you would typically need for changes in configurations across multiple images, as if you are working with multi-core chips like the 53 or 54. A sysbuild folder doesn't spawn on my side when building light_ctrl for the 52840dk.

    ji_584 said:

    autoconf.h contains the line:

    Great! Autoconf is essentially the same as .config, just a different use-case.

    So I guess that didn't help.

    Btw, I assume selecting the device in the scanner page of the app when using a completely default sample works fine? Could you check?

    Regards,

    Elfving

  • I don't see the problem with the default sample app light control.

Related