public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* bluetoothctl: list-attributes doesn't list services from example-gatt-server
@ 2019-07-07 10:14 Rafał Miłecki
  2019-07-08 13:19 ` Luiz Augusto von Dentz
  2019-07-09 12:14 ` Rafał Miłecki
  0 siblings, 2 replies; 8+ messages in thread
From: Rafał Miłecki @ 2019-07-07 10:14 UTC (permalink / raw)
  To: linux-bluetooth

Hi,

I have 2 notebooks with Bluetooth running bluez 5.30. I called them:
1) "elitebook" with controller 20:16:B9:D8:A9:3B
2) "matebook" with controller 38:BA:F8:3F:7C:A7

Normally, when I check elitebook from matebook I get this:

[elitebook]# info 20:16:B9:D8:A9:3B
Device 20:16:B9:D8:A9:3B (public)
         Name: elitebook
         Alias: elitebook
         Class: 0x001c010c
         Icon: computer
         Paired: yes
         Trusted: yes
         Blocked: no
         Connected: yes
         LegacyPairing: no
         UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
         UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
         UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
         UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
         UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
         UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
         UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
         UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
         UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
         UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
         UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
         UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
         UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
         UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
         Modalias: usb:v1D6Bp0246d0532

I decided to test GATT. On elitebook I started:
./test/example-gatt-server
and waited to let matebook refresh all info.

After that I got:

[elitebook]# info 20:16:B9:D8:A9:3B
Device 20:16:B9:D8:A9:3B (public)
         Name: elitebook
         Alias: elitebook
         Class: 0x001c010c
         Icon: computer
         Paired: yes
         Trusted: yes
         Blocked: no
         Connected: yes
         LegacyPairing: no
         UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
         UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
         UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
         UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
         UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
         UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
         UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
         UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
         UUID: Headset AG                (00001112-0000-1000-8000-00805f9b34fb)
         UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
         UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
         UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
         UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
         UUID: Heart Rate                (0000180d-0000-1000-8000-00805f9b34fb)
         UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
         UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
         UUID: Vendor specific           (12345678-1234-5678-1234-56789abcdef0)
         Modalias: usb:v1D6Bp0246d0532

That seems all correct for now. Test example-gatt-server registers
Heart Rate, Battery & Test services. All of them appeared as expected.

My problem is that I can't list GATT attributes. I don't any output.
Is there anything I'm doing incorrectly?

[elitebook]# menu gatt
Menu gatt:
Available commands:
-------------------
list-attributes [dev]                             List attributes
select-attribute <attribute/UUID>                 Select attribute
attribute-info [attribute/UUID]                   Select attribute
read [offset]                                     Read attribute value
write <data=xx xx ...> [offset]                   Write attribute value
acquire-write                                     Acquire Write file descriptor
release-write                                     Release Write file descriptor
acquire-notify                                    Acquire Notify file descriptor
release-notify                                    Release Notify file descriptor
notify <on/off>                                   Notify attribute value
register-application [UUID ...]                   Register profile to connect
unregister-application                            Unregister profile
register-service <UUID>                           Register application service.
unregister-service <UUID/object>                  Unregister application service
register-includes <UUID>                          Register as Included service in.
unregister-includes <Service-UUID><Inc-UUID>      Unregister Included service.
register-characteristic <UUID> <Flags=read,write,notify...>  Register application characteristic
unregister-characteristic <UUID/object>           Unregister application characteristic
register-descriptor <UUID> <Flags=read,write...>  Register application descriptor
unregister-descriptor <UUID/object>               Unregister application descriptor
back                                              Return to main menu
version                                           Display version
quit                                              Quit program
exit                                              Quit program
help                                              Display help about this program
export                                            Print evironment variables
[elitebook]# list-attributes
[elitebook]# list-attributes 20:16:B9:D8:A9:3B

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

end of thread, other threads:[~2019-07-17  9:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-07 10:14 bluetoothctl: list-attributes doesn't list services from example-gatt-server Rafał Miłecki
2019-07-08 13:19 ` Luiz Augusto von Dentz
2019-07-08 13:40   ` Rafał Miłecki
2019-07-09 12:14 ` Rafał Miłecki
2019-07-17  9:26   ` Szymon Janc
2019-07-17  9:35     ` Rafał Miłecki
2019-07-17  9:38   ` Rafał Miłecki
2019-07-17  9:44     ` Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox