nRF54L15 Mesh Light Ctrl: How to Keep Power On Up Setting After Mesh Reset?

Hi there,

I'm working with the nRF54L15 and using the light_ctrl sample from the Bluetooth Mesh SDK NCS3.1.0 .

I have a set of mesh light nodes, and I configured power_on_up to BT_MESH_ON_POWER_UP_ON to ensure the lights turn on after a power cycle.

However, when I perform a Mesh Reset (via nRF Mesh App), the power_on_up setting reverts back to BT_MESH_ON_POWER_UP_OFF. This requires me to reconfigure it manually after each reset.

My question:
How can I modify the code or configuration so that after a mesh reset, the power_on_up value remains BT_MESH_ON_POWER_UP_ON without requiring additional configuration?

I understand that mesh reset clears node configurations, so is it possible to set power_on_up  to BT_MESH_ON_POWER_UP_ON when perform the Mesh Reset?

Any guidance or suggestions would be greatly appreciated.

Thanks in advance!

Best regards,

Shawn

  • Update

    In functionality: bt_mesh_ponoff_srv_reset" 

    I modified 

    srv->on_power_up = BT_MESH_ON_POWER_UP_OFF;
    to
    srv->on_power_up = BT_MESH_ON_POWER_UP_ON;
     
    After executing mesh reset, the power on off server is reset to "default", but in next power up, the lightness is still off, when I read the power on off server on power up status, it`s default, strange.
    Do I need to set other parameters?
  • Hello Shawn,

    Can you please tell me about the use case? 

    By default, this is a configuration that is stored in the network settings. Do you want it to have this behavior whenever it is provisioned? If so, in my opinion, it would make sense to set this in the provisioner logic.

    If you want it to turn on whenever it doesn't belong to a mesh network, I would say that the best way to do this is to turn on the LED (acting as the light) whenever it boots up and it is not part of a network.

    Or what is the reason and/or usecases where you want this to be automatically turned on? 

    Best regards,

    Edvin

Related