<?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>Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7943/can-i-set-macaddress-in-bootloader-and-advertising-it</link><description>bootloader.rar (/attachment/d5fd4fbbc7d37433740f6c9468f3110b)
 bootloader_dfu.rar 
Hi,all.i want to set same macaddress with my app in bootloader,and advertise it in bootloader,that my phone can know the device is the updating device.Can do it as this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Jul 2015 05:01:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7943/can-i-set-macaddress-in-bootloader-and-advertising-it" /><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28418?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2015 05:01:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:625b0ff9-6412-4f92-b298-4ff1ab39ff1a</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Thanks a lot! i remove uuid from scan data,and it work .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28417?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2015 01:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ab59202-9afd-4511-86fe-ef00e0be7c98</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Thanks! i found it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28416?ContentTypeID=1</link><pubDate>Tue, 07 Jul 2015 00:57:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:752a1e4c-c5fa-4954-865d-78ced9e9b479</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Thanks! But i can&amp;#39;t find the file that you attached.Can you tell me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28415?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2015 12:28:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa680ce7-ece8-450f-97a9-1c0fb74881fc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@wuvo: I don&amp;#39;t see the same result as your. On Master Control Panel app I can see the DFUTARG device name.
In your case you had the issue because you tried to put all the device name, service uuid, and manufacturing data in to the scan response, which of course doesn&amp;#39;t have enough space (31 bytes).
If you remove the service uuid in the scan response, it should be fine.&lt;/p&gt;
&lt;p&gt;I attached in my answer the modified dfu_transport_ble.c file, please replace your file and let me know the result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28411?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 15:26:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bd694ee-1116-4d79-be60-b558a29ea6aa</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Hi,Hung Bui.Thank you very much! i  upload my project in my question. a zip named bootloader is my project files,and an other is files that i edited. i used SDK8.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28410?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 15:06:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8afdfe58-5c8c-4306-adfd-0401552bf560</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@wuvo.leo: You can either edit your question to add your project .zip file, or you can create a support case in our my page (on Nordic website) and upload the .zip file there, if there it is confidential. Mention my name when you create the case there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28409?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 15:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cad93f19-e859-4240-b170-dbd901f096e2</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Hi,Hung Bui.i use SDK8.0.how to send my project to you?Email or other?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28406?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 14:13:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8fa9102-526d-4091-9f97-7352828c52c8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@ wuvo: I think it would be easier if you can send me the project source code, I can try to test here. Let me know which SDK you use.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28414?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 12:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c9af5e8-1e57-4fd9-955e-74171592cbe7</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;i set default device name &amp;quot;DfuTarg&amp;quot;。when i  add  manufdata in function &amp;quot;advertising_init&amp;quot;, MCP find the device and name is &amp;quot;n/a&amp;quot;,connect button dispear（android）.i didn&amp;#39;t edit advertising type that keeping original。Thank you again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28413?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 08:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:616336a1-f0c4-4e3d-a27f-69c787658e28</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@wuvo.leo: How does you set the device name ? It should be set in gap_params_init().&lt;/p&gt;
&lt;p&gt;Regarding &amp;quot;no connect button&amp;quot;, you need to check the advertising type if it&amp;#39;s connectable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28412?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 23:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01dee6a7-d162-49a6-86eb-7791effb88f3</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Hi,Hung Bui.Thanks for your reply first. i still have trouble.i paste my function here:&lt;/p&gt;
&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;static void advertising_init(uint8_t adv_flags)
{
    uint32_t      err_code;
    ble_advdata_t advdata;
    ble_uuid_t    service_uuid;
	  ble_advdata_manuf_data_t manufdata;
	  int32_t       uniqueid[2] = {NRF_FICR-&amp;gt;DEVICEADDR1, NRF_FICR-&amp;gt;DEVICEADDR0};
    uint8_t addrarray[8] = { 0 };

    service_uuid.type = m_dfu.uuid_type;
    service_uuid.uuid = BLE_DFU_SERVICE_UUID;
		
	  memset(&amp;amp;manufdata, 0, sizeof(manufdata));
    manufdata.company_identifier = 0xFF90;
    manufdata.data.size = 6;
	
	  memcpy( (void *)&amp;amp;addrarray,(void *)&amp;amp;uniqueid,sizeof(addrarray) );
	  addrarray[1] |= 0xc0;
	  memcpy( (void *)&amp;amp;addrarray[2],(void *)&amp;amp;addrarray[4],4);
	  manufdata.data.p_data = ((unsigned char*)addrarray);
    memset(&amp;amp;advdata, 0, sizeof(advdata));

    advdata.name_type                     = BLE_ADVDATA_FULL_NAME;
    advdata.include_appearance            = false;
    advdata.flags                         = adv_flags;
    advdata.uuids_more_available.uuid_cnt = 1;
    advdata.uuids_more_available.p_uuids  = &amp;amp;service_uuid;
		advdata.p_manuf_specific_data   = &amp;amp;manufdata;

    err_code = ble_advdata_set(&amp;amp;advdata, NULL);
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr /&gt;
&lt;p&gt;i used nRF Master Control pannel to find my device,and display my device name &amp;quot;n/a&amp;quot;,no connect button.Please help me.Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28408?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 15:15:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8dbc82b9-ccda-4346-aa5f-a1ef44a92047</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@wuvo.leo: Could be smth wrong with the advertising packet setup. Make sure you don&amp;#39;t use too long name and manufacturing data. Maximum advertising packet size is 31 bytes. If you need more you can use scan response packet.
If you still have trouble, please upload your project here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28407?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 15:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e23a028-d0d4-453b-8062-52b744deefa4</guid><dc:creator>wuvo.leo</dc:creator><description>&lt;p&gt;Thanks, Hung Bui! i want advertising Mac address in manufdata in &amp;quot;advertising_init&amp;quot; function.but if i do this,device name change from Dfutarg to no name.what&amp;#39;s wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can i set macaddress in bootloader and advertising it?</title><link>https://devzone.nordicsemi.com/thread/28405?ContentTypeID=1</link><pubDate>Thu, 02 Jul 2015 11:40:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2a5509f-3020-4dc0-8895-5dc677df29f2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@wuvo.leo: You can simply remove the part that we change the address in the bootloader at dfu_transport_update_start() , where we call sd_ble_gap_address_set().&lt;/p&gt;
&lt;p&gt;You can have a look &lt;a href="https://devzone.nordicsemi.com/blogs/685/common-faq-on-dfu/"&gt;here&lt;/a&gt; at question I, for the explanation why we do that.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_transport_5F00_ble.c"&gt;dfu_transport_ble.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>