Friday, May 20, 2016

[RR Bluetooth] gatttool - What HCI Commands are Sent by gatttool (6) char-read-hnd, char-read-uuid

According to BT Spec Core 4.2, "4.9 CHARACTERISTIC VALUE WRITE"

There are five sub-procedures that can be used to write a Characteristic Value: Write Without Response, Signed Write Without Response, Write Characteristic Value, Write Long Characteristic Values and Reliable Writes.

char-write-cmd  <handle> <new value>           Characteristic Value Write (No response)


Write Command


< ACL Data TX: Handle 71 flags 0x00 dlen 8                     [hci0] 20.201215      ATT: Write Command (0x52) len 3        Handle: 0x0029          Data: 01
< 02 47 00 08 00 04 00 04 00 52 29 00 01 

> HCI Event: Number of Completed Packets (0x13) plen 5         [hci0] 20.779127        Num handles: 1        Handle: 71        Count: 1


> 04 13 05 01 47 00 01 00 

char-write-req  <handle> <new value>           Characteristic Value Write (Write Request)

Write Request



< ACL Data TX: Handle 71 flags 0x00 dlen 8                     [hci0] 61.390350
      ATT: Write Request (0x12) len 3
        Handle: 0x0029
          Data: 00

< 02 47 00 08 00 04 00 04 00
12 29 00 00 

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

Write Response


> ACL Data RX: Handle 71 flags 0x02 dlen 5                     [hci0] 61.587358
      ATT: Write Response (0x13) len 0

> 02 47 20 05 00 01 00 04 00 13 

No comments:

Post a Comment