<?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>chnage adv name on push btn event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45997/chnage-adv-name-on-push-btn-event</link><description>hi, i am doing a project where i have to change adv name of ble device. 
 i am using nrf sdk 15.3.0 ble_app_blinky example for pca 10040e because it has all the things i need ble adv name and push btn driver. 
 i have modified the code that app_button_enable</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Apr 2019 10:20:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45997/chnage-adv-name-on-push-btn-event" /><item><title>RE: chnage adv name on push btn event</title><link>https://devzone.nordicsemi.com/thread/181811?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2019 10:20:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3163837a-a449-4efd-a2ff-77cc60e59860</guid><dc:creator>nikunj8086</dc:creator><description>&lt;p&gt;thank you&amp;nbsp;Vidar,&lt;/p&gt;
&lt;p&gt;now it is working fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: chnage adv name on push btn event</title><link>https://devzone.nordicsemi.com/thread/181776?ContentTypeID=1</link><pubDate>Fri, 12 Apr 2019 07:45:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21e38c43-a242-4304-8e0a-ade5a91d9dcf</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks. I wasn&amp;#39;t able to replicate this:&amp;nbsp;&lt;/p&gt;
[quote user=""]but when i used shorter name then original adv name it worked fine but new problem is that when i go back to original adv name from here it is taking last adv name&amp;#39;s length.[/quote]
&lt;p&gt;But&amp;nbsp;I saw that the&amp;nbsp;advertisement name became truncated.&amp;nbsp;&amp;nbsp;The reason for that&amp;nbsp;is m_adv_data.adv_data.len which is an &amp;quot;inout&amp;quot; parameter is&amp;nbsp;not updated between calls to&amp;nbsp;ble_advdata_encode().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to add this line before ble_advdata_encode() in advertising_init():&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;static void advertiising_init(void)&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;{&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;..&amp;nbsp;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;m_adv_data.adv_data.len = BLE_GAP_ADV_SET_DATA_SIZE_MAX;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; err_code = ble_advdata_encode(&amp;amp;advdata, m_adv_data.adv_data.p_data, &amp;amp;m_adv_data.adv_data.len);&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;..&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: chnage adv name on push btn event</title><link>https://devzone.nordicsemi.com/thread/181659?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 14:11:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4caeb9b7-9fa4-4963-8bfe-9c4d9cf1bc45</guid><dc:creator>nikunj8086</dc:creator><description>&lt;p&gt;hi vidar,&lt;/p&gt;
&lt;p&gt;you can download my modified example from this link&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/open?id=13hSpo0mqdGHCyXwt3jr7Nr5Sb2IT8_Y4"&gt;https://drive.google.com/open?id=13hSpo0mqdGHCyXwt3jr7Nr5Sb2IT8_Y4&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: chnage adv name on push btn event</title><link>https://devzone.nordicsemi.com/thread/181597?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 12:35:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1296d213-3075-488f-9f73-b87a7c96b82a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you upload your modified project here? I&amp;#39;m not able to see what&amp;#39;s wrong from the code snippet you provided, and I think it will be easier if I could just debug it here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>