<?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>Does Pairing imply connecting?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91001/does-pairing-imply-connecting</link><description>My Peripheral device (nrf Connect SDK, nrf52840) will pair using NFC with an Android (8.0.0) phone. But although the Nordic device shows it is connected (in its UART output), the phone does not show connected. 
 If I hit &amp;#39;Connect&amp;#39; on the phone, it will</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Aug 2022 12:40:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91001/does-pairing-imply-connecting" /><item><title>RE: Does Pairing imply connecting?</title><link>https://devzone.nordicsemi.com/thread/382278?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 12:40:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:607a58e4-fd99-4b81-89e3-33882d6d60e1</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;&lt;strong&gt;BluetoothGatt &lt;/strong&gt;object is a virtual connection only. You may have multiple virtual connections active to the same physical device. You may disconnect each of them separately, but the physical connection (maintained by the OS) will be only terminated when the last virtual connection is closed. Other apps (like nRF Connect, Android Settings) may also be connected to the same BLE device, having their own virtual connections.&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What you may observe, if I understand correctly, is that Android did connect and pair and holds a virtual connection to the device, but you will not get any connection state event in your BluetoothGattCallback. However, if you have the server open, the BluetoothGattServerCallback will receive state change events whenever a device disconnects or reconnects.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Pairing imply connecting?</title><link>https://devzone.nordicsemi.com/thread/382275?ContentTypeID=1</link><pubDate>Thu, 18 Aug 2022 12:35:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04fb4786-bd9e-478c-b121-f30679e51485</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;What do you mean by&lt;/p&gt;
[quote userid="90435" url="~/f/nordic-q-a/91001/does-pairing-imply-connecting"]the phone&amp;nbsp;does not show connected[/quote]
&lt;p&gt;Are you talking about Bluetooth settings in Android Settings, or in your app you&amp;#39;re not getting STATE_CONNECTED?&lt;/p&gt;
&lt;p&gt;Try &lt;a href="https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp" rel="noopener noreferrer" target="_blank"&gt;nRF Connect app for Android&lt;/a&gt;.:&lt;/p&gt;
&lt;p&gt;1. Open nRF Connect, go to Menu -&amp;gt; Configure GATT Server -&amp;gt; in the top drop down select any configuration - can be Sample or a new one, even empty) - this will enable GATT Server in nRF Connect - the app will be listening to incoming notifications&lt;/p&gt;
&lt;p&gt;2. Having nRF Connect open - connect to your device (using NFC)&lt;/p&gt;
&lt;p&gt;3. The device should start connecting / pairing - you should see a new tab for the device showing up in nRF Connect.&lt;/p&gt;
&lt;p&gt;4. You should be able to communicate with the device now.&lt;/p&gt;
&lt;p&gt;You may also launch nRF Connect after the pairing when you believe your device is connected. It should also discover active connection and open the new tab.&lt;/p&gt;
&lt;p&gt;In order to receive similar functionality in your app (get an event when a device connects) you may either &lt;a href="https://developer.android.com/reference/android/bluetooth/BluetoothGattServer" rel="noopener noreferrer" target="_blank"&gt;open GATT server&lt;/a&gt; or listen to &lt;a href="https://developer.android.com/reference/android/bluetooth/BluetoothDevice#ACTION_ACL_CONNECTED" rel="noopener noreferrer" target="_blank"&gt;ACL_CONNECTED&lt;/a&gt; broadcasts.&lt;/p&gt;
&lt;p&gt;Please, try this and come back to us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Does Pairing imply connecting?</title><link>https://devzone.nordicsemi.com/thread/382045?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2022 12:55:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c07f5103-4217-4a27-b7bf-016bd4ceaccb</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Looks like the OS connects here, but that the app require you to push the connect button before it show that it&amp;#39;s connected and display the gatt table of the peer. Whether it&amp;#39;s paired or encrypted should not make any difference here, from the log I can see that security level 4 is applied, which is the highest.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>