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, thanks for the update.  Just to review (it's been a long thread), I'm looking for an example of CTL working with other relevant models (lightness, on/off, temperature, maybe some others).  If someone could just take the light_ctrl example (or any other example) and add CTL, that would be ideal.  I'm just trying to get CTL to work some way.

    The code that we've been discussing was a graft of the Zephyr test suite with the light_ctrl example code and, as I said earlier, is a mess.  Everything else I have tried works worse than that one though.  I don't know if that's the best baseline, but there we are.

    It's not extremely time-critical, we have plenty of other things to do, but if we could get something in the next few weeks it would be helpful.  We definitely need to get this working in the end.

    Also, we have switched from nRF52840 to nRF54L15 in the meantime, and the behavior is similar.  The build files, etc. I have been sending are still from the 840 build.

    Thanks,
    Jack

  • Hi,

    So this issue could be connected to that CONFIG_BT_MESH_MAX_CONN should be set to less than CONFIG_BT_MAX_CONN if you'd use BLE for other purposes in addition to mesh, like SMP. Although it doesn't immediately make sense to me why putting CONFIG_BT_MAX_CONN to 1 should make things work, try lowering CONFIG_BT_MESH_MAX_CONN.

    Of course, CONFIG_BT_EXT_ADV_MAX_ADV_SET should be increased by one for each additional advertising set you want to use. If you didn't know exactly how many sets you are using, you could simply increase it one by one and see when it works (ideally for optimum memory use, you should add only that as many as you are using in the application). If this was set to 1 currently, that could also be something that helps us here.

    ji_584 said:

    The code that we've been discussing was a graft of the Zephyr test suite with the light_ctrl example code and, as I said earlier, is a mess.  Everything else I have tried works worse than that one though.  I don't know if that's the best baseline, but there we are.

    Understood. I can see if I can get something neater for you later on, though for the time being the project you sent is what we're looking at. You haven't added any other BLE connection to this, like SMP right?

    Regards,

    Elfving

  • Edit: corrected variable name CONFIG_BT_MAX_CONN below

    Elfving,
    It seems to compile, provision and configure if and only if 
    CONFIG_BT_MESH_MAX_CONN == 1
    Increasing CONFIG_BT_EXT_ADV_MAX_ADV_SET and/or CONFIG_BT_MAX_CONN didn't seem to change this.
    Is there a drawback to this setting of CONFIG_BT_MESH_MAX_CONN?

    Also, can you tell me the best resources for learning the effects and interactions of these configuration variables?  I know how to look up the name to get a description, but the context is sometimes lacking.
    I still haven't functionally tested the model once it doesn't throw errors, so I'll do that. It seems like the nRF Mesh app doesn't have a color temperature control, so I'll set up a dimmer example.

    Thanks,
    Jack
  • Thanks for the patience Jack,

    I'm waiting for a response from the relevant R&D team. Just one question.

    ji_584 said:
    It seems to compile, provision and configure if and only if 
    CONFIG_BT_MESH_MAX_CONN == 1

    This is interesting. But that is in addition to setting CONFIG_BT_MAX_CONN to 1, right?

    Regards,

    Elfving

  • Elfving,

    No, I last set: 

    CONFIG_BT_MAX_CONN=5
    CONFIG_BT_MESH_MAX_CONN=1
    CONFIG_BT_EXT_ADV_MAX_ADV_SET=10
    CONFIG_BT_BUF_CMD_TX_COUNT=5
    which doesn't produce an error when configuring. 
    Other values of MAX_CONN and MESH_MAX_CONN are also ok as long as (I think) MAX_CONN > MESH_MAX_CONN.
    If I set MESH_MAX_CONN to 2 or greater I get problems.
    Jack
Related