This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOS reading not permitted when adding dfu charactersitics to application

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 am getting rx not permitted for nus. This occurs only when I have DFU enabled. If I would skip to initialize and add DFU my application doesn't seem to get this problem anymore. If I add it back again then the problem occurs again. Is there something weird that I am currently doing?Is there some specific order that I should initialize my device in. 

I currently initialize the DFU after have initialized all the other characteristic services.

I am currently using sdk15.0 and softdevice 6.0

  • Hadi Deknache said:
    Yes I the nrf connect application and toolbox seem to be running smooth when connecting.

     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.

    Hadi Deknache said:
    Is there someway to programmatically force update the table for the mobile phone (iOS)?

     No, it'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's not bonded with the device. For bonded devices you will have to send a service changed indication. 

  • Hi Vidar,

    Thank you for the help!

    I'll try to replicate these steps in nRF connect and get back with the result.

    Regarding the service changed notification I currently have enabled 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.

    When you mention that "...you will have to send a service changed indication." 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.

  • Hi again,

    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?

    Also I checked the know issues list and saw this one:

    devzone.nordicsemi.com/.../nus-sdk15-evt_comm_started-onconnect

    Is it relateable to this same issue I am experiencing?

  • Hi,

    Hadi Deknache said:
    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.

    Thee Peer Manager module includes an API for issuing the service changed indication to all bonded peers, see pm_local_database_has_changed. 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.

    Hadi Deknache said:
    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.

     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

  • 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?

    I made the change from RX to TX as mentioned in the other case and the same issue persisted unfortunately.

Related