Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

iOS device cannot find my custom BLE service

I am trying to set up a peripheral connection between an nRF-52840 and an iPhone via my team's iOS app. The board connects normally via the Nordic Connect app and shows the expected service and characteristic UUIDs with the descriptions "Unknown Service" and "Unknown Characteristic". However, when I try to connect on the app, it says that it cannot find any services. I have set the UUID for both the custom service as well as the custom characteristic to be equal to an older board that can already connect to the app, but for some reason the app is still unable to find any services that I advertise.

I am using the latest version of the nRF5-SDK with an s140 SoftDevice.

Parents
  • Hi,

    If I understand correctly you are testing the same example on your nRF52840 DK with the nRF Connect for Mobile app and an app you have created, and the service and characteristic shows up as expected in the nRF Connect app, but not your own iOS app?

    This might be related to attribute caching, as iOS use this feature so the phone can skip service discovery if it re-connects to a known device. Because of this, if you reprogram your device, changes in services and characteristics might not show up unless you clear the cache. You can clear it with the following steps:

    • Close the app completely
    • Go to iOS settings -> Bluetooth and make sure your device is not in the "My device" list. If it is, remove it
    • Toggle Flight mode or reboot the phone

    The cache should be cleared after this, so try to connect again and see if the service and characteristic show up now.

    Best regards,

    Marte

Reply
  • Hi,

    If I understand correctly you are testing the same example on your nRF52840 DK with the nRF Connect for Mobile app and an app you have created, and the service and characteristic shows up as expected in the nRF Connect app, but not your own iOS app?

    This might be related to attribute caching, as iOS use this feature so the phone can skip service discovery if it re-connects to a known device. Because of this, if you reprogram your device, changes in services and characteristics might not show up unless you clear the cache. You can clear it with the following steps:

    • Close the app completely
    • Go to iOS settings -> Bluetooth and make sure your device is not in the "My device" list. If it is, remove it
    • Toggle Flight mode or reboot the phone

    The cache should be cleared after this, so try to connect again and see if the service and characteristic show up now.

    Best regards,

    Marte

Children
Related