<?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>Rename &amp;#39;DfuTarg&amp;#39; from bootloader.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32511/rename-dfutarg-from-bootloader</link><description>Hi, 
 I checked this thread https://devzone.nordicsemi.com/f/nordic-q-a/24611/how-to-change-the-name-of-bootloader-s-dfutarg which suggests to modify the macro but I would try to avoid that. It doesn&amp;#39;t feel safe to modify anything from inside the SDK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 23 Jun 2018 14:21:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32511/rename-dfutarg-from-bootloader" /><item><title>RE: Rename 'DfuTarg' from bootloader.</title><link>https://devzone.nordicsemi.com/thread/137311?ContentTypeID=1</link><pubDate>Sat, 23 Jun 2018 14:21:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0afcdbb-57cc-4b30-85c7-82fc478f4a12</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;nrf_dfu_settings_adv_name_write() is meant to&amp;nbsp;called from the main application&amp;nbsp;through the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/lib_svc.html?cp=4_0_0_3_47"&gt;SVCI interface&lt;/a&gt;. This feature&amp;nbsp;enables&amp;nbsp;the DFU controller to change from the default adv. name to an arbitrary&amp;nbsp;one before&amp;nbsp;issuing the&amp;nbsp;DFU start command.&amp;nbsp; Not sure if it will work if you do it from the bootloader code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another option could be&amp;nbsp;to just modify nrf_dfu_ble.c::gap_params_init() to concatenate the static part with the dynamic part in UICR. Maybe something like this (haven&amp;#39;t tested it):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint32_t gap_params_init(void)
{
    uint32_t                err_code;
    ble_gap_conn_sec_mode_t sec_mode;
    uint8_t                 device_name[MAX_LEN] = NRF_DFU_BLE_ADV_NAME;
    uint8_t                 bytes_static_part = strlen(device_name);
    
    ...
    
    // Append dynamic string
    snprintf(&amp;amp;device_name[bytes_static_part], BYTES_DYNAMIC_PART, &amp;quot;%s&amp;quot;, NRF_UICR-&amp;gt;CUSTOMER);
    
    ...
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In case you are implementing buttonless dfu, be aware&amp;nbsp;that the&amp;nbsp;DFU controller may need to know the adv. name&amp;nbsp;in order to&amp;nbsp;re-connect when switching to DFU mode because of the address change.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rename 'DfuTarg' from bootloader.</title><link>https://devzone.nordicsemi.com/thread/137137?ContentTypeID=1</link><pubDate>Thu, 21 Jun 2018 14:42:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd21c7d6-477f-4fd1-8ee8-2f1a1cf004d6</guid><dc:creator>Samuele Forconi</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m having the same issue,&amp;nbsp;in nrf_dfu_settings.h there&amp;#39;s a&amp;nbsp;function named&amp;nbsp;nrf_dfu_settings_adv_name_write(...) that I think I should use to change the GAP device name of the device and to store in flash, but it&amp;#39;s not working.&lt;/p&gt;
&lt;p&gt;My device has a name composed of a static part and a &amp;#39;dynamic&amp;#39; part (stored in uicr memory during programming), so I can&amp;#39;t use the #define NRF_DFU_BLE_ADV_NAME to set a completely static name for the device.&lt;/p&gt;
&lt;p&gt;In my bootloader implementation, the&amp;nbsp;&lt;span&gt;nrf_dfu_settings_adv_name_write(...) is called inside&amp;nbsp;my&amp;nbsp;custom nrf_dfu_init_user() function,&amp;nbsp;should this be the correct way to go?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Rename 'DfuTarg' from bootloader.</title><link>https://devzone.nordicsemi.com/thread/125012?ContentTypeID=1</link><pubDate>Mon, 19 Mar 2018 13:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fc0742b-458f-4a2c-8915-c36c7210a8e9</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;quot;DfuTarg&amp;quot; should not be visible to the end user if you are implementing button-less DFU as the phone will automatically re-connect to device once it enters bootloader mode (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_buttonless_dfu.html?cp=4_0_0_4_4_1"&gt;button-less DFU application&amp;nbsp;example&lt;/a&gt;). However, if you are not doing button-less DFU and you want to have a different device name, you do need to change the DEVICE_NAME define as suggested in the other thread. I don&amp;#39;t foresee any problems with that.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>