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

IOS devices suddenly can no longer connect or discover services

We have a custom BLE service with several Gatt characteristics using the nrf52832 SDK 15. On occasion a device is no longer able to connect to IOS devices. This occurs after several successful connections. It seems to be more frequent with iPhone x and iPhone 11.

When scanning via nrfConnect the device is discoverable, but not connectable, and the BLE services are not found (see attached image below). The same device is connectable with an an Android device.

We are handling both BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST and BLE_GAP_EVT_PHY_UPDATE_REQUEST in the event handler. In previous similar cases this seemed to be the issue. We are also running fstorage concurrently, however no flash memory saves are performed while the BLE radio is active. Initialization of the fstorage instance is completed before the BLE service is initialized.

I have also seen that IOS caching has been an issue in the past, however our device is not stored in the bluetooth device list (i.e. the device cannot be 'forgotten').

Parents
  • Hi, 

    Could you take a screenshot on nRF Connect when scanning for the device that "discoverable but not connectable". What happened when you try to connect ? Could you show the advertising packet detail ? 
    Please try capture a sniffer trace as well. 

  • I have attached an image of the advertising scans as well as a successfully connected device. I have tried a few different advertising intervals without any noticeable change in the behavior.

    •  What happened when you try to connect ?

    Connection is not available, as you can see the 'Connect' button is grayed out and disabled on nrfConnect. We can't connect via our app either.

    Previously we were getting more of these issues when we didn't leave a delay between initializing the fstorage instance and the BLE service. I now have a 500 ms delay between the two which has reduced the frequency of these issues. However adding a delay is not ideal for our application as we need some events the occur right after the device awakes from sleep mode.

    I will try and capture a sniffer trace, the issue is sporadic and occurs with some of our beta users so it may take  little while before I am able to capture this data.

  • I think should clarify here. The nRF Connect app display a node as connectable or not connectable only base on the advertising flags.
    This should not related to any of the behavior when it's connected or if you support only one peripheral connection. 
    And this flag should be the same between devices, so when you see it's non-connectable on one phone it should be the same on other phone. It's very strange that you can connect from other phones. 

    Do you advertise after you have a connection to a central device ? If you do advertise and if you configure to support only one peripheral connection then the softdevice will only allow you to advertise with non-connectable flag. 

    Please try capture a sniffer trace when you see it's "non-connectable" . 

  • I have attached a sniffer log from one of the devices not is not connection to IOS. Same behavior as described previously: device is discoverable, it is connectable with android app and nrf connect, it is not connectable with IOS app or IOS nrfConnect. This device also had a device name corruption issue where the device name is empty. We have seen this correlates with the IOS connectivity issue, but we have also had devices with non-empty device names not connect.

    CC27A8F9F70F IOS not connectable log.pcapng

  • Hi Rberanek,

    From the sniffer trace I don't see any problem with the advertising packet. It's advertise as connectable packet.
    I give an example here of a non connectable packet: 
     


    You can find the PDU type of 0x02 when in your sniffer trace it's 0x00 meaning it's a normal connectable advertising packet:

    Have you tried to use another phone to check if it shows the device as connectable or not ? Please try to restart the phone as well. 
    In addition, please test with other BLE app, for example Lightblue app .

  • Yes we have tried with multiple phones. Once the issue occurs it seems all iPhones are not connectable. We have seen the issue on iPhones 6,8,X,11. Restarting the phone did not help. The device remains connectable with android phones.

    The iPhones do no have any issues connecting to new devices or other application examples. The issue seems to happen sporadically within a week or two of use.

  • I suspect it can be an issue with our nRF Connect app, could you try testing with other app ? For example LightBlue ?

Reply Children
Related