]> sigrok.org Git - libsigrok.git/commit
bt: apply 20s timeout to BLE connect(2) attempts
authorGerhard Sittig <redacted>
Tue, 29 Oct 2019 16:42:34 +0000 (17:42 +0100)
committerGerhard Sittig <redacted>
Tue, 29 Oct 2019 16:42:34 +0000 (17:42 +0100)
commit113de3a57290347b652c93eebc7ec0b32b1bea6d
treedeeca9412cf52869eaea5b02494d9c00b4087137
parent0f92d5db036e266a04edfdfe5b7c8cefd7ff2193
bt: apply 20s timeout to BLE connect(2) attempts

Even working BLE devices won't immediately succeed in the first call to
connect(2), which is why the "in progress" phase was added. But absent
peers made the previous implementation try forever, getting stuck in the
sr_bt_connect_ble() call.

Try to balance these two constraints. Do terminate BLE connect attempts
after a generous timeout. When this 20s period passed, there probably is
a configuration error or unresponsive peer. Yet the timeout needs to be
in this ballpark to not erroneously fail for working setups.
src/bt/bt_bluez.c