<?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>set custom GAP name failing due wrong max name length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/862/set-custom-gap-name-failing-due-wrong-max-name-length</link><description>I am using the code 
 err_code = sd_ble_gap_device_name_set(&amp;amp;sec_mode, (const uint8_t *)deviceName, nameLen); 
 I have made sure that nameLen is less than BLE_GAP_DEVNAME_MAX_LEN and that deviceName is null terminated at BLE_GAP_DEVNAME_MAX_LEN 
 but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2013 10:30:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/862/set-custom-gap-name-failing-due-wrong-max-name-length" /><item><title>RE: set custom GAP name failing due wrong max name length</title><link>https://devzone.nordicsemi.com/thread/4217?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2013 10:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca74001f-a4cd-4eed-a4c0-0ed7262dbab4</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;If there is not space in your advertising packet for your long device name you could choose to insert it into the scan response packet, which contains additional 31 bytes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set custom GAP name failing due wrong max name length</title><link>https://devzone.nordicsemi.com/thread/4216?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2013 23:26:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c094b290-86f2-4bd5-8a01-28b30f41c543</guid><dc:creator>Frank Zhao</dc:creator><description>&lt;p&gt;I think the UUIDs of three services (a custom one, DIS, and BAS) are packed in there. From the code, I don&amp;#39;t think anything else is in there, except for one more 8 bits worth of flag bits.&lt;/p&gt;
&lt;p&gt;Why would BLE_GAP_DEVNAME_MAX_LEN be 31 if the maximum for the advertising packet is also 31?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: set custom GAP name failing due wrong max name length</title><link>https://devzone.nordicsemi.com/thread/4215?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2013 22:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e6e14db-2bb4-419b-a0b6-6f69aacd3c4d</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;My suspicion is that this is a limitation in the length of the advertising packet, which is maximum 31 bytes. What other data is in your advertising packet? Try to reduce other data in your advertising packet and then increase your device name length.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>