diff options
author | Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com> | 2014-11-25 11:13:12 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-11-27 18:21:41 +0100 |
commit | e95e7f66bcfea26b1ea3653667ef31d833804bd4 (patch) | |
tree | 80285c7bcd65574084e3487356e076174b1bbfe5 /android/client | |
parent | d20ab695ac53802fa0fd312b998dd09fdb17c62f (diff) | |
download | bluez-e95e7f66bcfea26b1ea3653667ef31d833804bd4.tar.gz |
android/client: Add support for gattc configure_mtu
Diffstat (limited to 'android/client')
-rw-r--r-- | android/client/if-gatt.c | 23 |
1 files changed, 23 insertions, 0 deletions
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[] = { " [<include_txpower>] <min_interval> <max_interval>" " <appearance> [<manufacturer_data>] [<service_data>]" " [<service_uuid>]"), + STD_METHODCH(configure_mtu, "<conn_id> <mtu>"), #else STD_METHODCH(scan, "<client_if> [1|0]"), STD_METHODCH(connect, "<client_if> <addr> [<is_direct>]"), |