<?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>what&amp;#39;s difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/9328/what-s-difference-between-link-lost-and-disconnect</link><description>Hi,all. i faced a problem:when i take my phone far away from my device,link-lost severce can work,but turn bluetooth switch off on my phone directly,my device can&amp;#39;t alarm.What&amp;#39;s wrong?
Can someone help me?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Sep 2015 02:25:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/9328/what-s-difference-between-link-lost-and-disconnect" /><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34447?ContentTypeID=1</link><pubDate>Mon, 28 Sep 2015 02:25:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bdca08df-58e2-428c-a4b8-205fac1409d5</guid><dc:creator>leo.ni</dc:creator><description>&lt;p&gt;Thanks! i&amp;#39;ll try it as what you say.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34446?ContentTypeID=1</link><pubDate>Sun, 27 Sep 2015 03:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10a5efd0-0b4c-45d3-995f-471b34914de8</guid><dc:creator>RK</dc:creator><description>&lt;p&gt;that probably just means that iOS and android do something different when you turn off bluetooth. If android closes down the connections before it shuts the bluetooth chip down then you won&amp;#39;t see a link loss, you&amp;#39;ll see a disconnection, if iOS just turns the bluetooth chip off, then the link will time out and you&amp;#39;ll see the link loss.&lt;/p&gt;
&lt;p&gt;Put a packet sniffer on to see what&amp;#39;s happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34445?ContentTypeID=1</link><pubDate>Sun, 27 Sep 2015 02:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50011e0d-2972-4363-a3cf-5e30496a31c8</guid><dc:creator>leo.ni</dc:creator><description>&lt;p&gt;Under the same condition,my device&amp;#39;s behavior is deffernce.it can alarm on ios platform,can&amp;#39;t alarm on android platform.Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34444?ContentTypeID=1</link><pubDate>Sat, 26 Sep 2015 20:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:088be8ea-21fe-4c3a-8187-86604cd6eea9</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;what do you man by alamed on and not alaramed on?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34443?ContentTypeID=1</link><pubDate>Sat, 26 Sep 2015 01:40:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3605e13-3e21-4d6f-b733-c32b93147d94</guid><dc:creator>leo.ni</dc:creator><description>&lt;p&gt;Thanks ,Aryan!There is a new problem:When i turned off bluetooth switch on my phone directly,my device alarmed on ios platform and not alarmed on android.Can you help me?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: what's difference between  link-lost and disconnect?</title><link>https://devzone.nordicsemi.com/thread/34442?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2015 13:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d1f71ac-8bb9-44cc-bccf-73fd35b789a8</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,
I had to edit my previous answer because i misunderstood the question the first time.&lt;/p&gt;
&lt;p&gt;I am guessing that the link-loss is due to peer out of range or non responsive in that case you will get&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason = BLE_HCI_CONNECTION_TIMEOUT  (0x08)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;if it is proper disconnect then&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason = BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION(0x13)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>