<?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>nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2971/nrf51822-s110---how-can-i-change-the-device-name</link><description>Hi, I am trying to change the beacon data. 
 I changed Beacon UUID already, but I can not find where can I change device name. 
 I guess I need to change the gap_adv_data. However I can not find that part. 
 Would you help me to change the device name</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 04 Jul 2014 00:22:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2971/nrf51822-s110---how-can-i-change-the-device-name" /><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11272?ContentTypeID=1</link><pubDate>Fri, 04 Jul 2014 00:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa3b9723-1977-4346-961d-54e428827757</guid><dc:creator>Kyu</dc:creator><description>&lt;p&gt;And I insert that&lt;/p&gt;
&lt;p&gt;advdata.name_type               =BLE_ADVDATA_SHORT_NAME;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11271?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2014 06:52:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba84c4d5-1e51-424d-9c3c-04b3c9ee0947</guid><dc:creator>Kyu</dc:creator><description>&lt;p&gt;Thanks, Pål Håland !&lt;/p&gt;
&lt;p&gt;I put this line   &amp;quot;  sd_ble_gap_device_name_set(my, (uint8_t *)DeviceName, strlen(DeviceName));  &amp;quot;&lt;/p&gt;
&lt;p&gt;after ble_stack_init();&lt;/p&gt;
&lt;p&gt;and before advertising_init();&lt;/p&gt;
&lt;p&gt;However the device name is still unknown.&lt;/p&gt;
&lt;p&gt;Thank you so mush&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11270?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2014 05:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e458021-4dad-4a69-b0e1-b0495df98706</guid><dc:creator>P&amp;#229;l H&amp;#229;land</dc:creator><description>&lt;p&gt;Hi Kyu, you need to call the sd_ble_gap_device_name_set &lt;i&gt;after&lt;/i&gt; you have called the ble_stack_init and before you call the advertising_init.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11269?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2014 00:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dda90d7-ae00-4b1c-bb58-59039608fb25</guid><dc:creator>Kyu</dc:creator><description>&lt;p&gt;Thanks John.&lt;/p&gt;
&lt;p&gt;I edited the main function&lt;/p&gt;
&lt;p&gt;int main(void)
{&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define DeviceName &amp;quot;MyBeacon&amp;quot;

ble_gap_conn_sec_mode_t *my;

my = (ble_gap_conn_sec_mode_t *)malloc(sizeof(ble_gap_conn_sec_mode_t));

my-&amp;gt;sm=1;
my-&amp;gt;lv=1;

//sd_ble_gap_device_name_set(ble_gap_conn_sec_mode_t const * const p_write_perm, uint8_t const * const p_dev_name, uint16_t len));
sd_ble_gap_device_name_set(my, (uint8_t *)DeviceName, strlen(DeviceName));

// Initialize.
leds_init();
ble_stack_init();
advertising_init();

// Start execution.
advertising_start();



// Enter main loop.
for (;;)
{
    power_manage();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;But the device name is still unknown.&lt;/p&gt;
&lt;p&gt;Is there any problem in my code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11268?ContentTypeID=1</link><pubDate>Thu, 03 Jul 2014 00:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46582645-c354-4e78-9aea-c5d461696ce2</guid><dc:creator>Kyu</dc:creator><description>&lt;p&gt;Thanks John!&lt;/p&gt;
&lt;p&gt;But I don&amp;#39;t 	understand sec_mode parameter.
\n&lt;/p&gt;
&lt;p&gt;in the main function:&lt;/p&gt;
&lt;p&gt;#define DeviceName &amp;quot;JK&amp;#39;s Beacon&amp;quot;&lt;/p&gt;
&lt;p&gt;// Initialize.
leds_init();
ble_stack_init();
advertising_init();&lt;/p&gt;
&lt;p&gt;// Start execution.
advertising_start();&lt;/p&gt;
&lt;p&gt;sd_ble_gap_device_name_set(&amp;amp;sec_mode, (uint8_t *)DeviceName, strlen(DeviceName));&lt;/p&gt;
&lt;p&gt;what parameter should I put down?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51822 ( S110 )- how can I change the device name?</title><link>https://devzone.nordicsemi.com/thread/11267?ContentTypeID=1</link><pubDate>Wed, 02 Jul 2014 11:38:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d813a9b8-170c-427c-944d-459c8b8d8b6e</guid><dc:creator>John</dc:creator><description>&lt;p&gt;The device name is set in gap_params_init with the following line of code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode, (uint8_t *)DEVICE_NAME, strlen(DEVICE_NAME));
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>