<?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>Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45557/getting-status-messages-from-mesh-to-phone</link><description>Hi I&amp;#39;d like to know how to get status messages into Mesh Proxy Data out. I have a Light Switch Server, and a Light Switch Client. They publish/subscribe to each other, and I&amp;#39;ve set up a timer to call app_onoff_status_publish every 1 second. I get the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Sep 2019 22:15:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45557/getting-status-messages-from-mesh-to-phone" /><item><title>RE: Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/thread/209953?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2019 22:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95aaf834-2c53-4cd4-8f09-4736b62f927f</guid><dc:creator>ibrugnoli</dc:creator><description>&lt;p&gt;With your code are you able to send a msg to a phone after relaying it?&lt;/p&gt;
&lt;p&gt;I mean, mesh_node --&amp;gt; mesh_proxy_node ---&amp;gt; phone&lt;/p&gt;
&lt;p&gt;Could you post the code you made with the changes you made to get it working?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/thread/180110?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 19:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:896cf72d-0ae6-4c6c-8568-9daaa3a1eae2</guid><dc:creator>qmorrison</dc:creator><description>&lt;p&gt;That&amp;#39;s okay Bjorn I was able to figure it out. I remembered using sd_ble_gatts_value_set() to programmatically write to a characteristic a few months ago. I was able to slightly modify an existing function, renaming it mesh_gatt_value_update(), which used sd_ble_gatts_value_set().&lt;/p&gt;
&lt;p&gt;By adding mesh_gatt_value_update to mesh_gatt.h and mesh_gatt.c, the function would have access to m_gatt, which has the 0x2ADE characteristic.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Then I was able to call mesh_gatt_value_update in main.c by including mesh_gatt.h at the top of main.c. I call mesh_gatt_value_update inside of app_onoff_status_publish_cb, which takes the incoming status message and prints it (Nordic&amp;#39;s code) but then also sends the src address and payload to mesh_gatt_value_update, which passes it to sd_ble_gatts_value_set.&lt;/p&gt;
&lt;p&gt;It is working now, and anytime the servers publish status messages, they end up in 0x2ADE on the proxy node, where I can read them through notifications in my cross platform mobile application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/thread/179960?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 11:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33ff7916-1765-4079-9002-65454ff1145d</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Sorry if I did not explain myself clearly enough. I agree with you that if you send a get message or an acknowledged set message from the client to the server, then the server will send a status message back the client.&lt;/p&gt;
&lt;p&gt;However, if you send a get message from the nRF Mesh phone app, then, the client or server responds with a status message to the phone app. You can see that:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define PROXY_UUID_CHAR_TX 0x2ade
#define PROXY_UUID_CHAR_RX 0x2add&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;has been added to proxy.c (I am looking at mesh sdk v3.1.0, but it should be similar in previous mesh sdks).&lt;/p&gt;
&lt;p&gt;I am not exactly sure which function sends the status message from the proxy to the PROXY_UUID_CHAR_TX, but my bet is on the gatt_evt_handler. The case&amp;nbsp;MESH_GATT_EVT_TYPE_TX_COMPLETE should also be relevant I believe.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/thread/179607?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 19:50:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c93f259d-b194-4734-b835-ebfc1d60767b</guid><dc:creator>qmorrison</dc:creator><description>&lt;p&gt;Yes I&amp;#39;ve sent status publish messages using generic_onoff_status__publish() on a timer once every second from the light_switch_server to the light_switch_client, the issue was not with sending the status messages. The issue was with receiving the status message on the client and doing something other than printing the data out.&lt;/p&gt;
&lt;p&gt;In the app_onoff_status_publish_cb, the callback handler for when status messages are received (i.e. what the client does with status messages), you guys simply __LOG() the present on off value. I wanted to take that value, and programmatically write it to Mesh Proxy Data Out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Getting status messages from Mesh to Phone</title><link>https://devzone.nordicsemi.com/thread/179401?ContentTypeID=1</link><pubDate>Mon, 01 Apr 2019 08:15:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cbfc5b7-bae0-468e-accc-5840d125fb23</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;This should already be partially done in the mesh sdk FW. If you have an Android phone, you can update to the latest nRF Mesh app &amp;amp; you should be able to ask for the current LED status in the app. If you then run a debugging session, you should be able to see which function sends the status message from the mesh SDK to the smartphone app.&lt;/p&gt;
&lt;p&gt;If you have the iOS nRF Mesh app, this has not been implemented yet. However, you are still able to set the status of the LED. Take a look at the following lines in the proxy.c function in the latest mesh sdk for hints on where this functionality is implemented:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;t:    1932865&amp;gt;, proxy.c,  619, TX complete
&amp;lt;t:    7992254&amp;gt;, proxy.c,  611, RX
&amp;lt;t:    7992260&amp;gt;, proxy.c,  553, RX GATT PDU type 0x0, len 24
&amp;lt;t:    7992269&amp;gt;, access.c,  268, p_evt-&amp;gt;dst.value: 0x0003
&amp;lt;t:    7992272&amp;gt;, generic_onoff_server.c,  136, Server: transition_time_ms = 0
&amp;lt;t:    7992275&amp;gt;, generic_onoff_server.c,  137, Server: delay_ms = 0
&amp;lt;t:    7992278&amp;gt;, app_onoff.c,  204, msg: SET: 0
&amp;lt;t:    7992280&amp;gt;, main.c,   96, Setting GPIO value: 0
&amp;lt;t:    7994215&amp;gt;, proxy.c,  619, TX complete
&amp;lt;t:    8177064&amp;gt;, proxy.c,  611, RX
&amp;lt;t:    8177070&amp;gt;, proxy.c,  553, RX GATT PDU type 0x0, len 24
&amp;lt;t:    8177079&amp;gt;, access.c,  268, p_evt-&amp;gt;dst.value: 0x0003
&amp;lt;t:    8177082&amp;gt;, generic_onoff_server.c,  136, Server: transition_time_ms = 0
&amp;lt;t:    8177085&amp;gt;, generic_onoff_server.c,  137, Server: delay_ms = 0
&amp;lt;t:    8177088&amp;gt;, app_onoff.c,  204, msg: SET: 1
&amp;lt;t:    8177090&amp;gt;, main.c,   96, Setting GPIO value: 1
&amp;lt;t:    8179025&amp;gt;, proxy.c,  619, TX complete&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>