<?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>Application Crashing when connecting to a peripheral with low rssi</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97656/application-crashing-when-connecting-to-a-peripheral-with-low-rssi</link><description>Hi, I am working on nRF52833. I am using the discovery manager to connect with the peripheral. Whenever the device(peripheral) goes out of the range and again comes back in range the application crashes while subscribing back to one of the service. I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Mar 2023 07:59:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97656/application-crashing-when-connecting-to-a-peripheral-with-low-rssi" /><item><title>RE: Application Crashing when connecting to a peripheral with low rssi</title><link>https://devzone.nordicsemi.com/thread/415375?ContentTypeID=1</link><pubDate>Wed, 15 Mar 2023 07:59:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0047c71b-b356-48b9-a2fc-16f0c19ad99c</guid><dc:creator>kovidS</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;Thankyou,&lt;br /&gt;The issue is fixed now, I was setting the structure to null on disconnection after unref that conn.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Application Crashing when connecting to a peripheral with low rssi</title><link>https://devzone.nordicsemi.com/thread/415105?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 09:58:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8128b25-6b26-4c63-8760-2ecf752b3a50</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;As you can see in your log that the assert clearly happens at&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1678787762985v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp;Looking at that line in that file shows this&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;#160;__ASSERT(conn, &amp;quot;invalid parameters\n&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Which means that you are sending a NULL pointer for conn which is invalid for that operation.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;You need to find out why your conn pointer is NULL when you want to do a gatt_discover? probably the device is already disconnected? and the disconnected callback in your application have updated your conn pointer to NULL?&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>