diff --git a/src/gap.h b/src/gap.h index 851499946..d6fe7877d 100644 --- a/src/gap.h +++ b/src/gap.h @@ -165,7 +165,7 @@ void gap_set_class_of_device(uint32_t class_of_device); void gap_set_default_link_policy_settings(uint16_t default_link_policy_settings); /** - * @brief Set link supervision timeout for new classic ACL links + * @brief Set link supervision timeout for outgoing classic ACL links * @param default_link_supervision_timeout * 0.625 ms, default 0x7d00 = 20 seconds */ void gap_set_link_supervision_timeout(uint16_t link_supervision_timeout); diff --git a/src/hci.c b/src/hci.c index b07461226..f25c8d5f8 100644 --- a/src/hci.c +++ b/src/hci.c @@ -2159,8 +2159,8 @@ static void event_handler(uint8_t *packet, int size){ // queue get remote feature conn->bonding_flags |= BONDING_REQUEST_REMOTE_FEATURES; - // queue set supervision timeout - if (hci_stack->link_supervision_timeout != 0){ + // queue set supervision timeout if we're master + if ((hci_stack->link_supervision_timeout != 0) && conn->role == HCI_ROLE_MASTER){ connectionSetAuthenticationFlags(conn, WRITE_SUPERVISION_TIMEOUT); }