<?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>Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/10416/unable-to-connect-peripheral-with-peer-manager</link><description>Hi 
 I&amp;#39;m testing the Peer Manager as a replacement for the currently used device manger. I ported out code to use of the peer manager. I can see the peripheral advertising, but when i try to connect with the iOS LightBlue app the connection is terminated</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Nov 2015 17:51:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/10416/unable-to-connect-peripheral-with-peer-manager" /><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38679?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 17:51:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e06a4d43-dcff-441d-9c25-361d05c50107</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;This solves the problem! Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38680?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 15:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53b960c3-6c09-4318-879d-8f896e0879b2</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Hi Anders
Im aware that the module is experimental. I hope i can help to bring the peer manager to a stable state by reporting bugs :-). I&amp;#39;ll try if it solves my problem. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38678?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2015 14:49:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fce1be97-c028-4442-ac2c-c8ecf0327498</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;Hey!&lt;/p&gt;
&lt;p&gt;It is a minor bug in the peer manager. Keep in mind that this module is experimental for now.&lt;/p&gt;
&lt;p&gt;You were correct about the BLE_ERROR_GATTS_SYS_ATTR_MISSING event causing this issue. The functions handling this event had a logical error.&lt;/p&gt;
&lt;p&gt;The fix:
In &amp;quot;nRF51_SDK_10.0.0\components\ble\peer_manager\gatts_cache_manager.c&amp;quot;, comment out lines 206-209.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//if (peer_id == PM_PEER_ID_INVALID)
   // {
      //  return BLE_ERROR_INVALID_CONN_HANDLE;
    //}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and add checks around&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_GATT_LOCAL, &amp;amp;peer_data, NULL);
if (err_code == NRF_SUCCESS)
{
    pm_peer_data_local_gatt_db_flash_t const * p_local_gatt_db = peer_data.data.p_local_gatt_db;
    p_sys_attr_data                                            = p_local_gatt_db-&amp;gt;p_data;
    sys_attr_len                                               = p_local_gatt_db-&amp;gt;len;
    sys_attr_flags                                             = p_local_gatt_db-&amp;gt;flags;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (peer_id != PM_PEER_ID_INVALID)
{
    err_code = pdb_read_buf_get(peer_id, PM_PEER_DATA_ID_GATT_LOCAL, &amp;amp;peer_data, NULL);
    if (err_code == NRF_SUCCESS)
    {
        pm_peer_data_local_gatt_db_flash_t const * p_local_gatt_db = peer_data.data.p_local_gatt_db;
        p_sys_attr_data                                            = p_local_gatt_db-&amp;gt;p_data;
        sys_attr_len                                               = p_local_gatt_db-&amp;gt;len;
        sys_attr_flags                                             = p_local_gatt_db-&amp;gt;flags;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I hope this solves your problem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38677?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 18:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2c83f54-12d3-467b-a5e5-08a825c6975a</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;I guess that would match my observations. Then I assume this is a bug right? On iOS devices there is always a service discovery bevor bonding.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38676?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 16:07:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f343c2df-27cb-4f98-99f1-e007b093d7f0</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;It works with Master Control Panel (windows) if i bond before doing a service discovery.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38675?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 15:43:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82b53de1-2d56-4744-bac1-2aab62afc5cf</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;I think the problem appears after a BLE_ERROR_GATTS_SYS_ATTR_MISSING event occurs during the service discovery, but i was not able to track it down any further.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect peripheral with Peer Manager</title><link>https://devzone.nordicsemi.com/thread/38674?ContentTypeID=1</link><pubDate>Mon, 23 Nov 2015 15:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89f36c03-4168-439a-9ff2-00ce6ce5643a</guid><dc:creator>Anders Strand</dc:creator><description>&lt;p&gt;I have had the same problem. I will let you know if i find the solution&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>