<?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>nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42135/nrf5-sdk-for-mesh-v3-0-0-persistent_storage-macro-enable-create-issue</link><description>Hii, 
 I&amp;#39;m using Nordic nRF5 SDK for Mesh v3.0.0 Example Code in LIGHT SW Provisioner Example i got Error code please healp me how to solve. 
 In Case Of 
 #define PERSISTENT_STORAGE 1 
 
 if #define PERSISTENT_STORAGE 0 then works well. i want to store</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 11 Jan 2019 08:13:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42135/nrf5-sdk-for-mesh-v3-0-0-persistent_storage-macro-enable-create-issue" /><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/165065?ContentTypeID=1</link><pubDate>Fri, 11 Jan 2019 08:13:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4867c503-a727-4e92-941c-846346f214f4</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Since this is not the same topic as your original question, I suggest that you create a new ticket. I will try to help you in this answer, but if you are still stuck, then post your issue in a new ticket.&lt;/p&gt;
&lt;p&gt;This is the assertion handler.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you check the status value of your different calls? E.g. status = generic_onoff_client_set(). What is status after this line is executed?&lt;/p&gt;
&lt;p&gt;It may also be your ERROR_CHECK(app_timer_create()) or ERROR_CHECK(app_timer_start()). Try to do:&lt;/p&gt;
&lt;p&gt;ret_code_t err_code;&lt;/p&gt;
&lt;p&gt;err_code = app_timer_create();&lt;/p&gt;
&lt;p&gt;ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p&gt;err_code = app_timer_start());&lt;/p&gt;
&lt;p&gt;APP_ERROR_CHECK(err_code);&amp;nbsp;&lt;/p&gt;
&lt;p&gt;and check the err_code after the application calls, and before the APP_ERROR_CHECK();&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try to debug, and figure out what you are adding that causes the problem to crash. You say that it is when you try to &amp;quot;send command&amp;quot; I am not sure how you do this, but it is probably related to this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164857?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 09:50:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5cd0ca6-9484-4328-ae7b-10965fd8e0d7</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
void msg_send_to_server()
{
     uint8_t Data_Buff[50] =&amp;quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwx&amp;quot;;

    uint32_t status = NRF_SUCCESS;
    generic_onoff_set_params_t set_params;
    model_transition_t transition_params;
    static uint8_t tid = 0;

    memcpy(set_params.on_off,Data_Buff,sizeof(Data_Buff));
 
    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
   


    status = generic_onoff_client_set(&amp;amp;m_clients[0], &amp;amp;set_params, &amp;amp;transition_params);
    if(status==0)
    {
      __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,&amp;quot;\nClient Send:%s  LEN:%d\r\n&amp;quot;,set_params.on_off,sizeof(Data_Buff));
    }
   
//    status = generic_onoff_client_set_unack(&amp;amp;m_clients[0], &amp;amp;set_params,&amp;amp;transition_params, 0);//APP_UNACK_MSG_REPEAT_COUNT
//    if(status==0)
//    {
//      __LOG(LOG_SRC_APP, LOG_LEVEL_INFO,&amp;quot;\nClient Send:%s  LEN:%d\r\n&amp;quot;,set_params.on_off,sizeof(Data_Buff));
//    }


    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;);
            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;);
            break;

        default:
            ERROR_CHECK(status);
            break;
    }

   //hal_led_blink_ms(1 &amp;lt;&amp;lt; BSP_LED_3, LED_BLINK_INTERVAL_MS, 1);

}




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 initialize(void)
{

      uart_init();

    __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(2000)), 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;/p&gt;
&lt;p&gt;Got an Error below&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1547113629211v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If i send command on Button press and only print timer line every 2 sec working ok but when i send command every 2 sec (single Byte oR bool data ) code is stuck.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nikunj&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164852?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 09:35:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4032c172-9129-421a-bec0-e1ccf476f720</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Nikunj,&lt;/p&gt;
&lt;p&gt;Have you tried to set up the timer? Does it trigger? I am not sure where the code is stuck without some more details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164821?ContentTypeID=1</link><pubDate>Thu, 10 Jan 2019 08:00:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bda25a06-8cef-40b3-9d53-14ee877b8335</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;Thanks .but i have one &amp;nbsp;query , I&amp;#39;m using&amp;nbsp;LIGHT SWITCH Example code.i want to send LIGHT ON/OFF Command Every 5 Second base on timer interpret instead of button&amp;nbsp;pressed. In this scenario code stuck.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Nikunj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164550?ContentTypeID=1</link><pubDate>Tue, 08 Jan 2019 14:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:603bdfbd-0c39-420d-b941-8e0747785938</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Yes, but not with the light switch model. Check out &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/Mesh_SDK/v3-0-0/md_doc_getting_started_how_to_models"&gt;how to create custom Mesh models&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164456?ContentTypeID=1</link><pubDate>Tue, 08 Jan 2019 09:06:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ef185da-83b4-4a5b-a85c-a625b32653f8</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;Thanks its work well ..&lt;/p&gt;
&lt;p&gt;i want to send string like 10 byte using ble mesh is it possible..?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164254?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 12:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99c381c2-2691-4596-ada9-c4b3de8ba3c2</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. Can you try to download the mesh SDK (3.0.0) and the normal SDK (15.2.0), unzip them in the same folder, and compile it without any changes (PERSISTENT_STORAGE = 1). Can you also make sure that you erase the entire chip before programming it? It may be some leftover data stored in flash from another application.&lt;/p&gt;
&lt;p&gt;use &amp;quot;nrfjprog -e&amp;quot; in a cmd terminal window (PS: you need to install Nordic Command Line Tools first).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164204?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 10:19:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f97d6fa-d1cb-4f0a-b74e-f2a1c5fb57ca</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;i&amp;#39;m not using nRF 52840 DK. i&amp;#39;m using nRF52832 DK and i got this error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164194?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 09:59:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03dd3b1c-8872-4161-b9e6-83300be0c504</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t replicate your error. PERSISTENT_STORAGE is defined to 1 by default, and it works in a fresh unzip of the SDK (At least when I tested that now).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, I see from your ticket tags that you use the nRF52840 DK, is that correct? Because you seem to use the project for the nRF52832. Try to use the light_switch_provisioner_nrf522840_xxAA_s140_6_1_0.emProject if you indeed have the nRF52&lt;strong&gt;840&lt;/strong&gt; DK.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/164131?ContentTypeID=1</link><pubDate>Mon, 07 Jan 2019 03:39:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c862474-adf4-4012-8f55-400f55edb5c6</guid><dc:creator>Nikunj Patel</dc:creator><description>&lt;p&gt;Hello Edvin,&lt;/p&gt;
&lt;p&gt;Just i run Example code no any changes ,but i got an Error Code.&lt;/p&gt;
&lt;p&gt;#define PERSISTENT_STORAGE 0 instead of #define PERSISTENT_STORAGE 1 its work well.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x1200/__key/communityserver-discussions-components-files/4/pastedimage1546832226430v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5 SDK for Mesh v3.0.0 PERSISTENT_STORAGE Macro  Enable Create issue.</title><link>https://devzone.nordicsemi.com/thread/163945?ContentTypeID=1</link><pubDate>Fri, 04 Jan 2019 12:40:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cded556f-6fab-4a0a-a5cd-2b3d8b688d9c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello Nikunj,&lt;/p&gt;
&lt;p&gt;I am sorry, the resolution of your screenshot is very low, so I can&amp;#39;t see what it says. But I tested the provisioner with #define PERSISTENT_STORAGE 0, and I didn&amp;#39;t run into any problems while provisioning the server or the client.&lt;/p&gt;
&lt;p&gt;Can you please tell me what it says in the log of your screenshot? When did you get the error? When you start the application, or after you start the provisioning (after you press button 1)?&lt;/p&gt;
&lt;p&gt;Did you do any other changes to the project, other than setting PERSISTENT_STORAGE to 0?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>