<?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>Proper setup of m_adv_uuids for custom service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15153/proper-setup-of-m_adv_uuids-for-custom-service</link><description>We have our nrf52 working well with our iOS app - almost everything we need is in place. One last item (haha) we&amp;#39;ve been struggling with is to get the nrf52 to advertise our services properly. We&amp;#39;ve been working around this for awhile, but to get iOS</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Jul 2016 18:04:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15153/proper-setup-of-m_adv_uuids-for-custom-service" /><item><title>RE: Proper setup of m_adv_uuids for custom service</title><link>https://devzone.nordicsemi.com/thread/57856?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 18:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af854f67-b57c-49e2-bb94-0b6ba2c30473</guid><dc:creator>ejg2putt</dc:creator><description>&lt;p&gt;Yes, 7 is Invalid Parameter.  It was invalid because advertising_init() was being called before service_init() - which we took directly from the hrs app.  Swapping the order fixes the problem.&lt;/p&gt;
&lt;p&gt;So to summarize to advertise a custom service UUID:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initialize the 128 bit UUID with sd_ble_uuid_vs_add().&lt;/li&gt;
&lt;li&gt;If you&amp;#39;re not using scan data for ble_advertising_init(), m_adv_data goes in advdata, but you&amp;#39;ll probably need a short name&lt;/li&gt;
&lt;li&gt;You can use scan data in ble_advertising_init() for one custom UUID, not room for more.&lt;/li&gt;
&lt;li&gt;The UUID you put into m_adv_uuids[] is the 16 bit short version of your long UUID.&lt;/li&gt;
&lt;li&gt;Make sure you call service_init() before advertising_init() .&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks again Rols, please edit my bullet points if any of them are not correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Proper setup of m_adv_uuids for custom service</title><link>https://devzone.nordicsemi.com/thread/57855?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 12:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:649d0f91-25a2-4f36-9929-aa247f0bc952</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;If you&amp;#39;re using a segger you can use RTT for debugging, very easy and requires no setup.&lt;/p&gt;
&lt;p&gt;7 is &amp;#39;Invalid Parameter&amp;#39; I believe, there aren&amp;#39;t many thing which will return that from the advertising encoder, but there are a few. if all you put in was the list of ids I don&amp;#39;t see why you&amp;#39;d get that error message, have you set some other options too?&lt;/p&gt;
&lt;p&gt;The easiest thing to do is single step the advertising data encode function and find out where it&amp;#39;s blowing up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Proper setup of m_adv_uuids for custom service</title><link>https://devzone.nordicsemi.com/thread/57854?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 11:17:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d215d919-b55f-4ab1-b51d-1cd7d78231a3</guid><dc:creator>ejg2putt</dc:creator><description>&lt;p&gt;Thanks for the quick response Rols.  ble_advertisting_init() is returning a &amp;quot;7&amp;quot;.    I don&amp;#39;t have a lot of detail beyond that, as we&amp;#39;re using the UART for a different comm channel, and we don&amp;#39;t have TWI fully functional yet (i.e. TWI will be our debugging interface).&lt;/p&gt;
&lt;p&gt;sd_ble_uuid_vs_add() returns a ble_uuid.type of &amp;quot;2&amp;quot;, which is the same as BLE_UUID_TYPE_VENDOR_BEGIN, which of course, produces the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Proper setup of m_adv_uuids for custom service</title><link>https://devzone.nordicsemi.com/thread/57853?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2016 00:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ac9dac6-3ac3-4426-b4f7-81f76efa529a</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;What errors are you getting? What are the actual error codes, just saying you get errors is too vague to really help.&lt;/p&gt;
&lt;p&gt;of course your UUID is the 128 bit version, all custom UUIDs are 128 bits.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t use BLE_UUID_TYPE_VENDOR_BEGIN, use the actual value returned from the &lt;code&gt;sd_ble_uuid_vs_add()&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;Apart from that, you have the correct way of adding a list of UUIDs to the scan response data, so you need to tell us which function is producing and error and what the error is.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>