<?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>UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66762/uart-app-shows-connected-but-actually-not-when-peripheral-bonding-data-is-cleared</link><description>Hi, 
 
 I tested UART app(nRF Toolbox) by iPhone for scenario: erased bonding info of peripheral but iPhone, then establish connection between iPhone and peripheral. 
 Here are test result: 
 1. UART app shows connected (but actually not) when I erased</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 12 Oct 2020 06:22:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66762/uart-app-shows-connected-but-actually-not-when-peripheral-bonding-data-is-cleared" /><item><title>RE: UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/thread/274181?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 06:22:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04ccc91b-2a65-44b5-af3d-1de4fb8a1dbe</guid><dc:creator>Simonr</dc:creator><description>[quote user="Vick_Chang"]I think two different behavior because of design between iOS and Android, right?[/quote]
&lt;p&gt;&amp;nbsp;Yes, iOS and Android will behave somewhat differently in a few scenarios, this being one of them it seems. The disconnection reason (status 19) is called whenever the peer is the device initiating the disconnection (defers to 0x13 = GATT CONN TERMINATE PEER USER). So there isn&amp;#39;t a way to specifically know that this is the issue when you&amp;#39;re struggling to connect.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/thread/274172?ContentTypeID=1</link><pubDate>Mon, 12 Oct 2020 03:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d009e2a-a580-47d6-ac1d-fada489130f4</guid><dc:creator>Vick_Chang</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;b) I have test nRFConnect like below:&lt;/p&gt;
&lt;p&gt;[Android] In the&amp;nbsp;test&amp;nbsp;&lt;span&gt;scenario,&amp;nbsp;the logs&amp;nbsp;show &amp;quot;Connection terminated by peer (status 19)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/S_5F005F00_8863746.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;[iOS]&amp;nbsp;&lt;span&gt;In the&lt;/span&gt;&lt;span&gt;&amp;nbsp;test&amp;nbsp;&lt;/span&gt;&lt;span&gt;scenario,&amp;nbsp;the logs show Attempting to connect, and seems no timeout.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because peripheral&amp;nbsp;keeps connected then disconnected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt="iOS" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/S_5F005F00_8863748.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;I think two different behavior because of design between iOS and Android, right?&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;the bonding data of&amp;nbsp;&lt;span&gt;peripheral&lt;/span&gt;&lt;span&gt;&amp;nbsp;has been deleted, App should handle this case right?&amp;nbsp;&lt;/span&gt;&lt;span&gt;such as&amp;nbsp; &amp;quot;Keep the status disconnected&amp;quot; Then user can forget the&amp;nbsp;peripheral&amp;nbsp;in Phone setting.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;c) I see.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks. Vick&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/thread/273445?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 10:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75feda8a-076a-486a-84ac-714a8947b3a5</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It&amp;#39;s good practice to test for all thinkable scenarios of course, but as long as there is a way to erase bonding information on both the peripheral and central device, I don&amp;#39;t think this will be a problem for you. This is common for all BLE devices using pairing, as the connection will fail if one of the devices has erased the bonding information of the other.&lt;/p&gt;
&lt;p&gt;As for your testing method, it seems sound, and the tests seem expected. nRFConnect for Android /iOS have an option to pair once you have connected to a device and won&amp;#39;t do pairing without you initiating it. Have you tested to see if the Android app shows the same &amp;quot;incorrect&amp;quot; connected after the nRF has deleted bonding information?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c)&lt;/strong&gt; &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect"&gt;nRFConnect &lt;/a&gt;is not open-source I&amp;#39;m afraid, and is meant to be a tool for assisting BLE developers. We recommend using the &lt;a href="https://github.com/NordicSemiconductor/IOS-nRF-Toolbox"&gt;nRF Toolbox&lt;/a&gt;&amp;nbsp;and/or the&lt;a href="https://github.com/NordicSemiconductor/Android-BLE-Library"&gt; Android BLE Library&lt;/a&gt; for developing your own mobile apps.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/thread/273343?ContentTypeID=1</link><pubDate>Wed, 07 Oct 2020 03:52:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19ae743a-cbfe-4704-86c1-e4c4ede88456</guid><dc:creator>Vick_Chang</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;/p&gt;
&lt;p&gt;We need NUS + LESC pairing for our project, hence we are verifying different connection &lt;span&gt;scenario.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do you mean we don&amp;#39;t need to consider this&amp;nbsp;scenario? Because user should never encounter this.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On the other hand, I give a try of nRFConnect app and have some questions:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a) When I connect to peripheral&amp;nbsp;using nRFConnect by Android, the connection is established directly. &lt;/span&gt;&lt;span&gt;There is no LESC pairing process.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The behavior is different from UART app in nRF Toolbox.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;=&amp;gt;So I tried connect&amp;nbsp;peripheral&amp;nbsp;through Android setting, then LESC pairing process shows up.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;b)&amp;nbsp;&lt;/span&gt;&lt;span&gt;Also I tried erased the bonding info of&amp;nbsp;peripheral. I click &amp;quot;connect&amp;quot; in nRFConnect is not working. =&amp;gt; It make sense.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So far are those expected? Just want to make sure my test result are correct.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;c) I have also tried the UART service RX Characteristic,&amp;nbsp;and&amp;nbsp;&lt;span&gt;peripheral&lt;/span&gt;&lt;span&gt;&amp;nbsp;can receive the data from Phone(Android) successfully.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m wondering to know does nRFConnect tool have source code like UART app for development?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks. Vick&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: UART app shows connected (but actually not) when peripheral bonding data is cleared</title><link>https://devzone.nordicsemi.com/thread/273209?ContentTypeID=1</link><pubDate>Tue, 06 Oct 2020 11:53:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1109199-e3ee-4cc6-87bd-830d80585a92</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Vick&lt;/p&gt;
&lt;p&gt;The app will think it is connected until it runs into a timeout because it thinks that it&amp;#39;s paired to the device.&amp;nbsp;The nRF Toolbox app is only tested with the example projects in our SDK, so the UART app in nRF Toolbox has not been tested with an example using NUS and pairing. When modifying projects and testing towards applications I would suggest using the nRFConnect app instead of the nRF Toolbox application, as it&amp;#39;s a lot more versatile.&lt;/p&gt;
&lt;p&gt;The peripheral will not be able to send data to the same app if it has deleted its bonding information, as it won&amp;#39;t be connected anywhere and will start advertising again.&lt;/p&gt;
&lt;p&gt;Yes, if a peripheral device has erased its bonding information for some reason, the central device will have to &amp;quot;forget&amp;quot; the device as well in order for both devices to pair with one another again.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>