<?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>iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62059/ios-reading-not-permitted-when-adding-dfu-charactersitics-to-application</link><description>Hi everyone, 
 I have lately had some problems with my application which has different characteristics enabled, such as nus, battery service, dfu etc... 
 The problem I am facing lately is that when I connect to my device through my iOS application I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jun 2020 21:00:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62059/ios-reading-not-permitted-when-adding-dfu-charactersitics-to-application" /><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253613?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 21:00:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eeb2920b-d606-41a8-b736-1ba52bff1feb</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Ok, thank you for all your help!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll check with the app if could debug and see what might be causing this problem. Could maybe be some custom error as you mention, but very weird that the error only occur when I enable the&amp;nbsp;DFU service though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253280?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 12:03:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6e6bf8c-9220-420d-abf9-1de34213720d</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for confirming. Could this &amp;quot;RX&amp;nbsp;Not&amp;nbsp;Permitted&amp;quot; error possibly be a custom error that&amp;#39;s raised by your application? It doesn&amp;#39;t sound like a standard error message. I don&amp;#39;t think this is related to attribute caching based on what you&amp;#39;ve said.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253273?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 11:53:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4077bfad-4246-4ec3-be82-8afe670b4ddc</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Hello Vidar,&lt;/p&gt;
&lt;p&gt;Yes, when I have enabled the DFU service then the RX not permitted seem to be triggered. If I totally remove the DFU from my application then it works without any problems and do not get&amp;nbsp;this error. This seem to still also trigger after a re-connection too the same error.&lt;/p&gt;
&lt;p&gt;I tried to remove the device totally and also the cache by turning off Bluetooth and also putting the device in airplane mode, but seem the problem will still be there when re-bonding and connecting again. However, I am able to receive nus data and send, so technically it shouldn&amp;#39;t be any problem right? or am I wrong? because if I could send and receive data through the nus service then it is working, or is this&amp;nbsp;RX&amp;nbsp;Not&amp;nbsp;Permitted error referring to something else?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253269?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 11:43:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f473b383-82f0-4f10-bd60-001c41f62845</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;The SC indication should make the receiving client (iOS) perform new service discovery and re-enable subscriptions to notification and indications.&lt;/p&gt;
&lt;p&gt;Once you have added the DFU service, do you always get the &amp;quot;rx permitted&amp;quot; error, or does it go away next time you re-connect? Have you tried to delete the bonding information and cache as I suggested?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253037?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 13:25:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4a0e9fe-050f-440e-852a-2b61a5374b8d</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;This occur inside peer_mgr.c at PM_EVT_LOCAL_DB_CACHE_APPLY_FAILED.&lt;/p&gt;
&lt;p&gt;However, it later directly triggers this event :BLE_GATTS_EVT_SC_CONFIRM&lt;/p&gt;
&lt;p&gt;I assume then that the attr table is triggering a update of the table correctly, right?&lt;/p&gt;
&lt;p&gt;The fix you have linked to has unfortunately already been made in my project and seem.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/253019?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 13:04:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8369ce57-0d84-46d8-a9f2-85682d5848b0</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="Hadi Deknache"]Ok, yes I could see the Peer managed Local DB cache fail upon reconnecting to the device. Is there any quick fix for this without having to upgrade to sdk16?[/quote]
&lt;p&gt;&amp;nbsp;Where is this error reported? It doesn&amp;#39;t sound like it is related attribute caching. That said, it should be pretty straight forward to patch the service changed bug in your current project. I&amp;#39;ve tried to explain how in this thread here:&lt;/p&gt;
&lt;p&gt;&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;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252974?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 11:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eea396cc-faf9-4dd5-9038-2b2d8ac6cde0</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Ok, yes I could see the Peer managed Local DB cache fail upon reconnecting to the device. Is there any quick fix for this without having to upgrade to sdk16?&lt;/p&gt;
&lt;p&gt;I made the change from RX to TX as mentioned in the other case and the same issue persisted unfortunately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252958?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 10:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72d1d1d7-f17c-456b-b164-4ece996c2037</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="Hadi Deknache"]I assume this need to be called upon reconnecting again, because we currently pair the device and disconnect and later again connect to the device again after disconnecting.[/quote]
&lt;p&gt;Thee Peer Manager module includes an API for issuing the service changed indication to all bonded peers, see &lt;span&gt;&lt;a title="pm_local_database_has_changed" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__peer__manager.html?cp=7_1_6_2_16_43#gaaecb7f99f58d71f085f62f5cc5267508"&gt;pm_local_database_has_changed&lt;/a&gt;&lt;/span&gt;. However, there was a problem with the implementation in SDK 15.0.0 that could in some cases lead to the notification not being sent. This is fixed in SDK 16.0.0.&lt;/p&gt;
[quote user="Hadi Deknache"]The error on custom application is triggered on only subscribes to the RX when re connecting. I have tried to get the data on the RX with the arrow down and get a value on of 0x7A.[/quote]
&lt;p&gt;&amp;nbsp;Does the custom app raise the error when it does not receive any notifications? The problem may be related to the bug you linked to in that case&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252950?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 10:00:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b6b3933-d368-499a-8d51-346fda70f028</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;I am trying to replicate the same steps in the mobile application on the nRF Connect app now, but is there some way to see errors when I do this or is it just to observe the value? The error on custom application is triggered on only subscribes to the RX when re connecting. I have tried to get the data on the RX with the arrow down and get a value on of 0x7A. Is it then working?&lt;/p&gt;
&lt;p&gt;Also I checked the know issues list and saw this one:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/34628/nus-sdk15-evt_comm_started-onconnect"&gt;devzone.nordicsemi.com/.../nus-sdk15-evt_comm_started-onconnect&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is it relateable to this same issue I am experiencing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252909?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 07:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf33b741-3770-4988-bad2-f77605979387</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for the help!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try to replicate these steps in nRF connect and get back with the result.&lt;/p&gt;
&lt;p&gt;Regarding the service changed notification I currently have enabled&amp;nbsp;&lt;span&gt;NRF_SDH_BLE_SERVICE_CHANGED. However, we pair our devices which I assume that this will bond the device and therefore cause this issue with RX not permitted.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you mention that &amp;quot;...you will have to send a service changed indication.&amp;quot; how is this done in the software? I assume this need to be called upon reconnecting again, because we currently pair the device and disconnect and later again connect to the device again after disconnecting.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252901?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 06:58:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a39bc32-7700-464b-80c1-4bb5bf2eb436</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="Hadi Deknache"]Yes I the nrf connect application and toolbox seem to be running smooth when connecting.[/quote]
&lt;p&gt;&amp;nbsp;Did you try to replicate the RX not permitted problem with nRF connect by accessing the characteristics? It would be interesting to know if this problem is only seen with your custom app.&lt;/p&gt;
[quote user="Hadi Deknache"]Is there someway to programmatically force update the table for the mobile phone (iOS)?[/quote]
&lt;p&gt;&amp;nbsp;No, it&amp;#39;s not possible on iOS, unfortunately. But you may consider enabling the NRF_SDH_BLE_SERVICE_CHANGED setting in sdk_config.h. This will make iOS perform discovery on every connection as long as it&amp;#39;s not bonded with the device. For bonded devices you will have to send a service changed indication.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252764?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 13:20:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e46555b5-6342-4ca0-a63f-bb973f7ebe5a</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Just to mention, before my characteristic services were added based on the power mode (I have 2 different modes). Based on the modes I enable some of the characteristics. However, this seem to trigger same RX not permitted&amp;nbsp;problem if I enabled different characteristics in different modes or enable all characteristics always in both modes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252756?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 13:02:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc631e2e-cb3b-4e36-bdc8-8cbe50f7ccc2</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Yes I the nrf connect application and toolbox seem to be running smooth when connecting.&lt;/p&gt;
&lt;p&gt;Is there someway to programmatically force update the table for the mobile phone (iOS)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252752?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 12:57:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1a632a0-bb85-4e1b-a545-34435b64a4d2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Ok, attribute caching shouldn&amp;#39;t be a problem if you added the DFU service last. Is it possible to interface with these services with our nRF connect app? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252750?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 12:55:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:919440db-49eb-47fa-94be-865668ff6398</guid><dc:creator>Hadi Deknache</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all thank you for the immediate support!&lt;/p&gt;
&lt;p&gt;We had the same idea that it might be something related to the attr table as you mention.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Does this even occur when the service table is consistent between the re-connetions? Does the attr table still change?&lt;/p&gt;
&lt;p&gt;Currently we have added all the serivces and last we have added the dfu afterwards, that&amp;#39;s when the problem occurs that the iOS device mentions that RX not permitted. If I don&amp;#39;t initialize the dfu service at all then the application runs without these problems.&lt;/p&gt;
&lt;p&gt;The services are added like this:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;- system_service_init&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;- battery service init&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;- nus init&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;- peer manager init&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;- and lastly dfu init&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: iOS reading not permitted when adding dfu charactersitics to application</title><link>https://devzone.nordicsemi.com/thread/252740?ContentTypeID=1</link><pubDate>Tue, 02 Jun 2020 12:42:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:008ab7b3-2a40-4a4e-b8fb-94ac4592bb9c</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It sounds like it may be related to a Bluetooth feature known as attribute caching (bt spec, vol 3, part g, section 2.5.2). This feature lets the GATT client remember attribute tables across connections and thus enables it to skip service discovery on every re-connect. The problem with attribute caching, if not accounted for, arises when you make changes to an existing attribute table (adding a new service after a DFU, etc) because the ios client will continue to access the device with the old attribute handles.&lt;/p&gt;
&lt;p&gt;Unless you know it&amp;#39;s not attribute caching, please try to clear the cache by toggling the flight mode enable button in iOS settings (delete bonding first if bonded) before re-connecting with the DFU service. This should force the phone to perform a new discovery next time it connects to the peripheral.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>