<?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>How to get softdevice state in my application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24417/how-to-get-softdevice-state-in-my-application</link><description>I&amp;#39;d like to get the current connection state eg: 
 result = get_connection_state() 
 if(result == BLE_GAP_EVT_CONNECTED)
doSomthing(); 
 Is there such a function available ? 
 thanks,</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 16 Aug 2017 20:03:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24417/how-to-get-softdevice-state-in-my-application" /><item><title>RE: How to get softdevice state in my application</title><link>https://devzone.nordicsemi.com/thread/96164?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2017 20:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d539cd55-65f1-4b9b-8c2f-537cefb84e5a</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;There is no such function in SD API. Also it wouldn&amp;#39;t be such easy call if you have in mind Nordic SD architecture with multiple concurrent roles and links existing or potentially existing in the system. However you get all SD events inside your application&amp;#39;s event handler function so it&amp;#39;s up to you to keep track about how many links you have active and what state.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>