<?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>Discovering Gatt Parameters is stalling/crashing system system</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112616/discovering-gatt-parameters-is-stalling-crashing-system-system</link><description>Hello All, 
 
 I am programming an nrf52480 using zephyr on a windows machine. 
 
 I am trying to write a bluetooth peripheral characteristic, ore specifically to the led characteristic in the nordic led and button service. 
 In my code far I have verified</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Jul 2024 06:51:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112616/discovering-gatt-parameters-is-stalling-crashing-system-system" /><item><title>RE: Discovering Gatt Parameters is stalling/crashing system system</title><link>https://devzone.nordicsemi.com/thread/492171?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2024 06:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd9498eb-347e-4448-a1bd-0441d1ca7e36</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi genmastermega,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I am glad you are able to get things working now. Thank you for sharing the solution with the community &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovering Gatt Parameters is stalling/crashing system system</title><link>https://devzone.nordicsemi.com/thread/492158?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2024 05:03:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2661c85-6f56-42dd-ae1c-9d748eb16fb0</guid><dc:creator>genmastermega</dc:creator><description>&lt;p&gt;Hello Hieu, &lt;br /&gt;&lt;br /&gt;To be honest, I don&amp;#39;t remember. I looked at many resources when compiling the code to make sure that I was getting the structure correct. The (main) error was that I was referencing memory of the discover_params that would de allocate as soon as the bt_gatt_discover function would run.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovering Gatt Parameters is stalling/crashing system system</title><link>https://devzone.nordicsemi.com/thread/492157?ContentTypeID=1</link><pubDate>Thu, 04 Jul 2024 05:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f192cd58-fd57-434c-9c1f-ce48805f20ac</guid><dc:creator>genmastermega</dc:creator><description>&lt;p&gt;Hello All,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The main issue with the program was the memory scope of the &lt;span style="color:rgba(59, 59, 59, 1);"&gt;&lt;/span&gt;&lt;span style="color:rgba(38, 127, 153, 1);"&gt;bt_gatt_discover_params&lt;/span&gt;&lt;span style="color:rgba(59, 59, 59, 1);"&gt; &lt;/span&gt;&lt;span style="color:rgba(0, 16, 128, 1);"&gt;&lt;/span&gt; discover_params. Since I did not use the keyword &lt;strong&gt;static&lt;/strong&gt; in front of the struct the struct would be forgotten by the system after the &lt;span style="color:rgba(0, 128, 0, 1);"&gt;bt_gatt_discover&lt;/span&gt; function would run. This would mean that the discover callback would never be called or found thus casing the crashing and stalling &lt;strong&gt;behavior&lt;/strong&gt; to occur.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The static keyword would define the struct in the scope of the file so the bt_gatt_discover function will always be able to reference the memory that holds the parameters. &lt;br /&gt;&lt;br /&gt;Let me know if anyone else needs further help on this. I can try my best to update the post with relevant information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovering Gatt Parameters is stalling/crashing system system</title><link>https://devzone.nordicsemi.com/thread/491671?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 18:25:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e21847bc-a692-4009-ba74-cb459af9e4c1</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi genmastermega,&lt;/p&gt;
&lt;p&gt;I will analyze this&amp;nbsp;and come back to you in a couple of days.&lt;/p&gt;
&lt;p&gt;From the function names, it seems like you&amp;nbsp;based your application on one of the samples. Could you please let me know what sample that is?&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>