<?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>How to extend one BLE-Mesh model&amp;#39;s functionality to another.?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87555/how-to-extend-one-ble-mesh-model-s-functionality-to-another</link><description>Hi, 
 I am working on a multiple custom models, wherein I need one model to extend the functionality of another model. 
 I was analyzing through nCS provided &amp;quot;Chat&amp;quot; sample code, where I saw that Chat client model extends to health server model as an example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 May 2022 13:21:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87555/how-to-extend-one-ble-mesh-model-s-functionality-to-another" /><item><title>RE: How to extend one BLE-Mesh model's functionality to another.?</title><link>https://devzone.nordicsemi.com/thread/366747?ContentTypeID=1</link><pubDate>Fri, 06 May 2022 13:21:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f649c83-15ba-4680-8254-442caff3defd</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It seems to have been some confusion. Chat client doesn&amp;#39;t extend health server. They are just instantiated on the same element. The extended models will share a subscription list and this is the only thing that the mesh stack will handle for you. This is done through bt_mesh_model_extend API. Sharing a message behaviour is up to implementer. E.g. in nRF Connect SDK we do it through callbacks. For example, you can look at&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/bluetooth/mesh/gen_lvl_srv.c" rel="noopener noreferrer" target="_blank"&gt;Generic Level&lt;/a&gt;&amp;nbsp;and&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/subsys/bluetooth/mesh/gen_plvl_srv.c" rel="noopener noreferrer" target="_blank"&gt;Generic Power Level&lt;/a&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;servers implementation, where Generic Power Level Server models implements callbacks of Generic Level Server model to intercept Generic Level messages.&lt;/p&gt;
&lt;p&gt;Regadring the questions:&lt;/p&gt;
&lt;p&gt;1. No, you can&amp;#39;t do that. There is no such API in health server. You need to have a health client on the same device and use bt_mesh_health_attention_set API to do that. And you need to call this API from chat model message handler.&lt;br /&gt;2. As mentioned above, it is up to implementor. We use callbacks to propagate message data.&lt;br /&gt;3. Send a message to a base model. If a model is extended, this should trigger behaviour of the model that extends this one. E.g. if you send a message to a Generic Level Server model, when it is extended by Generic Power Level model, this will change Generic Power Level state value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to extend one BLE-Mesh model's functionality to another.?</title><link>https://devzone.nordicsemi.com/thread/366208?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 11:44:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0325b6fa-3ccc-474d-a8a3-018bb346619e</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote userid="15475" url="~/f/nordic-q-a/87555/how-to-extend-one-ble-mesh-model-s-functionality-to-another/366192#366192"]&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/chat/chat_cli.html" rel="noopener noreferrer" target="_blank"&gt;Chat Client Model&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_chat_sample_walk_through.html" rel="noopener noreferrer" target="_blank"&gt;Chat sample walk-through&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html" rel="noopener noreferrer" target="_blank"&gt;Vendor model development overview&lt;/a&gt;&lt;/p&gt;[/quote]
&lt;p&gt;These absolutely have no data regarding model extension.&lt;/p&gt;
[quote userid="108934" url="~/f/nordic-q-a/87555/how-to-extend-one-ble-mesh-model-s-functionality-to-another"]&lt;p&gt;My questions are:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;1. Suppose I want to call attention on when a chat message is received. How do I do this &amp;amp; what changes I need to make in code..?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;2. In my custom models, how do exchange data between models..?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;3. How do I trigger an extending model API from the main model API..?&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I am looking for code changes, I am aware of the theory on extension.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;As an example, help me with an use case, suppose i want to trigger attention On API (From health model) when I receive a chat message (In chat client model), How can I do so..?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I am aware of the initial loop, looking more towards API changes now.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to extend one BLE-Mesh model's functionality to another.?</title><link>https://devzone.nordicsemi.com/thread/366192?ContentTypeID=1</link><pubDate>Wed, 04 May 2022 11:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcd2874b-7e11-409a-a0bb-f514c83b95d2</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What version of the SDK are you using?&lt;/p&gt;
&lt;p&gt;I would recommend you to look through these documentation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/chat/chat_cli.html" rel="noopener noreferrer" target="_blank"&gt;Chat Client Model&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_chat_sample_walk_through.html" rel="noopener noreferrer" target="_blank"&gt;Chat sample walk-through&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html" rel="noopener noreferrer" target="_blank"&gt;Vendor model development overview&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also have a look at this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41857/what-does-it-mean-to-extend-a-bloetooth-mesh-model" rel="noopener noreferrer" target="_blank"&gt;thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>