<?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>NRF52 Running S132V3.0 Soft Device as a Central can&amp;#39;t maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20937/nrf52-running-s132v3-0-soft-device-as-a-central-can-t-maintain-a-connection-with-a-samsung-galaxy-s7-peripheral</link><description>Hardware:
I have an nRF52 device running the S132 running as a Central.
I have 6 iOS/Android devices running as peripherals. 
 Background:
I am attempting to have my central device maintain a connection with a variety of devices.
My phone app is</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Apr 2017 14:07:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20937/nrf52-running-s132v3-0-soft-device-as-a-central-can-t-maintain-a-connection-with-a-samsung-galaxy-s7-peripheral" /><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81802?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 14:07:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6a2b1f-1fcf-442d-8bfb-b33f913aff9c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, click the three-line button on left top and select &amp;quot;Configure GATT server&amp;quot;, click the down arrow on top, click the &amp;quot;download&amp;quot; arrow, and browse to this file: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/NUS.xml"&gt;NUS.xml&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81801?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:59:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8f2c141-100e-4016-8aa0-fa0d24cc2d5a</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Your Central is depending on UART service to exist on the peripheral, as is mine.  Is there a way to make nRF Connect as an Advertiser have the UART service?   My &amp;#39;central&amp;#39; device is &amp;#39;stuck&amp;#39; in &amp;quot;Discovering Services&amp;quot;.
I just found the GATT Server Setup option on the app.   Nevermind.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81811?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:49:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:796abd45-40d5-4dce-8a0c-f83d819239ab</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I&amp;#39;m using &lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Connect"&gt;nRF Connect for Android&lt;/a&gt; (can be found on Google Play). Go to the tab &amp;quot;ADVERTISER&amp;quot; and setup your peripheral with desired advertising data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81810?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:42:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:84a496fe-5739-4221-8386-b0f37beaa5d9</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Could you send me your Android App code?  I could try your app with my hardware and see if I can rule out my app as being the problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81809?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:37:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b705833-5e77-4939-9740-0e6cf33ed5fb</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Yes, the parameters should be the same:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SCAN_INTERVAL           0x0C80                          /**&amp;lt; Determines scan interval in units of 0.625 millisecond. */
#define SCAN_WINDOW             0x0050                          /**&amp;lt; Determines scan window in units of 0.625 millisecond. */
#define SCAN_ACTIVE             1                               /**&amp;lt; If 1, performe active scanning (scan requests). */
#define SCAN_SELECTIVE          0                               /**&amp;lt; If 1, ignore unknown devices (non whitelisted). */
#define SCAN_TIMEOUT            0x0000                          /**&amp;lt; Timout when scanning. 0x0000 disables timeout. */

#define MIN_CONNECTION_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**&amp;lt; Determines minimum connection interval in millisecond. */
#define MAX_CONNECTION_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS) /**&amp;lt; Determines maximum connection interval in millisecond. */
#define SLAVE_LATENCY           0                               /**&amp;lt; Determines slave latency in counts of connection events. */
#define SUPERVISION_TIMEOUT     MSEC_TO_UNITS(6000, UNIT_10_MS) /**&amp;lt; Determines supervision time-out in units of 10 millisecond. */
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The phone is a Galaxy S7 running Android 7.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81808?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5feac4b7-08b9-42e4-98c4-43c363f36f73</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Your Central is using the same connection parameters I&amp;#39;m using (with Slave Latency set to 0?)
What type of phone is it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81807?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:23:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:387ef0d5-bdf7-421b-8f74-38bea1e047f7</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The central is a nRF52 DK (PCA10040) running &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/ble_sdk_app_nus_c.html?cp=4_0_1_4_2_0_2"&gt;ble_app_uart_c&lt;/a&gt; example from SDK. I do however not have any other connections with the board simultaneously, and it is not continuing to scanning (as I have not implemented any ways to avoid connecting multiple times, and the advertising in nRF Connect on Android does not stop advertising when a device connects).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81806?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 13:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06551d31-90b5-43a7-9392-785c34a21a59</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;When you say that you have a solid connection, what is your &amp;quot;Central&amp;quot;?  Is it another Android phone?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81805?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 11:54:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0af42f17-ce2b-4507-b1e1-e99c8696eded</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;My application (hardware side) continues scanning after it makes the initial connection. The phone can only stop advertising after service discovery is complete because iOS has no &amp;quot;connected&amp;quot; event, just a &amp;quot;subscribed&amp;quot; event.  I try to avoid multiple connections by only doing service discovery for a particular MAC address at one time.  I ultimately can&amp;#39;t avoid the MAC switching during discovery, but I&amp;#39;m only seeing the issue after the discovery is complete.
Sending you the application (firmware side) will be difficult because it depends on my hardware.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81804?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 08:51:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26bc30de-aaf5-4120-918b-bcc882b17882</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Are you doing bonding in your application when the peripheral connects? Or do you stop advertising on the phone when connecting? If not, have you checked that the central is not trying to connect to the phone multiple times? If the phone use private resolvable address, it is hard to avoid multiple connections if scanning and advertising resumes after connection if the devices is not bonded.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81803?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 08:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e773ef4-7731-41dd-b8a7-01d7e5a379fc</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;That&amp;#39;s strange. Could you send me your application so I can test with my phone? I&amp;#39;m able to connect and keep the connection indefinetly with SLAVE_LATENCY set to 0. Does this only happen if you have multiple peripherals connected or do scanning in background when connecting?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81800?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 15:07:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07383250-e79e-488f-9d27-b2ba60742fda</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Progress (maybe...)!   I made the Slave Latency &amp;#39;0&amp;#39; and my Nexus 5X running Android 7.0 can connect!! Interestingly enough every 30 seconds (30 seconds exactly, +/- 100 ms) the phone disconnects.  It takes about 5 seconds for the phone to go through the reconnect process, but it does reconnect and is able to send/receive commands.
However, this did nothing to correct the Galaxy S7 running Android 7.0 issue.  The Galaxy S7 connects, my hardware goes through service discovery of the phone,  it finds the UART service, and then the phone writes some data to the UART characteristics (as it normally does), and immediately disconnects.   I&amp;#39;m having a harder time stopwatching how long it is connected because it disconnects so quickly.  Suffice it to say it doesn&amp;#39;t stay connected long enough to do anything useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81799?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 12:29:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64e675bc-06f1-4087-8104-c44d89f81223</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;I will try the slave latency set to 0 on the central side.  On the phone side there is no API in the Cordova Plugin I&amp;#39;m using to set any connection parameters, so setting any sort of preference is out of the question.  The &amp;quot;peripheral mode&amp;quot; on Android/ iOS seems to be lacking some pretty basic features IMO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81798?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 12:13:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64e632ed-6c3b-44ba-a893-d3d0eae0aa95</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Could you test with SLAVE_LATENCY set to 0? Slave latency is typically used to save power on the peripheral device, but I don&amp;#39;t think this will have a large impact on the phone battery life. I tested without slave latency, and is able to keep a connection with these settings. There might be a bug in Android 7.0, not implementing slave latency correctly. Do you know if there is any API in Android to set this manually?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81797?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2017 13:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd4b9c41-3376-4e91-a1df-6e21e6b94302</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Yes I have written my own application to act as a Peripheral.   My Nordic device is a Central maintaining 6 concurrent UART connections.  I&amp;#39;m experiencing the same issue:   it will connect, I can send/receive data via UART from the phone to the Nordic device for 15-30 seconds and eventually I stop receiving data and the connection times out (with BLE_HCI_CONNECTION_TIMEOUT).
I&amp;#39;m also getting 0x13 as the Disconnect Reason (USER TERMINATED), but my Peripheral application isn&amp;#39;t issuing any disconnect commands.  I&amp;#39;m stepping through WireShark of the btsnoop_hci log files generated by my Android device but I haven&amp;#39;t seen anything obvious.
I get a write request from my remote device (Nordic Hardware) and my phone (Device_4) and then the host commands the controller to disconnect.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1296	220.326488	remote ()	localhost (DEVICE_4)	ATT	14	Rcvd Write Request, Handle: 0x002b (Unknown: Nordic UART Rx: Client Characteristic Configuration)

1297	220.331496	host	controller	HCI_CMD	7	Sent Disconnect
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81796?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2017 13:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23b6cab9-2796-4a72-848a-169a10296d38</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you written your own Android application? I&amp;#39;m seeing similar issues with my Galaxy S7 with Android 7.0 with nRF Connect, but I can connect to the phone. If I try to read characteristics, the phone disconnects with reason &lt;code&gt;BLE_HCI_CONNECTION_TIMEOUT&lt;/code&gt;. I have managed to get a connection sometimes though. I will look some more into this and try to do a sniffer trace to see if there is some unexpected going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81792?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 20:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6759697e-3498-435f-a0ad-24f7ebc1dad4</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;Another update.   The Disconnect Reason is BLE_HCI_CONNECTION_TIMEOUT.&lt;br /&gt;
I&amp;#39;m not sure why the Android 7.0 phones have this issue but no other phone I&amp;#39;ve tried has it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81795?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 12:29:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2891028f-41fd-472f-b477-52d5d9534ca9</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;I should also note that i&amp;#39;m just doing a standard connection and device discovery, I am not using Nordic&amp;#39;s &amp;quot;Peer Manager&amp;quot; or attempting to do any sort of encryption of the connection.  At this point I figured it would be easier to get non-encrypted traffic working and add the encryption later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81794?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 12:28:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:119126f6-1eec-46cb-8707-2a20ba126ec2</guid><dc:creator>Greg Nowak</dc:creator><description>&lt;p&gt;I haven&amp;#39;t tried sniffing the packets directly (I don&amp;#39;t have a BLE Sniffer) but I&amp;#39;m getting the BLE_GAP_EVT_DISCONNECTED event from the on_ble_evt() callback.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been doing some research into the differences between Android 7.0 and other versions of Android.  I found that my hardware also cannot connect to Android 5.1.1 devices either.  My suspicion at this point has to do with the rotating MAC addresses on the peripheral.  When the phone rotates its MAC address it seems as though I get a BLE Disconnect event.   My Android 6.0.1 device seems to have a static MAC address throughout the entire connection process, where the S7 doesn&amp;#39;t seem to have a fixed MAC address.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52 Running S132V3.0 Soft Device as a Central can't maintain a connection with a Samsung Galaxy S7 peripheral</title><link>https://devzone.nordicsemi.com/thread/81793?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 12:18:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18949a2e-29be-41d7-b7f4-8d903bd54007</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Have you tried doing a sniffer trace to see if it gives any indications on why the connection is dropped?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>