<?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>How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9326/how-to-get-248-byte-device-name-into-the-nrf51822-chip</link><description>Hello,
We are doing a study about the features of nRF51822 and the nRF51 Development Kit and are wondering about the maximum visible &amp;quot;friendly name&amp;quot; (DEVICE_NAME?) which the chip can advertise. 
 Based on some earlier discussions found here and other</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 20 Sep 2015 20:26:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9326/how-to-get-248-byte-device-name-into-the-nrf51822-chip" /><item><title>RE: How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/34430?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 20:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5914706-a745-4c56-8844-9b7989f00f14</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;Just a minor clarification on Jan&amp;#39;s comment:  Attributes and Characteristics, like Device Name, can be longer than 31 bytes.   In recent SDKs  this can be done via Nordic&amp;#39;s Long Write mechanism.   Search the forum for Long Write for details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/34429?ContentTypeID=1</link><pubDate>Sun, 20 Sep 2015 19:34:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bca2185c-449e-470e-973e-b3ac06a4fc2f</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Hi Risto, Bill is correct. There are two places you can put &amp;quot;Device Name&amp;quot; in BLE &amp;quot;stack&amp;quot; (assuming you are talking about GAP Peripheral device implementing GATT Server stack):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GAP AD element within Advertising or Scan Response Data (there are two options: &amp;quot;Short Local Name&amp;quot; tag 0x08 or &amp;quot;Complete Local Name&amp;quot; tag 0x09).&lt;/li&gt;
&lt;li&gt;Value of Device Name characteristic (standard BLE 16-bit UUID = 0x2A00) under Generic Access Profile Primary Service (standard BLE 16-bit UUID = 0x1800).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;First place is limited by maximum length of Advertising or Scan Response packet (that&amp;#39;s 31B by specification so when counting Tag and Length bytes of AD element encapsulation it&amp;#39;s 29B for name itself). Second place is limited by GATT Value maximum defined as 512B but Nordic&amp;#39;s GATT Server implementation inside Soft Device S110/S120/S130/S132 has limitation of 31B there anyway. Of course it&amp;#39;s easy to define your own Primary Service and Characteristic where you can use full length of value field for your proprietary identification.&lt;/p&gt;
&lt;p&gt;CHeers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/34428?ContentTypeID=1</link><pubDate>Sat, 19 Sep 2015 12:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07c3c853-a27d-469a-b41d-e4e8dcbd8b99</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;248 is the maximum length for the Local Name when using traditional bluetooth (BR/EDR), not bluetooth low energy (BLE).  The nRF51/52 series are bluetooth low energy.&lt;/p&gt;
&lt;p&gt;The Bluetooth Low Energy Specifications (BLUETOOTH SPECIFICATION Version 4.0 [Vol 6], Section 2.1 &amp;amp; Figure 2.1) show the packet format for Bluetooth Low Energy.  A Link Layer packet only has 39 bytes for payload. (GAP &amp;amp; GATT messages will be a little less).  More data can be sent by using more packets, but this doesn&amp;#39;t allow one to advertise longer names.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/34427?ContentTypeID=1</link><pubDate>Sat, 19 Sep 2015 06:34:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fee99ede-4bfd-4bfe-bf21-3a9bf5aa0538</guid><dc:creator>Risto</dc:creator><description>&lt;p&gt;Yes, I mean the name actually contained in advertising packet. As I understand the chips as such do not limit the device name to 31 but support the Bluetooth standard 248. Maybe there are different SDKs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get 248 byte device name into the nRF51822 chip?</title><link>https://devzone.nordicsemi.com/thread/34426?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2015 23:54:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d039f60-ddcb-4b27-ba57-bdd5be93400f</guid><dc:creator>Bill Siever</dc:creator><description>&lt;p&gt;Risto,&lt;/p&gt;
&lt;p&gt;Just to clarify, are you referring to the name actually contained in advertising packet?  It so, I believe you can only send full names that are ~29 bytes or the initial ~29 bytes of longer names.  The specs for the GAP device name don&amp;#39;t appear to have a length limit (other than the max characteristic size on BLE, which I think is 512 bytes), but it requires a connection to retrieve.  Nordic&amp;#39;s SDK appears to limit the string passed to sd_ble_gap_device_name_set() to 31 bytes. (&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk51.v9.0.0%2Findex.html"&gt;infocenter.nordicsemi.com/index.jsp&lt;/a&gt; and the definition of BLE_GAP_DEVNAME_MAX_LEN).&lt;/p&gt;
&lt;p&gt;For those interested, here are some possible workarounds that may work in some use-cases:  Advertising a custom UUID can be used to identify products from a particular vendor.  Custom advertising messages might be used to transfer a longer un-official name.  And if a connection is required to retrieve the name anyway, the Device Information Service data (possible with custom data) may be a better choice for model/device data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>