Thread (6 messages) 6 messages, 2 authors, 2016-09-06

Re: [PATCH BlueZ 1/2] core/device: Fix attempting to connect to random address over BR/EDR

flat view

From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Date: 2016-09-05 09:46:41

Hi,

On Fri, Sep 2, 2016 at 3:49 PM, Luiz Augusto von Dentz
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Luiz Augusto von Dentz <redacted>

BR/EDR don't have the concept of random addresses so the only option is
to over LE in that case.
---
 src/device.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/src/device.c b/src/device.c
index fb766d1..b8556f1 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1748,6 +1748,10 @@ static uint8_t select_conn_bearer(struct btd_device *dev)
        else if (!dev->bredr_state.bonded && dev->le_state.bonded)
                return dev->bdaddr_type;

+       /* If the address is private it can only be connected over LE */
+       if (device_address_is_private(dev))
+               return dev->bdaddr_type;
+
        if (dev->bredr_seen) {
                bredr_last = current - dev->bredr_seen;
                if (bredr_last > SEEN_TRESHHOLD)
--
2.7.4
Applied.


-- 
Luiz Augusto von Dentz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help