<?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>nrf52832 zephyr central device cannot reconnect to a peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79699/nrf52832-zephyr-central-device-cannot-reconnect-to-a-peripheral</link><description>I have an nrf52832 acting as a central device that is trying to connect to a peripheral. However, after the peripheral disconnects and the central tries to reconnect I get an error with value -22. Here is the pseudo code. 
 static bt_conn* conn = NULL;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Sep 2021 01:26:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79699/nrf52832-zephyr-central-device-cannot-reconnect-to-a-peripheral" /><item><title>RE: nrf52832 zephyr central device cannot reconnect to a peripheral</title><link>https://devzone.nordicsemi.com/thread/329697?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 01:26:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c7b31e-fef0-417f-bbb7-8b6d35863a59</guid><dc:creator>yayembedded</dc:creator><description>&lt;p&gt;I figured out the issue.&amp;nbsp; I was increasing the reference count of a connection after I connected successfully.&amp;nbsp; This is not necessary when you create a connection&amp;nbsp; as a central device.&amp;nbsp; This seems like it is only needed when you are acting as a peripheral device and the connection is initiated by the remote user&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>