<?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>Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/15480/issues-with-proximity-example</link><description>I tried to get the ble_app_proximity example to work today, with either the nRF51-DK, nRF51-Dongle or nRF52-DK, along with the Nordic Connect app on Android. 
 I encounter the following issues: 
 With nRF5 SDK v11, the code size became too large for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 17 Aug 2016 08:42:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/15480/issues-with-proximity-example" /><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59136?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 08:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28fa829b-0ace-437a-85e8-a5a087c9131a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I am testing again and it indeed an issue with nRF Connect. The connection timed out after connection parameter update. It&amp;#39;s from the central side.
I would need to check with the development team. For now please use nRF Master Control Panel.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59137?ContentTypeID=1</link><pubDate>Wed, 17 Aug 2016 02:40:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51309a94-f1be-4e54-9f6b-f83b05872c36</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I was working on the SDK v10&amp;#39;s examples though, so I think the problem should not be with the peer manager?
I looked at the equivalent &lt;code&gt;dm_ble_evt_handler()&lt;/code&gt; but I don&amp;#39;t think any error assertion there could cause problems. I could be wrong though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59139?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2016 07:44:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c3ad94e-9153-49cc-9e5c-cb6eb72413db</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m glad that root cause has been found.
Please be aware that by using 32kHz RC which has lower accuracy, the chip would consume little larger power due to larger RX windows.&lt;/p&gt;
&lt;p&gt;Regarding the issue with bonding without pairing, it&amp;#39;s the issue with the new peer manager.  It was because pm_peer_rank_highest() called in PM_EVT_CONN_SEC_SUCCEEDED event (in main.c) with the invalid peer_id. If you catch this and don&amp;#39;t throw an assertion then it should be fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59138?ContentTypeID=1</link><pubDate>Tue, 16 Aug 2016 02:46:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20e41762-1dc9-4121-860a-595bb3701dd2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hung, sorry for the late follow up. I just had a couple of days off.&lt;/p&gt;
&lt;p&gt;I initialized the BLE SoftDevice handler with internal RC oscillator as you suggested, and indeed I don&amp;#39;t have disconnection issue after connection parameter update anymore.
It also explains why we never run into issues with our firmware, because that firmware also use internal RC oscillator.&lt;/p&gt;
&lt;p&gt;Glad at least the disconnection issue is figured out. This should also help us prevent headaches in future development.&lt;/p&gt;
&lt;p&gt;Then I will count on you and the team working on examples to figure out the possible bug you mentioned?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59135?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 12:02:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:389601c8-efef-4aa6-8fa4-7c33f5f01ecb</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Thanks a lot for the intense test and clear description.
From the tests case, it looks like it&amp;#39;s the issue with only the nRF51 DK. nRF51 dongle and nRF52 DK always work.&lt;/p&gt;
&lt;p&gt;I suspect there could be an issue with the 32kHz LFCLK on the DK as you can find that it usually drop the connection after the connection parameter update (when the period between 2 connection events is longer).
You can try to test again with the nRF51DK but this time use the NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION instead of the NRF_CLOCK_LFCLKSRC_XTAL_20_PPM when you configure the softdevice in ble_stack_init().&lt;/p&gt;
&lt;p&gt;Or you have another nRF51DK you can try to test with that. I would expect that you won&amp;#39;t have the same problem on 2 boards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59134?ContentTypeID=1</link><pubDate>Thu, 11 Aug 2016 10:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62fe6469-aab0-4317-acba-78fb1b29a4d8</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hung, I did the test you suggested, but the note for that ended up became so long I had to append it to the questions. Please find it there&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59133?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 10:55:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df0d9ff8-ec9e-440e-a612-fdf03e571892</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Hieu: Please try to test again with &amp;quot;perform bonding&amp;quot; with nRF Connect, or try with Master Control panel.&lt;/p&gt;
&lt;p&gt;Also please try to test with HRM example, just to verify if the hardware works fine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59132?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 10:46:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2608eb3-0132-444a-b808-91c3e3e27b99</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Ah, that is unfortunate, because what I have been trying to do is to get the Proximity Service to work and test. I guess I could spend sometime to stare at the module and how it is laid out instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59149?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 09:19:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:378b6ad3-51f6-48ed-baa2-09ab43be15a2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hung:
What I did was:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;On PCA10028, run the stock example, unmodified. This results in both issue with read/write attributes and connection drop&lt;/li&gt;
&lt;li&gt;On PCA10031, from the stock example, change only the preprocessor &lt;code&gt;BOARD_PCA10028&lt;/code&gt; to &lt;code&gt;BOARD_PCA10031&lt;/code&gt;and recompile. This results in only the read/write issue but not the connection drop.&lt;/li&gt;
&lt;li&gt;On our prototype board, we use a nRF51822 module. I created a board support header file for it, updated boards.h, and changed &lt;code&gt;BOARD_PCA10028&lt;/code&gt; accordingly to load that file. I also had to change the IROM and IRAM settings to match the nRF51822xxAB chip on the module. With this setup, I could not remember for sure, but I believe I saw the same result as the PCA10031.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I have updated the question with such details.&lt;/p&gt;
&lt;p&gt;I also ran some more detailed experiment and posted it up there as well.&lt;/p&gt;
&lt;p&gt;Regarding photo, what kind of photo are you looking for?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59131?ContentTypeID=1</link><pubDate>Wed, 10 Aug 2016 08:50:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af13f96c-fa62-4d3d-af95-79f71992c903</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;Thanks for the update.&lt;/p&gt;
&lt;p&gt;I just tested here and found maybe a bug with the proximity example that it crashed if we do pairing but not bonding. I will do further investigation on this.&lt;/p&gt;
&lt;p&gt;In the mean time, please try to tick the check box &amp;quot;Perform Bonding&amp;quot; when you pair.&lt;/p&gt;
&lt;p&gt;Also please try to test using Master Control Panel on PC. You can test it by using the nRF51 dongle as the backend and the nRF51 DK/nRF52DK as the device under test. You would need to flash the nRF51 dongle with the firmware comes with Master Control panel.&lt;/p&gt;
&lt;p&gt;Also you can test with other example that doesn&amp;#39;t require bonding, for example ble_app_hrs. This is to rule out the issue with bonding. And verify that the radio works fine.&lt;/p&gt;
&lt;p&gt;nRF Connect is fairly new application and I would say it&amp;#39;s less reliable than the Master Control Panel application.&lt;/p&gt;
&lt;p&gt;the INSUF_AUTHENTICATION error is normal if you haven&amp;#39;t bonded/paired with the device as the characteristic requires encryption.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59148?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 08:34:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40e5c9a1-547a-4b4f-b0c7-1bfb3dd9f0ad</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s fine to use nRF Connect.&lt;/p&gt;
&lt;p&gt;From the trace you attached what I can see is that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The read request was sent and got Insufficient authentication error back. This is normal as the 2 devices are not paired, link is not encrypted. Then the link is continued for 2 seconds until the slave sent connection parameter update request and got accepted. The issue happens after the central update the new connection interaval which is  500ms.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The slave failed to continue with the new connection interval. The central continue to send message until a timeout occurs. This usually happens when you don&amp;#39;t have a good low frequency oscillator or you configured the wrong tolerance of the crystal/oscillator.&lt;/p&gt;
&lt;p&gt;I would like to have the following information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Did you test with the stock example ? Without any modification ? Could you try to test with the precompiled hex file provided in each example ?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Did you test with other boards as well ?  I was quite confused with information you provided, for example:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;*&amp;quot;With a modified project for nrF51-Dongle (defines BOARD_PCA10031 instead of BOARD_PCA10028), I don&amp;#39;t have this issue with the nRF51-Dongle at all.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;Furthermore I have used the Development Kits and the nRF Dongle to test our firmware a lot. They have never shown any issue with connection drop before.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;However, the prototypes and the kits/dongle have no issue with mentioned example and firmware.*&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t understand this.&lt;/p&gt;
&lt;p&gt;Could you summarize on what works and what doesn&amp;#39;t work ? What worked before and doesn&amp;#39;t work now ?&lt;/p&gt;
&lt;p&gt;Could you maybe take a photo of your setup ?&lt;/p&gt;
&lt;p&gt;I attached the screenshot of the sniffer showing how the connection dropped in my answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59147?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 03:47:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d50e19dc-99d5-4959-a08a-463f60a1fa90</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;&amp;lt;cont.&amp;gt;
Regarding the testing with a different example, I tried again to be sure and tested with the Glucose example, with one more central, a Moto G (previous one is a Moto X). What I observed on the Android devices was that connection do drop, sometime after a long while (1~2m), sometime soon after the first read/write request. However, when run with PC version of nRF Connect, I have yet seen any connection drop yet.
The Motorola devices are of the same generations running the same version of nRF Connect, so I will look more into this once I have more time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59146?ContentTypeID=1</link><pubDate>Tue, 09 Aug 2016 03:45:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e64f8832-9599-4104-ad3b-1d874e601e54</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Hung,
I tried what you suggested. Because I only have two nRF51 evaluation boards, I had to use the nRF52 DK together with the nRF Connect PC app instead of Master Control Panel, but I hope that it doesn&amp;#39;t matter.
What I saw was connection dropped again right after I attempt to read Tx Power. However, one thing differed. After that connection drop I cannot connect back to the Nordic Prox board.
I have attached the sniffer trace and nRF Connect log for your reference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59145?ContentTypeID=1</link><pubDate>Mon, 08 Aug 2016 08:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5031ad7-ac44-4ac7-925e-0682dfe324f4</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Hieu,&lt;/p&gt;
&lt;p&gt;From your trace I couldn&amp;#39;t find any write request/command. Could you try to capture again ? If still there is no write request from the master side, it could be an issue with the phone.&lt;/p&gt;
&lt;p&gt;Also could you capture the trace again with Master Control Panel or nRF Connect application on PC , instead of the Motorola phone ?&lt;/p&gt;
&lt;p&gt;You meant you have tested with the DK and dongle before and it worked fine and the issue just happened lately ?&lt;/p&gt;
&lt;p&gt;From your trace I can see the 2 device kept the connection for quite a long time without any packet drop. And at the end the slave just stop responding, the central keep transmitting until time out. After 20-30 seconds, the slave advertising again.&lt;/p&gt;
&lt;p&gt;This is pretty strange I haven&amp;#39;t seen this with our example before.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59144?ContentTypeID=1</link><pubDate>Fri, 05 Aug 2016 11:02:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f8987b5-5de7-409e-941b-406c3986be39</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;@Hung: I have obtained a sniffer trace with the nRF Sniffer.&lt;/p&gt;
&lt;p&gt;I have tried with the ble_app_uart example and may be a couple more. Furthermore I have used the Development Kits and the nRF Dongle to test our firmware a lot. They have never shown any issue with connection drop before.&lt;/p&gt;
&lt;p&gt;I could not judge if the interference is severe, but we now have 5~10 prototypes/BLE devices powered within the 2-meter radius around me at all time, together with two WiFi routers. However, the prototypes and the kits/dongle have no issue with mentioned example and firmware.&lt;/p&gt;
&lt;p&gt;I also tried the proximity example on one of our prototype and it also resulted in similar connection issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59143?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 11:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5756f12-8028-4916-ad78-4cabace31918</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@Hieu: Please install &lt;a href="https://www.wireshark.org/download/win32/all-versions/"&gt;Wireshark v1.10&lt;/a&gt; instead of v2.x . Wireshark v1.10 is the only version we support.&lt;/p&gt;
&lt;p&gt;From the log I can see it was the BTLE_CONNECTION_TIMEOUT that caused the disconnection, there is something wrong with the slave or it could be too much interference caused the timeout.&lt;/p&gt;
&lt;p&gt;Have you tried with other examples in the SDK ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59141?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 07:58:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bbe641b-1a31-4f0b-b0b1-16a8c6fdae3c</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;I tried using the PC version of Master Control Panel, and ran into the same connection drop problem, however after a much shorter time. Once I saw that it drops the connection 1~3s after connection formed, and another 1~3s after the service discovery completed. I will have the Master Control Panel log attached to the main post for your reference.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59142?ContentTypeID=1</link><pubDate>Thu, 04 Aug 2016 07:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37e9c8cb-85a6-409c-94cd-1a989ff15cef</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Chao anh Hung,&lt;/p&gt;
&lt;p&gt;The central I was using is an Android device. I don&amp;#39;t think I have encountered troubles with this device as far as it concerns BLE.&lt;/p&gt;
&lt;p&gt;I tried to install nRF Sniffer and Wireshark to record a trace but I encountered another issue with that. When I launch Wireshark from nRF Sniffer, I encountered an error saying &lt;strong&gt;Couldn&amp;#39;t load module C:\Program Files\Wireshark\plugins\2.0.5\nordic_ble.dll:&amp;#39;C:\Program Files\Wireshark\plugins\2.0.5\nordic_ble.dll&amp;#39;: %1 is not a valid Win32 application.&lt;/strong&gt;
This probably is why Wireshark also pops up a warning saying &lt;strong&gt;The NPF driver isn&amp;#39;t running. You may have trouble capturing or listing interfaces.&lt;/strong&gt;
I tried replacing &lt;strong&gt;nordic_ble.dll&lt;/strong&gt; with the .dll files in the sniffer package, both x64 and x86 versions. However neither file works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with Proximity Example</title><link>https://devzone.nordicsemi.com/thread/59140?ContentTypeID=1</link><pubDate>Tue, 02 Aug 2016 11:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ab81d99-7d0d-46bc-9307-727a8a1f3ba5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Chao Hieu,&lt;/p&gt;
&lt;p&gt;Which central device did you use ?&lt;/p&gt;
&lt;p&gt;Could you try to record &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF-Sniffer/(language)/eng-GB"&gt;a sniffer trace&lt;/a&gt; on what happens  ?&lt;/p&gt;
&lt;p&gt;Could you check what was the disconnect reason when the BLE_GAP_EVT_DISCONNECTED event occurs ?&lt;/p&gt;
&lt;p&gt;I would suggest to get started with the nRF Connect or nRF Master Control Panel app on PC.&lt;/p&gt;
&lt;p&gt;Regarding the issue with the size of the example on SDK v11, in SDK v11 we introduced the peer manager and the fds, fstorage to replace device manager and pstorage. The code size increased quite a lot. My suggestion is to port the example to use device manager and pstorage instead. You can follow what we have with other example such as ble_app_hrs on how to use the pstorage.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/proximity.PNG" alt="image description" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>