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

iOS compatibillity with SDK13

Hi,

I migrated an nrf52832 s132 application from SDK12.2.0 (sd v3) to SDK13 (sd v4.0.2). On the iPad and iPod Touch the NRF Connect app does not discover the services I added. However on Android the NRF Connect app detects all services.

The iOS app can connect to the device, however not a single service is visible. Andriod does not have this issue.

Is this something known to Nordic?

  • I saw in the peripheral ble template app the following function being used: nrf_ble_gatt_on_ble_evt(&m_gatt, p_ble_evt); inside ble_evt_dispatch. This function wasn't used in the SDK12 template project. Maybe this is the issue. The GATT module seems to be implemented as a standalone module.

  • Okay, I found my problem.

    I migrated from SDK12 to SDK13. One quite big difference which was not mentioned in the migration documentation is the change in the GATT module. This module needs to be implemented separate.

    If you migrated to SDK13 following the migration documents and everything compiles, check if the Android version of NRF Connect can read your services.

    If this is possible you are nearly there, just add the following code:

    1. Add #include "nrf_ble_gatt.h" to your includes
    2. Add nrf_ble_gatt.c to your sources
    3. Initialize the GATT module:
    void gatt_init(void)
    {
        ret_code_t err_code = nrf_ble_gatt_init(&m_gatt, NULL);
        APP_ERROR_CHECK(err_code);
    }
    
    1. Call gatt_init() before advertise_init()

    2. Add nrf_ble_gatt_on_ble_evt(&m_gatt, p_ble_evt); To your ble_evt_dispatch function.

    3. Add static nrf_ble_gatt_t m_gatt; (the GATT instance) as a global variable

    4. Compile and enjoy

    This worked for me. I allow only a single connection on my peripheral, so I did not bother with the new tag cfg functionality of the new SDK.

    I hope you find this useful.

  • @Tostikoning, Thanks for updating the case, glad to hear you figured it out. I guess the problem is that the new SD now requires that the application responds to the Data Length Update Procedure. Mentioned in the SD migration document. I'm guessing; the reason why it works with Android, is because the android device you are testing with doesn't negotiate the MTU size?

  • hi, have you try sdk14.2? I meet the same problem when I try to upgrade mine from sdk12.2 to sdk14.2. and I try what you said, but still not works.

Related