<?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>NRF Connect Crash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21770/nrf-connect-crash</link><description>Hi Nordic Team, 
 I saw some issue with Nrf connect on IOS. 
 
 
 First the App crash when i open it. 
 
 
 Second with IOS i can see some issue with pairing and bonding information that in Android side, i can&amp;#39;t. For example sometimes i can see</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 May 2017 13:32:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21770/nrf-connect-crash" /><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85478?ContentTypeID=1</link><pubDate>Mon, 08 May 2017 13:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:579e1e9b-ade9-4a86-8104-9fe0e9cd3e66</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please test again with GLS example in the SD and check if the same behaviour can be seen. This is to check if your firmware causes the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85479?ContentTypeID=1</link><pubDate>Mon, 08 May 2017 09:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad79c9dc-a05b-4bad-96e3-011fb41e48aa</guid><dc:creator>annapalu</dc:creator><description>&lt;p&gt;I can&amp;#39;y use a NRFToolbox, beacuse i remove the UUID of gls and i&amp;#39;m using of custom UUID. From gls i use only the menage of peer&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85477?ContentTypeID=1</link><pubDate>Fri, 05 May 2017 08:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:677978b2-9042-4e14-90fd-e6c0149adbb5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@annapalu: Please also include the result of the test with NRFToolbox compare to your app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85476?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 11:57:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d630ca71-3efd-4dcd-8567-757600a5b03d</guid><dc:creator>annapalu</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;thank you for the answer. I&amp;#39;ll check with the new version of NrfConnect. Note that the problem that i have written above, is using the APP developments from our supplier.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85475?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 11:39:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1243bac-fec9-4f4a-9bf2-86f83cd5c233</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Annapalu,&lt;/p&gt;
&lt;p&gt;Thanks for detailed description.&lt;/p&gt;
&lt;p&gt;The NRFConnect just received an update today with version 1.7.5 .&lt;/p&gt;
&lt;p&gt;Please try to test with this version and let me know if the issue persists.&lt;/p&gt;
&lt;p&gt;Also please try to test using nRFToolbox for comparison. You can try to test with 3rd party app such as LightBlue. We need to find out if the issues are from the app itself or from the OS.&lt;/p&gt;
&lt;p&gt;Please test with unmodified GLS example as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85474?ContentTypeID=1</link><pubDate>Thu, 04 May 2017 07:32:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d669a71-b7a5-4682-af20-0c9e145a3f13</guid><dc:creator>annapalu</dc:creator><description>&lt;p&gt;Hi Hung Bui,
This is the comment of App development for my product.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We experienced some issues to    reconnect to the device in some cases    after we closed the app, or powered    OFF the device, or put the device out    of range... Basically what happens is    that the app successfully reconnects    to the device, but right after it    receives a disconnection event. Then    the app automatically reconnects, and    the disconnection events occurs    again, and so on ... So we think this    might be a connectivity issue from    the device, or from the phone itself,    but nothing we can handle from the    app. Most of time when this happens,    we have to reset the connection    between the 2 devices.   I would just    like to precise that the issue does    not only happen after we reset the    bonding information on device.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It also happens randomly, in the following cases:
  after device is put out of range: then when we go back in range of phone, and try to trigger a synchronization, nothing happens on the app side.
  after Bluetooth has been deactivated on phone: then when we activate Bluetooth on phone again, and try to trigger a synchronization, nothing happens on the app side.
  after device has been switched OFF: then when we switch ON device again, and try to trigger a synchronization, nothing happens on the app side&lt;/p&gt;
&lt;p&gt;In all cases, what we could observe is that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;  Once the connection is lost with device for any of the reason listed above, the app repeatedly scans devices in background to try to connect to device again
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;  Once the device is available again (ie: device back in range, or device switched ON again, or Bluetooth on phone activated again) and advertising, the phone successfully detects the device and try to connect to it
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;  Each time the connection is successful: we receive a “connection state change” event with status GATT_SUCCESS (ie: status = 0), and the new connection state STATE_CONNECTED (ie: newState = 2)
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;  But right after (almost instantly), we receive a new “connection state change” event with status = 8 (I am not sure what it corresponds to, what I could read is that it can be GATT_CONN_TIMEOUT or GATT_INSUF_AUTHORIZATION), and the new connection state STATE_DISCONNECTED (ie: newState = 0).
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;  Then app repeats operations from point 1. again and again, until we reset connection on both devices.
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that this does not happen all the time. It even happens rarely, or happens more frequently on some specific devices.&lt;/p&gt;
&lt;p&gt;Also note that the behavior is the same when we just reset bonding information on device, but the status we receive on app is different.
In case we reset bonding information, for point 4., instead of receiving status = 8, we receive status = 19 (as you were mentioning). So the case described above seems different than bonding information being reset on device.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;pre&gt;&lt;code&gt;    I would like to report one more issue. Sometimes after we reset the bonding information on device and unpair device from phone settings, then when we try to pair device again from app, we receive the following error message from OS: “Couldn’t pair with Nordic because of an incorrect PIN or passkey”. Sometimes the issue occurs repeatedly, but sometimes when we try to pair again, it is working fine. Do you have an idea of where the issue comes from?  
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;My code to menage the peer, (I use a gls example) is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void PR_MGR_EventHandler(pm_evt_t const * p_evt)
{
   ret_code_t err_code;
   switch(p_evt-&amp;gt;evt_id)
   {
      case PM_EVT_BONDED_PEER_CONNECTED:
      {
         APP_LOG(&amp;quot;Connected to previously bonded device\r\n&amp;quot;);                      
         err_code=TIMER_Start(TIMER_REQUEST,SECURITY_REQUEST_DELAY,NULL);
         APP_ERROR_CHECK(err_code);
         
         err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
         if (err_code != NRF_ERROR_BUSY)
         {
                 APP_ERROR_CHECK(err_code);
         }
      }
      break;//PM_EVT_BONDED_PEER_CONNECTED

      case PM_EVT_CONN_SEC_START:
         break;//PM_EVT_CONN_SEC_START

      case PM_EVT_CONN_SEC_SUCCEEDED:
         {
         pm_conn_sec_status_t conn_sec_status;
         err_code = pm_conn_sec_status_get(p_evt-&amp;gt;conn_handle, &amp;amp;conn_sec_status);
         APP_ERROR_CHECK(err_code);
         err_code = pm_peer_rank_highest(p_evt-&amp;gt;peer_id);
         APP_ERROR_CHECK(err_code);
                     
         break;//PM_EVT_CONN_SEC_SUCCEEDED

      case PM_EVT_CONN_SEC_FAILED:
         {
         /** In some cases, when securing fails, it can be restarted directly. Sometimes it can
          *  be restarted, but only after changing some Security Parameters. Sometimes, it cannot
          *  be restarted until the link is disconnected and reconnected. Sometimes it is
          *  impossible, to secure the link, or the peer device does not support it. How to
          *  handle this error is highly application dependent. */
          
            err_code = CNT_MGR_Disconnect();
            APP_ERROR_CHECK(err_code);
            lPeerMsg.msg = QUEUE_PEER_FAILED;
            QUEUE_Put(lPeerMsg );  
            CNT_MGR_SetConnStatus(BLE_CONN_HANDLE_INVALID);
         }
         break;//PM_EVT_CONN_SEC_FAILED

      case PM_EVT_CONN_SEC_CONFIG_REQ:
         {
         // Allow pairing request from an already bonded peer.
            pm_conn_sec_config_t conn_sec_config = {.allow_repairing = true};
            pm_conn_sec_config_reply(p_evt-&amp;gt;conn_handle, &amp;amp;conn_sec_config);
         }
         break;//PM_EVT_CONN_SEC_CONFIG_REQ

         case PM_EVT_STORAGE_FULL:
         {
         // Run garbage collection on the flash.
         err_code = fds_gc();
         if (err_code == FDS_ERR_BUSY || err_code == FDS_ERR_NO_SPACE_IN_QUEUES)
         {
             // Retry.
         }
         else
         {
             APP_ERROR_CHECK(err_code);
         }
         }
         break;//PM_EVT_STORAGE_FULL

      case PM_EVT_ERROR_UNEXPECTED:
         // Assert.
         APP_ERROR_CHECK(p_evt-&amp;gt;params.error_unexpected.error);
         break;//PM_EVT_ERROR_UNEXPECTED


      case PM_EVT_PEER_DATA_UPDATE_FAILED:
         // Assert.
         APP_ERROR_CHECK_BOOL(false);
         break;//PM_EVT_PEER_DATA_UPDATE_FAILED


      case PM_EVT_PEER_DELETE_FAILED:
         // Assert.
         APP_ERROR_CHECK(p_evt-&amp;gt;params.peer_delete_failed.error);
         break;//PM_EVT_PEER_DELETE_FAILED


      case PM_EVT_PEERS_DELETE_FAILED:
         // Assert.
         APP_ERROR_CHECK(p_evt-&amp;gt;params.peers_delete_failed_evt.error);
         break;//PM_EVT_PEERS_DELETE_FAILED


      case PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED:
         // The local database has likely changed, send service changed indications.
         pm_local_database_has_changed();
         break;//PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED

      default:
         // No implementation needed.
         break;
   }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect Crash</title><link>https://devzone.nordicsemi.com/thread/85473?ContentTypeID=1</link><pubDate>Wed, 03 May 2017 14:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3416246-e3d9-44e7-941e-753f5803ba87</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi, Could you provide the log when the issue occurred ?
You say &amp;quot;sometimes&amp;quot; how often was that ? Does that mean there were also successful connection and pairing ? For glucose profile, please try to test using nRFToolbox and BGM profile inside.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>