<?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>How to deal with BLE_GATTS_EVT_SYS_ATTR_MISSING error?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23239/how-to-deal-with-ble_gatts_evt_sys_attr_missing-error</link><description>Hi,When I use nRF Connect app(IOS version) to connect my ble device,BLE_GATTS_EVT_SYS_ATTR_MISSING log information appears in my RTT Viewer(Picture IOS_Phone_Conncet).After about 96s，app(IOS version) will disconnect to my ble device.Disconnect Reason</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Jul 2017 07:09:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23239/how-to-deal-with-ble_gatts_evt_sys_attr_missing-error" /><item><title>RE: How to deal with BLE_GATTS_EVT_SYS_ATTR_MISSING error?</title><link>https://devzone.nordicsemi.com/thread/91396?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 07:09:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5397b46-bb24-48e1-aa6a-f81f78e108e3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Depending on configuration, the connection parameter module may terminate the link if the central device does not accept a connection interval within your max/min range. Please check if .disconnect_on_fail parameter is set to false in conn_params_init().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to deal with BLE_GATTS_EVT_SYS_ATTR_MISSING error?</title><link>https://devzone.nordicsemi.com/thread/91395?ContentTypeID=1</link><pubDate>Wed, 05 Jul 2017 02:52:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ff6187c-7c8f-4495-a409-80b5026b71ce</guid><dc:creator>alivexiaoluo</dc:creator><description>&lt;p&gt;Thanks,Vidar! I have already add the code above to on_ble_evt()  function,but the disconnection between ios phone and device still exist. So the BLE_GATTS_EVT_SYS_ATTR_MISSING is not the reason of the disconnection.
Disconnect Reason is 0x0016.(#define BLE_HCI_LOCAL_HOST_TERMINATED_CONNECTION 0x16 /**&amp;lt; Local Host Terminated Connection. */ in ble.hci.h)
I have found  the connection between ios phone and device established,the device try to update connection parameters.after 3(#define MAX_CONN_PARAMS_UPDATE_COUNT     3) timers,the disconnection occurs.I doubt connection parameters update is the reason of this disconnection.
how the connection parameter update event occurs during connection establishment? Both IOS phone and Android phone will update connection parameter.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to deal with BLE_GATTS_EVT_SYS_ATTR_MISSING error?</title><link>https://devzone.nordicsemi.com/thread/91394?ContentTypeID=1</link><pubDate>Tue, 04 Jul 2017 11:34:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9665ccfd-1d11-4607-ab55-e238d21a210c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;BLE_GATTS_EVT_SYS_ATTR_MISSING is typically handled inside the peer manager / device manager module (sys att are store persistently when bonded). Add the following to code to your on_ble_evt() handler if you are not using either of these modules :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    case BLE_GATTS_EVT_SYS_ATTR_MISSING:
        // No system attributes have been stored.
        err_code = sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0);
        APP_ERROR_CHECK(err_code);
        break; // BLE_GATTS_EVT_SYS_ATTR_MISSING
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>