본문 바로가기
블루투스/ATT

ATT Opcode (ATT PDU) - 세로 버전

by 테크쟁이 2023. 1. 10.
반응형

참고자료: https://www.bluetooth.com/specifications/specs/core-specification-5-3/

* 가로 형태의 ATT PDU는 "ATT Opcode (ATT PDU) - 가로 버전" 참고

 

Attribute protocol PDUs
분류 Attribute Opcode
(1 octet)
Parameter
Error
handling
0x01  ATT_ERROR_RSP Error가 발생한 Request Opcode
(1 octet)
Error가 발생한 Attribute Handle
(2 octet)
Error Code: 에러가 발생한 이유
(1 octet)
MTU
exchange
0x02 ATT_EXCHANGE_MTU_REQ Client에서 수신 가능한 MTU 크기
(2 octet)
0x03 ATT_EXCHANGE_MTU_RSP Server에서 수신 가능한 MTU 크기
(2 octet)
Find
information
0x04 ATT_FIND_INFORMATION_REQ 첫번째 Handle
(2 octet)
마지막 Handle
(2 octet)
0x05 ATT_FIND_INFORMATION_RSP Information data의 포맷
(1 octet)
- 0x01: 16-bit Bluetooth UUID
- 0x02: 128-bit Bluetooth UUID
Information data
(4 ~ ATT_MTU-2 octet)

Information data 1
- Handle(2 octet)
- 16-bit Bluetooth UUID(2 octet)

Information data 2
- Handle(2 octet)
- 128-bit Bluetooth UUID(16 octet)
0x06 ATT_FIND_BY_TYPE_VALUE_REQ 첫번째 Handle
(2 octet)
마지막 Handle
(2 octet)
찾을 Attribute Type (UUID)
(2 octet)
찾을 Attribute Value
(0 ~ ATT_MTU-7 octet)
0x07 ATT_FIND_BY_TYPE_VALUE_RSP Handle Information List
(4 ~ ATT_MTU-1 octet)

Handle Information
포맷
-
찾은 Attribute value(2 octet)
- Group End Handle(2 octet)
Reading
attribute
0x08 ATT_READ_BY_TYPE_REQ 첫번째 Handle
(2 octet)
마지막 Handle
(2 octet)
Attribute Type (UUID)
(2 or 16 octet)
0x09 ATT_READ_BY_TYPE_RSP Length
(1 octet)
Attribute Data List
(2 ~ ATT_MTU-2 octet)

Attribute Data
포맷
- Attribute Handle(2 octet)
- Attribute Value(Length-2 octet)
0x0A ATT_READ_REQ Attribute Handle
(2 octet)
0x0B ATT_READ_RSP Attribute Value
(0 ~ ATT_MTU-1 octet)
0x0C ATT_READ_BLOB_REQ Attribute Handle
(2 octet)
Value Offset
(2 octet)
0x0D ATT_READ_BLOB_RSP Part Attribute value
(0 ~ ATT_MTU-1 octet)
0x0E ATT_READ_MULTIPLE_REQ Attribute Handle Set
(4 ~ ATT_MTU-1 octet)
0x0F ATT_READ_MULTIPLE_RSP Value Set
(0 ~ ATT_MTU-1 octet)
0x10 ATT_READ_BY_GROUP_TYPE_REQ 첫번째 Handle
(2 octet)
마지막 Handle
(2 octet)
Attribute Type (UUID)
(2 or 16 octet)
0x11 ATT_READ_BY_GROUP_TYPE_RSP Length
(1 octet)
Attribute Data List
(4 ~ ATT_MTU-2 octet)

Attribute Data
포맷
- Attribute Handle(2 octet)
- End Group Handle(2 octet)
- Attribute Value(Length-4 octet)
0x20 ATT_READ_MULTIPLE_VARIABLE_REQ Attribute Handle Set
(4 ~ ATT_MTU-1 octet)
0x21 ATT_READ_MULTIPLE_VARIABLE_RSP Length Value Tuple List
(4 ~ ATT_MTU-1 octet)

Length Value Tuple
포맷
- Attribute Value
Length(2 octet)
- Attribute Value(Length octet)
Writing
attribute
0x12 ATT_WRITE_REQ Attribute Handle
(2 octet)
Attribute Value
(0 ~ ATT_MTU-3 octet)
0x13 ATT_WRITE_RSP No Parameter
0x52 ATT_WRITE_CMD Attribute Handle
(2 octet)
Attribute Value
(0 ~ ATT_MTU-3 octet)
0xD2 ATT_SIGNED_WRITE_CMD Attribute Handle
(2 octet)
Attribute Value
(0 ~ ATT_MTU-15 octet)
Authentication Signature
(12 octet)
Queued
write
0x16 ATT_PREPARE_WRITE_REQ Attribute Handle
(2 octet)
Value Offset
(2 octet)
Part Attribute value
(0 ~ ATT_MTU-5 octet)
0x17 ATT_PREPARE_WRITE_RSP Attribute Handle
(2 octet)
Value Offset
(2 octet)
Part Attribute value
(0 ~ ATT_MTU-5 octet)
0x18 ATT_EXECUTE_WRITE_REQ Flag
(1 octet)

Flag
- 0x00:
모든 prepared write 취소
- 0x01:
남아있는 모든 prepared value write
0x19 ATT_EXECUTE_WRITE_RSP No Parameter
Server
initiated
0x1B ATT_HANDLE_VALUE_NTF Attribute Handle
(2 octet)
Attribute Value
(0 ~ ATT_MTU-3 octet)
0x1D ATT_HANDLE_VALUE_IND Attribute Handle
(2 octet)
Attribute Value
(0 ~ ATT_MTU-3 octet)
0x1E ATT_HANDLE_VALUE_CFM No Parameter
0x23 ATT_MULTIPLE_HANDLE_VALUE_NTF Handle Length Tuple List
(8 ~ ATT_MTU-1 octet)

Handle Length Tuple
포맷
- Attribute Handle(2 octet)
- Attribute Value
Length(2 octet)
- Attribute value(Length octet)

 

반응형

'블루투스 > ATT' 카테고리의 다른 글

ATT Opcode (ATT PDU) - 가로 버전  (0) 2023.01.10
ATT_ERROR_RSP Error Code  (0) 2023.01.09
ATT(Attribute Protocol)  (0) 2023.01.09