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

Issue with reconnection on DFU - Only on iOS devices

HW: MDBT50Q-P1MV2 (Raytac NRF52 module)

NRF52840_SDK_VER = 16.0.0
NRF52840_SOFTDEVICE_NUM = SD140
NRF52840_SOFTDEVICE_VER = 7.0.1 

I am finding a peculiar behavior in iOS devices. The iOS device is unable to communicate (to be precise, receive indications) from the BLE peripheral once there is a DFU on the device. Even if this DFU is done by a different smartphone, the behavior still persists. What solves the situation is, restarting the Bluetooth on the iOS devices. This happens consistently and across all iOS phones and versions. Restarting the Bluetooth from settings solves the problem and for all devices. This doesn't happen on Android

I have seen similar issues on the forum where iOS device is caching all the device services and chars info and hence if they get changed, then its a problem. But in our case, we are not changing any service or characteristic ID, still, the iPhone is unable to communicate. The only thing changing over the DFU is the device manufacturer data (part of the extended advertising info) where we are broadcasting the firmware version of the device, which gets updated over a DFU. We did a bit more debugging and found this behaviour:

1) Even if the DFU doesn't change the manufacturer data but it's just a new package (with some changes in code), the issue happens

2) If we do a DFU using the exact same package, with code and manufacturer data both being the same, then the issue doesn't happen and phones are able to connect properly after DFU

3) This issue happens only if the iPhone had previously connected to the peripheral before DFU had happened. If I take a new iPhone and connect to a peripheral post DFU, it works just fine

Parents
  • Hello,

    Do you use the "Service Changed" service on your peripheral? You can see how to use it in the ble_app_buttonless_dfu example.

    What application do you use to connect to the peripheral on the iPhone? Have you tried to connect via nRF Connect for iOS? If so, do you see the services and characteristics? Can you manually enable the notifications/indications from that app?

    Let us start with that. I don't have much more to go with yet. I guess a sniffer trace comparing of one connection with an iPhone that is working and one that is not could also be useful. You can use the nRF Sniffer for BLE to capture this.

    The issue you describe is not that the iPhone is not able to perform the DFU, but that it can't use the services after the DFU, right?

    Best regards,

    Edvin

  • Yes you got the issue exactly right. The iPhone (all iPhone's) can't use the services after DFU from a different phone (Android in our case). We did try implementing the "service" changed characteristic, by enabling the Service Changed Nordic SDK configuration value in sdk_config.h

    Code Block
    #define NRF_SDH_BLE_SERVICE_CHANGED 1

    but it didn't change the behavior. Although, since the services/characteristics haven't changed, not sure why that would be needed in the first place.

    The sniffer trace and debugging using nRF Connect, will try to do tomorrow and let you know

  • Is NRF_SDH_BLE_SERVICE_CHANGED used in nrf_sdh_ble.c in your project?

    If it is, then:

     

    Edvin said:

    What application do you use to connect to the peripheral on the iPhone? Have you tried to connect via nRF Connect for iOS? If so, do you see the services and characteristics? Can you manually enable the notifications/indications from that app?

    Let us start with that. I don't have much more to go with yet. I guess a sniffer trace comparing of one connection with an iPhone that is working and one that is not could also be useful. You can use the nRF Sniffer for BLE to capture this.

     

    BR,

    Edvin

Reply
  • Is NRF_SDH_BLE_SERVICE_CHANGED used in nrf_sdh_ble.c in your project?

    If it is, then:

     

    Edvin said:

    What application do you use to connect to the peripheral on the iPhone? Have you tried to connect via nRF Connect for iOS? If so, do you see the services and characteristics? Can you manually enable the notifications/indications from that app?

    Let us start with that. I don't have much more to go with yet. I guess a sniffer trace comparing of one connection with an iPhone that is working and one that is not could also be useful. You can use the nRF Sniffer for BLE to capture this.

     

    BR,

    Edvin

Children
No Data
Related