RE: [External] [PATCH BlueZ v2 0/2] Change ConnectDevice to connect a subset of services

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Luis,

> -----Original Message-----
> From: Karabin, Josh
> Sent: Friday, August 31, 2018 10:26 AM
> To: 'Luiz Augusto von Dentz' <luiz.dentz@xxxxxxxxx>
> Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> Subject: RE: [External] [PATCH BlueZ v2 0/2] Change ConnectDevice to
> connect a subset of services
> 
> > From: Luiz Augusto von Dentz [mailto:luiz.dentz@xxxxxxxxx]
> > Sent: Friday, August 31, 2018 10:04 AM
> > To: Karabin, Josh <George.Karabin@xxxxxxxxxxxxx>
> > Cc: linux-bluetooth@xxxxxxxxxxxxxxx
> > Subject: Re: [External] [PATCH BlueZ v2 0/2] Change ConnectDevice to
> > connect a subset of services
> >
> > Hi Josh,
> >
> > On Fri, Aug 31, 2018 at 4:58 PM, Luiz Augusto von Dentz
> > <luiz.dentz@xxxxxxxxx> wrote:
> > > Hi Josh,
> > >
> > > On Fri, Aug 31, 2018 at 4:47 PM, Karabin, Josh
> > > <George.Karabin@xxxxxxxxxxxxx> wrote:
> > >> Hello all - I would like to point your attention to this
> > >> patch set again. I realize it's more complicated than v1, and likely
> > >> needs more time for review.
> > >
> > > Could you please add description to each patch, also is your email
> correct?
> 
> Will do. My email Is correct - Josh is my middle name and the name
> that I commonly use, but our corporate address assignment defaults to
> my first name.
> 
> 
> > I forgot to mention that the documentation should come first and
> > perhaps it makes send that we use ConnectDevice in bluetoothctl, may
> > add an optional parameter for UUIDs list which in case it is set the
> > use Adapter.ConnectDevice instead of Device.Connect.
> 
> Will do. Thanks.

I made the change to the client that you recommended, but that
created another question for me. The master branch of the
ConnectDevice method has a limitation where it will reject
an attempt to connect a device if the Adapter already knows
about it (e.g., it has an object path for the device).

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/adapter.c?h=5.50#n3280

The only reason that I can see for that limitation is that if
it is removed, subsequent attempts to connect to a known
device end up failing due to dev->browse still being set at
the point where the services try to connect:

https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/src/device.c?h=5.50#n1813

This makes me wary about adding the optional UUID code to
the bluetoothctl client's "connect" command. Most connect
calls would always work, but if you added a UUID list it would
only work if the device was unknown.

This makes me inclined to want to expose ConnectDevice
and its UUID list as its own bluetoothctl command. Another
option would be to remove ConnectDevice's limitation of
only connecting to a device if it is not already known, but
that is a significantly bigger job.

I have branches ready for both your original suggestion
(adding the UUID path to the client's connect command)
as well as adding a new "adapter-connect" command
to the client that will explicitly call ConnectDevice on
the adapter interface, both with and without UUIDs.

I am curious if you think either of them are
worth pursing, or if you have any better suggestions.

Thanks!
 
> > >>> From: linux-bluetooth-owner@xxxxxxxxxxxxxxx [mailto:linux-
> bluetooth-
> > >>> owner@xxxxxxxxxxxxxxx] On Behalf Of Karabin, Josh
> > >>> Sent: Tuesday, August 21, 2018 11:37 AM
> > >>> To: linux-bluetooth@xxxxxxxxxxxxxxx
> > >>> Subject: [External] [PATCH BlueZ v2 0/2] Change ConnectDevice to
> > connect a
> > >>> subset of services
> > >>>
> > >>> 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 device's services. This enables the out-of-band
> > >>> discovery of an address and expected service set without a
> > >>> general discovery procedure.
> > >>>
> > >>> This patch builds on this previous commit:
> > >>>
> > >>> commit c3f7b6733c5f ("adapter: Add ConnectDevice method")
> > >>>
> > >>> and review feedback on an earlier patch here:
> > >>>
> > >>> https://marc.info/?l=linux-bluetooth&m=153451634605069&w=2
> > >>>
> > >>> George Josh Karabin (2):
> > >>>   Allow Adapter1 ConnectDevice method to connect a limited set of
> > >>>     service UUIDs
> > >>>   Update the Adapter1 API to match the change to ConnectDevice.
> > >>>
> > >>> George Josh Karabin (2):
> > >>>   Allow Adapter1 ConnectDevice method to connect a limited set of
> > >>>     service UUIDs
> > >>>   Update the Adapter1 API to match the change to ConnectDevice.
> > >>>
> > >>>  doc/adapter-api.txt | 16 +++++---
> > >>>  src/adapter.c       | 91
> > +++++++++++++++++++++++++++++++++++++++++--
> > >>> --
> > >>>  2 files changed, 95 insertions(+), 12 deletions(-)
> > >>>
> > >>> --
> > >>> 2.17.1
> > >
> > >
> > >
> > > --
> > > Luiz Augusto von Dentz
> >
> >
> >
> > --
> > Luiz Augusto von Dentz




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux