mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-01 04:20:33 +00:00
gap: allow to disable link supervision timeout
This commit is contained in:
parent
ec61abe886
commit
d821984b1f
@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- HFP: Emit Audio Connection Released on SLC Release, e.g. remote power off
|
||||
- GAP: calculate IO Cap AuthReq Bondable Mode based on `gap_ssp_set_authentication_requirement` and `gap_set_bondable_mode`
|
||||
- GAP: only store link key for ssp if remote side has set bondable in io cap auth requirements as well
|
||||
- GAP: allow to disable link supervision timeout
|
||||
- HFP HF: only emit single event for RING and AG Status updates
|
||||
- HFP AG: fix audio connection setup for in-band ringtone on incoming connection
|
||||
|
||||
|
@ -137,6 +137,11 @@ typedef enum {
|
||||
INQUIRY_SCAN_MODE_INTERLACED,
|
||||
} inquiry_scan_type_t;
|
||||
|
||||
/**
|
||||
* Link Supervision Timeout Default, 0x7d00 * 0.625ms = 20s
|
||||
*/
|
||||
#define HCI_LINK_SUPERVISION_TIMEOUT_DEFAULT 0x7D00
|
||||
|
||||
/**
|
||||
* HCI Transport
|
||||
*/
|
||||
|
@ -188,7 +188,7 @@ void gap_set_allow_role_switch(bool allow_role_switch);
|
||||
|
||||
/**
|
||||
* @brief Set link supervision timeout for outgoing classic ACL links
|
||||
* @param default_link_supervision_timeout * 0.625 ms, default 0x7d00 = 20 seconds
|
||||
* @param default_link_supervision_timeout * 0.625 ms, default 0x7d00 = 20 seconds, 0 = no link supervision timeout
|
||||
*/
|
||||
void gap_set_link_supervision_timeout(uint16_t link_supervision_timeout);
|
||||
|
||||
|
@ -2494,7 +2494,7 @@ static void event_handler(uint8_t *packet, uint16_t size){
|
||||
conn->bonding_flags |= BONDING_REQUEST_REMOTE_FEATURES_PAGE_0;
|
||||
|
||||
// queue set supervision timeout if we're master
|
||||
if ((hci_stack->link_supervision_timeout != 0) && (conn->role == HCI_ROLE_MASTER)){
|
||||
if ((hci_stack->link_supervision_timeout != HCI_LINK_SUPERVISION_TIMEOUT_DEFAULT) && (conn->role == HCI_ROLE_MASTER)){
|
||||
connectionSetAuthenticationFlags(conn, WRITE_SUPERVISION_TIMEOUT);
|
||||
}
|
||||
|
||||
@ -3215,6 +3215,10 @@ void hci_init(const hci_transport_t *transport, const void *config){
|
||||
|
||||
// Errata-11838 mandates 7 bytes for GAP Security Level 1-3
|
||||
hci_stack->gap_required_encyrption_key_size = 7;
|
||||
|
||||
// Link Supervision Timeout
|
||||
hci_stack->link_supervision_timeout = HCI_LINK_SUPERVISION_TIMEOUT_DEFAULT;
|
||||
|
||||
#endif
|
||||
|
||||
// Secure Simple Pairing default: enable, no I/O capabilities, general bonding, mitm not required, auto accept
|
||||
|
Loading…
x
Reference in New Issue
Block a user