<?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>BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42338/ble-mesh-stack-3-0---message-send-on-timer-issue</link><description>Hi, 
 i&amp;#39;m using BLE MESH 3.0 Light Switch Example code. i want to send Light on-Off command every 2 second Timer base instead of Button press. 
 i got an error below.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Jul 2019 12:38:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42338/ble-mesh-stack-3-0---message-send-on-timer-issue" /><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/197847?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 12:38:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ab233db-6f76-4ac7-b88b-e982d69a5d34</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Could you please open a new DevZone case?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/197418?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2019 13:43:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdaadea0-522c-46cc-9fa3-c88b2c530301</guid><dc:creator>Pegah</dc:creator><description>&lt;p&gt;Hi I am having the same issue. Could you please let me know how you figure this out?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/169101?ContentTypeID=1</link><pubDate>Fri, 01 Feb 2019 15:07:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b0d858a-a86a-406e-89ce-99093848cc24</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi Nikunj,&lt;/p&gt;
&lt;p&gt;If you are still having trouble with this case, could you please post an updated comment? I will take a look at it then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/166284?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 14:31:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34e2d64f-a973-44de-a745-bd1043ccab0e</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi Nikunj,&lt;/p&gt;
&lt;p&gt;First off, you should figure out why the app error weak is called.&amp;nbsp;Which error check is leading to this app_error_weak call?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems you have successfully initialized the softdevice before you intialized the mesh stack (&lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Mesh_SDK/v3-0-0/md_doc_getting_started_how_to_nordicSDK"&gt;see documentation&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Have you taken &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37186/app-timer-in-mesh"&gt;a look at the example&lt;/a&gt; I provided in my first comment? Have you tried just updating that example from mesh sdk v2.1.1 to mesh sdk v3? Or just taking the standard light switch server example in mesh sdk v3 &amp;amp; adding the code that Simon added (i.e. timeout_config() function &amp;amp; adding app_timer_init() to the initialize function)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/165047?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 04:34:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d162fa23-277d-466a-9edc-8e8d0431fa11</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;Hello Bjorn Kvaale&lt;/p&gt;
&lt;p&gt;Thanks But i&amp;#39;m using BLE MESH SDK 3.0 .I want to send Light On/Off Command evrny 10Second.&lt;/p&gt;
&lt;p&gt;If i print String every 10 second and command send on Button pressed it&amp;#39;s working well . but i send command every 10 second code is stuck.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
APP_TIMER_DEF(m_temp_timer);
uint8_t sec_2 =0;
static void temp_handler(void * p_context)
{
  UNUSED_VARIABLE(p_context);
  sec_2=1;
}

static void msg_send_to_server(void)
{

    uint32_t status = NRF_SUCCESS;
    generic_onoff_set_params_t set_params;
    model_transition_t transition_params;


    static uint8_t tid = 0;

    set_params.on_off[0] = APP_STATE_ON;
     

    set_params.tid = tid++;
    transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;//50MS
    transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;//100MS

    /* Demonstrate acknowledged transaction, using 1st client model instance */
    /* In this examples, users will not be blocked if the model is busy */
    // (void)access_model_reliable_cancel(m_clients[0].model_handle);
    status = generic_onoff_client_set(&amp;amp;m_clients[0], &amp;amp;set_params, &amp;amp;transition_params);

    hal_led_pin_set(BSP_LED_0, set_params.on_off);  

    switch (status)
    {
        case NRF_SUCCESS:
            break;

        case NRF_ERROR_NO_MEM:
        case NRF_ERROR_BUSY:
        case NRF_ERROR_INVALID_STATE:
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;\nClient %u cannot send\r\n&amp;quot;, button_number);
            hal_led_blink_ms(LEDS_MASK, LED_BLINK_SHORT_INTERVAL_MS, LED_BLINK_CNT_NO_REPLY);
            break;

        case NRF_ERROR_INVALID_PARAM:
            /* Publication not enabled for this client. One (or more) of the following is wrong:
             * - An application key is missing, or there is no application key bound to the model
             * - The client does not have its publication state set
             *
             * It is the provisioner that adds an application key, binds it to the model and sets
             * the model&amp;#39;s publication state.
             */
            __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;\n Publication not configured for client %u\r\n&amp;quot;, button_number);
            break;

        default:
            ERROR_CHECK(status);
            break;
    }
}

static void initialize(void)
{


    __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_BEARER, LOG_LEVEL_INFO, LOG_CALLBACK_DEFAULT);
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,&amp;quot;\n----- BLE Mesh Light Switch Client Demo -----\r\n&amp;quot;);

  

    ERROR_CHECK(app_timer_init());
    hal_leds_init();

#if BUTTON_BOARD
    ERROR_CHECK(hal_buttons_init(button_event_handler));
#endif

    ble_stack_init();

#if MESH_FEATURE_GATT_ENABLED
    gap_params_init();
    conn_params_init();
#endif
    mesh_init();
    

   ERROR_CHECK(app_timer_create(&amp;amp;m_temp_timer, APP_TIMER_MODE_REPEATED, temp_handler));
   ERROR_CHECK(app_timer_start(m_temp_timer, MAX(APP_TIMER_MIN_TIMEOUT_TICKS, HAL_MS_TO_RTC_TICKS(10000)), NULL));

}


int main(void)
{

   initialize();
    start();

    for (;;)
    {

       if(sec_2)
       {
         msg_send_to_server();
         __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,&amp;quot;\n----- 2Second Timer Run-----\r\n&amp;quot;);
         sec_2=0;
       }


    
        (void)sd_app_evt_wait();
    }



}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1547181210193v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Got an above Error. Please reply me ASAP.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nikunj&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE MESH stack 3.0 - message send on timer issue</title><link>https://devzone.nordicsemi.com/thread/164876?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 11:10:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce2d55b8-e413-494e-8e21-b6be3771bb2b</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Please take a look at &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37186/app-timer-in-mesh"&gt;this devzone case&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>