<?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>change the device name while connected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66818/change-the-device-name-while-connected</link><description>Hi, 
 
 
 I am using 
 
 nRF52840 
 SDK 15.3.0 
 Keil IDE 
 The soft device is S140 
 JLinkRTTViewer for debug 
 
 I changed the device name while not connected. 
 but, The device made a connection with the smartphone. 
 and I tried to change the device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Oct 2020 11:54:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66818/change-the-device-name-while-connected" /><item><title>RE: change the device name while connected</title><link>https://devzone.nordicsemi.com/thread/275598?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 11:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcd7536f-fb66-41e6-8698-40e58b242eb9</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I suggest you share a simplified example I can unzip to the RF5 SDK v15.3 and run on an nRF52-DK to recreate the issue.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change the device name while connected</title><link>https://devzone.nordicsemi.com/thread/275572?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 11:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:912d46f1-42af-4403-970a-be29297c3711</guid><dc:creator>alex kim</dc:creator><description>&lt;p&gt;Hi, Kenneth&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks for the answer. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Changing the device name works well when the smartphone is not connected. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have attached the gap_params_init() function.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void gap_params_init(void)
{
    ret_code_t              err_code;
    ble_gap_conn_params_t   gap_conn_params;
    ble_gap_conn_sec_mode_t sec_mode;

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;sec_mode);

	get_ble_device_name();	
    err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode,
//                                          (const uint8_t *) device_name,
                                           device_name, strlen( (char const *)device_name));
	NRF_LOG_INFO(&amp;quot;device_name= 0x%x&amp;quot;, strlen( (char const *)device_name))
										  
    APP_ERROR_CHECK(err_code);

    memset(&amp;amp;gap_conn_params, 0, sizeof(gap_conn_params));

    gap_conn_params.min_conn_interval = m_scan.conn_params.min_conn_interval;
    gap_conn_params.max_conn_interval = m_scan.conn_params.max_conn_interval;
    gap_conn_params.slave_latency     = m_scan.conn_params.slave_latency;
    gap_conn_params.conn_sup_timeout  = m_scan.conn_params.conn_sup_timeout;

    err_code = sd_ble_gap_ppcp_set(&amp;amp;gap_conn_params);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alex&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change the device name while connected</title><link>https://devzone.nordicsemi.com/thread/274997?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 07:54:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:589e3da9-730b-42bc-b27b-2e566f2e16c3</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I assume that is is the sd_ble_gap_device_name_set() that return NRF_ERROR_DATA_SIZE. Not quite sure what may trigger that, but likely a parameter in&amp;nbsp;sd_ble_gap_device_name_get() is wrong. You an refer to&amp;nbsp;gap_params_init() on example.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change the device name while connected</title><link>https://devzone.nordicsemi.com/thread/274963?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 00:48:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14693e20-509f-44ce-8c6e-cd4159267c47</guid><dc:creator>alex kim</dc:creator><description>&lt;p&gt;Hi, awneil&lt;/p&gt;
&lt;pre class="tw-data-text tw-text-large XcVN5d tw-ta" dir="ltr"&gt;&lt;span lang="en"&gt;Sorry for the late reply.
The error code is 0x12.
Please refer to the screen capture.&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class="tw-data-text tw-text-large XcVN5d tw-ta" id="tw-target-text" dir="ltr"&gt;&lt;span lang="en"&gt;When I call re_device_name() to change the device name,&lt;br /&gt; an error occurs like a screen capture.&lt;/span&gt;&lt;span lang="en"&gt;&lt;br /&gt;&lt;br /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/nordic_5F00_QA1.png" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: change the device name while connected</title><link>https://devzone.nordicsemi.com/thread/273474?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 11:53:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:225ea113-f852-40b8-9b2e-99929954e3b4</guid><dc:creator>awneil</dc:creator><description>[quote userid="69031" url="~/f/nordic-q-a/66818/change-the-device-name-while-connected"]smartphone[/quote]
&lt;p&gt;Note that smartphones are likely to cache device names - so may not notice a change ...&lt;/p&gt;
[quote userid="69031" url="~/f/nordic-q-a/66818/change-the-device-name-while-connected"]a&amp;nbsp;fatal error occurs [/quote]
&lt;p&gt;Where, exactly, does it occur?&lt;/p&gt;
&lt;p&gt;Have you looked up the error code that you get?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8637._5F00_Insert-Code-_2D00_-Nordic-2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>