<?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>Mesh disable time vary</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/43786/mesh-disable-time-vary</link><description>Dears, 
 I am working with mesh sdk 3.0 and 15.2 with soft device S140 nrf82840, our application using the mesh network topology for minimum amount of time then turn it on again after certain period, I tried to disable the mesh by command nrf_mesh_disable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Feb 2019 09:22:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/43786/mesh-disable-time-vary" /><item><title>RE: Mesh disable time vary</title><link>https://devzone.nordicsemi.com/thread/171825?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 09:22:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3aa07573-8a84-48df-b8fc-15e9908f3232</guid><dc:creator>Khaled Fayed</dc:creator><description>&lt;p&gt;Thanks I will give a try but I found another solution could you also verify:&lt;/p&gt;
&lt;p&gt;by using timeslot_stop(); and timeslot_start();&amp;nbsp;functions before&amp;nbsp; nrf_mesh_disable and nrf_mesh_enable, It give me the&amp;nbsp;required behavior but&amp;nbsp;I am still testing for some time to catch if&amp;nbsp; any possible bug found&amp;nbsp;after hours of testing.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh disable time vary</title><link>https://devzone.nordicsemi.com/thread/171821?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 09:13:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:182cbd5e-4e83-4932-aaca-d877b7adc527</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Sorry for the late reply, I&amp;#39;ve looked a bit more into this, can you try the following for enable/disable mesh:&lt;/p&gt;
&lt;p&gt;Disable mesh:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t retval = proxy_stop();

            if (retval == NRF_SUCCESS)

            {

                scanner_disable();

                retval = nrf_mesh_disable();

            }

     __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Disabling mesh: status: %d\n&amp;quot;, retval);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Enable mesh:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; scanner_enable();

            uint32_t retval = proxy_enable();

            if (retval == NRF_SUCCESS)

            {

                retval = proxy_start();

            }

 

            if (retval == NRF_SUCCESS)

            {

                retval = nrf_mesh_enable();

            }

 

            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Enabling  mesh: status: %d\n&amp;quot;, retval);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;These two code snippets should be the proper sequence to disable/enable mesh according to an expert.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh disable time vary</title><link>https://devzone.nordicsemi.com/thread/171570?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 09:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdbae876-6daf-4b39-bf9a-3cbaf9b2c9c9</guid><dc:creator>Khaled Fayed</dc:creator><description>&lt;p&gt;Thanks but I want to have minimum power consumption so I used the following commands;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void mesh_evt_handler(const nrf_mesh_evt_t * p_evt)
{
    if (p_evt-&amp;gt;type == NRF_MESH_EVT_DISABLED)
    {
      __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- BLE SDH OFF -----\n&amp;quot;);
      //volatile uint8_t a=1;
      nrf_sdh_suspend();                                          //Disable Soft device
    }

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int main(void) {
  initialize();
  m_mesh_evt_handler.evt_cb = mesh_evt_handler;
  nrf_mesh_evt_handler_add(&amp;amp;m_mesh_evt_handler);
  
  
  //code continue
  
  while(1){
  
  //...
  nrf_mesh_disable();
  //wait till sdh power off
  
  
  //...
  nrf_sdh_resume();              //enable Soft device   
  uint32_t err_code = nrf_mesh_enable();
  APP_ERROR_CHECK(err_code);
  
  
  }
  
 }&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mesh disable time vary</title><link>https://devzone.nordicsemi.com/thread/171564?ContentTypeID=1</link><pubDate>Mon, 18 Feb 2019 09:08:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dfbb776-f90c-428b-a5c5-ebb340719fa2</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;When you say &amp;quot;disable the mesh&amp;quot;, do you mean starting and stopping the advertising?&lt;/p&gt;
&lt;p&gt;You can use the two &lt;strong&gt;API&amp;#39;S&lt;/strong&gt; &lt;strong&gt;mesh_adv_start()&lt;/strong&gt; and &lt;strong&gt;mesh_adv_stop()&lt;/strong&gt; for that.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**
 * Starts advertising connectable advertisements.
 *
 * @note This call will assert if the advertisement data has not been set.
 */
void mesh_adv_start(void);

/**
 * Stops the connectable advertisements.
 */
void mesh_adv_stop(void);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>