<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Can&amp;#39;t add scheduler server model to mesh light sample.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123086/can-t-add-scheduler-server-model-to-mesh-light-sample</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Jul 2025 01:03:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123086/can-t-add-scheduler-server-model-to-mesh-light-sample" /><item><title>RE: Can't add scheduler server model to mesh light sample.</title><link>https://devzone.nordicsemi.com/thread/543574?ContentTypeID=1</link><pubDate>Fri, 25 Jul 2025 01:03:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:058a65c0-bf53-40c4-a042-369fc168eec9</guid><dc:creator>Jerry zeng</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much, the problem is solved. I didn&amp;#39;t initialize it like you did when I created the service：&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static struct bt_mesh_scheduler_srv scheduler_srv = BT_MESH_SCHEDULER_SRV_INIT(NULL, &amp;amp;time_srv);&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't add scheduler server model to mesh light sample.</title><link>https://devzone.nordicsemi.com/thread/543510?ContentTypeID=1</link><pubDate>Thu, 24 Jul 2025 13:10:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0ed1df2-5e56-426f-9543-202a075908a3</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;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 &amp;quot;&lt;code&gt;BT_MESH_MODEL_SCENE_SRV(&amp;amp;scene_srv)&lt;/code&gt;&amp;quot;.)&lt;/p&gt;
&lt;p&gt;In addition to adding the models to the element list, they should also be added in configs (typically in the file prj.conf):&lt;/p&gt;
&lt;p&gt;&lt;code&gt;CONFIG_BT_MESH_TIME_SRV=y&lt;/code&gt;&lt;br /&gt;&lt;code&gt;CONFIG_BT_MESH_SCHEDULER_SRV=y&lt;/code&gt;&lt;br /&gt;&lt;code&gt;CONFIG_BT_MESH_SCENE_SRV=y&lt;/code&gt;&lt;br /&gt;&lt;code&gt;CONFIG_BT_MESH_DTT_SRV=y&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Also, how are you creating the scheduler server instance itself, you should have something like e.g.:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;static struct bt_mesh_scheduler_srv scheduler_srv = BT_MESH_SCHEDULER_SRV_INIT(NULL, &amp;amp;time_srv);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;You also need similar initialization for the other models.&lt;/p&gt;
&lt;p&gt;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&amp;#39;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.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't add scheduler server model to mesh light sample.</title><link>https://devzone.nordicsemi.com/thread/543304?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 08:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:357e56f0-53be-44d9-8a99-7fb168659260</guid><dc:creator>Jerry zeng</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for your reply, I added&amp;nbsp; the Scene Server model with Scheduler Server model as below:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;bt_mesh_elem&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;elements&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;&amp;nbsp;{&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_ELEM&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_LIST&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_CFG_SRV&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_HEALTH_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;health_srv&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;health_pub&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_ONOFF_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;led_ctx&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;].&lt;/span&gt;&lt;span&gt;srv&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_DTT_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;dtt_srv&lt;/span&gt;&lt;span&gt;), &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_TIME_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;time_srv&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_SCHEDULER_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;scheduler_srv&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_SCENE_SRV&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;scene_srv&lt;/span&gt;&lt;span&gt;)),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;BT_MESH_MODEL_NONE&lt;/span&gt;&lt;span&gt;),&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The error log will still appear , the complete log is as below:&lt;/p&gt;
&lt;p&gt;*** Booting Mesh Light v2.9.1-60d0d6c8d42d ***&lt;br /&gt;*** Using nRF Connect SDK v2.9.1-60d0d6c8d42d ***&lt;br /&gt;*** Using Zephyr OS v3.7.99-ca954a6216c9 ***&lt;br /&gt;Initializing...&lt;br /&gt;[00:00:00.024,475] &amp;lt;inf&amp;gt; fs_nvs: 8 Sectors of 4096 bytes&lt;br /&gt;[00:00:00.030,395] &amp;lt;inf&amp;gt; fs_nvs: alloc wra: 2, ea0&lt;br /&gt;[00:00:00.035,797] &amp;lt;inf&amp;gt; fs_nvs: data wra: 2, cc&lt;br /&gt;[00:00:00.041,107] &amp;lt;inf&amp;gt; bt_sdc_hci_driver: SoftDevice Controller build revision: &lt;br /&gt; 79 a3 10 be e6 80 b7 e9 a3 ba cc a9 fc 08 66 12 |y....... ......f.&lt;br /&gt; 90 cf 45 a9 |..E. &lt;br /&gt;[00:00:00.074,157] &amp;lt;inf&amp;gt; bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)&lt;br /&gt;[00:00:00.082,244] &amp;lt;inf&amp;gt; bt_hci_core: HW Variant: nRF52x (0x0002)&lt;br /&gt;[00:00:00.088,989] &amp;lt;inf&amp;gt; bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 121.4259 Build 3078678206&lt;br /&gt;[00:00:00.100,830] &amp;lt;inf&amp;gt; bt_hci_core: No ID address. App must call settings_load()&lt;br /&gt;Bluetooth initialized&lt;br /&gt;[00:00:00.111,541] &amp;lt;wrn&amp;gt; bt_mesh_access: Unused space in relation list: 5&lt;br /&gt;Initializing mesh failed (err -140)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't add scheduler server model to mesh light sample.</title><link>https://devzone.nordicsemi.com/thread/543236?ContentTypeID=1</link><pubDate>Tue, 22 Jul 2025 16:07:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30246641-7001-43d7-8330-3c803d6ae795</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;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&amp;nbsp;&amp;quot;Initializing mesh failed (err -140)&amp;quot;?&lt;/p&gt;
&lt;p&gt;Please note also that according to the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/mesh/scheduler_srv.html"&gt;Scheduler Server documentation&lt;/a&gt;, when a Scheduler Server model is present on an element, the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/mesh/scene_srv.html#bt-mesh-scene-srv-readme"&gt;Scene Server model&lt;/a&gt; shall also be present on the same element. From what I can tell, you have not added the Scene Server?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>