<?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>nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77922/nrf51-ble-devicename-in-beacon-app-sdk10</link><description>Hello there, 
 I&amp;#39;m facing inconsistency across two nrf51 PCB boards in term of sending the device name. I&amp;#39;m running the same exact code on both. One is advertising the device name but the other on is not (it appears as N/A on the nerf Connect app). I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 29 Jul 2021 13:56:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77922/nrf51-ble-devicename-in-beacon-app-sdk10" /><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322498?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 13:56:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ddd24745-075b-432d-a82c-12a0efab47a1</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;It looks like the advertising module (ble_advertising.c) is always setting the BLE_GAP_ADV_TYPE_ADV_IND flag which indicate connectable advertising. As a test, please try to change that to BLE_GAP_ADV_TYPE_ADV_SCAN_IND.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322323?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 19:47:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1c35603-0716-416c-807b-86d5a57de19c</guid><dc:creator>aalsubhi</dc:creator><description>&lt;p&gt;how do I attached scan response in the advertisement to send more data (more than 31 bytes) in non connectable mode?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is my attempt , but the issue is showing the device as connectable. for my application the device should be non connectable. here is my advertisement&amp;nbsp;inclination function :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_init(void)

{   uint32_t      err_code;
    ble_advdata_t advdata;
    ble_advdata_manuf_data_t manuf_data_response;
    ble_advdata_manuf_data_t manuf_data;
    ble_advdata_t advdata_response;
    ble_adv_modes_config_t options;
    
     //an advertising packet can consist of no more than 31 bytes! a header of 2 bytes (length and type) for each field in the advertising packet (appearance, name, service UUID, and so on).
    uint8_t i,j =0;
    uint8_t data1[10], data2[21];
    
    for (i = 0; i &amp;lt; 10; i++)
    {
        data1[i] = m_rx_buf[i];
    
    }

    for (i =10; i &amp;lt; 31; i++)
    {
       
       data2[j] = m_rx_buf[i];
        j++;
    }
    // Build advertising data struct.
    memset(&amp;amp;advdata, 0, sizeof(advdata));
    //populate the adv packet
    manuf_data.data.p_data = (uint8_t *)data1;
    manuf_data.data.size   = sizeof(data1);
    advdata.name_type = BLE_ADVDATA_FULL_NAME;
    advdata.p_manuf_specific_data = &amp;amp;manuf_data;
    advdata.include_appearance    = false; // False to free additional 4 bytes of space. 2 for the appearance characteristic and 2 for its header
    advdata.flags                 = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    ////uuid 3 bytes 1 for the flag and two for its header
    advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    advdata.uuids_complete.p_uuids  = m_adv_uuids;
    
    // Build advertising scan response struct.
    memset(&amp;amp;advdata_response, 0, sizeof(advdata_response));
    
    //prepare the scan response by loading the data on manufacture data
    manuf_data_response.data.p_data = (uint8_t *) data2;
    manuf_data_response.data.size   = sizeof(data2);
    
   //populate the scan response packet
    advdata_response.name_type = BLE_ADVDATA_NO_NAME;
    advdata_response.p_manuf_specific_data = &amp;amp;manuf_data_response;
    
   // Initialize advertising parameters (used when starting advertising).
    memset(&amp;amp;options, 0, sizeof(options));

    options.ble_adv_fast_enabled = true;
    options.ble_adv_fast_interval    = NON_CONNECTABLE_ADV_INTERVAL;
    options.ble_adv_fast_timeout     = APP_CFG_NON_CONN_ADV_TIMEOUT;
  
    ble_gap_conn_sec_mode_t sec_mode;
    
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&amp;amp;sec_mode);

    err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode,
                                          (const uint8_t *)DEVICE_NAME,
                                          strlen(DEVICE_NAME));
    APP_ERROR_CHECK(err_code);
    
   
    err_code = ble_advertising_init(&amp;amp;advdata, &amp;amp;advdata_response, &amp;amp;options, NULL, NULL);
    APP_ERROR_CHECK(err_code);
    
   
    
    
    
  
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and here the advertisement start function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void advertising_start(void)
{
    uint32_t err_code;
    err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
    APP_ERROR_CHECK(err_code);

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;where should I specify that the device is not connectable?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322320?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 19:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:456ecf06-60c4-4b0a-85f3-b8b900d81caa</guid><dc:creator>aalsubhi</dc:creator><description>&lt;p&gt;Thanks Vidar. It works now and showing the device name!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322150?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 07:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe5908b8-370a-49ab-995e-d4a7c2f084d8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Maybe the phone is bonded with the device? In that case, you may go the phone&amp;#39;s bluetooth setting and remove/forget the device.&lt;/p&gt;
[quote user="aalsubhi"]I have another question about the advertisement packet length. I&amp;#39;m trying to send 20 bytes in the advertisement along with the device name is that possible?[/quote]
&lt;p&gt;&amp;nbsp;Yes, as long as the encoded payload doesn&amp;#39;t exceed 31 bytes. But I&amp;#39;m noticing from your code snippet that you&amp;#39;re setting the device name (i.e. calling sd_ble_gap_device_name_set()) after encoding the advertising payload. I think you must do it before if you want the name to be included.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322104?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 17:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4de211a9-4560-42fd-a897-6e08406cca63</guid><dc:creator>aalsubhi</dc:creator><description>&lt;p&gt;Thanks for getting back to me Vidar.&lt;/p&gt;
&lt;p&gt;I was thinking that might be the reason (my phone is remembering the device when I used the connection code not the beacon code). So. I restart my phone and reinstall&amp;nbsp;the nerf Connect app but still is showing the name. When I used other phone the &amp;quot;Solar&amp;quot; name is replaced by &amp;quot;N/A&amp;quot;. So the issue is that my phone is remembering the device name.&lt;/p&gt;
&lt;p&gt;Thanks for pointing that out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have another question about the advertisement packet length. I&amp;#39;m trying to send 20 bytes in the advertisement along with the device name is that possible?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf51 BLE DeviceName in Beacon app SDK10</title><link>https://devzone.nordicsemi.com/thread/322063?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 13:16:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73ec6024-8287-4a3d-96b2-6a32b30e36b8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The advertiser is actually configured to not include device name in the payload (&amp;#39;BLE_ADVDATA_NO_NAME&amp;#39; is set), so I would have expected the phone to display N/A in both cases.&amp;nbsp; I guess the reason &amp;quot;Solar&amp;quot; is displayed for one of the devices, is that the iPhone is remembers it from a previous connection with this same board. Please try to reboot the phone as a way to clear the device name cache, then see if it still shows the device name.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>