/* Called when service discovery of the specified peer has completed.  */
static void wm_ble_client_demo_on_disc_complete(const struct peer *peer, int status, void *arg)
/* Called when service discovery of the specified peer has completed.  */
static void wm_ble_client_demo_on_disc_complete(const struct peer *peer, int status, void *arg)
{
    if (status != 0) {
        TLS_BT_APPL_TRACE_ERROR("Error: Service discovery failed; status=%d "
                           "conn_handle=%d\r\n", status, peer->conn_handle);
        ble_gap_terminate(peer->conn_handle, BLE_ERR_REM_USER_CONN_TERM);
        tls_ble_gap_scan(WM_BLE_SCAN_PASSIVE, true);
        return;
    }
    TLS_BT_APPL_TRACE_API("Service discovery complete; status=%d "
                       "conn_handle=%d\r\n", status, peer->conn_handle);
    ble_gattc_exchange_mtu(peer->conn_handle, wm_ble_client_demo_on_mtu, NULL);
    wm_ble_client_demo_read_write_subscribe(peer);
}