Can't add scheduler server model to mesh light sample.

Hi,

I want to add scheduler server to the mesh/light sample with nrf52DK, I change the element define like below:

static struct bt_mesh_elem elements[] = {
    BT_MESH_ELEM(
        1, BT_MESH_MODEL_LIST(
            BT_MESH_MODEL_CFG_SRV,
            BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
            BT_MESH_MODEL_ONOFF_SRV(&led_ctx[0].srv),
           
            BT_MESH_MODEL_DTT_SRV(&dtt_srv),
            BT_MESH_MODEL_TIME_SRV(&time_srv),
            BT_MESH_MODEL_SCHEDULER_SRV(&scheduler_srv)
            ),

        BT_MESH_MODEL_NONE),
};
After build and flash, the program can't run and the error log "Initializing mesh failed (err -140)" occur.
I tried to use another nrf52840 board to do the same testing, but the fault still occurred.
After deleting BT_MESH_MODEL_SCHEDULER_SRV(&scheduler_srv) , the program runs normally.
What is the correct approach to handle this?
Parents
  • Hi,

    The error value of -140 means the error ECANCELED, which indicates that mesh initialization was canceled. For more context, can you please share the rest of the log as well, and not only the "Initializing mesh failed (err -140)"?

    Please note also that according to the Scheduler Server documentation, when a Scheduler Server model is present on an element, the Scene Server model shall also be present on the same element. From what I can tell, you have not added the Scene Server?

    Regards,
    Terje

  • Hi,

    Thanks for your reply, I added  the Scene Server model with Scheduler Server model as below:

    static struct bt_mesh_elem elements[] = {

        BT_MESH_ELEM(
            1, BT_MESH_MODEL_LIST(
                BT_MESH_MODEL_CFG_SRV,
                BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
                BT_MESH_MODEL_ONOFF_SRV(&led_ctx[0].srv),
                BT_MESH_MODEL_DTT_SRV(&dtt_srv),
                BT_MESH_MODEL_TIME_SRV(&time_srv),
                BT_MESH_MODEL_SCHEDULER_SRV(&scheduler_srv),
                BT_MESH_MODEL_SCENE_SRV(&scene_srv)),
            BT_MESH_MODEL_NONE),
    };

    The error log will still appear , the complete log is as below:

    *** Booting Mesh Light v2.9.1-60d0d6c8d42d ***
    *** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***
    *** Using Zephyr OS v3.7.99-ca954a6216c9 ***
    Initializing...
    [00:00:00.024,475] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.030,395] <inf> fs_nvs: alloc wra: 2, ea0
    [00:00:00.035,797] <inf> fs_nvs: data wra: 2, cc
    [00:00:00.041,107] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    79 a3 10 be e6 80 b7 e9 a3 ba cc a9 fc 08 66 12 |y....... ......f.
    90 cf 45 a9 |..E.
    [00:00:00.074,157] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.082,244] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.088,989] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 121.4259 Build 3078678206
    [00:00:00.100,830] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:00.111,541] <wrn> bt_mesh_access: Unused space in relation list: 5
    Initializing mesh failed (err -140)

Reply
  • Hi,

    Thanks for your reply, I added  the Scene Server model with Scheduler Server model as below:

    static struct bt_mesh_elem elements[] = {

        BT_MESH_ELEM(
            1, BT_MESH_MODEL_LIST(
                BT_MESH_MODEL_CFG_SRV,
                BT_MESH_MODEL_HEALTH_SRV(&health_srv, &health_pub),
                BT_MESH_MODEL_ONOFF_SRV(&led_ctx[0].srv),
                BT_MESH_MODEL_DTT_SRV(&dtt_srv),
                BT_MESH_MODEL_TIME_SRV(&time_srv),
                BT_MESH_MODEL_SCHEDULER_SRV(&scheduler_srv),
                BT_MESH_MODEL_SCENE_SRV(&scene_srv)),
            BT_MESH_MODEL_NONE),
    };

    The error log will still appear , the complete log is as below:

    *** Booting Mesh Light v2.9.1-60d0d6c8d42d ***
    *** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***
    *** Using Zephyr OS v3.7.99-ca954a6216c9 ***
    Initializing...
    [00:00:00.024,475] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.030,395] <inf> fs_nvs: alloc wra: 2, ea0
    [00:00:00.035,797] <inf> fs_nvs: data wra: 2, cc
    [00:00:00.041,107] <inf> bt_sdc_hci_driver: SoftDevice Controller build revision:
    79 a3 10 be e6 80 b7 e9 a3 ba cc a9 fc 08 66 12 |y....... ......f.
    90 cf 45 a9 |..E.
    [00:00:00.074,157] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
    [00:00:00.082,244] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
    [00:00:00.088,989] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 121.4259 Build 3078678206
    [00:00:00.100,830] <inf> bt_hci_core: No ID address. App must call settings_load()
    Bluetooth initialized
    [00:00:00.111,541] <wrn> bt_mesh_access: Unused space in relation list: 5
    Initializing mesh failed (err -140)

Children
No Data
Related