<?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>adding characteristic to a service</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10679/adding-characteristic-to-a-service</link><description>I&amp;#39;m sorry but i don&amp;#39;t know where else to turn. The tutorial on adding a characteristic to a service (the nordic tutorial i am basing this off) isn&amp;#39;t finished and I have no one to ask but the internet. I have tried copying code and applying it myself but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 07 Dec 2015 13:55:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10679/adding-characteristic-to-a-service" /><item><title>RE: adding characteristic to a service</title><link>https://devzone.nordicsemi.com/thread/39858?ContentTypeID=1</link><pubDate>Mon, 07 Dec 2015 13:55:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1d3a4e6-b92b-4f2e-9d04-82c37a9509f6</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;You should first add the service using &lt;code&gt;sd_ble_gatts_service_add&lt;/code&gt; and then add all its characteristics using &lt;code&gt;sd_ble_gatts_characteristic_add&lt;/code&gt;. So in your case, you should call &lt;code&gt;our_char_add&lt;/code&gt; on the bottom of &lt;code&gt;our_service_init2&lt;/code&gt;. Make sure that the service was initialized successfully before adding your characteristic.&lt;/p&gt;
&lt;p&gt;See part 3.6 and 4.4 of the &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.pdf.nan/nan_36.pdf"&gt;Creating Bluetooth&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/00ae.svg" title="Registered"&gt;&amp;#x00ae;&lt;/span&gt; Low Energy Applications
Using nRF51822&amp;quot;.&lt;/a&gt; application note.&lt;/p&gt;
&lt;p&gt;It was a bit unclear what you were uncertain about. Please try to specify what you want to know if you want a more detailed explanation. If things are not working, you can note which error code was returned by which function. You can then search this forum for the error code, or ask about it in a comment or in a new thread.&lt;/p&gt;
&lt;p&gt;-Anders&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: adding characteristic to a service</title><link>https://devzone.nordicsemi.com/thread/39857?ContentTypeID=1</link><pubDate>Sun, 06 Dec 2015 13:34:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:643ffbd9-8dde-4291-bd8b-5e4aaa76b664</guid><dc:creator>Ulrich Myhre</dc:creator><description>&lt;p&gt;First of all, you should figure out what the return code (err_code) is. There are multiple ways to go from there. You could be out of memory, the parameters could also be invalid. Adding this information to your question will narrow it down by a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>