<?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>Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37321/peer-manager-causes-fault-due-to-invalid-connection-handle</link><description>Hello all! 
 I&amp;#39;m trying to optimize power consumption for project based on nRF51802 and external host MCU. My current platform and toolchain: 
 1. nRF51802 as Bluetooth controller at custom board. 
 2. Segger Embedded Studio. Release 3.34b. 
 3. Soft</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Sep 2018 14:02:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37321/peer-manager-causes-fault-due-to-invalid-connection-handle" /><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/149263?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 14:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a5562c4-1eb1-4e17-ad6e-8466af719d68</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;I just took another example project (glucose sensor) where pairing logic is exactly what I needed, ported it to SES and adopted for my purposes. Hardfaults are still present but it likely caused by hardware so there is no point to discuss it here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/149237?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 12:55:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:823b3aeb-72fb-42fc-b4a5-c088ca371f8a</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;You can leave the current post as-is. Do you mind describing what you did to solve your issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/148926?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 07:50:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89708829-3686-457b-bf8c-393f5750b303</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;I went in another way, it seems to be working well. How can I close current issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/147415?ContentTypeID=1</link><pubDate>Wed, 05 Sep 2018 14:27:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ea8ae9e-5a5a-424c-9c01-5e868c41c4fb</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;Sorry for late response. Problem still exists and I need help.&lt;/p&gt;
&lt;p&gt;Please see screenshot of debug session.&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/3247.Dump.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/145106?ContentTypeID=1</link><pubDate>Tue, 21 Aug 2018 11:44:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37423861-1b39-415b-8989-35dae0c57910</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I think 0x6B0 is the address of the hardfault handler. Do you have a dump of the CPU registers at that point?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144677?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 10:08:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f2ab319c-e276-4323-a3ff-5a64a3d84960</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;It looks like device crashes on the very begining of connection establishing due to some internal SoftDevice assert or error, as&amp;nbsp; no event rises to application before it goes to hardfault. In debugger i see it stops on 0x000006B0 address.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think that omitting Peer Manager and implementing simplified custom pairing/bonding logic could be an option for me. I would use&amp;nbsp;pm_peer_data_bonding_store() function directly from application.&amp;nbsp; Is there any restrictions or concerns?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144659?ContentTypeID=1</link><pubDate>Fri, 17 Aug 2018 08:54:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1447fc43-7342-4d94-89ad-9258604eb1ce</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I would try to focus on the retrieval of the bonding information from flash by the peer manager. Find out what is different from the first to the second connection establishment attempt. How far into the process do your get on the second attempt before you crash?&lt;br /&gt;&lt;br /&gt;Do you have any debug information from the crash?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144562?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 13:49:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5fdc035-8572-4a47-aa9b-6f03f4bebee3</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;I tried to compare hex dumps of entire SoC memory, there were no writes at all. Later I found reason why - there were few duplicate event handlers like was described here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/35433/configuring-peer-manager-for-bonding"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/35433/configuring-peer-manager-for-bonding&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now device is able to save bonding info, but it became unstable. It can accept first connection after powering up and goes to hardfault on second attempt. I can&amp;#39;t find were it crashes.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144502?ContentTypeID=1</link><pubDate>Thu, 16 Aug 2018 10:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28b72bde-c273-49e4-93c1-15d248316f0d</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I&amp;#39;ll try to help you as best I can &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;br /&gt;&lt;br /&gt;First we should verify that you can write the bond information to flash. You&amp;#39;ll need to find the address of the stored information and read out the content.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144182?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 13:01:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:188dfea7-cc22-42d1-92a0-b655269c5cd2</guid><dc:creator>Dmitriy L1</dc:creator><description>&lt;p&gt;Thanks for response!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been confused with connection handle 0 since function wasn&amp;#39;t able to resolve handle to connection role and returned error.&lt;/p&gt;
&lt;p&gt;After some playing around handlers I don&amp;#39;t observe freezing anymore. However device doesn&amp;#39;t keep bonding information.&lt;/p&gt;
&lt;p&gt;Passkey popup appears each time device resumed from sleep mode. Should I create another ticket or it can be discussed here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Peer manager causes fault due to invalid connection handle.</title><link>https://devzone.nordicsemi.com/thread/144176?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 12:45:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1178c024-fa63-4e79-a801-d8b3455b7969</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;Connection handle 0 is the fist connection handle to be assigned. Your first connection will always be assigned to 0.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I think the order of your event handlers are correct as well.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have any more debug information ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>