<?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>Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118586/custom-characteristics-are-not-appearing-when-i-attempt-iterate-through-the-attributes</link><description>the code below successfully complies and returns 3 services with 1 characteristic each, I have copied the uuid for the primary services and characteristic and that doesn&amp;#39;t seem to have caused an issue in the nrf connect app 
 
 the code below successfully</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Feb 2025 09:32:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118586/custom-characteristics-are-not-appearing-when-i-attempt-iterate-through-the-attributes" /><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521490?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2025 09:32:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:666dd392-0d8e-43ed-9fde-bb7a4c8ef426</guid><dc:creator>vernonyankson</dc:creator><description>&lt;p&gt;sorry for the confusion, I&amp;#39;m planning on adding more than one characteristic per service in the future, I simplified the code on the bottom for better&amp;nbsp;readability,&amp;nbsp;but the term j&amp;nbsp;is going to be used to index a struct of uuid array to assign to the characteristics attribute. I was hoping to reduce the amount of lines of code by using iteration as having 10 or more services with approximately 5 attributes each&amp;nbsp;hard coded isn&amp;#39;t exactly efficient or readable. I&amp;#39;ve attempted creating a separate function for the characteristic attribute but the issue persists.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521488?ContentTypeID=1</link><pubDate>Wed, 05 Feb 2025 09:23:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:66854f47-1727-4320-b389-389db5910a59</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I do not know why you use the second loop with &amp;quot;J&amp;quot; but it does not look like it loops at all, that for loop is executed only once and you are not using the loop count for anything inside the loop.&lt;/p&gt;
&lt;p&gt;Why don&amp;#39;t you just use the same code if the first is working for you. Putting these two snippets in beyond compare side by side does not show any differences apart from these three things i told you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521369?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:48:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b82357d1-2ea9-4c41-9b6d-4a6fbd69820f</guid><dc:creator>vernonyankson</dc:creator><description>&lt;p&gt;could it be something to do with the scope of the for loop, do you know of any sample code where a for loop and struct attr and service being used&amp;nbsp; ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521367?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb959097-b427-460a-92ce-1a41af6c6002</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Then I do not see any other differences. Should behave the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521362?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:28:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a5df272-fdf0-47c9-927b-e0d4a731ce69</guid><dc:creator>vernonyankson</dc:creator><description>&lt;p&gt;Hi Susheel, I assumed you meant that originally (I attempted that first) but no results&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521361?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:25:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8e0deef-9a72-4a0c-9bc0-4476a77ec699</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Missed to see that you also have to do this in two places and not one. You need to change this too at line 33 of your second version.&lt;/p&gt;
&lt;p&gt;.uuid = &amp;amp;uuids_struct[i].val,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;to&amp;nbsp;&lt;/p&gt;
&lt;p&gt;.uuid = uuids_struct[i].val,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521358?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:15:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35805644-6e48-40e4-9684-1f48907bf434</guid><dc:creator>vernonyankson</dc:creator><description>&lt;p&gt;hi susheel, i&amp;#39;ve tried your suggestion the results remain the same&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Custom characteristics are not appearing when I attempt iterate through the attributes</title><link>https://devzone.nordicsemi.com/thread/521355?ContentTypeID=1</link><pubDate>Tue, 04 Feb 2025 15:11:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41db21a9-cafc-4ca9-82db-7e64d45426b9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;In the second version you have&amp;nbsp;.user_data = &lt;strong&gt;&amp;amp;&lt;/strong&gt;uuids_struct[i].val, That seems wrong and I think it should be&amp;nbsp;.user_data = uuids_struct[i].val, without the &amp;quot;&amp;amp;&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>