Skip to content

Commit

Permalink
softdevice: add support for connection timeout on connect
Browse files Browse the repository at this point in the history
This adds support for the "connection supervision timeout", basically
the connection timeout while the connection is active (as opposed to
while connecting).
  • Loading branch information
aykevl committed Jan 5, 2024
1 parent 163a416 commit 8325641
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gap_nrf528xx-central.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ func (a *Adapter) Connect(address Address, params ConnectionParams) (Device, err
slave_latency: 0, // mostly relevant to connected keyboards etc
conn_sup_timeout: 200, // 2 seconds (in 10ms units), the minimum recommended by Apple
}
if params.Timeout != 0 {
connectionParams.conn_sup_timeout = uint16(params.Timeout / 16)
}

// Flag to the event handler that we are waiting for incoming connections.
// This should be safe as long as Connect is not called concurrently. And
Expand Down

0 comments on commit 8325641

Please sign in to comment.