feat(gateway): update BLE connection parameters and enhance DALI timeout configurations
Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
@@ -455,6 +455,18 @@ int GatewayBleBridge::handleGapEvent(struct ble_gap_event* event) {
|
||||
notify_enabled_.fill(false);
|
||||
last_notify_payload_.clear();
|
||||
last_notify_at_us_ = 0;
|
||||
struct ble_gap_upd_params params = {
|
||||
.itvl_min = 15,
|
||||
.itvl_max = 15,
|
||||
.latency = 3,
|
||||
.supervision_timeout = 1000,
|
||||
.min_ce_len = 0,
|
||||
.max_ce_len = 0,
|
||||
};
|
||||
int rc = ble_gap_update_params(event->connect.conn_handle, ¶ms);
|
||||
if (rc != 0) {
|
||||
ESP_LOGW(kTag, "ble_gap_update_params rc=%d", rc);
|
||||
}
|
||||
ESP_LOGI(kTag, "BLE client connected handle=%u", conn_handle_);
|
||||
} else if (enabled_) {
|
||||
startAdvertising();
|
||||
|
||||
Reference in New Issue
Block a user