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

nRF52 SDK16 Service Discovery doesn't happen on iOS

Hi, I'm having some issues with migrating from SDK12.1 to SDK16 while discovering services.

It seems to connect to Android without much issue, but on iOS the connection fails. From running testing connecting from a linux with a BLE connection through node js it looks like the services are not discovered. I don't see any information about how to enable service discovery on connection or how to migrate from 12.1 to 16.0.0 on the forums, in the examples or in the documentation.

Does anyone have any suggestions?

  • I discovered the issue it was due to not handling the BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST case properly. It was not responding with an accurate MTU_SIZE.

            case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
                printf("Exchange MTU Request\n");
                err_code = sd_ble_gatts_exchange_mtu_reply(p_ble_evt->evt.gatts_evt.conn_handle,
                                                           NRF_BLE_MAX_MTU_SIZE);
                APP_ERROR_CHECK(err_code);
                break; // BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST

Related