From e95e7f66bcfea26b1ea3653667ef31d833804bd4 Mon Sep 17 00:00:00 2001 From: Grzegorz Kolodziejczyk Date: Tue, 25 Nov 2014 11:13:12 +0100 Subject: [PATCH] android/client: Add support for gattc configure_mtu --- android/client/if-gatt.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index 42dd11975..9681bc244 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -1835,6 +1835,28 @@ static void set_adv_data_p(int argc, const char **argv) service_data_len, (char *) service_data, service_uuid_len, (char *) service_uuid); } + +/* configure mtu */ +static void configure_mtu_c(int argc, const char **argv, + enum_func *enum_func, void **user) +{ + if (argc == 2) { + *user = conn_id_str; + *enum_func = enum_one_string; + } +} + +static void configure_mtu_p(int argc, const char **argv) +{ + int conn_id; + int mtu; + + RETURN_IF_NULL(if_gatt); + VERIFY_CONN_ID(2, conn_id); + VERIFY_MTU(3, mtu); + + EXEC(if_gatt->client->configure_mtu, conn_id, mtu); +} #endif /* get_device_type */ @@ -1918,6 +1940,7 @@ static struct method client_methods[] = { " [] " " [] []" " []"), + STD_METHODCH(configure_mtu, " "), #else STD_METHODCH(scan, " [1|0]"), STD_METHODCH(connect, " []"), -- 2.47.3