<?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>Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51172/service-changed-characteristic-not-enabled-on-ios</link><description>Hi, 
 My current project make use of pairing/bonding and at certain times I change the attribute table. To notify the central device about this change I have added the Service Changed Characteristic. It works good on Android after enabling notifications</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Aug 2019 07:22:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51172/service-changed-characteristic-not-enabled-on-ios" /><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205453?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 07:22:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04aacc07-4145-4a57-8126-5e472dcf051e</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;adding the service_changed_cccd and modifying the send_in_evt function solved it. Thanks.&lt;/p&gt;
&lt;p&gt;/ Anton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205431?ContentTypeID=1</link><pubDate>Thu, 22 Aug 2019 06:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:628d7935-f6b9-46b0-92d4-b4bd6d28e3f4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;No problem. Just let me know if it&amp;#39;s not working.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205223?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 08:56:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dfdc7b3-dc51-4d78-81cd-3b21459e24b0</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;I see, I was a bit unsure about that part. Thanks for clarifying!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205221?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 08:55:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e72d6d3c-0fbe-42c9-a5cc-a92dd180521e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;That is correct, the function was added in SDK 15.3.0 and is used to check whether the SC indication is enabled or if it even exists. You need to add this function in the&amp;nbsp;NRF_ERROR_INVALID_STATE case to determine if is &amp;quot;invalid state&amp;quot; because of an&amp;nbsp;ongoing MTU exchange or simply because the indication is not enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205216?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 08:44:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9dd7766-257f-4011-b863-b8757279fa45</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;I checked the source files for SDK v15.0 (gatt_cache_manager.c) and I cannot find the function service_changed_cccd function that you mention in the other thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205210?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 08:31:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e749f296-0179-443d-9f2f-f89e0327658c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I think the changes shown in the *.diff file from my last comment will be valid for v15.0.0 as well. But haven&amp;#39;t verified it here.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205027?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 12:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a8729d7-bc84-4570-8ff5-54aceedea0f2</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Yes SDK V15.0, is the fix you suggested in the other question valid for SDK v15.0?&lt;/p&gt;
&lt;p&gt;I have checked and service_changed_cccd function does not exist in SDK v15.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205026?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 12:38:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1c94684c-c5fe-4c02-890e-432c59014fd0</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="AntonHellbe"]When you say PM API to manage SC indications, do you mean pm_local_database_has_changed()?[/quote]
&lt;p&gt;Yes, that&amp;#39;s what I meant. But you need to fix the implementation as I proposed in the other thread to ensure SC indications aren&amp;#39;t dropped. Are you on an older SDK version?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/205017?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 12:09:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24e67ecb-6c6a-4b50-9f17-faac75d26c71</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;br /&gt;&lt;br /&gt;It seems like that the case, I moved the call sd_ble_gatts_service_changed from the event BLE_GAP_EVT_CONN_SEC_UPDATE to BLE_GAP_EVT_CONN_PARAM_UPDATE which comes after roughly 20 seconds after connection. Then it works without issues.&lt;/p&gt;
&lt;p&gt;Any advice how to handle this? Putting the call in BLE_GAP_EVT_CONN_PARAM_UPDATE seems abit strange.&lt;/p&gt;
&lt;p&gt;Edit:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;You can use the PM API to manage SC indications to bonded peers.&lt;/p&gt;
&lt;p&gt;When you say PM API to manage SC indications, do you mean pm_local_database_has_changed()?&lt;/p&gt;
&lt;p&gt;Also I&amp;#39;m using SDK v15.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/204998?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 11:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acd499db-6d90-4f7b-9f57-62d71fe04a31</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You may get INVALID_STATE if you try to issue a SC indication while there is an ongoing MTU exchange. Could this maybe explain why it&amp;#39;s not sent in your case? You can try to send the indication at a later time and see if you still get the error to confirm this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My iPhone 7 w iOS 12.4 enables SC indication after the bond is established.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Edit: this thread may be relevant as well:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/46633/peer-manager-silently-drop-service-changed-indications-if-an-att-mtu-exchange-was-happening/204968#204968"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/46633/peer-manager-silently-drop-service-changed-indications-if-an-att-mtu-exchange-was-happening/204968#204968&lt;/a&gt;. You can use the PM API to manage SC indications to bonded peers.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/204950?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 08:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdfa9cfc-d9b6-472a-bf3f-83fe599f6fce</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Further investigation shows that it happens regardless of reset or not.&lt;br /&gt;&lt;br /&gt;I pair / bond using my iPhone 6s running iOS 12.4, after pairing/bonding is complete my application running on the nRF52832 sends one notification successfully. Then the iPhone gets disconnected regardless, when I reconnect I receive NRF_ERROR_INVALID_STATE when trying to send Service Changed notifications&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Service Changed Characteristic not enabled on iOS</title><link>https://devzone.nordicsemi.com/thread/204937?ContentTypeID=1</link><pubDate>Tue, 20 Aug 2019 08:20:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b84fdf42-22d0-4ab8-bc2d-f31d5c0baf5a</guid><dc:creator>AntonHellbe</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I think I have found the issue. After pairing/bonding another CPU resets the nRF52832, but before that happens I can see that the application can send one notification. When the nRF52832 boots up again and I reconnect I receive error NRF_ERROR_INVALID_STATE. It seems like the CCCDs are not saved on Central side it seems like.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>