@@ -7322,3 +7322,17 @@ void btd_device_foreach_ad(struct btd_device *dev, bt_ad_func_t func,
{
bt_ad_foreach_data(dev->ad, func, data);
}
+
+void btd_device_set_conn_param(struct btd_device *device, uint16_t min_interval,
+ uint16_t max_interval, uint16_t latency,
+ uint16_t timeout)
+{
+ btd_adapter_store_conn_param(device->adapter, &device->bdaddr,
+ device->bdaddr_type, min_interval,
+ max_interval, latency,
+ timeout);
+ btd_adapter_load_conn_param(device->adapter, &device->bdaddr,
+ device->bdaddr_type, min_interval,
+ max_interval, latency,
+ timeout);
+}
@@ -204,3 +204,6 @@ typedef void (*bt_device_ad_func_t)(void *data, void *user_data);
void btd_device_foreach_ad(struct btd_device *dev, bt_device_ad_func_t func,
void *data);
+void btd_device_set_conn_param(struct btd_device *device, uint16_t min_interval,
+ uint16_t max_interval, uint16_t latency,
+ uint16_t timeout);
From: "Felipe F. Tonello" <eu@felipetonello.com> This function allows plugins to set the connection parameters of the respective btd_device object. It is useful for GAP Peripheral Preferred Connection Parameters characteristic for example. --- src/device.c | 14 ++++++++++++++ src/device.h | 3 +++ 2 files changed, 17 insertions(+)