All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services
@ 2018-08-16 20:26 Karabin, Josh
  2018-08-17  6:14 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Karabin, Josh @ 2018-08-16 20:26 UTC (permalink / raw)
  To: linux-bluetooth

This patch set makes it possible to use the experimental Adapter1
ConnectDevice DBUS API to connect to a device without also
connecting each of the devices service. This enables out-of-band
discovery of an address with the conditional behavior of calling
ConnectProfile on a discovered device.

I chose to change the default behavior of the ConnectDevice API.
It will only connect all services if you set a new ConnectAllDevices
boolean value in the dictionary argument.

I feel that that makes a better default, and with this still being
an experimental API, I'll ask to see how others feel.

This would require changes to users of the original commit:

commit c3f7b6733c5f ("adapter: Add ConnectDevice method")

I would be fine with changing the API in some other way that makes this
use case possible - this is just my preference.

You may have seen questions about this a little bit ago - this is the
follow-up:

https://marc.info/?l=3Dlinux-bluetooth&m=3D153317507925739&w=3D2
https://marc.info/?l=3Dlinux-bluetooth&m=3D153315011619515&w=3D2

George Josh Karabin (2):
  Change the experimental Adapter1 ConnectDevice api to default to not
    connecting all profiles, using an optional parameter to restore the
    current behavior.
  Update the Adapter1 API to match the change to ConnectDevice.

 doc/adapter-api.txt | 15 ++++++++++-----
 src/adapter.c       | 18 +++++++++++++++---
 2 files changed, 25 insertions(+), 8 deletions(-)

--=20
2.17.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services
  2018-08-16 20:26 [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services Karabin, Josh
@ 2018-08-17  6:14 ` Luiz Augusto von Dentz
  2018-08-17 13:35   ` [External] " Karabin, Josh
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2018-08-17  6:14 UTC (permalink / raw)
  To: Karabin, Josh; +Cc: linux-bluetooth

Hi Josh,

On Thu, Aug 16, 2018 at 11:26 PM, Karabin, Josh
<George.Karabin@honeywell.com> wrote:
> This patch set makes it possible to use the experimental Adapter1
> ConnectDevice DBUS API to connect to a device without also
> connecting each of the devices service. This enables out-of-band
> discovery of an address with the conditional behavior of calling
> ConnectProfile on a discovered device.
>
> I chose to change the default behavior of the ConnectDevice API.
> It will only connect all services if you set a new ConnectAllDevices
> boolean value in the dictionary argument.
>
> I feel that that makes a better default, and with this still being
> an experimental API, I'll ask to see how others feel.

I wonder how this is suppose to work since what you are suggesting is
to not auto-connect matching profiles/services, but that would leave
the ACL link with no channels in use (at least on BR/EDR) so the link
would disconnect anyway.


> This would require changes to users of the original commit:
>
> commit c3f7b6733c5f ("adapter: Add ConnectDevice method")
>
> I would be fine with changing the API in some other way that makes this
> use case possible - this is just my preference.
>
> You may have seen questions about this a little bit ago - this is the
> follow-up:
>
> https://marc.info/?l=linux-bluetooth&m=153317507925739&w=2
> https://marc.info/?l=linux-bluetooth&m=153315011619515&w=2
>
> George Josh Karabin (2):
>   Change the experimental Adapter1 ConnectDevice api to default to not
>     connecting all profiles, using an optional parameter to restore the
>     current behavior.
>   Update the Adapter1 API to match the change to ConnectDevice.
>
>  doc/adapter-api.txt | 15 ++++++++++-----
>  src/adapter.c       | 18 +++++++++++++++---
>  2 files changed, 25 insertions(+), 8 deletions(-)
>
> --
> 2.17.1
>



-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] Re: [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services
  2018-08-17  6:14 ` Luiz Augusto von Dentz
@ 2018-08-17 13:35   ` Karabin, Josh
  2018-08-17 14:32     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 5+ messages in thread
From: Karabin, Josh @ 2018-08-17 13:35 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBMdWl6IEF1Z3VzdG8gdm9uIERl
bnR6IFttYWls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YXQgY2FzZS4NCg0KSSBj
b3VsZCBub3RlIHRoYXQgYmVoYXZpb3IgaW4gdGhlIGFkYXB0ZXIgYXBpIGRvY3VtZW50IGlmIHlv
dSB0aGluaw0KSXQgd291bGQgaGVscCB0byBjbGFyaWZ5IHRoZSBpbnRlbnQuDQo=

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [External] Re: [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services
  2018-08-17 13:35   ` [External] " Karabin, Josh
@ 2018-08-17 14:32     ` Luiz Augusto von Dentz
  2018-08-17 14:40       ` Karabin, Josh
  0 siblings, 1 reply; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2018-08-17 14:32 UTC (permalink / raw)
  To: Karabin, Josh; +Cc: linux-bluetooth

Hi Josh,

On Fri, Aug 17, 2018 at 4:35 PM, Karabin, Josh
<George.Karabin@honeywell.com> wrote:
>> -----Original Message-----
>> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
>> Sent: Friday, August 17, 2018 2:15 AM
>
>> I wonder how this is suppose to work since what you are suggesting is
>> to not auto-connect matching profiles/services, but that would leave
>> the ACL link with no channels in use (at least on BR/EDR) so the link
>> would disconnect anyway.
>
> In my use case, the client application will wait for the appearance of
> a device object with a matching address to appear on the Device1
> interface. If that device contains a profile that that the application
> supports, it will call ConnectProfile on the device object. In general,
> the link won't time out before the application has a chance to
> respond, but it would be fine if it did - the ConnectProfile call would
> end up re-establishing the link in that case.
>
> I could note that behavior in the adapter api document if you think
> It would help to clarify the intent.

Wouldn't it be better to have a list of profiles to connect then? That
would make a nice addition to the API since ConnectProfile only
connect one profile at time, that way we could have auto-connect be a
list and in case it is empty we connect all otherwise we just connect
the profiles in that list, how about that?

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [External] Re: [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services
  2018-08-17 14:32     ` Luiz Augusto von Dentz
@ 2018-08-17 14:40       ` Karabin,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mVj
ZXNzYXJ5IGZvciBiYXNpYyBmdW5jdGlvbmFsaXR5LiBJIHdpbGwNCnN0YXJ0IG9uIHRoYXQgdG9k
YXkuDQoNCiANCg==

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-17 14:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-16 20:26 [PATCH BlueZ 0/2] Change ConnectDevice to optionally connect services Karabin, Josh
2018-08-17  6:14 ` Luiz Augusto von Dentz
2018-08-17 13:35   ` [External] " Karabin, Josh
2018-08-17 14:32     ` Luiz Augusto von Dentz
2018-08-17 14:40       ` Karabin, Josh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.