<?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>Trying to advertise the shotend name not the complete name</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/76131/trying-to-advertise-the-shotend-name-not-the-complete-name</link><description>I am trying to advertise the shotend name of the device no the complete local name, so code looks like follow 
 
 
 
 After scanning I can still find the name in the advertisement packet is the complete local name, not sure what I am doing wrong</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 09 Jun 2021 10:29:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/76131/trying-to-advertise-the-shotend-name-not-the-complete-name" /><item><title>RE: Trying to advertise the shotend name not the complete name</title><link>https://devzone.nordicsemi.com/thread/314427?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 10:29:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1d65590-ab97-4954-a3a0-ca89e10dcdb6</guid><dc:creator>MOHAMED AHMED ALI MAHMOUD ELSABAGH</dc:creator><description>&lt;p&gt;I am using sdk ver 17.0.2&lt;/p&gt;
&lt;p&gt;device name as shown is&amp;nbsp;DEVK, I traced the low level functions after settings the name&amp;nbsp;sd_ble_gap_device_name_set as I show on the code up there, then calling sd_ble_gap_device_name_get the length of the string is still 0.&lt;/p&gt;
&lt;p&gt;I checked also bytes of the advertising on nrf52 I can see, it is advertising 0x09 (complete local name), not 0x08 (shortend name).&lt;/p&gt;
&lt;p&gt;I debugged low level functions on softdevice and found that I have to make sure when I call&amp;nbsp;&lt;span&gt;sd_ble_gap_device_name_set&amp;nbsp; I have to pass full name only, and shortname has to be part of this name, this is the only way it works, so length of full name can&amp;#39;t be same as length of short name.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to advertise the shotend name not the complete name</title><link>https://devzone.nordicsemi.com/thread/314332?ContentTypeID=1</link><pubDate>Wed, 09 Jun 2021 06:07:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c298a57-dd94-4f23-bb60-97881cc1947e</guid><dc:creator>Joakim Jakobsen</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Which version of the nRF5 SDK are you using here?&lt;/p&gt;
&lt;p&gt;What is &amp;quot;DEVICE_NAME&amp;quot; defined as?&lt;/p&gt;
&lt;p&gt;If you are using a phone to scan for the device, it might be that the cache on the phone has the Long name stored (if you previously used it to scan for the full name). You could try to delete the cache on your phone.&lt;/p&gt;
&lt;p&gt;Br, &lt;br /&gt;Joakim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>