From 33258f8cb53579cada2f3b11f9ece695762fe545 Mon Sep 17 00:00:00 2001 From: "injun.yang" Date: Mon, 10 Aug 2020 10:51:27 +0900 Subject: [PATCH] Update LE connection interval after GATT connection completed [Model] All [BinType] AP [Customer] OPEN [Issue#] N/A [Request] Internal [Occurrence Version] N/A [Problem] Connection interval 7.5ms maintained [Cause & Measure] After GATT connection completed, update interval [Checking Method] gatt connection [Team] Convergence BT [Developer] Injun Yang [Solution company] Samsung [Change Type] Specification change Change-Id: Ia48fe3ac6290018631117e322d100d5d194e4cc3 Signed-off-by: injun.yang Signed-off-by: Wootak Jung --- bt-service/services/device/bt-service-core-device.c | 7 +++++++ bt-service/services/gatt/bt-service-gatt.c | 2 ++ bt-service/services/include/bt-service-core-device.h | 4 ++++ 3 files changed, 13 insertions(+) diff --git a/bt-service/services/device/bt-service-core-device.c b/bt-service/services/device/bt-service-core-device.c index 50f2731..180fab4 100644 --- a/bt-service/services/device/bt-service-core-device.c +++ b/bt-service/services/device/bt-service-core-device.c @@ -2451,6 +2451,13 @@ static int __bt_le_set_conn_parameter(const char *address, return gattc_conn_param_update(&dev_addr, min, max, latency, to); } +int _bt_le_set_default_connection_param(const char *address, + float interval_min, float interval_max, + guint16 latency, guint16 time_out) +{ + return __bt_le_set_conn_parameter(address, interval_min, interval_max, latency, time_out); +} + int _bt_remove_le_conn_param_info(const char *address, const char *sender) { bt_connected_le_dev_t *dev = NULL; diff --git a/bt-service/services/gatt/bt-service-gatt.c b/bt-service/services/gatt/bt-service-gatt.c index 6f87e6f..ad1e65c 100644 --- a/bt-service/services/gatt/bt-service-gatt.c +++ b/bt-service/services/gatt/bt-service-gatt.c @@ -3066,6 +3066,8 @@ static void __bt_handle_client_connected(event_gattc_conn_t *event_data) BT_ERR("Local GATT Client connected event for addr[%s], but device is in connected list already", address); __bt_add_mtu_gatt_device(address); + + _bt_le_set_default_connection_param(address, 30, 35, 0, 6000); } else BT_ERR("GATT Client Connection failed!!"); diff --git a/bt-service/services/include/bt-service-core-device.h b/bt-service/services/include/bt-service-core-device.h index 54e3785..7b07ce4 100755 --- a/bt-service/services/include/bt-service-core-device.h +++ b/bt-service/services/include/bt-service-core-device.h @@ -40,6 +40,10 @@ int _bt_le_connection_update(const char *sender, float interval_min, float interval_max, guint16 latency, guint16 time_out); +int _bt_le_set_default_connection_param(const char *address, + float interval_min, float interval_max, + guint16 latency, guint16 time_out); + #ifdef TIZEN_FEATURE_BT_OBEX bluetooth_trusted_profile_t _bt_get_trusted_profile_enum(const char *uuid); #endif -- 2.7.4