<?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)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/30065/mesh-device-restart-how-to-communicate-with-the-previous-configuration</link><description>Board: custom board; Mesh SDK: V1.0.0; Softdevice: S132; IDE: SEGGER Embedded; BLE: nrf52832 
 When I test the steps specified by “Interactive PyACI”, I can Provisioning the client and server, and client can send message to server. but when i restart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 06 Feb 2018 11:45:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/30065/mesh-device-restart-how-to-communicate-with-the-previous-configuration" /><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119914?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 11:45:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0eed179-4c9e-48a8-8d86-667f7bb9d033</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Beike,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Adding subscription_count increase there might not be best idea. Usually what we do is when we restore model (start by calling&amp;nbsp;nrf_mesh_node_config() from main)&amp;nbsp; ,&amp;nbsp;restore_addresses_for_model() in access.c will be called and the subscription_count will be updated by dsm_address_subscription_add_handle() function.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The serial example currently demonstrates a simple serialization application, meaning all the configuration data and provisioning should be stored on the peer MCU (or PC). And&amp;nbsp;be restored every time the chip reset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are creating a standalone node, I would suggest to have a look at the light switch example.&amp;nbsp;In that example the flash is handled properly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119855?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 06:34:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd0177b7-f642-405f-bac9-c66f8bcfe5a6</guid><dc:creator>Beike</dc:creator><description>&lt;p&gt;today, this problem solved by me . &lt;/p&gt;
&lt;p&gt;Adding this command in flash_load fountion.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(type == DSM_ENTRY_TYPE_ADDR_NONVIRTUAL)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_addresses[index].subscription_count++;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void flash_load(dsm_entry_type_t type, uint32_t index, const dsm_flash_entry_t * p_entry, uint16_t entry_len)
{
    NRF_MESH_ASSERT(type &amp;lt; DSM_ENTRY_TYPES);
    const flash_group_t * p_group = &amp;amp;m_flash_groups[type];

    p_group-&amp;gt;to_dsm_entry(index, p_entry, entry_len);
    bitfield_set(p_group-&amp;gt;p_allocated_bitfield, index);

    //add by zhou ,to update the subscription address number , avoid adding subscription address after reboot.
    if(type == DSM_ENTRY_TYPE_ADDR_NONVIRTUAL)
    {
        m_addresses[index].subscription_count++;
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to update the subscription number after reboot.&lt;/p&gt;
&lt;p&gt;is this a bug?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119842?ContentTypeID=1</link><pubDate>Tue, 06 Feb 2018 01:18:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1295abfe-f6c3-49cb-8b2d-5bd26d1522f5</guid><dc:creator>Beike</dc:creator><description>&lt;p&gt;Sorry, My description is not clear enough. I am using Serial example. &lt;/p&gt;
&lt;p&gt;yes, i think&amp;nbsp; &lt;span&gt;the subscription/publication address is missing on the client/server after reboot.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;after reboot device, we must send this command&amp;nbsp; &amp;quot;send(cmd.AddrSubscriptionAdd(49218))&amp;quot;&amp;nbsp; to reconnfigrate the subscription address to receive the messages.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119746?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 12:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26b734c-2a96-4072-a655-ba5cf6dcda43</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I was asking which application firmware/example did you use ? In our lightswitch example we did call&amp;nbsp;dsm_flash_config_load() in main.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;What do you mean by &amp;quot;&lt;span&gt;&amp;nbsp;if let the client and server node that has been rebooted print log by serial port&amp;quot; ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you saying the subscription/publication address is missing on the client/server after reboot&amp;nbsp; ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119711?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 11:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9027342b-c244-4124-b79e-66804258d0f5</guid><dc:creator>Beike</dc:creator><description>&lt;p&gt;firmware :S132_5.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119710?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2018 11:02:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd6c86aa-0bc1-4a30-a104-c4625082cee5</guid><dc:creator>Beike</dc:creator><description>&lt;p&gt;mesh V1.0.0;&lt;/p&gt;
&lt;p&gt;This problem has been solved by me. I found the configration has been stored on flash, but has not been reload after reboot , so add this line &amp;quot;dsm_flash_config_load();&amp;quot; in main fountion , that is ok! I think this is a bug.&lt;/p&gt;
&lt;p&gt;Add, there still has a little problem is that the relay node can relay messages in a same subnet after reboot and don&amp;#39;t need to reconfigrate the app key and subnet address, but if let the client and server node that has been rebooted print log by serial port we must reconfigrate the publlication and subscription address by this command&lt;/p&gt;
&lt;p&gt;send(cmd.AddrSubscriptionAdd(49218));send(cmd.AddrPublicationAdd(49218))&lt;/p&gt;
&lt;p&gt;so can you tell me why?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Mesh)device restart,how to communicate with the previous configuration;</title><link>https://devzone.nordicsemi.com/thread/119562?ContentTypeID=1</link><pubDate>Fri, 02 Feb 2018 14:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0687cb64-5a7d-458d-b05f-a7e15ff4f217</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Which firmware did you use ? Have you&amp;nbsp;set&amp;nbsp;PERSISTENT_STORAGE = 1 ? If you did, the configuration should be stored on flash.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What did you observe ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>