<?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>Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69074/get-source-address-of-publisher-node-in-nrf-mesh</link><description>I have used light_Switch example from nrf mesh sdk nrf5_SDK_for_Mesh_v4.2.0_src I like to get the client source address in nrf_switch_server what should I need to modify to get client source address in below function static void app_onoff_server_set_cb</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Dec 2020 12:28:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69074/get-source-address-of-publisher-node-in-nrf-mesh" /><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/285060?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2020 12:28:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:faa931fa-5d52-43d8-98dc-dd318b77351a</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Thank you&lt;br /&gt;I got it working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/284017?ContentTypeID=1</link><pubDate>Wed, 09 Dec 2020 11:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f922d0d1-869c-459f-8bae-d265a574eb5c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dhaval,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have an example for that. But my understanding is that you need to add the source address to the p_app and also to the&amp;nbsp;app_transition_t.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note that the app_onoff.c and app_transition.c are on application layer, so you have the full control of what you can do with them. It&amp;#39;s not something&amp;nbsp;that need to be qualified with the spec. So you can call a callback to the main application, or you can process what you need to do in&amp;nbsp;generic_onoff_state_set_cb() also.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/283495?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 10:38:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ff8e70-b020-4258-850e-78067e5b7839</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Thank you very much&lt;br /&gt;Is it possible that you guide small step about&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;pass it through the process of transition&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;I think that would be more professional way and can be help full in many application&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/283494?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 10:35:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f74e985f-9ce8-43eb-931a-448c1954c642</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You would need to pass it from&amp;nbsp;&lt;span&gt;generic_onoff_state_set_cb(), either by calling your own callback to main.c inside that function, or pass it through the process of transition which can be a little bit more complex. Or you can store it in a variable and then pass the variable back to main&amp;nbsp;when&amp;nbsp; onoff_current_value_update() is executed.&amp;nbsp;&lt;br /&gt;But I think calling a callback inside&amp;nbsp;generic_onoff_state_set_cb() would be the the most straight forward.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/283489?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 10:19:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:306bd514-674e-4220-84aa-42dec71cc288</guid><dc:creator>Dhaval Dalvadi</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;I found&amp;nbsp;same while debugging too&lt;br /&gt;&lt;strong&gt;but how can I get source address&amp;nbsp;inside&amp;nbsp;&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;onoff_current_value_update() function so I can pass it too&amp;nbsp;app_onoff_server_set_cb()?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;static void onoff_current_value_update(app_onoff_server_t * p_app)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;I only gets&amp;nbsp;app_onoff_server_t&amp;nbsp;which does not include source address so unable to pass to&amp;nbsp;app_onoff_server_set_cb()&lt;br /&gt;&lt;br /&gt;Thank you&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Get source address of publisher node in nrf mesh</title><link>https://devzone.nordicsemi.com/thread/283487?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2020 10:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c953816a-97c5-4553-bf4a-59f8671a542f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Dhaval,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You would need to look inside&amp;nbsp;generic_onoff_state_set_cb() in app_onoff.c to find the source address of the set message , inside&amp;nbsp;p_meta.&amp;nbsp;&lt;br /&gt;This is the function that will trigger a transition and the transition when completed will call&amp;nbsp;onoff_current_value_update() -&amp;gt;&amp;nbsp;&lt;span&gt;app_onoff_server_set_cb().&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>