<?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>(Android) Connecting to device with high advertisement interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20860/android-connecting-to-device-with-high-advertisement-interval</link><description>Hi, 
 I&amp;#39;m currently working on a BLE device which works his whole lifetime on one battery. This means we have to save as much energy as possible. This is why we set our advertisement interval to 3 seconds. 
 Using the Nordic Connect app this causes</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 May 2017 06:43:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20860/android-connecting-to-device-with-high-advertisement-interval" /><item><title>RE: (Android) Connecting to device with high advertisement interval</title><link>https://devzone.nordicsemi.com/thread/81464?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 06:43:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd4e70cb-b08b-478a-a3e5-1f1527647cbb</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;It took us a while to figure it out. For anyone passing by, as you can see our &lt;code&gt;connect()&lt;/code&gt; function takes the mac address as parameter. The mac address is obtained from the BluetoothDevice object of a ScanResult. By only passing the mac address the BluetoothDevice object is discarded. Then in our &lt;code&gt;connect()&lt;/code&gt; function we need to obtain it again with &lt;code&gt;mBluetoothAdapter.getRemoteDevice(address)&lt;/code&gt;. This process causes the connecting procedure (&lt;code&gt;connectGatt()&lt;/code&gt;) to take longer than normal.&lt;/p&gt;
&lt;p&gt;So use &lt;code&gt;device.connectGatt()&lt;/code&gt; directly on the device obtained from the ScanResult.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Android) Connecting to device with high advertisement interval</title><link>https://devzone.nordicsemi.com/thread/81463?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 07:21:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e8bc3b5-bc84-4763-8903-b9800e304454</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;Alright, currently we stop scanning before connecting. We will try keep scanning during connecting! Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Android) Connecting to device with high advertisement interval</title><link>https://devzone.nordicsemi.com/thread/81462?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2017 12:37:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae54fcfd-79ba-4d9f-9865-a055c79ef0e6</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Bluetooth LE connect involves a scan. So you could try to use &lt;a href="https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner.html#startScan(java.util.List%3Candroid.bluetooth.le.ScanFilter%3E,%20android.bluetooth.le.ScanSettings,%20android.bluetooth.le.ScanCallback)"&gt;BluetoothLeScanner.startScan()&lt;/a&gt; with the scan settings set to &lt;code&gt;SCAN_MODE_LOW_LATENCY&lt;/code&gt;. This should speed up the connection attempt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>