<?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>Connect to phone in background</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16246/connect-to-phone-in-background</link><description>I&amp;#39;m trying to get my nRF52 BLE peripheral to connect to my phone while its screen is off and it&amp;#39;s in sleep mode. Other consumer BLE peripherals that I have can connect to my phone while its screen is off but my peripheral can&amp;#39;t and will only reconnect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 May 2017 02:40:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16246/connect-to-phone-in-background" /><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62082?ContentTypeID=1</link><pubDate>Fri, 12 May 2017 02:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae063269-8c11-47d7-97de-61f83eb934e6</guid><dc:creator>Vaibhav Aggarwal</dc:creator><description>&lt;p&gt;These are mine, but only because I don&amp;#39;t need high throughput. You will have to adjust according to your usecase. I am working on iOS 10, but it should work for most of them.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define MIN_CONN_INTERVAL_MS   150
#define MAX_CONN_INTERVAL_MS   200
#define SLAVE_LATENCY		   4
#define CONN_SUP_TIMEOUT_MS    6000
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62081?ContentTypeID=1</link><pubDate>Fri, 12 May 2017 02:15:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71d4667b-d9fb-4e6c-a567-1481d1fa427f</guid><dc:creator>Julian</dc:creator><description>&lt;p&gt;Same issue with me and I am using the apple specs. Vaibhav, which iOS version are you using? Could you share your GAP parameters? Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62080?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 16:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41ba0f50-382d-4589-9c0e-614578b77f20</guid><dc:creator>Vaibhav Aggarwal</dc:creator><description>&lt;p&gt;Yes, the issue was with tweaking my GAP parameters. Make sure they are within the range specified by Apple. Look at section 3.6 &lt;a href="https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62079?ContentTypeID=1</link><pubDate>Thu, 11 May 2017 12:26:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:367bc0ff-bf43-4f39-a55a-f16c279fa992</guid><dc:creator>hagar</dc:creator><description>&lt;p&gt;@Vaibhav Aggarwal Did you manage to solve this?
I am having the same problem here and any help would be really appreciated. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62078?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2016 13:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a89cc4c-8168-4e83-9fda-7c6373948ab0</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You can test the sniffer like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You put your app in background mode&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You turn on your device, let it advertise&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The app won&amp;#39;t connect to your device as you described as the issue. You can use the sniffer to follow the device&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check if there is any connection request when the app is in background&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wake the app up to foreground and see if how it&amp;#39;s connected.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of address do you have ? Please take a screenshot of the normal device and your device.&lt;/p&gt;
&lt;p&gt;Please be noted that, besides advertising, the nRF5 can&amp;#39;t do anything else to interact with the phone unless the phone connect to it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62077?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2016 08:28:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71c00ce3-1a11-4b26-92f0-d9b3550fa53b</guid><dc:creator>Vaibhav Aggarwal</dc:creator><description>&lt;p&gt;@Hung Bui I have a sniffer and there is a difference in &amp;quot;randomized tx address&amp;quot; bit in the ADV_IND packet header. Do you know how to set this? Other than that, the adv packet is essentially the same, and my peripheral can communicate with the app only when the app is in the foreground, so it probably isn&amp;#39;t an issue with advertisement since other peripherals wouldn&amp;#39;t advertise differently since they wouldn&amp;#39;t know when to connect to mobile app in the background or foreground. It&amp;#39;s sort of hard to use a sniffer to catch packets when connecting in the background since the moment I turn on the device it immediately connects to the app before I can configure the sniffer. Is there a way around this issue? Thanks for the help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62076?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2016 07:33:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d871837-6cf5-4bcf-8872-63fb7cf40cef</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Vaibhav: You may need to have a look at the &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/"&gt;sniffer trace&lt;/a&gt; to figure out why it connects to other devices but not yours.&lt;/p&gt;
&lt;p&gt;We need to check if the app/phone actually connect to the nRF5 or not. If it doesn&amp;#39;t then it could be that the flag or something are different from what other device advertise to the phone doesn&amp;#39;t send connect request.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62075?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 20:34:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8e260c1-a7ee-46fd-accf-b4f7741996eb</guid><dc:creator>Vaibhav Aggarwal</dc:creator><description>&lt;p&gt;I&amp;#39;m attempting to get my peripheral to work with an app that already exists and I don&amp;#39;t have control over. Other peripheral devices can connect with it in the background but my nRF52 peripheral can&amp;#39;t and needs the app to come into the foreground. This is on iOS. Is there some sort of setting or callback for the nRF52 to handle background connection or something? Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Connect to phone in background</title><link>https://devzone.nordicsemi.com/thread/62074?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2016 13:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa9c9d7b-dca7-41a4-9033-ca729fe754a7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Vaiblhav: Are you talking about iOS or Android ?
On Android you can create a background service, like &lt;a href="https://developer.android.com/training/run-background-service/create-service.html"&gt;this&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For iOS you may want to have a look at &lt;a href="https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/CoreBluetoothBackgroundProcessingForIOSApps/PerformingTasksWhileYourAppIsInTheBackground.html"&gt;this&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>