]> sigrok.org Git - libsigrok.git/commit
bt/bt_bluez: Implement retry if rfcomm sockets are busy
authorAndreas Sandberg <redacted>
Mon, 24 Feb 2020 22:46:35 +0000 (22:46 +0000)
committerUwe Hermann <redacted>
Sat, 11 Apr 2020 14:00:52 +0000 (16:00 +0200)
commit4704f64551dd917c2616b4162e7e816fb57113da
treeb80da64846d6c23ba315facfa86fe6415ef74a23
parent1d657f47be01b2194f6caa7c55d95fc869bd86dc
bt/bt_bluez: Implement retry if rfcomm sockets are busy

There are cases where the connect() call returns EBUSY when trying to
connect to a device. This has been observed when sampling an RDTech
UM24C. In this case, scanning the device works fine. However, when
sampling the device, Sigrok first scans the device, then closes the
connection and re-opens it to sample the device. If the close/open
calls happen in close successions, the Bluetooth stack sometimes
returns EBUSY.

Work around this issue by retrying if the connect() returns EBUSY.

Signed-off-by: Andreas Sandberg <redacted>
src/bt/bt_bluez.c