* [PATCH BlueZ] device: Fix doing sdp discovery for LE devices
@ 2012-02-03 23:06 Vinicius Costa Gomes
2012-02-03 23:17 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-02-03 23:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Vinicius Costa Gomes
If ReverseServiceDiscovery is enabled and we are connected to a LE
device, we should do a Primary Service Discovery, not a SDP discovery
(which doesn't even make sense).
---
This patch assumes that it makes sense to reuse the ReverseServiceDiscovery
functionality for LE devices.
src/device.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/device.c b/src/device.c
index 46f26d1..c7c741c 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1933,7 +1933,9 @@ int device_browse_primary(struct btd_device *device, DBusConnection *conn,
return -EIO;
}
- req->conn = dbus_connection_ref(conn);
+ if (conn)
+ req->conn = dbus_connection_ref(conn);
+
device->browse = req;
if (msg) {
@@ -2118,7 +2120,10 @@ static gboolean start_discovery(gpointer user_data)
{
struct btd_device *device = user_data;
- device_browse_sdp(device, NULL, NULL, NULL, TRUE);
+ if (device_is_bredr(device))
+ device_browse_sdp(device, NULL, NULL, NULL, FALSE);
+ else
+ device_browse_primary(device, NULL, NULL, FALSE);
device->discov_timer = 0;
--
1.7.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] device: Fix doing sdp discovery for LE devices
2012-02-03 23:06 [PATCH BlueZ] device: Fix doing sdp discovery for LE devices Vinicius Costa Gomes
@ 2012-02-03 23:17 ` Johan Hedberg
2012-02-04 12:14 ` Anderson Lizardo
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2012-02-03 23:17 UTC (permalink / raw)
To: Vinicius Costa Gomes; +Cc: linux-bluetooth
Hi Vinicius,
On Fri, Feb 03, 2012, Vinicius Costa Gomes wrote:
> If ReverseServiceDiscovery is enabled and we are connected to a LE
> device, we should do a Primary Service Discovery, not a SDP discovery
> (which doesn't even make sense).
> ---
>
> This patch assumes that it makes sense to reuse the ReverseServiceDiscovery
> functionality for LE devices.
>
>
> src/device.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
Applied. Thanks. (and yes, I do think it should be fine to "reverse
discover" LE services).
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH BlueZ] device: Fix doing sdp discovery for LE devices
2012-02-03 23:17 ` Johan Hedberg
@ 2012-02-04 12:14 ` Anderson Lizardo
0 siblings, 0 replies; 3+ messages in thread
From: Anderson Lizardo @ 2012-02-04 12:14 UTC (permalink / raw)
To: Vinicius Costa Gomes, linux-bluetooth
Hi Johan/Vinicius,
On Fri, Feb 3, 2012 at 7:17 PM, Johan Hedberg <johan.hedberg@gmail.com> wrote:
> Hi Vinicius,
>
> On Fri, Feb 03, 2012, Vinicius Costa Gomes wrote:
>> If ReverseServiceDiscovery is enabled and we are connected to a LE
>> device, we should do a Primary Service Discovery, not a SDP discovery
>> (which doesn't even make sense).
>> ---
>>
>> This patch assumes that it makes sense to reuse the ReverseServiceDiscovery
>> functionality for LE devices.
>>
>>
>> src/device.c | 9 +++++++--
>> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> Applied. Thanks. (and yes, I do think it should be fine to "reverse
> discover" LE services).
I'm fine as well, but due to the current Core spec restrictions, It is
unlikely BlueZ will act as slave/acceptor to this to be triggered on
valid scenarios. Unless we add support for single mode LE adapters, or
by "infringing" current Core spec's restriction and allow LE
connection between dual mode devices for testing purposes.
Best Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-04 12:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-03 23:06 [PATCH BlueZ] device: Fix doing sdp discovery for LE devices Vinicius Costa Gomes
2012-02-03 23:17 ` Johan Hedberg
2012-02-04 12:14 ` Anderson Lizardo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).