<?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>Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC&amp;#39;s readings?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82916/rather-than-reporting-the-status-of-the-led-how-do-i-configure-the-light-sample-to-publish-the-adc-s-readings</link><description>I see on the forums that this is done through access_model_publish, but I cannot find where that is called in the Light sample.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 29 Dec 2021 17:20:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82916/rather-than-reporting-the-status-of-the-led-how-do-i-configure-the-light-sample-to-publish-the-adc-s-readings" /><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/345405?ContentTypeID=1</link><pubDate>Wed, 29 Dec 2021 17:20:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4257ff08-7f9d-4941-ab33-ba2a57422349</guid><dc:creator>jala</dc:creator><description>&lt;p&gt;Ok Thanks for all the help Hung. I was able to repurpose the generic on off for ADC&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/345201?ContentTypeID=1</link><pubDate>Tue, 28 Dec 2021 09:06:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2898f2b8-c0db-481f-b859-ea7f8fc6f1be</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jala,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you only want to do some testing between your device and the QCA4020, then it&amp;#39;s not a problem to use the Generic OpCodes.&amp;nbsp;&lt;br /&gt;But if you want to do Bluetooth qualification for your product for the market you must register your own company ID and use that instead.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/345165?ContentTypeID=1</link><pubDate>Tue, 28 Dec 2021 01:31:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:226a4109-b324-476c-8122-5e70ffffc771</guid><dc:creator>jala</dc:creator><description>&lt;p&gt;Can I use any of the Generic OpCodes for my vendor model? This other qca4020 board is limited in documentation and support so its hard to find how to customize the op code I&amp;#39;m sending other than what is given (which are the Generic ones).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344885?ContentTypeID=1</link><pubDate>Thu, 23 Dec 2021 08:44:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2992c17a-ba69-4a9d-a82f-f26a3a4441bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jala,&amp;nbsp;&lt;br /&gt;Glad that you found the documentation.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No, you can&amp;#39;t use the Generic OnOff Opcode to send your own data. You would need to follow what we described in the documentation:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html#defining-opcodes-for-the-messages"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html#defining-opcodes-for-the-messages&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t register your own company ID to Bluetooth SIG, you can use Nordic Company ID (0x0059). The first number (0x01 for example) is up to you to choose. Note that there is a chance that other company also use Nordic Company ID and same opcode (0x01 for example). So it may conflict if you are in the same network.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344859?ContentTypeID=1</link><pubDate>Thu, 23 Dec 2021 01:10:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52c6b141-c1d9-48e3-8c51-c8faf0dcf069</guid><dc:creator>jala</dc:creator><description>&lt;p&gt;I found &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bt_mesh_vendor_model_dev_overview.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve added&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define YOUR_COMPANY_ID 0xFFFF
#define YOUR_MODEL_ID   0x2323

static struct bt_mesh_elem elements[] = {
#if DT_NODE_EXISTS(DT_ALIAS(led0))
	BT_MESH_ELEM(
		1, BT_MESH_MODEL_LIST(
			BT_MESH_MODEL_CFG_SRV,
			BT_MESH_MODEL_HEALTH_SRV(&amp;amp;health_srv, &amp;amp;health_pub),
			BT_MESH_MODEL_ONOFF_SRV(&amp;amp;led_ctx[0].srv)),
		BT_MESH_MODEL_NONE),
#endif
#if DT_NODE_EXISTS(DT_ALIAS(led1))
	BT_MESH_ELEM(
		2, BT_MESH_MODEL_LIST(BT_MESH_MODEL_ONOFF_SRV(&amp;amp;led_ctx[1].srv)),
		BT_MESH_MODEL_NONE),
#endif
#if DT_NODE_EXISTS(DT_ALIAS(led2))
	BT_MESH_ELEM(
		3, BT_MESH_MODEL_LIST(BT_MESH_MODEL_ONOFF_SRV(&amp;amp;led_ctx[2].srv)),
		BT_MESH_MODEL_NONE),
#endif
#if DT_NODE_EXISTS(DT_ALIAS(led3))
	BT_MESH_ELEM(
		4, BT_MESH_MODEL_LIST(BT_MESH_MODEL_ONOFF_SRV(&amp;amp;led_ctx[3].srv)),
		BT_MESH_MODEL_NONE),
#endif
       BT_MESH_ELEM(
        5,
		BT_MESH_MODEL_NONE,
        BT_MESH_MODEL_LIST(BT_MESH_MODEL_VND_CB(YOUR_COMPANY_ID,
                                                YOUR_MODEL_ID,
                                                _opcode_list,
                                                NULL,
                                                NULL,
                                                NULL))
    ),
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Is it okay to reuse the generic onoff opcodes (0x82) and, if I understand this correctly, send back ADC values through the opcode handler?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344768?ContentTypeID=1</link><pubDate>Wed, 22 Dec 2021 10:38:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82b5f51f-34da-41b6-8cf3-779d63f29d81</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jala,&amp;nbsp;&lt;br /&gt;Sorry I was thinking that you were asking about mesh example in nRF5 SDK not nRF Connect SDK (&lt;span&gt;access_model_publish() is a function in nRF5 SDK)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In light example the publication of the sever model is sent in&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;led_work() in model_handler.c . You can find&amp;nbsp;&lt;/span&gt;model_send() is called in the function.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;You would need to define your own proprietary model to send your ADC data.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would suggest to have a look at the chat example as it&amp;#39;s a proprietary. It&amp;#39;s client only. So you need to refer to the light example to know how to define a server.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344447?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 21:17:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9bd6aa3-58b1-4229-a5b7-a1dce568d301</guid><dc:creator>jala</dc:creator><description>&lt;p&gt;Where are these models located? Couldn&amp;#39;t find \models\vendors in ncs\1.7.1&lt;/p&gt;
&lt;p&gt;Also couldn&amp;#39;t find where status_send() is called&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344436?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 17:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4472a38-9b41-4a84-89a7-adfa77c605a9</guid><dc:creator>jala</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I am working on the server one referred to here &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/light/README.html#bluetooth-mesh-light"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/mesh/light/README.html#bluetooth-mesh-light&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve went through the forums and it seems most use the client node (light switch sample) to send, is this not possible on a server node?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll have a look at those models and post my findings, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rather than reporting the status of the LED, how do I configure the Light sample to publish the ADC's readings?</title><link>https://devzone.nordicsemi.com/thread/344382?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 13:42:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3df402e-b473-4911-a33b-661b5d27c470</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jala,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you let me know which exact example you are working on ?&amp;nbsp;&lt;br /&gt;You are correct that you can call&amp;nbsp;&lt;span&gt;access_model_publish() to send the data to a node. But you need to define your own model instead of using the light switch model for example. (In the light switch example the data is sent inside&amp;nbsp;status_send() function)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We have created some proprietary models that you can have a look inside&amp;nbsp;\models\vendor.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>