Re: BlueZ 5.50: Browsing local GATT table

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

 



On Mon, Jan 21, 2019 at 3:02 PM Luiz Augusto von Dentz
<luiz.dentz@xxxxxxxxx> wrote:
>
> Hi Youssif,
> On Mon, Jan 21, 2019 at 3:57 PM Youssif Saeed
> <youssif.am.saeed@xxxxxxxxx> wrote:
> >
> > Hi Luiz
> >
> > On Mon, Jan 21, 2019 at 12:12 PM Luiz Augusto von Dentz
> > <luiz.dentz@xxxxxxxxx> wrote:
> > >
> > > Hi Youssif,
> > >
> > > On Mon, Jan 21, 2019 at 1:05 PM Youssif Saeed
> > > <youssif.am.saeed@xxxxxxxxx> wrote:
> > > >
> > > > Hi
> > > >
> > > > Is there a tool/utility for browsing the local GATT table. I have so
> > > > far used "bluetoothctl info" as follows:-
> > > >
> > > > [bluetooth]menu gatt
> > > > [bluetooth]register-service 0xFFFF
> > > > [bluetooth]register-characteristic 0xAAAA read,write
> > > > [bluetooth]register-application
> > > > [bluetooth]back
> > > > [bluetooth]info
> > > > Controller 00:16:A4:09:31:11 (public)
> > > > Name: linuxvm
> > > > Alias: linuxvm
> > > > Class: 0x000c0000
> > > > Powered: yes
> > > > Discoverable: no
> > > > Pairable: yes
> > > > UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
> > > > UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
> > > > UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
> > > > UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
> > > > UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
> > > > UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
> > > > UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
> > > > UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
> > > > UUID: Unknown                   (0000ffff-0000-1000-8000-00805f9b34fb)
> > > > UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
> > > > Modalias: usb:v1D6Bp0246d0532
> > > > Discovering: no
> > > >
> > > > However, this does not show the list of characteristics/descriptors
> > > > and their handles which is what I am after.
> > > >
> > > > I am using BlueZ 5.50 on an Ubuntu machine running Linux 4.15.0-43-generic.
> > >
> > > I guess you would be after the registered local attributes, command
> > > info doesn't print that only the UUID of the services, we could have
> > > then as part of list-attributes perhaps but it would only show the
> > > attributes register by that instance of bluetoothctl nothing else. As
> > > for the handles that is currently not exposed to the application, do
> > > you require them perhaps to restore them in the same location?
> > >
> > > --
> > > Luiz Augusto von Dentz
> >
> > Thanks for getting back to me. Yes I am after the registered local
> > attributes. We're working on PTS testing the BlueZ stack and a few
> > tests require you to submit handles for the local GATT
> > services/characteristics, which is why having this would be very
> > useful. In my personal opinion the output to the deprecated "gatttool
> > primary/characteristics/descriptors" is ideal for displaying all the
> > necessary information. Something similar to this but for the local
> > GATT table can be very beneficial for future users even outside the
> > scope of PTS testing.
>
> I will need to look into that, we actually intend to have this all
> automated with auto-pts:
>
> https://github.com/intel/auto-pts
>
> Though that is not complete for BlueZ, only Zephyr, and even in case
> of Zephyr we hardcoded the handles, but I agree it is better to
> somehow notify the handle back to the application. Also another thing
> that we might have to improve in the future is a way to pin services
> so even if one reboot the system, or just restart bluetoothd, the
> application can have its services in the same region once again.
>
> --
> Luiz Augusto von Dentz

Thanks for the link. I've seen the auto-pts project and it's quite
impressive. It's definitely helpful when doing PTS tests but as you
said it is missing a big portion for the BlueZ stack.

Is there a place where we can post feature requests and unconfirmed
bugs, or is this mailing list the best location for that?

I think it will be handy as well to report the handle back for remote
services/characteristics. As an example, this is the response for
"list-attributes":-

Primary Service
        /org/bluez/hci0/dev_00_1B_DC_08_0A_D4/service0014
        00001801-0000-1000-8000-00805f9b34fb
        Generic Attribute Profile
Characteristic
        /org/bluez/hci0/dev_00_1B_DC_08_0A_D4/service0014/char0015
        00002a05-0000-1000-8000-00805f9b34fb
        Service Changed

Unfortunately there are many PTS tests that list multiple attributes
with the same UUID but different handles. This is rare for everyday
application but it is not impossible. Again, the output of the
deprecated "gatttool primary/characteristics/descriptors" showed all
the necessary information including the properties and permissions,
and it would be extremely useful if something similar was implemented
to bluetoothctl.

Youssif Saeed



[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