<?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>Re-connect to central device(phone)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/47292/re-connect-to-central-device-phone</link><description>Hi, 
 My device sends the advertising packet when some button pressed. 
 Then phone app will connect to my device and do some process between my device and disconnect. 
 Then my device goes to sleep. 
 My device will wake-up every single 1 hour. 
 I want</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 May 2019 04:50:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/47292/re-connect-to-central-device-phone" /><item><title>RE: Re-connect to central device(phone)</title><link>https://devzone.nordicsemi.com/thread/187396?ContentTypeID=1</link><pubDate>Thu, 16 May 2019 04:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71e52568-2fe2-4520-93c4-6ba400a220e1</guid><dc:creator>paul0208</dc:creator><description>&lt;p&gt;Thank you for information and advice.&lt;/p&gt;
&lt;p&gt;BR&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Re-connect to central device(phone)</title><link>https://devzone.nordicsemi.com/thread/187232?ContentTypeID=1</link><pubDate>Wed, 15 May 2019 11:49:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd518e8e-a869-4c6e-b550-4cc386ca65d2</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
&lt;p&gt;It is not possible for a phone to connect if the peripheral is not advertising. A BLE connection can only be established when the peripheral is advertising. The phone will send a connect request packet right after receiving a advertising packet, and in that time window the advertising peripheral is listening for connection requests. If it is received, the connection is established.&lt;/p&gt;
&lt;p&gt;What is it you want to achieve? If you only want a specific phone to connect at regular wakeup, then you can handle this using whitelisting when you advertise every hour. Similarly, if you want any phone to connect when you press a button, you can advertise without whitelisting in this case.&lt;/p&gt;
&lt;p&gt;Based on my understanding&amp;nbsp;of your requirement (including some guesses) you could do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you want to add a new phone, press a button. When this happens, start advertising without whietlisting. If a connection is established, initiate bonding so that you have the IRK which is needed to to subsequent whitelisting.&lt;/li&gt;
&lt;li&gt;Us an app_timer to wake up every hour and start advertising with whitelisting (this allows you to filter in up to 8&amp;nbsp;phones&amp;nbsp; you are bonded with). Timeout after a few seconds/minutes in case of no connection and try again in an hour(?)&lt;/li&gt;
&lt;li&gt;If a connection is established, do whatever you should do, then disconnect. The app timer will make sure the device wakes up and starts to advertise again in one hour.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The SDK has some examples of whitelisting, for instance the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/ble_sdk_app_cts_c.html?cp=5_1_4_2_2_7"&gt;Current Time Application&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>