Hi,
I want to add scheduler server to the mesh/light sample with nrf52DK, I change the element define like below:
Hi,
I want to add scheduler server to the mesh/light sample with nrf52DK, I change the element define like below:
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,
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[] = {
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)
Hi,
Right, so after digging some more, I found that the Scene Server is actually automatically added by the Scheduler Server, so it should not be added manually. (I.e., you do not need the "BT_MESH_MODEL_SCENE_SRV(&scene_srv)
".)
In addition to adding the models to the element list, they should also be added in configs (typically in the file prj.conf):
CONFIG_BT_MESH_TIME_SRV=y
CONFIG_BT_MESH_SCHEDULER_SRV=y
CONFIG_BT_MESH_SCENE_SRV=y
CONFIG_BT_MESH_DTT_SRV=y
Also, how are you creating the scheduler server instance itself, you should have something like e.g.:
static struct bt_mesh_scheduler_srv scheduler_srv = BT_MESH_SCHEDULER_SRV_INIT(NULL, &time_srv);
You also need similar initialization for the other models.
If those are all in place, then please share the prj.conf file, as well as the model_handler.c, so we can have a look at what could be the issue. If you don't want to share your files here in a public ticket, then please create a private one and share the files there, and refer to this case from the new one.
Regards,
Terje