<?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>nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37491/nrf52840-how-to-add-multiple-custom-characteristic</link><description>I&amp;#39;m having trouble having multiple characteristics for my custom service. My main.c looks like this: 
 
 Even though I have 2 characteristics added here, I can see just the first characteristic on my BLE App. If I move the char_add_2 above the char_add_1</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 17 Aug 2018 15:04:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37491/nrf52840-how-to-add-multiple-custom-characteristic" /><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144758?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 15:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:919cf2ba-75ee-4f07-a6bc-90da6d1f4984</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sorry but the code excerpts do not contain any references to cus_init() and char_add_1 or char_add_2 any more. What characters are you having trouble with? Can you describe the issue in terms of the characters and functions that are in the code that you pasted?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144600?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 18:19:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:417c6bd0-c92d-4c92-a5c4-c4e143b0f209</guid><dc:creator>smhapank</dc:creator><description>&lt;p&gt;Hi Terje,&lt;/p&gt;
&lt;p&gt;I used LightBlue app, not a custom app. I&amp;#39;ve added all the codes except sd_config.h because it won&amp;#39;t let me add that for some reason. Anyway, I get no errors and the build is Successful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144599?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 18:17:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:447120a7-c09d-4a51-97a0-7046fb985220</guid><dc:creator>smhapank</dc:creator><description>&lt;p&gt;I&amp;#39;ve updated my question and added all the files used except sdk_config.h. I don&amp;#39;t see the possible mistake you are referring&amp;nbsp;to being made there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144591?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 15:54:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8b4f151-5b4e-46dd-88f0-03e3c19f537c</guid><dc:creator>tesc</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;With the code snippets provided thus far it is hard to tell what might be the issue.&lt;/p&gt;
&lt;p&gt;What app do you see those characteristics from, is it a custom application that you wrote yourself? It would be interesting to see what this looks like when you connect from nRF Connect (either desktop or mobile version) and browse the device. What services and characteristics are displayed then? Can you provide a screenshot?&lt;/p&gt;
&lt;p&gt;Further, the code for both characteristics (char_add_1 and char_add_2) would be good. The full main.c and the sdk_config.h would be even better, as that would let us see everything in full context.&lt;/p&gt;
&lt;p&gt;Also, do you get any error values returned from cus_init()? I see that you use the VERIFY_SUCCESS() macro, which will return from the function with the error code if the error code is not NRF_SUCCESS.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Terje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144417?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 07:14:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ba35a75-2d09-4948-aee4-22ac6551748c</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I can only see the code for char_add_1.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t know about you, but I tend to copy and paste these functions and alter the new one, but occasionally forget to change some of the parameters e.g. char1_value to char2_value.&lt;/p&gt;
&lt;p&gt;If you can see only the one, I was wondering whether you could have made a similar error, say by not updating the function &lt;em&gt;sd_ble_gatts_characteristic_add &lt;/em&gt;parameters so that some of the characteristic parameters added by the first call are matched by the second.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144383?ContentTypeID=1</link><pubDate>Wed, 15 Aug 2018 18:34:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f78f015-6b09-41c9-865d-a1ee51b8ae71</guid><dc:creator>smhapank</dc:creator><description>&lt;p&gt;Hi cbd, not sure I can see the error. What exactly are you referring&amp;nbsp;to?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840: How to add multiple custom characteristic?</title><link>https://devzone.nordicsemi.com/thread/144276?ContentTypeID=1</link><pubDate>Wed, 15 Aug 2018 08:43:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07a9e027-9105-4044-84df-5aed2acd142d</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;At an initial glance it looks okay, but before looking further, could you have a cut and paste error, say on your last line to add the characteristic to the service?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>