Thursday, May 19, 2016

[RR Bluetooth] gatttool - What HCI Commands are Sent by gatttool (4) char-desc

char-desc       [start hnd] [end hnd]          Characteristics Descriptor Discovery

It is defined in "4.7 CHARACTERISTIC DESCRIPTOR DISCOVERY" in Bluetooth Specification Core 4.2.
This sub-procedure is used by a client to find all the characteristic descriptor’s
Attribute Handles and Attribute Types within a characteristic definition when
only the characteristic handle range is known


Find Information Request:


< ACL Data TX: Handle 71 flags 0x00 dlen 9                      [hci0] 5.648413
      ATT: Find Information Request (0x04) len 4
        Handle range: 0x0001-0x0002
< 02 47 00 09 00 05 00 04 00 04 01 00 02 00 

> HCI Event: Number of Completed Packets (0x13) plen 5          [hci0] 5.803482
        Num handles: 1
        Handle: 71
        Count: 1
> 04 13 05 01 47 00 01 00 

Find Information Response


> ACL Data RX: Handle 71 flags 0x02 dlen 14                     [hci0] 5.873329
      ATT: Find Information Response (0x05) len 9
        Format: UUID-16 (0x01)
        Handle: 0x0001
        UUID: Primary Service (0x2800)
        Handle: 0x0002
        UUID: Characteristic (0x2803)


> 02 47 20 0E 00 0A 00 04 00 05 01 01 00 00 28 02 00 03 28 
Note: The sub-procedure is complete when the Error Response is received and the Error Code is set to Attribute Not Found or the Find Information Response has an Attribute Handle that is equal to the Ending Handle of the request. (4.7.1 Discover All Characteristic Descriptors@ BT Spec Core 4.2)


No comments:

Post a Comment