蓝牙ATT_GATT协议

ATT_GATT协议数据分析

下面我们将对ATT完整的一次建立过程进行数据分析,数据来源于btsnoop_hci_gatt.log。

以下蓝色为hci部分、绿色为l2cap部分、红色为ATT部分,这里我只针对ATT协议进行解析

1、Client(Master):Request

00000010 00000010 00000000 00001011 00000000 00000111 00000000 00000100 00000000 00010000 00000001 00000000 11111111 11111111 00000000 00101000

Authentication Signature Flag:0(协议包末尾没有认证签名)

PDU Type is Command:0(不是一个命令包)

Opcode:010000(0x10,Read by Group Type Request)

Attribute Parameters:

       Starting Attribute Handle:00000001 00000000(0x0001,起始句柄为1)

       Ending Attribute Handle: 11111111 11111111(0xffff,结束句柄为65535)

       Attribute Group Type: 00000000 00101000(UUID=0x2800,首要服务)

2、Server(Master):Notification

00000010 00000010 00000000 00001111 00000000 00001011 00000000 00000100 00000000 00011011 00101010 00000000 00000100 00000110 01111000 00000010 11111000 11101100 01111101 01000000

Authentication Signature Flag:0(协议包末尾没有认证签名)

PDU Type is Command:0(不是一个命令包)

Opcode:011011(0x1b,Handle Value Notification)

Attribute Parameters:

       Starting Attribute Handle:00000001 00000000(0x0001,起始句柄为1)

       Ending Attribute Handle: 11111111 11111111(0xffff,结束句柄为65535)

       Attribute Group Type: 00000000 00101000(UUID=0x2800,首要服务)

3、Server(Slave):Response

00000010 00000010 00100000 00010010 00000000 00001110 00000000 00000100 00000000 00010001 00000110 00000001 00000000 00001001 00000000 00000000 11111111 00001010 00000000 00010001 00000000 11100111 11111110

Authentication Signature Flag:0(协议包末尾没有认证签名)

PDU Type is Command:0(不是一个命令包)

Opcode:010001(0x11,Read by Group Type Response)

Length:00000110(0x06,每个attribute的长度为6)

Attribute Data List:

Attribute 1:

       Starting Attribute Handle:00000001 00000000(0x0001,起始句柄为1)

       Ending Attribute Handle: 00001001 00000000(0x0009,结束句柄为9)

       Attribute Group Type: 00000000 11111111(UUID=0xff00,IVT数据传输服务UUID)

Attribute 2:

       Starting Attribute Handle:00001010 00000000(0x000a,起始句柄为10)

       Ending Attribute Handle: 00010001 00000000(0x0011,结束句柄为17)

     Attribute Group Type: 11100111 11111110(UUID=0xfee7,Tencent Holdings Limited)

4、Client(Master):Request

00000010 00000010 00000000 00001011 00000000 00000111 00000000 00000100 00000000 00010000 00010010 00000000 11111111 11111111 00000000 00101000

Authentication Signature Flag:0(协议包末尾没有认证签名)

PDU Type is Command:0(不是一个命令包)

Opcode:010000(0x10,Read by Group Type Request)

Attribute Parameters:

       Starting Attribute Handle:00010010 00000000(0x0012,起始句柄为18)

       Ending Attribute Handle: 11111111 11111111(0xffff,结束句柄为65535)

       Attribute Group Type: 00000000 00101000(UUID=0x2800,首要服务)
 

你可能感兴趣的:(蓝牙)