<?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>Device name showing as &amp;quot;n/a&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/7947/device-name-showing-as-n-a</link><description>I&amp;#39;ve tried to set up my own BLE project as an exercise in understanding what&amp;#39;s going on. It&amp;#39;s going okay, with the exception that the device isn&amp;#39;t advertising the data that I&amp;#39;d expect it to. At the moment I just have the very basics needed to advertise</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 04 Jul 2015 19:42:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/7947/device-name-showing-as-n-a" /><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28432?ContentTypeID=1</link><pubDate>Sat, 04 Jul 2015 19:42:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5fd7c681-9565-459c-a313-84670ebae014</guid><dc:creator>Sensors</dc:creator><description>&lt;p&gt;Stepping through it, it appears that it&amp;#39;s fine stepping into this whole section of the name_encode() function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Check if device internd to use short name and it can fit available data size.
if ((p_advdata-&amp;gt;name_type == BLE_ADVDATA_FULL_NAME) &amp;amp;&amp;amp; (actual_length &amp;lt;= rem_adv_data_len))
{
    // Complete device name can fit, setting Complete Name in Adv Data.
    adv_data_format  = BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME;
    rem_adv_data_len = actual_length;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;EDIT: seems like after using the sd_ble_uuid_vs_add() function I&amp;#39;m able to get the device to show a name while still using the BLE_UUID_TYPE_VENDOR_BEGIN. Like you had anticipated, Bill, I&amp;#39;m fairly limited in the length of the device name but it seems to be showing okay if it&amp;#39;s 4 characters or less.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28428?ContentTypeID=1</link><pubDate>Sat, 04 Jul 2015 12:58:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37208a2c-73ad-47c9-b2e6-0b2d5a2385f8</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;The Bluetooth SIG UUIDs only take 2 bytes whereas a custom UUID will take 16.  When included in the advertisement, each will also include a length byte and a type byte, so each advertised Bluetooth SIG Service will take 4 bytes and each advertised custom UUID will take 18 bytes. You also include flags and appearance.  Since the advertising packet is only 31 bytes, it doesn&amp;#39;t leave much space for a name.  (I.e. about &amp;lt;= 7 bytes for a name). As you can see in &lt;code&gt;name_encode()&lt;/code&gt;, if there isn&amp;#39;t enough space for the complete name it will attempt to use the short name. Did you actually debug the call to &lt;code&gt;name_decode()&lt;/code&gt; and step through the if-statements to see which path it is taking?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28427?ContentTypeID=1</link><pubDate>Sat, 04 Jul 2015 09:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6cc6240-ef7a-433b-9557-860828ca246b</guid><dc:creator>Sensors</dc:creator><description>&lt;p&gt;IT seems to have had something to do with this line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_uuid_t m_adv_uuids[] = {{X_SERVICE_UUID,BLE_UUID_TYPE_VENDOR_BEGIN}};
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But I don&amp;#39;t understand why.&lt;/p&gt;
&lt;p&gt;When I set the UUID type to BLE_UUID_TYPE_BLE, I don&amp;#39;t get the problem any more.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28426?ContentTypeID=1</link><pubDate>Sat, 04 Jul 2015 08:40:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20202cba-7faa-4046-bb2c-7474749ada8a</guid><dc:creator>Sensors</dc:creator><description>&lt;p&gt;This is what I&amp;#39;m seeing: &lt;a href="http://i.imgur.com/H0EIFbJ.png"&gt;http://i.imgur.com/H0EIFbJ.png&lt;/a&gt;
I tried the short name, no luck with that either. I would expect to at least see some flags or an appearance or something.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28430?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 16:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85bde73a-77e9-48b8-ae75-66a57d35a0b9</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;After posting I realized that the &lt;code&gt;power_manage()&lt;/code&gt; probably wasn&amp;#39;t significant, but I forgot to update.&lt;/p&gt;
&lt;p&gt;You may not have enough space in the advertising packet for the full name.  If you look at the &lt;code&gt;name_encode()&lt;/code&gt; function in ble_advdata.c you&amp;#39;ll see that it only uses the full name if there is still sufficient space left (you&amp;#39;d have to check more details to see what was added first). Can you put a breakpoint on the if-statement in &lt;code&gt;name_encode()&lt;/code&gt; to see if it is using the full name or if it&amp;#39;s falling back to the short name?  If that is the cause of the problem you can a) choose a smaller name; and/or b) put less info in the advertising packet; and/or c) configure the short name length (so it at least includes a partial name) via &lt;code&gt;advdata.short_name_len&lt;/code&gt; in the &lt;code&gt;advertising_init()&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28431?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2015 16:15:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc203a38-2071-45d4-b601-7971ba98def6</guid><dc:creator>Sensors</dc:creator><description>&lt;p&gt;Bill, it is advertising I think... Using the nRF master control panel app I can see it, but it doesn&amp;#39;t have any data. It says &amp;#39;n/a&amp;#39;, has the device address, &amp;#39;Not Bonded&amp;#39; and &amp;#39;Type: Unknown&amp;#39;. I&amp;#39;ve thrown in the power_manage() into the while loop now with the same result.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Device name showing as "n/a"</title><link>https://devzone.nordicsemi.com/thread/28429?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2015 18:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0fae461-044a-427e-a539-49ec7038694f</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;Is it advertising at all? And, if so, how do you know (via a packet-level sniffer, like with Nordic&amp;#39;s dongle or with a browser tool, like LightBlue)?&lt;/p&gt;
&lt;p&gt;If it isn&amp;#39;t actually advertising at all, you might want to think carefully about your &lt;code&gt;while(1) {}&lt;/code&gt; loop. It may be starving out the events necessary for advertising. Note that Nordic&amp;#39;s examples typically include a call to &lt;code&gt;sd_app_evt_wait()&lt;/code&gt; (sometimes through a wrapper function named &lt;code&gt;power_manage()&lt;/code&gt;) to allow the SoftDevice to process events.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>