<?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>restart advertising by ble_advertising_start,and get fatal error</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58279/restart-advertising-by-ble_advertising_start-and-get-fatal-error</link><description>HI, 
 Version: SDK15.3,ble_app_template,custom board with nrf52832 
 I&amp;#39;m trying to change my device name by writing data from bluetooth 
 when getting 0xdd 0x06 ........,it will trigger the change_device_name_timer_handler as below 
 the code works before</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Feb 2020 00:27:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58279/restart-advertising-by-ble_advertising_start-and-get-fatal-error" /><item><title>RE: restart advertising by ble_advertising_start,and get fatal error</title><link>https://devzone.nordicsemi.com/thread/236395?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 00:27:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d910f05d-c28b-48de-9887-07f4e209c8ad</guid><dc:creator>Aku</dc:creator><description>&lt;p&gt;thank you very much! It works!&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="csharp"&gt;static void change_device_name_timer_handler(void * p_context)
{     
      ret_code_t err_code;
      SEGGER_RTT_printf(0, &amp;quot;change device name!\n&amp;quot;);
      uint8_t str1[] = &amp;quot;GT06_&amp;quot;;
      int len = strlen(str1) + strlen(our_device_name_data) + 1;
      SEGGER_RTT_printf(0, &amp;quot;len1 = %d ,len2 = %d\n&amp;quot;,strlen(str1),strlen(our_device_name_data));
      uint8_t concated[len];
      memset(concated, &amp;#39;\0&amp;#39;, len);
      strcat(concated, str1);
      strcat(concated, our_device_name_data);
      SEGGER_RTT_printf(0, &amp;quot;len = %d ,name = %s\n&amp;quot;,len,concated);
      
      ble_gap_conn_sec_mode_t sec_mode;
      BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;sec_mode);
      sd_ble_gap_device_name_set(&amp;amp;sec_mode,(const uint8_t *)concated,strlen(concated));
      
      uint16_t m_adv_current_slave_link_conn_handle_saved = m_advertising.current_slave_link_conn_handle;
      advertising_init();
      m_advertising.current_slave_link_conn_handle = m_adv_current_slave_link_conn_handle_saved;


}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Surprisingly,i dont have to stop advertising and restart it!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: restart advertising by ble_advertising_start,and get fatal error</title><link>https://devzone.nordicsemi.com/thread/236340?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 16:15:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0954d82-3493-4edf-8f70-a91739b0719e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;Check out &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41404/change-device-name-during-ble-connection-sdk-15-0-0"&gt;this link&lt;/a&gt;, which proposes a solution to this. If anything is unclear, or you don&amp;#39;t get it to work, please ask and I will look into it.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>