第 50 篇:Read Long Characteristic Value:长值读取
覆盖章节
- 4.8.3 Read Long Characteristic Value
学习重点
-
ATT_READ_BLOB_REQ
-
offset
-
MTU 限制
-
分段读取
-
长字符串、长证书、长配置数据场景
Mermaid 图
Server Client Server Client #mermaid-svg-gaA28lRnRMPeS0vC{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-gaA28lRnRMPeS0vC .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-gaA28lRnRMPeS0vC .error-icon{fill:#552222;}#mermaid-svg-gaA28lRnRMPeS0vC .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-gaA28lRnRMPeS0vC .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-gaA28lRnRMPeS0vC .marker{fill:#333333;stroke:#333333;}#mermaid-svg-gaA28lRnRMPeS0vC .marker.cross{stroke:#333333;}#mermaid-svg-gaA28lRnRMPeS0vC svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-gaA28lRnRMPeS0vC p{margin:0;}#mermaid-svg-gaA28lRnRMPeS0vC .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-gaA28lRnRMPeS0vC text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-gaA28lRnRMPeS0vC .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-gaA28lRnRMPeS0vC .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-gaA28lRnRMPeS0vC .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-gaA28lRnRMPeS0vC .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-gaA28lRnRMPeS0vC #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-gaA28lRnRMPeS0vC .sequenceNumber{fill:white;}#mermaid-svg-gaA28lRnRMPeS0vC #sequencenumber{fill:#333;}#mermaid-svg-gaA28lRnRMPeS0vC #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-gaA28lRnRMPeS0vC .messageText{fill:#333;stroke:none;}#mermaid-svg-gaA28lRnRMPeS0vC .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-gaA28lRnRMPeS0vC .labelText,#mermaid-svg-gaA28lRnRMPeS0vC .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-gaA28lRnRMPeS0vC .loopText,#mermaid-svg-gaA28lRnRMPeS0vC .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-gaA28lRnRMPeS0vC .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-gaA28lRnRMPeS0vC .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-gaA28lRnRMPeS0vC .noteText,#mermaid-svg-gaA28lRnRMPeS0vC .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-gaA28lRnRMPeS0vC .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-gaA28lRnRMPeS0vC .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-gaA28lRnRMPeS0vC .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-gaA28lRnRMPeS0vC .actorPopupMenu{position:absolute;}#mermaid-svg-gaA28lRnRMPeS0vC .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-gaA28lRnRMPeS0vC .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-gaA28lRnRMPeS0vC .actor-man circle,#mermaid-svg-gaA28lRnRMPeS0vC line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-gaA28lRnRMPeS0vC :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Read Blob Request offset=0Blob Response part 1Read Blob Request offset=NBlob Response part 2
第 51 篇:Read Multiple Characteristic Values:一次读多个值
覆盖章节
- 4.8.4 Read Multiple Characteristic Values
学习重点
-
多 handle 读取
-
返回值拼接
-
每个 value 长度需要预先可知
-
使用限制
第 52 篇:Read Multiple Variable Length Characteristic Values
覆盖章节
- 4.8.5 Read Multiple Variable Length Characteristic Values
学习重点
-
可变长度多值读取
-
与普通 Read Multiple 的区别
-
ATT_READ_MULTIPLE_VARIABLE_REQ / RSP
-
适合 variable length characteristic
阶段十:Characteristic Value Write
第 53 篇:Characteristic Value Write 总览
覆盖章节
- 4.9 Characteristic Value Write
学习重点
-
Write Without Response
-
Signed Write Without Response
-
Write Characteristic Value
-
Write Long Characteristic Value
-
Reliable Writes
-
写操作和属性权限
第 54 篇:Write Without Response:写了就跑,不等回信
覆盖章节
- 4.9.1 Write Without Response
学习重点
-
ATT_WRITE_CMD
-
无响应
-
速度快
-
不可靠确认
-
适合高频控制数据
Mermaid 图
Server Client Server Client #mermaid-svg-8kAYOCnqTy3ddV3a{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-8kAYOCnqTy3ddV3a .error-icon{fill:#552222;}#mermaid-svg-8kAYOCnqTy3ddV3a .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-8kAYOCnqTy3ddV3a .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-8kAYOCnqTy3ddV3a .marker{fill:#333333;stroke:#333333;}#mermaid-svg-8kAYOCnqTy3ddV3a .marker.cross{stroke:#333333;}#mermaid-svg-8kAYOCnqTy3ddV3a svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-8kAYOCnqTy3ddV3a p{margin:0;}#mermaid-svg-8kAYOCnqTy3ddV3a .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-8kAYOCnqTy3ddV3a text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-8kAYOCnqTy3ddV3a .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-8kAYOCnqTy3ddV3a .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-8kAYOCnqTy3ddV3a #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-8kAYOCnqTy3ddV3a .sequenceNumber{fill:white;}#mermaid-svg-8kAYOCnqTy3ddV3a #sequencenumber{fill:#333;}#mermaid-svg-8kAYOCnqTy3ddV3a #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-8kAYOCnqTy3ddV3a .messageText{fill:#333;stroke:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-8kAYOCnqTy3ddV3a .labelText,#mermaid-svg-8kAYOCnqTy3ddV3a .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .loopText,#mermaid-svg-8kAYOCnqTy3ddV3a .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-8kAYOCnqTy3ddV3a .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-8kAYOCnqTy3ddV3a .noteText,#mermaid-svg-8kAYOCnqTy3ddV3a .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-8kAYOCnqTy3ddV3a .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-8kAYOCnqTy3ddV3a .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-8kAYOCnqTy3ddV3a .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-8kAYOCnqTy3ddV3a .actorPopupMenu{position:absolute;}#mermaid-svg-8kAYOCnqTy3ddV3a .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-8kAYOCnqTy3ddV3a .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-8kAYOCnqTy3ddV3a .actor-man circle,#mermaid-svg-8kAYOCnqTy3ddV3a line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-8kAYOCnqTy3ddV3a :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} No ATT response ATT_WRITE_CMD
第 55 篇:Signed Write Without Response:带签名的无响应写
覆盖章节
- 4.9.2 Signed Write Without Response
学习重点
-
ATT_SIGNED_WRITE_CMD
-
Authentication Signature
-
适用限制
-
和安全管理器的关系
第 56 篇:Write Characteristic Value:标准写请求
覆盖章节
- 4.9.3 Write Characteristic Value
学习重点
-
ATT_WRITE_REQ
-
ATT_WRITE_RSP
-
有响应
-
写失败错误码
-
写配置、写控制命令常用
Mermaid 图
Server Client Server Client #mermaid-svg-V9wqaq1iV9MlTOWE{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-V9wqaq1iV9MlTOWE .error-icon{fill:#552222;}#mermaid-svg-V9wqaq1iV9MlTOWE .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-V9wqaq1iV9MlTOWE .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-V9wqaq1iV9MlTOWE .marker{fill:#333333;stroke:#333333;}#mermaid-svg-V9wqaq1iV9MlTOWE .marker.cross{stroke:#333333;}#mermaid-svg-V9wqaq1iV9MlTOWE svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-V9wqaq1iV9MlTOWE p{margin:0;}#mermaid-svg-V9wqaq1iV9MlTOWE .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-V9wqaq1iV9MlTOWE text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-V9wqaq1iV9MlTOWE .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-V9wqaq1iV9MlTOWE .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-V9wqaq1iV9MlTOWE #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-V9wqaq1iV9MlTOWE .sequenceNumber{fill:white;}#mermaid-svg-V9wqaq1iV9MlTOWE #sequencenumber{fill:#333;}#mermaid-svg-V9wqaq1iV9MlTOWE #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-V9wqaq1iV9MlTOWE .messageText{fill:#333;stroke:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-V9wqaq1iV9MlTOWE .labelText,#mermaid-svg-V9wqaq1iV9MlTOWE .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .loopText,#mermaid-svg-V9wqaq1iV9MlTOWE .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-V9wqaq1iV9MlTOWE .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-V9wqaq1iV9MlTOWE .noteText,#mermaid-svg-V9wqaq1iV9MlTOWE .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-V9wqaq1iV9MlTOWE .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-V9wqaq1iV9MlTOWE .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-V9wqaq1iV9MlTOWE .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-V9wqaq1iV9MlTOWE .actorPopupMenu{position:absolute;}#mermaid-svg-V9wqaq1iV9MlTOWE .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-V9wqaq1iV9MlTOWE .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-V9wqaq1iV9MlTOWE .actor-man circle,#mermaid-svg-V9wqaq1iV9MlTOWE line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-V9wqaq1iV9MlTOWE :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} ATT_WRITE_REQATT_WRITE_RSP
第 57 篇:Write Long Characteristic Value:长值写入
覆盖章节
- 4.9.4 Write Long Characteristic Value
学习重点
-
Prepare Write
-
Execute Write
-
offset
-
分片缓存
-
最终提交
Mermaid 图
Server Client Server Client #mermaid-svg-szX1uguAcYPMjUxu{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-szX1uguAcYPMjUxu .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-szX1uguAcYPMjUxu .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-szX1uguAcYPMjUxu .error-icon{fill:#552222;}#mermaid-svg-szX1uguAcYPMjUxu .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-szX1uguAcYPMjUxu .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-szX1uguAcYPMjUxu .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-szX1uguAcYPMjUxu .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-szX1uguAcYPMjUxu .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-szX1uguAcYPMjUxu .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-szX1uguAcYPMjUxu .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-szX1uguAcYPMjUxu .marker{fill:#333333;stroke:#333333;}#mermaid-svg-szX1uguAcYPMjUxu .marker.cross{stroke:#333333;}#mermaid-svg-szX1uguAcYPMjUxu svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-szX1uguAcYPMjUxu p{margin:0;}#mermaid-svg-szX1uguAcYPMjUxu .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-szX1uguAcYPMjUxu text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-szX1uguAcYPMjUxu .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-szX1uguAcYPMjUxu .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-szX1uguAcYPMjUxu .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-szX1uguAcYPMjUxu .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-szX1uguAcYPMjUxu #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-szX1uguAcYPMjUxu .sequenceNumber{fill:white;}#mermaid-svg-szX1uguAcYPMjUxu #sequencenumber{fill:#333;}#mermaid-svg-szX1uguAcYPMjUxu #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-szX1uguAcYPMjUxu .messageText{fill:#333;stroke:none;}#mermaid-svg-szX1uguAcYPMjUxu .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-szX1uguAcYPMjUxu .labelText,#mermaid-svg-szX1uguAcYPMjUxu .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-szX1uguAcYPMjUxu .loopText,#mermaid-svg-szX1uguAcYPMjUxu .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-szX1uguAcYPMjUxu .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-szX1uguAcYPMjUxu .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-szX1uguAcYPMjUxu .noteText,#mermaid-svg-szX1uguAcYPMjUxu .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-szX1uguAcYPMjUxu .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-szX1uguAcYPMjUxu .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-szX1uguAcYPMjUxu .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-szX1uguAcYPMjUxu .actorPopupMenu{position:absolute;}#mermaid-svg-szX1uguAcYPMjUxu .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-szX1uguAcYPMjUxu .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-szX1uguAcYPMjUxu .actor-man circle,#mermaid-svg-szX1uguAcYPMjUxu line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-szX1uguAcYPMjUxu :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Prepare Write Request offset=0Prepare Write ResponsePrepare Write Request offset=NPrepare Write ResponseExecute Write RequestExecute Write Response
第 58 篇:Characteristic Value Reliable Writes:可靠写
覆盖章节
- 4.9.5 Characteristic Value Reliable Writes
学习重点
-
Reliable Write 的目的
-
Prepare Write Response 校验
-
Execute Write 提交
-
写入前确认数据没有被篡改
-
和 Extended Properties 的关系
阶段十一:Notification 与 Indication
第 59 篇:Characteristic Value Notification 总览
覆盖章节
- 4.10 Characteristic Value Notification
学习重点
-
Notification 是 Server 主动发
-
不需要 Client confirmation
-
必须先配置 CCCD
-
适合传感器数据流
第 60 篇:Single Notification:单个通知流程
覆盖章节
- 4.10.1 Single Notification
学习重点
-
ATT_HANDLE_VALUE_NTF
-
无确认
-
可能丢失应用层感知不到
-
通知频率与连接参数关系
Mermaid 图
Server Client Server Client #mermaid-svg-exuojXcpIAWxFgHP{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-exuojXcpIAWxFgHP .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-exuojXcpIAWxFgHP .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-exuojXcpIAWxFgHP .error-icon{fill:#552222;}#mermaid-svg-exuojXcpIAWxFgHP .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-exuojXcpIAWxFgHP .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-exuojXcpIAWxFgHP .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-exuojXcpIAWxFgHP .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-exuojXcpIAWxFgHP .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-exuojXcpIAWxFgHP .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-exuojXcpIAWxFgHP .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-exuojXcpIAWxFgHP .marker{fill:#333333;stroke:#333333;}#mermaid-svg-exuojXcpIAWxFgHP .marker.cross{stroke:#333333;}#mermaid-svg-exuojXcpIAWxFgHP svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-exuojXcpIAWxFgHP p{margin:0;}#mermaid-svg-exuojXcpIAWxFgHP .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-exuojXcpIAWxFgHP text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-exuojXcpIAWxFgHP .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-exuojXcpIAWxFgHP .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-exuojXcpIAWxFgHP .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-exuojXcpIAWxFgHP .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-exuojXcpIAWxFgHP #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-exuojXcpIAWxFgHP .sequenceNumber{fill:white;}#mermaid-svg-exuojXcpIAWxFgHP #sequencenumber{fill:#333;}#mermaid-svg-exuojXcpIAWxFgHP #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-exuojXcpIAWxFgHP .messageText{fill:#333;stroke:none;}#mermaid-svg-exuojXcpIAWxFgHP .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-exuojXcpIAWxFgHP .labelText,#mermaid-svg-exuojXcpIAWxFgHP .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-exuojXcpIAWxFgHP .loopText,#mermaid-svg-exuojXcpIAWxFgHP .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-exuojXcpIAWxFgHP .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-exuojXcpIAWxFgHP .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-exuojXcpIAWxFgHP .noteText,#mermaid-svg-exuojXcpIAWxFgHP .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-exuojXcpIAWxFgHP .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-exuojXcpIAWxFgHP .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-exuojXcpIAWxFgHP .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-exuojXcpIAWxFgHP .actorPopupMenu{position:absolute;}#mermaid-svg-exuojXcpIAWxFgHP .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-exuojXcpIAWxFgHP .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-exuojXcpIAWxFgHP .actor-man circle,#mermaid-svg-exuojXcpIAWxFgHP line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-exuojXcpIAWxFgHP :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Write CCCD: Enable NotificationATT_HANDLE_VALUE_NTFATT_HANDLE_VALUE_NTF
第 61 篇:Multiple Variable Length Notifications
覆盖章节
- 4.10.2 Multiple Variable Length Notifications
学习重点
-
多个可变长度通知
-
ATT_MULTIPLE_HANDLE_VALUE_NTF
-
提升效率
-
支持条件和兼容性
第 62 篇:Characteristic Value Indication 总览
覆盖章节
-
4.11 Characteristic Value Indication
-
4.11.1 Indication
学习重点
-
Indication 需要 confirmation
-
ATT_HANDLE_VALUE_IND
-
ATT_HANDLE_VALUE_CFM
-
可靠但吞吐更低
-
适合关键状态变化
规范的 ATT Opcode 映射表中,Indication 对应 ATT_HANDLE_VALUE_IND 和 ATT_HANDLE_VALUE_CFM。
Mermaid 图
Server Client Server Client #mermaid-svg-cuNbllybsVUeHyOI{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-cuNbllybsVUeHyOI .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-cuNbllybsVUeHyOI .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-cuNbllybsVUeHyOI .error-icon{fill:#552222;}#mermaid-svg-cuNbllybsVUeHyOI .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-cuNbllybsVUeHyOI .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-cuNbllybsVUeHyOI .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-cuNbllybsVUeHyOI .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-cuNbllybsVUeHyOI .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-cuNbllybsVUeHyOI .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-cuNbllybsVUeHyOI .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-cuNbllybsVUeHyOI .marker{fill:#333333;stroke:#333333;}#mermaid-svg-cuNbllybsVUeHyOI .marker.cross{stroke:#333333;}#mermaid-svg-cuNbllybsVUeHyOI svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-cuNbllybsVUeHyOI p{margin:0;}#mermaid-svg-cuNbllybsVUeHyOI .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-cuNbllybsVUeHyOI text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-cuNbllybsVUeHyOI .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-cuNbllybsVUeHyOI .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-cuNbllybsVUeHyOI .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-cuNbllybsVUeHyOI .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-cuNbllybsVUeHyOI #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-cuNbllybsVUeHyOI .sequenceNumber{fill:white;}#mermaid-svg-cuNbllybsVUeHyOI #sequencenumber{fill:#333;}#mermaid-svg-cuNbllybsVUeHyOI #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-cuNbllybsVUeHyOI .messageText{fill:#333;stroke:none;}#mermaid-svg-cuNbllybsVUeHyOI .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-cuNbllybsVUeHyOI .labelText,#mermaid-svg-cuNbllybsVUeHyOI .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-cuNbllybsVUeHyOI .loopText,#mermaid-svg-cuNbllybsVUeHyOI .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-cuNbllybsVUeHyOI .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-cuNbllybsVUeHyOI .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-cuNbllybsVUeHyOI .noteText,#mermaid-svg-cuNbllybsVUeHyOI .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-cuNbllybsVUeHyOI .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-cuNbllybsVUeHyOI .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-cuNbllybsVUeHyOI .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-cuNbllybsVUeHyOI .actorPopupMenu{position:absolute;}#mermaid-svg-cuNbllybsVUeHyOI .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-cuNbllybsVUeHyOI .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-cuNbllybsVUeHyOI .actor-man circle,#mermaid-svg-cuNbllybsVUeHyOI line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-cuNbllybsVUeHyOI :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Write CCCD: Enable IndicationATT_HANDLE_VALUE_INDATT_HANDLE_VALUE_CFM
阶段十二:Descriptor Read / Write
第 63 篇:Characteristic Descriptors 总览
覆盖章节
- 4.12 Characteristic Descriptors
学习重点
-
descriptor value 的读写过程
-
和 characteristic value 读写的相似点
-
CCCD 写入属于 descriptor write
第 64 篇:Read Characteristic Descriptor
覆盖章节
- 4.12.1 Read Characteristic Descriptor
学习重点
-
ATT_READ_REQ
-
descriptor handle
-
读取 CCCD / User Description / Presentation Format
第 65 篇:Read Long Characteristic Descriptor
覆盖章节
- 4.12.2 Read Long Characteristic Descriptor
学习重点
-
ATT_READ_BLOB_REQ
-
offset
-
长 descriptor 读取
第 66 篇:Write Characteristic Descriptor
覆盖章节
- 4.12.3 Write Characteristic Descriptor
学习重点
-
ATT_WRITE_REQ
-
写 CCCD
-
写 User Description
-
写失败常见原因
Mermaid 图
GATT Server GATT Client Application GATT Server GATT Client Application #mermaid-svg-pss34TEkruG9gmi2{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-pss34TEkruG9gmi2 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-pss34TEkruG9gmi2 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-pss34TEkruG9gmi2 .error-icon{fill:#552222;}#mermaid-svg-pss34TEkruG9gmi2 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-pss34TEkruG9gmi2 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-pss34TEkruG9gmi2 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-pss34TEkruG9gmi2 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-pss34TEkruG9gmi2 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-pss34TEkruG9gmi2 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-pss34TEkruG9gmi2 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-pss34TEkruG9gmi2 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-pss34TEkruG9gmi2 .marker.cross{stroke:#333333;}#mermaid-svg-pss34TEkruG9gmi2 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-pss34TEkruG9gmi2 p{margin:0;}#mermaid-svg-pss34TEkruG9gmi2 .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pss34TEkruG9gmi2 text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-pss34TEkruG9gmi2 .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-pss34TEkruG9gmi2 .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-pss34TEkruG9gmi2 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-pss34TEkruG9gmi2 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-pss34TEkruG9gmi2 #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-pss34TEkruG9gmi2 .sequenceNumber{fill:white;}#mermaid-svg-pss34TEkruG9gmi2 #sequencenumber{fill:#333;}#mermaid-svg-pss34TEkruG9gmi2 #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-pss34TEkruG9gmi2 .messageText{fill:#333;stroke:none;}#mermaid-svg-pss34TEkruG9gmi2 .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pss34TEkruG9gmi2 .labelText,#mermaid-svg-pss34TEkruG9gmi2 .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-pss34TEkruG9gmi2 .loopText,#mermaid-svg-pss34TEkruG9gmi2 .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-pss34TEkruG9gmi2 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-pss34TEkruG9gmi2 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-pss34TEkruG9gmi2 .noteText,#mermaid-svg-pss34TEkruG9gmi2 .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-pss34TEkruG9gmi2 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pss34TEkruG9gmi2 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pss34TEkruG9gmi2 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-pss34TEkruG9gmi2 .actorPopupMenu{position:absolute;}#mermaid-svg-pss34TEkruG9gmi2 .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-pss34TEkruG9gmi2 .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-pss34TEkruG9gmi2 .actor-man circle,#mermaid-svg-pss34TEkruG9gmi2 line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-pss34TEkruG9gmi2 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Enable NotificationWrite CCCD DescriptorWrite ResponseNotification
第 67 篇:Write Long Characteristic Descriptor
覆盖章节
- 4.12.4 Write Long Characteristic Descriptor
学习重点
-
Prepare Write
-
Execute Write
-
长 descriptor 写入
-
和 long characteristic value write 的对比
阶段十三:GATT Procedure 到 ATT Opcode 的映射
第 68 篇:GATT Procedure Mapping to ATT Protocol Opcodes
覆盖章节
- 4.13 GATT procedure mapping to ATT protocol opcodes
学习重点
-
GATT 是"过程语义"
-
ATT 是"实际发包"
-
每个 GATT procedure 对应哪些 ATT PDU
-
Wireshark 抓包时看到的是 ATT Opcode,不是"GATT_ReadMagic"
规范 Table 4.2 将 GATT procedure 映射到 ATT protocol opcodes,例如 Notification 对应 ATT_HANDLE_VALUE_NTF,Indication 对应 ATT_HANDLE_VALUE_IND / CFM,Long Write 和 Reliable Writes 对应 Prepare Write 与 Execute Write。
Mermaid 图
#mermaid-svg-aDwxlsX30dWgs84K{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-aDwxlsX30dWgs84K .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-aDwxlsX30dWgs84K .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-aDwxlsX30dWgs84K .error-icon{fill:#552222;}#mermaid-svg-aDwxlsX30dWgs84K .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-aDwxlsX30dWgs84K .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-aDwxlsX30dWgs84K .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-aDwxlsX30dWgs84K .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-aDwxlsX30dWgs84K .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-aDwxlsX30dWgs84K .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-aDwxlsX30dWgs84K .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-aDwxlsX30dWgs84K .marker{fill:#333333;stroke:#333333;}#mermaid-svg-aDwxlsX30dWgs84K .marker.cross{stroke:#333333;}#mermaid-svg-aDwxlsX30dWgs84K svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-aDwxlsX30dWgs84K p{margin:0;}#mermaid-svg-aDwxlsX30dWgs84K .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-aDwxlsX30dWgs84K .cluster-label text{fill:#333;}#mermaid-svg-aDwxlsX30dWgs84K .cluster-label span{color:#333;}#mermaid-svg-aDwxlsX30dWgs84K .cluster-label span p{background-color:transparent;}#mermaid-svg-aDwxlsX30dWgs84K .label text,#mermaid-svg-aDwxlsX30dWgs84K span{fill:#333;color:#333;}#mermaid-svg-aDwxlsX30dWgs84K .node rect,#mermaid-svg-aDwxlsX30dWgs84K .node circle,#mermaid-svg-aDwxlsX30dWgs84K .node ellipse,#mermaid-svg-aDwxlsX30dWgs84K .node polygon,#mermaid-svg-aDwxlsX30dWgs84K .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-aDwxlsX30dWgs84K .rough-node .label text,#mermaid-svg-aDwxlsX30dWgs84K .node .label text,#mermaid-svg-aDwxlsX30dWgs84K .image-shape .label,#mermaid-svg-aDwxlsX30dWgs84K .icon-shape .label{text-anchor:middle;}#mermaid-svg-aDwxlsX30dWgs84K .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-aDwxlsX30dWgs84K .rough-node .label,#mermaid-svg-aDwxlsX30dWgs84K .node .label,#mermaid-svg-aDwxlsX30dWgs84K .image-shape .label,#mermaid-svg-aDwxlsX30dWgs84K .icon-shape .label{text-align:center;}#mermaid-svg-aDwxlsX30dWgs84K .node.clickable{cursor:pointer;}#mermaid-svg-aDwxlsX30dWgs84K .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-aDwxlsX30dWgs84K .arrowheadPath{fill:#333333;}#mermaid-svg-aDwxlsX30dWgs84K .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-aDwxlsX30dWgs84K .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-aDwxlsX30dWgs84K .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aDwxlsX30dWgs84K .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-aDwxlsX30dWgs84K .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aDwxlsX30dWgs84K .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-aDwxlsX30dWgs84K .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-aDwxlsX30dWgs84K .cluster text{fill:#333;}#mermaid-svg-aDwxlsX30dWgs84K .cluster span{color:#333;}#mermaid-svg-aDwxlsX30dWgs84K div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-aDwxlsX30dWgs84K .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-aDwxlsX30dWgs84K rect.text{fill:none;stroke-width:0;}#mermaid-svg-aDwxlsX30dWgs84K .icon-shape,#mermaid-svg-aDwxlsX30dWgs84K .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aDwxlsX30dWgs84K .icon-shape p,#mermaid-svg-aDwxlsX30dWgs84K .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-aDwxlsX30dWgs84K .icon-shape .label rect,#mermaid-svg-aDwxlsX30dWgs84K .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aDwxlsX30dWgs84K .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-aDwxlsX30dWgs84K .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-aDwxlsX30dWgs84K :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} GATT Procedure
ATT Opcode
L2CAP Packet
Controller
Air Interface
Read Characteristic Value
ATT_READ_REQ / RSP
Notification
ATT_HANDLE_VALUE_NTF
Indication
ATT_HANDLE_VALUE_IND / CFM
第 69 篇:Procedure Timeouts:GATT 超时以后为什么这个 Bearer 废了
覆盖章节
- 4.14 Procedure timeouts
学习重点
-
ATT transaction timeout
-
timeout 后 procedure failed
-
local higher layer 被通知
-
该 ATT bearer 上不能再执行 GATT procedure
-
只能换另一个 ATT bearer
规范说明,如果 ATT transaction timeout,则该 procedure 失败,并且该 ATT bearer 上不得再执行 GATT procedure;新的 GATT procedure 只能在另一个 ATT bearer 上执行。
Mermaid 图
#mermaid-svg-XqAiyitalrxfZHrK{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-XqAiyitalrxfZHrK .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-XqAiyitalrxfZHrK .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-XqAiyitalrxfZHrK .error-icon{fill:#552222;}#mermaid-svg-XqAiyitalrxfZHrK .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-XqAiyitalrxfZHrK .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-XqAiyitalrxfZHrK .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-XqAiyitalrxfZHrK .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-XqAiyitalrxfZHrK .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-XqAiyitalrxfZHrK .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-XqAiyitalrxfZHrK .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-XqAiyitalrxfZHrK .marker{fill:#333333;stroke:#333333;}#mermaid-svg-XqAiyitalrxfZHrK .marker.cross{stroke:#333333;}#mermaid-svg-XqAiyitalrxfZHrK svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-XqAiyitalrxfZHrK p{margin:0;}#mermaid-svg-XqAiyitalrxfZHrK .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-XqAiyitalrxfZHrK .cluster-label text{fill:#333;}#mermaid-svg-XqAiyitalrxfZHrK .cluster-label span{color:#333;}#mermaid-svg-XqAiyitalrxfZHrK .cluster-label span p{background-color:transparent;}#mermaid-svg-XqAiyitalrxfZHrK .label text,#mermaid-svg-XqAiyitalrxfZHrK span{fill:#333;color:#333;}#mermaid-svg-XqAiyitalrxfZHrK .node rect,#mermaid-svg-XqAiyitalrxfZHrK .node circle,#mermaid-svg-XqAiyitalrxfZHrK .node ellipse,#mermaid-svg-XqAiyitalrxfZHrK .node polygon,#mermaid-svg-XqAiyitalrxfZHrK .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-XqAiyitalrxfZHrK .rough-node .label text,#mermaid-svg-XqAiyitalrxfZHrK .node .label text,#mermaid-svg-XqAiyitalrxfZHrK .image-shape .label,#mermaid-svg-XqAiyitalrxfZHrK .icon-shape .label{text-anchor:middle;}#mermaid-svg-XqAiyitalrxfZHrK .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-XqAiyitalrxfZHrK .rough-node .label,#mermaid-svg-XqAiyitalrxfZHrK .node .label,#mermaid-svg-XqAiyitalrxfZHrK .image-shape .label,#mermaid-svg-XqAiyitalrxfZHrK .icon-shape .label{text-align:center;}#mermaid-svg-XqAiyitalrxfZHrK .node.clickable{cursor:pointer;}#mermaid-svg-XqAiyitalrxfZHrK .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-XqAiyitalrxfZHrK .arrowheadPath{fill:#333333;}#mermaid-svg-XqAiyitalrxfZHrK .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-XqAiyitalrxfZHrK .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-XqAiyitalrxfZHrK .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XqAiyitalrxfZHrK .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-XqAiyitalrxfZHrK .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XqAiyitalrxfZHrK .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-XqAiyitalrxfZHrK .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-XqAiyitalrxfZHrK .cluster text{fill:#333;}#mermaid-svg-XqAiyitalrxfZHrK .cluster span{color:#333;}#mermaid-svg-XqAiyitalrxfZHrK div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-XqAiyitalrxfZHrK .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-XqAiyitalrxfZHrK rect.text{fill:none;stroke-width:0;}#mermaid-svg-XqAiyitalrxfZHrK .icon-shape,#mermaid-svg-XqAiyitalrxfZHrK .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XqAiyitalrxfZHrK .icon-shape p,#mermaid-svg-XqAiyitalrxfZHrK .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-XqAiyitalrxfZHrK .icon-shape .label rect,#mermaid-svg-XqAiyitalrxfZHrK .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XqAiyitalrxfZHrK .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-XqAiyitalrxfZHrK .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-XqAiyitalrxfZHrK :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} No
Yes
GATT Procedure Started
ATT transaction timeout?
Procedure completes
Procedure failed
Notify local higher layer
Stop further GATT procedures on this ATT bearer
Use another ATT bearer
阶段十四:L2CAP Interoperability Requirements
第 5 章解释 GATT 的"底盘"。GATT 自己不飞,它坐 L2CAP 的车。
第 70 篇:L2CAP Interoperability Requirements 总览
覆盖章节
- 5 L2CAP interoperability requirements
学习重点
-
default values
-
physical channel 差异
-
ATT over BR/EDR
-
ATT over LE
-
Enhanced ATT Bearer
-
Bearer support
第 71 篇:BR/EDR L2CAP Requirements:经典蓝牙上的 ATT Bearer
覆盖章节
-
5.1 BR/EDR L2CAP interoperability requirements
-
5.1.1 ATT_MTU
-
5.1.2 BR/EDR channel requirements
-
5.1.3 This section is no longer used
学习重点
-
BR/EDR 上的 Unenhanced ATT bearer
-
L2CAP connection-oriented channel
-
ATT fixed PSM
-
ATT_MTU 如何确定
-
BR/EDR 最小 ATT_MTU
-
channel 必须加密
-
5.1.3 是废弃章节
规范说明,BR/EDR 上 Unenhanced ATT bearer 使用 L2CAP connection-oriented channel,并通过 ATT fixed PSM 建立;ATT_MTU 在 L2CAP 配置阶段确定。
Mermaid 图
#mermaid-svg-zei8IQeXg7gxLt4Q{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-zei8IQeXg7gxLt4Q .error-icon{fill:#552222;}#mermaid-svg-zei8IQeXg7gxLt4Q .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-zei8IQeXg7gxLt4Q .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-zei8IQeXg7gxLt4Q .marker{fill:#333333;stroke:#333333;}#mermaid-svg-zei8IQeXg7gxLt4Q .marker.cross{stroke:#333333;}#mermaid-svg-zei8IQeXg7gxLt4Q svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-zei8IQeXg7gxLt4Q p{margin:0;}#mermaid-svg-zei8IQeXg7gxLt4Q .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster-label text{fill:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster-label span{color:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster-label span p{background-color:transparent;}#mermaid-svg-zei8IQeXg7gxLt4Q .label text,#mermaid-svg-zei8IQeXg7gxLt4Q span{fill:#333;color:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q .node rect,#mermaid-svg-zei8IQeXg7gxLt4Q .node circle,#mermaid-svg-zei8IQeXg7gxLt4Q .node ellipse,#mermaid-svg-zei8IQeXg7gxLt4Q .node polygon,#mermaid-svg-zei8IQeXg7gxLt4Q .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-zei8IQeXg7gxLt4Q .rough-node .label text,#mermaid-svg-zei8IQeXg7gxLt4Q .node .label text,#mermaid-svg-zei8IQeXg7gxLt4Q .image-shape .label,#mermaid-svg-zei8IQeXg7gxLt4Q .icon-shape .label{text-anchor:middle;}#mermaid-svg-zei8IQeXg7gxLt4Q .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-zei8IQeXg7gxLt4Q .rough-node .label,#mermaid-svg-zei8IQeXg7gxLt4Q .node .label,#mermaid-svg-zei8IQeXg7gxLt4Q .image-shape .label,#mermaid-svg-zei8IQeXg7gxLt4Q .icon-shape .label{text-align:center;}#mermaid-svg-zei8IQeXg7gxLt4Q .node.clickable{cursor:pointer;}#mermaid-svg-zei8IQeXg7gxLt4Q .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-zei8IQeXg7gxLt4Q .arrowheadPath{fill:#333333;}#mermaid-svg-zei8IQeXg7gxLt4Q .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-zei8IQeXg7gxLt4Q .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-zei8IQeXg7gxLt4Q .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-zei8IQeXg7gxLt4Q .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-zei8IQeXg7gxLt4Q .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-zei8IQeXg7gxLt4Q .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster text{fill:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q .cluster span{color:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-zei8IQeXg7gxLt4Q .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-zei8IQeXg7gxLt4Q rect.text{fill:none;stroke-width:0;}#mermaid-svg-zei8IQeXg7gxLt4Q .icon-shape,#mermaid-svg-zei8IQeXg7gxLt4Q .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-zei8IQeXg7gxLt4Q .icon-shape p,#mermaid-svg-zei8IQeXg7gxLt4Q .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-zei8IQeXg7gxLt4Q .icon-shape .label rect,#mermaid-svg-zei8IQeXg7gxLt4Q .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-zei8IQeXg7gxLt4Q .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-zei8IQeXg7gxLt4Q .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-zei8IQeXg7gxLt4Q :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} GATT
ATT PDU
L2CAP Connection-Oriented Channel
BR/EDR Physical Link
第 72 篇:LE L2CAP Requirements:BLE 上的 ATT Fixed Channel
覆盖章节
-
5.2 LE L2CAP interoperability requirements
-
5.2.1 ATT_MTU
-
5.2.2 LE channel requirements
学习重点
-
LE Attribute L2CAP fixed channel
-
Fixed CID 0x0004
-
default ATT_MTU = 23
-
flushable data
-
reliable / best effort 区别
规范中 LE L2CAP ATT_MTU 表给出默认 ATT_MTU 为 23,并说明 LE Attribute Protocol 使用 fixed CID 0x0004。
Markdown 表格
| 项目 | LE 默认值 |
|---|---|
| ATT_MTU | 23 |
| L2CAP CID | 0x0004 |
第 73 篇:Enhanced ATT Bearer:EATT 是怎么增强 ATT 的
覆盖章节
-
5.3 Enhanced ATT bearer L2CAP interoperability requirements
-
5.3.1 ATT_MTU
-
5.3.2 Channel Requirements
学习重点
-
EATT 是什么
-
Enhanced Credit Based Flow Control
-
多个 ATT bearer 并发
-
为什么 EATT 能改善阻塞问题
-
EATT 和普通 ATT 的区别
Mermaid 图
#mermaid-svg-3NgOMrSOWux4jzNR{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-3NgOMrSOWux4jzNR .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-3NgOMrSOWux4jzNR .error-icon{fill:#552222;}#mermaid-svg-3NgOMrSOWux4jzNR .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-3NgOMrSOWux4jzNR .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-3NgOMrSOWux4jzNR .marker{fill:#333333;stroke:#333333;}#mermaid-svg-3NgOMrSOWux4jzNR .marker.cross{stroke:#333333;}#mermaid-svg-3NgOMrSOWux4jzNR svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-3NgOMrSOWux4jzNR p{margin:0;}#mermaid-svg-3NgOMrSOWux4jzNR .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-3NgOMrSOWux4jzNR .cluster-label text{fill:#333;}#mermaid-svg-3NgOMrSOWux4jzNR .cluster-label span{color:#333;}#mermaid-svg-3NgOMrSOWux4jzNR .cluster-label span p{background-color:transparent;}#mermaid-svg-3NgOMrSOWux4jzNR .label text,#mermaid-svg-3NgOMrSOWux4jzNR span{fill:#333;color:#333;}#mermaid-svg-3NgOMrSOWux4jzNR .node rect,#mermaid-svg-3NgOMrSOWux4jzNR .node circle,#mermaid-svg-3NgOMrSOWux4jzNR .node ellipse,#mermaid-svg-3NgOMrSOWux4jzNR .node polygon,#mermaid-svg-3NgOMrSOWux4jzNR .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-3NgOMrSOWux4jzNR .rough-node .label text,#mermaid-svg-3NgOMrSOWux4jzNR .node .label text,#mermaid-svg-3NgOMrSOWux4jzNR .image-shape .label,#mermaid-svg-3NgOMrSOWux4jzNR .icon-shape .label{text-anchor:middle;}#mermaid-svg-3NgOMrSOWux4jzNR .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-3NgOMrSOWux4jzNR .rough-node .label,#mermaid-svg-3NgOMrSOWux4jzNR .node .label,#mermaid-svg-3NgOMrSOWux4jzNR .image-shape .label,#mermaid-svg-3NgOMrSOWux4jzNR .icon-shape .label{text-align:center;}#mermaid-svg-3NgOMrSOWux4jzNR .node.clickable{cursor:pointer;}#mermaid-svg-3NgOMrSOWux4jzNR .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-3NgOMrSOWux4jzNR .arrowheadPath{fill:#333333;}#mermaid-svg-3NgOMrSOWux4jzNR .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-3NgOMrSOWux4jzNR .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-3NgOMrSOWux4jzNR .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-3NgOMrSOWux4jzNR .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-3NgOMrSOWux4jzNR .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-3NgOMrSOWux4jzNR .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-3NgOMrSOWux4jzNR .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-3NgOMrSOWux4jzNR .cluster text{fill:#333;}#mermaid-svg-3NgOMrSOWux4jzNR .cluster span{color:#333;}#mermaid-svg-3NgOMrSOWux4jzNR div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-3NgOMrSOWux4jzNR .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-3NgOMrSOWux4jzNR rect.text{fill:none;stroke-width:0;}#mermaid-svg-3NgOMrSOWux4jzNR .icon-shape,#mermaid-svg-3NgOMrSOWux4jzNR .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-3NgOMrSOWux4jzNR .icon-shape p,#mermaid-svg-3NgOMrSOWux4jzNR .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-3NgOMrSOWux4jzNR .icon-shape .label rect,#mermaid-svg-3NgOMrSOWux4jzNR .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-3NgOMrSOWux4jzNR .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-3NgOMrSOWux4jzNR .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-3NgOMrSOWux4jzNR :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Client
ATT Bearer 1
EATT Bearer 2
EATT Bearer 3
Server
第 74 篇:L2CAP Collision Mitigation:碰撞如何缓解
覆盖章节
- 5.4 L2CAP collision mitigation
学习重点
-
collision 是什么
-
双方同时建链可能发生什么
-
L2CAP 层如何缓解
-
对实现的影响
第 75 篇:Bearer Support:一个设备到底要支持哪些 Bearer
覆盖章节
- 5.5 Bearer support
学习重点
-
Unenhanced ATT bearer
-
Enhanced ATT bearer
-
BR/EDR bearer
-
LE bearer
-
支持矩阵
-
兼容性策略
阶段十五:GAP Interoperability Requirements
GATT 负责"数据服务",GAP 负责"我怎么找到你、连上你、断了怎么办"。一个像点菜系统,一个像餐厅门口迎宾。
第 76 篇:GAP Interoperability Requirements 总览
覆盖章节
- 6 GAP interoperability requirements
学习重点
-
GATT 与 GAP 的边界
-
连接建立由 GAP 处理
-
ATT bearer 建立依赖 GAP / L2CAP
第 77 篇:BR/EDR GAP Connection Establishment
覆盖章节
-
6.1 BR/EDR GAP interoperability requirements
-
6.1.1 Connection Establishment
学习重点
-
BR/EDR 下如何建立 Unenhanced ATT bearer
-
PSM = ATT
-
如何建立 Enhanced ATT bearer
-
何时需要确认 peer 支持 EATT
-
任意设备都可建立或终止 ATT bearer
规范说明,BR/EDR 上建立 Enhanced ATT bearer 前,需要知道对端支持 Enhanced ATT bearer,例如通过 Server Supported Features 或 SDP record。
第 78 篇:LE GAP Connection Establishment
覆盖章节
-
6.2 LE GAP interoperability requirements
-
6.2.1 Connection Establishment
学习重点
-
LE 下 Unenhanced ATT bearer 如何建立
-
LE 下 EATT 如何建立
-
ATT bearer 如何终止
-
LE 与 BR/EDR 的差异
规范说明,LE 上建立 Unenhanced ATT bearer 使用 GAP connection establishment procedure,Enhanced ATT bearer 使用 EATT fixed PSM。
第 79 篇:Profile Roles:GATT 可以跑在哪些 GAP 角色上
覆盖章节
- 6.2.2 Profile roles
学习重点
-
Central
-
Peripheral
-
GATT Client / Server 与 GAP Central / Peripheral 的关系
-
手机通常是 Central + GATT Client,但不是铁律
Mermaid 图
#mermaid-svg-jYSWePHhA7kSTHKr{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-jYSWePHhA7kSTHKr .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-jYSWePHhA7kSTHKr .error-icon{fill:#552222;}#mermaid-svg-jYSWePHhA7kSTHKr .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-jYSWePHhA7kSTHKr .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-jYSWePHhA7kSTHKr .marker{fill:#333333;stroke:#333333;}#mermaid-svg-jYSWePHhA7kSTHKr .marker.cross{stroke:#333333;}#mermaid-svg-jYSWePHhA7kSTHKr svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-jYSWePHhA7kSTHKr p{margin:0;}#mermaid-svg-jYSWePHhA7kSTHKr .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-jYSWePHhA7kSTHKr .cluster-label text{fill:#333;}#mermaid-svg-jYSWePHhA7kSTHKr .cluster-label span{color:#333;}#mermaid-svg-jYSWePHhA7kSTHKr .cluster-label span p{background-color:transparent;}#mermaid-svg-jYSWePHhA7kSTHKr .label text,#mermaid-svg-jYSWePHhA7kSTHKr span{fill:#333;color:#333;}#mermaid-svg-jYSWePHhA7kSTHKr .node rect,#mermaid-svg-jYSWePHhA7kSTHKr .node circle,#mermaid-svg-jYSWePHhA7kSTHKr .node ellipse,#mermaid-svg-jYSWePHhA7kSTHKr .node polygon,#mermaid-svg-jYSWePHhA7kSTHKr .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-jYSWePHhA7kSTHKr .rough-node .label text,#mermaid-svg-jYSWePHhA7kSTHKr .node .label text,#mermaid-svg-jYSWePHhA7kSTHKr .image-shape .label,#mermaid-svg-jYSWePHhA7kSTHKr .icon-shape .label{text-anchor:middle;}#mermaid-svg-jYSWePHhA7kSTHKr .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-jYSWePHhA7kSTHKr .rough-node .label,#mermaid-svg-jYSWePHhA7kSTHKr .node .label,#mermaid-svg-jYSWePHhA7kSTHKr .image-shape .label,#mermaid-svg-jYSWePHhA7kSTHKr .icon-shape .label{text-align:center;}#mermaid-svg-jYSWePHhA7kSTHKr .node.clickable{cursor:pointer;}#mermaid-svg-jYSWePHhA7kSTHKr .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-jYSWePHhA7kSTHKr .arrowheadPath{fill:#333333;}#mermaid-svg-jYSWePHhA7kSTHKr .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-jYSWePHhA7kSTHKr .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-jYSWePHhA7kSTHKr .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jYSWePHhA7kSTHKr .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-jYSWePHhA7kSTHKr .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jYSWePHhA7kSTHKr .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-jYSWePHhA7kSTHKr .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-jYSWePHhA7kSTHKr .cluster text{fill:#333;}#mermaid-svg-jYSWePHhA7kSTHKr .cluster span{color:#333;}#mermaid-svg-jYSWePHhA7kSTHKr div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-jYSWePHhA7kSTHKr .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-jYSWePHhA7kSTHKr rect.text{fill:none;stroke-width:0;}#mermaid-svg-jYSWePHhA7kSTHKr .icon-shape,#mermaid-svg-jYSWePHhA7kSTHKr .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-jYSWePHhA7kSTHKr .icon-shape p,#mermaid-svg-jYSWePHhA7kSTHKr .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-jYSWePHhA7kSTHKr .icon-shape .label rect,#mermaid-svg-jYSWePHhA7kSTHKr .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-jYSWePHhA7kSTHKr .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-jYSWePHhA7kSTHKr .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-jYSWePHhA7kSTHKr :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 不必然等于
不必然等于
GAP Role
Central
Peripheral
GATT Role
Client
Server
第 80 篇:Disconnected Events:断开后通知和指示怎么办
覆盖章节
-
6.3 Disconnected events
-
6.3.1 Notifications and indications while disconnected
学习重点
-
Client 配置了 notification / indication 后断开
-
Server 需要尝试重建连接
-
Client 是 Central 时主动建连
-
Client 是 Peripheral 时进入 connectable mode
-
Server 无法重连时丢弃事件
规范说明,如果 Server 因事件需要发送 notification 或 indication,但连接已断开,则应重新建立连接;如果无法重建连接,则丢弃该事件。
Mermaid 图
#mermaid-svg-OJwQORUBLoXeMEIX{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-OJwQORUBLoXeMEIX .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-OJwQORUBLoXeMEIX .error-icon{fill:#552222;}#mermaid-svg-OJwQORUBLoXeMEIX .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-OJwQORUBLoXeMEIX .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-OJwQORUBLoXeMEIX .marker{fill:#333333;stroke:#333333;}#mermaid-svg-OJwQORUBLoXeMEIX .marker.cross{stroke:#333333;}#mermaid-svg-OJwQORUBLoXeMEIX svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-OJwQORUBLoXeMEIX p{margin:0;}#mermaid-svg-OJwQORUBLoXeMEIX .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-OJwQORUBLoXeMEIX .cluster-label text{fill:#333;}#mermaid-svg-OJwQORUBLoXeMEIX .cluster-label span{color:#333;}#mermaid-svg-OJwQORUBLoXeMEIX .cluster-label span p{background-color:transparent;}#mermaid-svg-OJwQORUBLoXeMEIX .label text,#mermaid-svg-OJwQORUBLoXeMEIX span{fill:#333;color:#333;}#mermaid-svg-OJwQORUBLoXeMEIX .node rect,#mermaid-svg-OJwQORUBLoXeMEIX .node circle,#mermaid-svg-OJwQORUBLoXeMEIX .node ellipse,#mermaid-svg-OJwQORUBLoXeMEIX .node polygon,#mermaid-svg-OJwQORUBLoXeMEIX .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-OJwQORUBLoXeMEIX .rough-node .label text,#mermaid-svg-OJwQORUBLoXeMEIX .node .label text,#mermaid-svg-OJwQORUBLoXeMEIX .image-shape .label,#mermaid-svg-OJwQORUBLoXeMEIX .icon-shape .label{text-anchor:middle;}#mermaid-svg-OJwQORUBLoXeMEIX .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-OJwQORUBLoXeMEIX .rough-node .label,#mermaid-svg-OJwQORUBLoXeMEIX .node .label,#mermaid-svg-OJwQORUBLoXeMEIX .image-shape .label,#mermaid-svg-OJwQORUBLoXeMEIX .icon-shape .label{text-align:center;}#mermaid-svg-OJwQORUBLoXeMEIX .node.clickable{cursor:pointer;}#mermaid-svg-OJwQORUBLoXeMEIX .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-OJwQORUBLoXeMEIX .arrowheadPath{fill:#333333;}#mermaid-svg-OJwQORUBLoXeMEIX .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-OJwQORUBLoXeMEIX .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-OJwQORUBLoXeMEIX .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OJwQORUBLoXeMEIX .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-OJwQORUBLoXeMEIX .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OJwQORUBLoXeMEIX .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-OJwQORUBLoXeMEIX .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-OJwQORUBLoXeMEIX .cluster text{fill:#333;}#mermaid-svg-OJwQORUBLoXeMEIX .cluster span{color:#333;}#mermaid-svg-OJwQORUBLoXeMEIX div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-OJwQORUBLoXeMEIX .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-OJwQORUBLoXeMEIX rect.text{fill:none;stroke-width:0;}#mermaid-svg-OJwQORUBLoXeMEIX .icon-shape,#mermaid-svg-OJwQORUBLoXeMEIX .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-OJwQORUBLoXeMEIX .icon-shape p,#mermaid-svg-OJwQORUBLoXeMEIX .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-OJwQORUBLoXeMEIX .icon-shape .label rect,#mermaid-svg-OJwQORUBLoXeMEIX .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-OJwQORUBLoXeMEIX .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-OJwQORUBLoXeMEIX .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-OJwQORUBLoXeMEIX :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Yes
No
Yes
No
Event triggers notification/indication
Connection exists?
Send Notification/Indication
Try to re-establish connection
Reconnect success?
Discard this event
阶段十六:Defined GATT Service
第 7 章讲的是 GATT 自己定义的服务。别看它名字像"系统自带小工具",实际上缓存一致性、服务变化、EATT 支持都靠它撑场面。
第 81 篇:Defined GATT Service 总览
覆盖章节
- 7 Defined GATT service
学习重点
-
GATT Service 是 primary service
-
本章定义的 characteristics 都属于 <<GATT Service>>
-
GATT Service 的作用
规范说明,本节定义的所有 characteristics 都应包含在 UUID 为 <<GATT Service>> 的 primary service 中。
第 82 篇:Service Changed:服务表变了,快刷新缓存
覆盖章节
- 7.1 Service Changed
学习重点
-
Service Changed Characteristic
-
Indication
-
affected handle range
-
Client 缓存失效
-
为什么修改固件服务表后需要 Service Changed
Mermaid 图
Client Server Client Server #mermaid-svg-g4byEJsSsUJrzSsk{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-g4byEJsSsUJrzSsk .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-g4byEJsSsUJrzSsk .error-icon{fill:#552222;}#mermaid-svg-g4byEJsSsUJrzSsk .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-g4byEJsSsUJrzSsk .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-g4byEJsSsUJrzSsk .marker{fill:#333333;stroke:#333333;}#mermaid-svg-g4byEJsSsUJrzSsk .marker.cross{stroke:#333333;}#mermaid-svg-g4byEJsSsUJrzSsk svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-g4byEJsSsUJrzSsk p{margin:0;}#mermaid-svg-g4byEJsSsUJrzSsk .actor{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-g4byEJsSsUJrzSsk text.actor>tspan{fill:black;stroke:none;}#mermaid-svg-g4byEJsSsUJrzSsk .actor-line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-g4byEJsSsUJrzSsk .innerArc{stroke-width:1.5;stroke-dasharray:none;}#mermaid-svg-g4byEJsSsUJrzSsk .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-svg-g4byEJsSsUJrzSsk .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-svg-g4byEJsSsUJrzSsk #arrowhead path{fill:#333;stroke:#333;}#mermaid-svg-g4byEJsSsUJrzSsk .sequenceNumber{fill:white;}#mermaid-svg-g4byEJsSsUJrzSsk #sequencenumber{fill:#333;}#mermaid-svg-g4byEJsSsUJrzSsk #crosshead path{fill:#333;stroke:#333;}#mermaid-svg-g4byEJsSsUJrzSsk .messageText{fill:#333;stroke:none;}#mermaid-svg-g4byEJsSsUJrzSsk .labelBox{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-g4byEJsSsUJrzSsk .labelText,#mermaid-svg-g4byEJsSsUJrzSsk .labelText>tspan{fill:black;stroke:none;}#mermaid-svg-g4byEJsSsUJrzSsk .loopText,#mermaid-svg-g4byEJsSsUJrzSsk .loopText>tspan{fill:black;stroke:none;}#mermaid-svg-g4byEJsSsUJrzSsk .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);}#mermaid-svg-g4byEJsSsUJrzSsk .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-svg-g4byEJsSsUJrzSsk .noteText,#mermaid-svg-g4byEJsSsUJrzSsk .noteText>tspan{fill:black;stroke:none;}#mermaid-svg-g4byEJsSsUJrzSsk .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-svg-g4byEJsSsUJrzSsk .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-svg-g4byEJsSsUJrzSsk .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-svg-g4byEJsSsUJrzSsk .actorPopupMenu{position:absolute;}#mermaid-svg-g4byEJsSsUJrzSsk .actorPopupMenuPanel{position:absolute;fill:#ECECFF;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);filter:drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));}#mermaid-svg-g4byEJsSsUJrzSsk .actor-man line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;}#mermaid-svg-g4byEJsSsUJrzSsk .actor-man circle,#mermaid-svg-g4byEJsSsUJrzSsk line{stroke:hsl(259.6261682243, 59.7765363128%, 87.9019607843%);fill:#ECECFF;stroke-width:2px;}#mermaid-svg-g4byEJsSsUJrzSsk :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Service Changed IndicationAffected Handle RangeConfirm IndicationRediscover affected services
第 83 篇:Client Supported Features:Client 支持什么能力
覆盖章节
- 7.2 Client Supported Features
学习重点
-
Client Supported Features characteristic
-
Robust Caching 支持位
-
Multiple Handle Value Notifications 支持位
-
Client 主动告诉 Server 自己能力
-
和后续行为优化的关系
第 84 篇:Database Hash:数据库指纹
覆盖章节
- 7.3 Database Hash
学习重点
-
Database Hash 的目的
-
判断 GATT 数据库是否变化
-
Robust Caching 的核心工具
-
和 Service Changed 的关系
Mermaid 图
#mermaid-svg-dQLlQNgMgx5Ar8Jw{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .error-icon{fill:#552222;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .marker{fill:#333333;stroke:#333333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .marker.cross{stroke:#333333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw p{margin:0;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster-label text{fill:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster-label span{color:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster-label span p{background-color:transparent;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .label text,#mermaid-svg-dQLlQNgMgx5Ar8Jw span{fill:#333;color:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .node rect,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node circle,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node ellipse,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node polygon,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .rough-node .label text,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node .label text,#mermaid-svg-dQLlQNgMgx5Ar8Jw .image-shape .label,#mermaid-svg-dQLlQNgMgx5Ar8Jw .icon-shape .label{text-anchor:middle;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .rough-node .label,#mermaid-svg-dQLlQNgMgx5Ar8Jw .node .label,#mermaid-svg-dQLlQNgMgx5Ar8Jw .image-shape .label,#mermaid-svg-dQLlQNgMgx5Ar8Jw .icon-shape .label{text-align:center;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .node.clickable{cursor:pointer;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .arrowheadPath{fill:#333333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-dQLlQNgMgx5Ar8Jw .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-dQLlQNgMgx5Ar8Jw .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster text{fill:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .cluster span{color:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-dQLlQNgMgx5Ar8Jw rect.text{fill:none;stroke-width:0;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .icon-shape,#mermaid-svg-dQLlQNgMgx5Ar8Jw .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .icon-shape p,#mermaid-svg-dQLlQNgMgx5Ar8Jw .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .icon-shape .label rect,#mermaid-svg-dQLlQNgMgx5Ar8Jw .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-dQLlQNgMgx5Ar8Jw .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-dQLlQNgMgx5Ar8Jw .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-dQLlQNgMgx5Ar8Jw :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Same
Different
GATT Database
Database Hash
Client Cache
Compare Hash
Use Cache
Rediscover Database
第 85 篇:Database Hash Calculation:Hash 到底怎么算
覆盖章节
- 7.3.1 Database Hash calculation
学习重点
-
Database Hash 参与计算的内容
-
哪些 attribute 会影响 hash
-
顺序和 handle 的影响
-
Appendix B 的示例铺垫
第 86 篇:Server Supported Features:Server 支持 EATT 吗?
覆盖章节
- 7.4 Server Supported Features
学习重点
-
Server Supported Features characteristic
-
EATT Supported bit
-
Client 如何判断是否能建立 EATT
-
BR/EDR 下 EATT 检查的重要性
阶段十七:Security Considerations
第 87 篇:GATT Security 总览:属性不是你想读就能读
覆盖章节
- 8 Security considerations
学习重点
-
GATT 安全作用在 characteristic 级别
-
Authentication
-
Authorization
-
Encryption
-
每个 characteristic 可有不同安全要求
第 88 篇:Authentication Requirements:认证要求
覆盖章节
- 8.1 Authentication requirements
学习重点
-
认证如何影响读写
-
特征值之间可以有不同认证要求
-
一个 service 内也可能有不同强度要求
-
insufficient authentication 类错误
规范说明,每个 characteristic 可以有不同的安全属性,能读不代表能写,能写也不代表能读。
第 89 篇:Authorization Requirements:授权要求
覆盖章节
- 8.2 Authorization requirements
学习重点
-
authorization 独立应用到每个 characteristic
-
authorization 与 authentication 的区别
-
Insufficient Authorization 0x08
-
Server 如何拒绝未授权请求
规范说明,如果请求访问未授权的 characteristic,responder 应发送 ATT_ERROR_RSP,Error Code 为 Insufficient Authorization 0x08。
Mermaid 图
#mermaid-svg-nbNeVqDp9ixRjadg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-nbNeVqDp9ixRjadg .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-nbNeVqDp9ixRjadg .error-icon{fill:#552222;}#mermaid-svg-nbNeVqDp9ixRjadg .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-nbNeVqDp9ixRjadg .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-nbNeVqDp9ixRjadg .marker{fill:#333333;stroke:#333333;}#mermaid-svg-nbNeVqDp9ixRjadg .marker.cross{stroke:#333333;}#mermaid-svg-nbNeVqDp9ixRjadg svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-nbNeVqDp9ixRjadg p{margin:0;}#mermaid-svg-nbNeVqDp9ixRjadg .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-nbNeVqDp9ixRjadg .cluster-label text{fill:#333;}#mermaid-svg-nbNeVqDp9ixRjadg .cluster-label span{color:#333;}#mermaid-svg-nbNeVqDp9ixRjadg .cluster-label span p{background-color:transparent;}#mermaid-svg-nbNeVqDp9ixRjadg .label text,#mermaid-svg-nbNeVqDp9ixRjadg span{fill:#333;color:#333;}#mermaid-svg-nbNeVqDp9ixRjadg .node rect,#mermaid-svg-nbNeVqDp9ixRjadg .node circle,#mermaid-svg-nbNeVqDp9ixRjadg .node ellipse,#mermaid-svg-nbNeVqDp9ixRjadg .node polygon,#mermaid-svg-nbNeVqDp9ixRjadg .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-nbNeVqDp9ixRjadg .rough-node .label text,#mermaid-svg-nbNeVqDp9ixRjadg .node .label text,#mermaid-svg-nbNeVqDp9ixRjadg .image-shape .label,#mermaid-svg-nbNeVqDp9ixRjadg .icon-shape .label{text-anchor:middle;}#mermaid-svg-nbNeVqDp9ixRjadg .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-nbNeVqDp9ixRjadg .rough-node .label,#mermaid-svg-nbNeVqDp9ixRjadg .node .label,#mermaid-svg-nbNeVqDp9ixRjadg .image-shape .label,#mermaid-svg-nbNeVqDp9ixRjadg .icon-shape .label{text-align:center;}#mermaid-svg-nbNeVqDp9ixRjadg .node.clickable{cursor:pointer;}#mermaid-svg-nbNeVqDp9ixRjadg .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-nbNeVqDp9ixRjadg .arrowheadPath{fill:#333333;}#mermaid-svg-nbNeVqDp9ixRjadg .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-nbNeVqDp9ixRjadg .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-nbNeVqDp9ixRjadg .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-nbNeVqDp9ixRjadg .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-nbNeVqDp9ixRjadg .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-nbNeVqDp9ixRjadg .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-nbNeVqDp9ixRjadg .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-nbNeVqDp9ixRjadg .cluster text{fill:#333;}#mermaid-svg-nbNeVqDp9ixRjadg .cluster span{color:#333;}#mermaid-svg-nbNeVqDp9ixRjadg div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-nbNeVqDp9ixRjadg .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-nbNeVqDp9ixRjadg rect.text{fill:none;stroke-width:0;}#mermaid-svg-nbNeVqDp9ixRjadg .icon-shape,#mermaid-svg-nbNeVqDp9ixRjadg .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-nbNeVqDp9ixRjadg .icon-shape p,#mermaid-svg-nbNeVqDp9ixRjadg .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-nbNeVqDp9ixRjadg .icon-shape .label rect,#mermaid-svg-nbNeVqDp9ixRjadg .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-nbNeVqDp9ixRjadg .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-nbNeVqDp9ixRjadg .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-nbNeVqDp9ixRjadg :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} No
Yes
No
Yes
Client Read/Write Request
Authenticated?
Return authentication-related error
Authorized?
ATT_ERROR_RSP
Insufficient Authorization 0x08
Allow Access
阶段十八:SDP Interoperability Requirements
第 90 篇:SDP Interoperability:BR/EDR 上如何发布 GATT 服务
覆盖章节
- 9 SDP interoperability requirements
学习重点
-
为什么 BR/EDR 下需要 SDP record
-
ATT only
-
EATT only
-
ATT + EATT
-
GATT Service Start Handle
-
GATT Service End Handle
-
PSM = ATT / EATT
规范说明,支持 GATT over BR/EDR 的设备需要根据 ATT/EATT 支持情况发布对应 SDP record;如果同时支持 ATT 和 EATT,则使用另一张 SDP record 表。
Mermaid 图
#mermaid-svg-AK0VQCv4hbVZDNnC{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-AK0VQCv4hbVZDNnC .error-icon{fill:#552222;}#mermaid-svg-AK0VQCv4hbVZDNnC .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-AK0VQCv4hbVZDNnC .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-AK0VQCv4hbVZDNnC .marker{fill:#333333;stroke:#333333;}#mermaid-svg-AK0VQCv4hbVZDNnC .marker.cross{stroke:#333333;}#mermaid-svg-AK0VQCv4hbVZDNnC svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-AK0VQCv4hbVZDNnC p{margin:0;}#mermaid-svg-AK0VQCv4hbVZDNnC .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster-label text{fill:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster-label span{color:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster-label span p{background-color:transparent;}#mermaid-svg-AK0VQCv4hbVZDNnC .label text,#mermaid-svg-AK0VQCv4hbVZDNnC span{fill:#333;color:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC .node rect,#mermaid-svg-AK0VQCv4hbVZDNnC .node circle,#mermaid-svg-AK0VQCv4hbVZDNnC .node ellipse,#mermaid-svg-AK0VQCv4hbVZDNnC .node polygon,#mermaid-svg-AK0VQCv4hbVZDNnC .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-AK0VQCv4hbVZDNnC .rough-node .label text,#mermaid-svg-AK0VQCv4hbVZDNnC .node .label text,#mermaid-svg-AK0VQCv4hbVZDNnC .image-shape .label,#mermaid-svg-AK0VQCv4hbVZDNnC .icon-shape .label{text-anchor:middle;}#mermaid-svg-AK0VQCv4hbVZDNnC .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-AK0VQCv4hbVZDNnC .rough-node .label,#mermaid-svg-AK0VQCv4hbVZDNnC .node .label,#mermaid-svg-AK0VQCv4hbVZDNnC .image-shape .label,#mermaid-svg-AK0VQCv4hbVZDNnC .icon-shape .label{text-align:center;}#mermaid-svg-AK0VQCv4hbVZDNnC .node.clickable{cursor:pointer;}#mermaid-svg-AK0VQCv4hbVZDNnC .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-AK0VQCv4hbVZDNnC .arrowheadPath{fill:#333333;}#mermaid-svg-AK0VQCv4hbVZDNnC .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-AK0VQCv4hbVZDNnC .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-AK0VQCv4hbVZDNnC .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-AK0VQCv4hbVZDNnC .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-AK0VQCv4hbVZDNnC .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-AK0VQCv4hbVZDNnC .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster text{fill:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC .cluster span{color:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-AK0VQCv4hbVZDNnC .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-AK0VQCv4hbVZDNnC rect.text{fill:none;stroke-width:0;}#mermaid-svg-AK0VQCv4hbVZDNnC .icon-shape,#mermaid-svg-AK0VQCv4hbVZDNnC .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-AK0VQCv4hbVZDNnC .icon-shape p,#mermaid-svg-AK0VQCv4hbVZDNnC .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-AK0VQCv4hbVZDNnC .icon-shape .label rect,#mermaid-svg-AK0VQCv4hbVZDNnC .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-AK0VQCv4hbVZDNnC .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-AK0VQCv4hbVZDNnC .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-AK0VQCv4hbVZDNnC :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Only one of ATT or EATT
Both ATT and EATT
BR/EDR Device supports GATT
Supports ATT/EATT?
Publish SDP Record Table 9.1
Publish SDP Record Table 9.2
第 91 篇:References:GATT 依赖了哪些外部规范
覆盖章节
- 10 References
学习重点
-
Assigned Numbers
-
RFC-4493
-
Core Specification Supplement
-
为什么 Database Hash 会引用密码学算法
-
为什么 UUID 要看 Assigned Numbers
阶段十九:Appendix 实战数据库
第 92 篇:Appendix A Example ATT Server Contents:从示例数据库看 GATT 全貌
覆盖章节
- Appendix A Example ATT Server contents
学习重点
-
示例 ATT Server 数据库
-
Handle 排列
-
GAP Service
-
GATT Service
-
Battery State Service
-
Include
-
Characteristic Declaration
-
Characteristic Value
-
Descriptor
-
用 Markdown 表格完整转换 Appendix A
规范 Appendix A 给出了一个 ATT Server 示例,包括 GAP Service、GATT Service、Battery State Service、Thermometer Humidity Service、Manufacturer Service 等 attribute。
Mermaid 图
#mermaid-svg-cOgqj7aDY30Slm9k{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-cOgqj7aDY30Slm9k .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-cOgqj7aDY30Slm9k .error-icon{fill:#552222;}#mermaid-svg-cOgqj7aDY30Slm9k .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-cOgqj7aDY30Slm9k .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-cOgqj7aDY30Slm9k .marker{fill:#333333;stroke:#333333;}#mermaid-svg-cOgqj7aDY30Slm9k .marker.cross{stroke:#333333;}#mermaid-svg-cOgqj7aDY30Slm9k svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-cOgqj7aDY30Slm9k p{margin:0;}#mermaid-svg-cOgqj7aDY30Slm9k .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-cOgqj7aDY30Slm9k .cluster-label text{fill:#333;}#mermaid-svg-cOgqj7aDY30Slm9k .cluster-label span{color:#333;}#mermaid-svg-cOgqj7aDY30Slm9k .cluster-label span p{background-color:transparent;}#mermaid-svg-cOgqj7aDY30Slm9k .label text,#mermaid-svg-cOgqj7aDY30Slm9k span{fill:#333;color:#333;}#mermaid-svg-cOgqj7aDY30Slm9k .node rect,#mermaid-svg-cOgqj7aDY30Slm9k .node circle,#mermaid-svg-cOgqj7aDY30Slm9k .node ellipse,#mermaid-svg-cOgqj7aDY30Slm9k .node polygon,#mermaid-svg-cOgqj7aDY30Slm9k .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-cOgqj7aDY30Slm9k .rough-node .label text,#mermaid-svg-cOgqj7aDY30Slm9k .node .label text,#mermaid-svg-cOgqj7aDY30Slm9k .image-shape .label,#mermaid-svg-cOgqj7aDY30Slm9k .icon-shape .label{text-anchor:middle;}#mermaid-svg-cOgqj7aDY30Slm9k .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-cOgqj7aDY30Slm9k .rough-node .label,#mermaid-svg-cOgqj7aDY30Slm9k .node .label,#mermaid-svg-cOgqj7aDY30Slm9k .image-shape .label,#mermaid-svg-cOgqj7aDY30Slm9k .icon-shape .label{text-align:center;}#mermaid-svg-cOgqj7aDY30Slm9k .node.clickable{cursor:pointer;}#mermaid-svg-cOgqj7aDY30Slm9k .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-cOgqj7aDY30Slm9k .arrowheadPath{fill:#333333;}#mermaid-svg-cOgqj7aDY30Slm9k .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-cOgqj7aDY30Slm9k .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-cOgqj7aDY30Slm9k .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cOgqj7aDY30Slm9k .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-cOgqj7aDY30Slm9k .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cOgqj7aDY30Slm9k .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-cOgqj7aDY30Slm9k .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-cOgqj7aDY30Slm9k .cluster text{fill:#333;}#mermaid-svg-cOgqj7aDY30Slm9k .cluster span{color:#333;}#mermaid-svg-cOgqj7aDY30Slm9k div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-cOgqj7aDY30Slm9k .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-cOgqj7aDY30Slm9k rect.text{fill:none;stroke-width:0;}#mermaid-svg-cOgqj7aDY30Slm9k .icon-shape,#mermaid-svg-cOgqj7aDY30Slm9k .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-cOgqj7aDY30Slm9k .icon-shape p,#mermaid-svg-cOgqj7aDY30Slm9k .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-cOgqj7aDY30Slm9k .icon-shape .label rect,#mermaid-svg-cOgqj7aDY30Slm9k .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-cOgqj7aDY30Slm9k .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-cOgqj7aDY30Slm9k .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-cOgqj7aDY30Slm9k :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Example ATT Server Database
GAP Service
GATT Service
Battery State Service
Thermometer Humidity Service
Included Manufacturer Service
第 93 篇:Appendix A 逐行拆解:Handle、Type、Value 如何组成数据库
覆盖章节
- Appendix A Example ATT Server contents
学习重点
-
每一行 attribute 的含义
-
Primary Service 行
-
Characteristic Declaration 行
-
Characteristic Value 行
-
Include 行
-
Descriptor 行
-
从 handle 范围推导 service 边界
输出内容
-
把 Appendix A 表格逐行转换为 Markdown
-
每行添加解释列
-
用颜色概念解释不同 attribute 类型,但 Markdown 中用分类列实现
Markdown 表格模板
| Handle | Attribute Type | Attribute Value | 分类 | 解释 |
|---|---|---|---|---|
| 0x0001 | <<Primary Service>> | <<GAP Service>> | Service | 声明 GAP 服务起点 |
| 0x0004 | <<Characteristic>> | {...} | Characteristic Declaration | 声明某个特征值 |
| 0x0006 | <<Device Name>> | "Example Device" | Characteristic Value | 真实设备名 |
第 94 篇:Appendix B Example Database Hash:用例子理解数据库 Hash
覆盖章节
- Appendix B Example Database Hash
学习重点
-
Appendix B 示例如何计算 Database Hash
-
输入数据如何组织
-
Hash 结果如何验证
-
和 Robust Caching 的闭环
Mermaid 图
#mermaid-svg-XrvHcQwGkWucapr6{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-XrvHcQwGkWucapr6 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-XrvHcQwGkWucapr6 .error-icon{fill:#552222;}#mermaid-svg-XrvHcQwGkWucapr6 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-XrvHcQwGkWucapr6 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-XrvHcQwGkWucapr6 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-XrvHcQwGkWucapr6 .marker.cross{stroke:#333333;}#mermaid-svg-XrvHcQwGkWucapr6 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-XrvHcQwGkWucapr6 p{margin:0;}#mermaid-svg-XrvHcQwGkWucapr6 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-XrvHcQwGkWucapr6 .cluster-label text{fill:#333;}#mermaid-svg-XrvHcQwGkWucapr6 .cluster-label span{color:#333;}#mermaid-svg-XrvHcQwGkWucapr6 .cluster-label span p{background-color:transparent;}#mermaid-svg-XrvHcQwGkWucapr6 .label text,#mermaid-svg-XrvHcQwGkWucapr6 span{fill:#333;color:#333;}#mermaid-svg-XrvHcQwGkWucapr6 .node rect,#mermaid-svg-XrvHcQwGkWucapr6 .node circle,#mermaid-svg-XrvHcQwGkWucapr6 .node ellipse,#mermaid-svg-XrvHcQwGkWucapr6 .node polygon,#mermaid-svg-XrvHcQwGkWucapr6 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-XrvHcQwGkWucapr6 .rough-node .label text,#mermaid-svg-XrvHcQwGkWucapr6 .node .label text,#mermaid-svg-XrvHcQwGkWucapr6 .image-shape .label,#mermaid-svg-XrvHcQwGkWucapr6 .icon-shape .label{text-anchor:middle;}#mermaid-svg-XrvHcQwGkWucapr6 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-XrvHcQwGkWucapr6 .rough-node .label,#mermaid-svg-XrvHcQwGkWucapr6 .node .label,#mermaid-svg-XrvHcQwGkWucapr6 .image-shape .label,#mermaid-svg-XrvHcQwGkWucapr6 .icon-shape .label{text-align:center;}#mermaid-svg-XrvHcQwGkWucapr6 .node.clickable{cursor:pointer;}#mermaid-svg-XrvHcQwGkWucapr6 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-XrvHcQwGkWucapr6 .arrowheadPath{fill:#333333;}#mermaid-svg-XrvHcQwGkWucapr6 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-XrvHcQwGkWucapr6 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-XrvHcQwGkWucapr6 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XrvHcQwGkWucapr6 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-XrvHcQwGkWucapr6 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XrvHcQwGkWucapr6 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-XrvHcQwGkWucapr6 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-XrvHcQwGkWucapr6 .cluster text{fill:#333;}#mermaid-svg-XrvHcQwGkWucapr6 .cluster span{color:#333;}#mermaid-svg-XrvHcQwGkWucapr6 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-XrvHcQwGkWucapr6 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-XrvHcQwGkWucapr6 rect.text{fill:none;stroke-width:0;}#mermaid-svg-XrvHcQwGkWucapr6 .icon-shape,#mermaid-svg-XrvHcQwGkWucapr6 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-XrvHcQwGkWucapr6 .icon-shape p,#mermaid-svg-XrvHcQwGkWucapr6 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-XrvHcQwGkWucapr6 .icon-shape .label rect,#mermaid-svg-XrvHcQwGkWucapr6 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-XrvHcQwGkWucapr6 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-XrvHcQwGkWucapr6 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-XrvHcQwGkWucapr6 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} Attribute Database
Select hash-relevant attributes
Concatenate fields in defined order
Run hash algorithm
Database Hash Characteristic Value
Client compares with cached hash
6. 全章节覆盖矩阵
| 规范章节 | 标题 | 对应学习篇 |
|---|---|---|
| 1 | Introduction | 第 1~3 篇 |
| 1.1 | Scope | 第 1 篇 |
| 1.2 | Profile dependency | 第 2 篇 |
| 1.3 | No longer used | 第 3 篇 |
| 1.4 | No longer used | 第 3 篇 |
| 1.5 | Conventions | 第 3 篇 |
| 2 | Profile overview | 第 4 篇 |
| 2.1 | Protocol stack | 第 5 篇 |
| 2.2 | Configurations and roles | 第 6 篇 |
| 2.3 | User requirements and scenarios | 第 7 篇 |
| 2.4 | Profile fundamentals | 第 8 篇 |
| 2.5 | Attribute Protocol | 第 9~14 篇 |
| 2.5.1 | Overview | 第 9~10 篇 |
| 2.5.2 | Attribute caching | 第 11 篇 |
| 2.5.2.1 | Robust Caching | 第 12 篇 |
| 2.5.3 | Attribute grouping | 第 13 篇 |
| 2.5.4 | UUIDs | 第 14 篇 |
| 2.6 | GATT Profile hierarchy | 第 15~18 篇 |
| 2.6.1 | Overview | 第 15 篇 |
| 2.6.2 | Service | 第 16 篇 |
| 2.6.3 | Included services | 第 17 篇 |
| 2.6.4 | Characteristic | 第 18 篇 |
| 2.7 | Configured Broadcast | 第 19 篇 |
| 3 | Service interoperability requirements | 第 20~35 篇 |
| 3.1 | Service definition | 第 20 篇 |
| 3.2 | Include definition | 第 21 篇 |
| 3.3 | Characteristic definition | 第 22 篇 |
| 3.3.1 | Characteristic declaration | 第 23 篇 |
| 3.3.1.1 | Characteristic Properties | 第 24 篇 |
| 3.3.1.2 | Characteristic Value Attribute Handle | 第 25 篇 |
| 3.3.1.3 | Characteristic UUID | 第 26 篇 |
| 3.3.2 | Characteristic Value declaration | 第 27 篇 |
| 3.3.3 | Characteristic descriptor declarations | 第 28 篇 |
| 3.3.3.1 | Characteristic Extended Properties | 第 29 篇 |
| 3.3.3.2 | Characteristic User Description | 第 30 篇 |
| 3.3.3.3 | Client Characteristic Configuration | 第 31 篇 |
| 3.3.3.4 | Server Characteristic Configuration | 第 32 篇 |
| 3.3.3.5 | Characteristic Presentation Format | 第 33 篇 |
| 3.3.3.6 | Characteristic Aggregate Format | 第 34 篇 |
| 3.4 | Summary of GATT Profile attribute types | 第 35 篇 |
| 4 | GATT feature requirements | 第 36~69 篇 |
| 4.1 | Overview | 第 36 篇 |
| 4.2 | Feature support and procedure mapping | 第 37 篇 |
| 4.3 | Server configuration | 第 38 篇 |
| 4.3.1 | Exchange MTU | 第 38 篇 |
| 4.4 | Primary Service Discovery | 第 39~41 篇 |
| 4.4.1 | Discover All Primary Services | 第 40 篇 |
| 4.4.2 | Discover Primary Service by Service UUID | 第 41 篇 |
| 4.5 | Relationship Discovery | 第 42 篇 |
| 4.5.1 | Find Included Services | 第 42 篇 |
| 4.6 | Characteristic discovery | 第 43~45 篇 |
| 4.6.1 | Discover All Characteristics of a Service | 第 44 篇 |
| 4.6.2 | Discover Characteristics by UUID | 第 45 篇 |
| 4.7 | Characteristic Descriptor Discovery | 第 46 篇 |
| 4.7.1 | Discover All Characteristic Descriptors | 第 46 篇 |
| 4.8 | Characteristic Value Read | 第 47~52 篇 |
| 4.8.1 | Read Characteristic Value | 第 48 篇 |
| 4.8.2 | Read Using Characteristic UUID | 第 49 篇 |
| 4.8.3 | Read Long Characteristic Value | 第 50 篇 |
| 4.8.4 | Read Multiple Characteristic Values | 第 51 篇 |
| 4.8.5 | Read Multiple Variable Length Characteristic Values | 第 52 篇 |
| 4.9 | Characteristic Value Write | 第 53~58 篇 |
| 4.9.1 | Write Without Response | 第 54 篇 |
| 4.9.2 | Signed Write Without Response | 第 55 篇 |
| 4.9.3 | Write Characteristic Value | 第 56 篇 |
| 4.9.4 | Write Long Characteristic Value | 第 57 篇 |
| 4.9.5 | Characteristic Value Reliable Writes | 第 58 篇 |
| 4.10 | Characteristic Value Notification | 第 59~61 篇 |
| 4.10.1 | Single Notification | 第 60 篇 |
| 4.10.2 | Multiple Variable Length Notifications | 第 61 篇 |
| 4.11 | Characteristic Value Indication | 第 62 篇 |
| 4.11.1 | Indication | 第 62 篇 |
| 4.12 | Characteristic Descriptors | 第 63~67 篇 |
| 4.12.1 | Read Characteristic Descriptor | 第 64 篇 |
| 4.12.2 | Read Long Characteristic Descriptor | 第 65 篇 |
| 4.12.3 | Write Characteristic Descriptor | 第 66 篇 |
| 4.12.4 | Write Long Characteristic Descriptor | 第 67 篇 |
| 4.13 | GATT procedure mapping to ATT protocol opcodes | 第 68 篇 |
| 4.14 | Procedure timeouts | 第 69 篇 |
| 5 | L2CAP interoperability requirements | 第 70~75 篇 |
| 5.1 | BR/EDR L2CAP interoperability requirements | 第 71 篇 |
| 5.1.1 | ATT_MTU | 第 71 篇 |
| 5.1.2 | BR/EDR channel requirements | 第 71 篇 |
| 5.1.3 | No longer used | 第 71 篇 |
| 5.2 | LE L2CAP interoperability requirements | 第 72 篇 |
| 5.2.1 | ATT_MTU | 第 72 篇 |
| 5.2.2 | LE channel requirements | 第 72 篇 |
| 5.3 | Enhanced ATT bearer L2CAP interoperability requirements | 第 73 篇 |
| 5.3.1 | ATT_MTU | 第 73 篇 |
| 5.3.2 | Channel Requirements | 第 73 篇 |
| 5.4 | L2CAP collision mitigation | 第 74 篇 |
| 5.5 | Bearer support | 第 75 篇 |
| 6 | GAP interoperability requirements | 第 76~80 篇 |
| 6.1 | BR/EDR GAP interoperability requirements | 第 77 篇 |
| 6.1.1 | Connection Establishment | 第 77 篇 |
| 6.2 | LE GAP interoperability requirements | 第 78~79 篇 |
| 6.2.1 | Connection Establishment | 第 78 篇 |
| 6.2.2 | Profile roles | 第 79 篇 |
| 6.3 | Disconnected events | 第 80 篇 |
| 6.3.1 | Notifications and indications while disconnected | 第 80 篇 |
| 7 | Defined GATT service | 第 81~86 篇 |
| 7.1 | Service Changed | 第 82 篇 |
| 7.2 | Client Supported Features | 第 83 篇 |
| 7.3 | Database Hash | 第 84 篇 |
| 7.3.1 | Database Hash calculation | 第 85 篇 |
| 7.4 | Server Supported Features | 第 86 篇 |
| 8 | Security considerations | 第 87~89 篇 |
| 8.1 | Authentication requirements | 第 88 篇 |
| 8.2 | Authorization requirements | 第 89 篇 |
| 9 | SDP interoperability requirements | 第 90 篇 |
| 10 | References | 第 91 篇 |
| Appendix A | Example ATT Server contents | 第 92~93 篇 |
| Appendix B | Example Database Hash | 第 94 篇 |
7. 推荐学习顺序
如果按"博客连载"方式推进,推荐顺序如下:
#mermaid-svg-FptUC6Cfucsi4GV2{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-FptUC6Cfucsi4GV2 .error-icon{fill:#552222;}#mermaid-svg-FptUC6Cfucsi4GV2 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-FptUC6Cfucsi4GV2 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-FptUC6Cfucsi4GV2 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-FptUC6Cfucsi4GV2 .marker.cross{stroke:#333333;}#mermaid-svg-FptUC6Cfucsi4GV2 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-FptUC6Cfucsi4GV2 p{margin:0;}#mermaid-svg-FptUC6Cfucsi4GV2 .mermaid-main-font{font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-FptUC6Cfucsi4GV2 .exclude-range{fill:#eeeeee;}#mermaid-svg-FptUC6Cfucsi4GV2 .section{stroke:none;opacity:0.2;}#mermaid-svg-FptUC6Cfucsi4GV2 .section0{fill:rgba(102, 102, 255, 0.49);}#mermaid-svg-FptUC6Cfucsi4GV2 .section2{fill:#fff400;}#mermaid-svg-FptUC6Cfucsi4GV2 .section1,#mermaid-svg-FptUC6Cfucsi4GV2 .section3{fill:white;opacity:0.2;}#mermaid-svg-FptUC6Cfucsi4GV2 .sectionTitle0{fill:#333;}#mermaid-svg-FptUC6Cfucsi4GV2 .sectionTitle1{fill:#333;}#mermaid-svg-FptUC6Cfucsi4GV2 .sectionTitle2{fill:#333;}#mermaid-svg-FptUC6Cfucsi4GV2 .sectionTitle3{fill:#333;}#mermaid-svg-FptUC6Cfucsi4GV2 .sectionTitle{text-anchor:start;font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-FptUC6Cfucsi4GV2 .grid .tick{stroke:lightgrey;opacity:0.8;shape-rendering:crispEdges;}#mermaid-svg-FptUC6Cfucsi4GV2 .grid .tick text{font-family:"trebuchet ms",verdana,arial,sans-serif;fill:#333;}#mermaid-svg-FptUC6Cfucsi4GV2 .grid path{stroke-width:0;}#mermaid-svg-FptUC6Cfucsi4GV2 .today{fill:none;stroke:red;stroke-width:2px;}#mermaid-svg-FptUC6Cfucsi4GV2 .task{stroke-width:2;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskText{text-anchor:middle;font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutsideRight{fill:black;text-anchor:start;font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutsideLeft{fill:black;text-anchor:end;}#mermaid-svg-FptUC6Cfucsi4GV2 .task.clickable{cursor:pointer;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskText.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163!important;font-weight:bold;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskText0,#mermaid-svg-FptUC6Cfucsi4GV2 .taskText1,#mermaid-svg-FptUC6Cfucsi4GV2 .taskText2,#mermaid-svg-FptUC6Cfucsi4GV2 .taskText3{fill:white;}#mermaid-svg-FptUC6Cfucsi4GV2 .task0,#mermaid-svg-FptUC6Cfucsi4GV2 .task1,#mermaid-svg-FptUC6Cfucsi4GV2 .task2,#mermaid-svg-FptUC6Cfucsi4GV2 .task3{fill:#8a90dd;stroke:#534fbc;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutside0,#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutside2{fill:black;}#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutside1,#mermaid-svg-FptUC6Cfucsi4GV2 .taskTextOutside3{fill:black;}#mermaid-svg-FptUC6Cfucsi4GV2 .active0,#mermaid-svg-FptUC6Cfucsi4GV2 .active1,#mermaid-svg-FptUC6Cfucsi4GV2 .active2,#mermaid-svg-FptUC6Cfucsi4GV2 .active3{fill:#bfc7ff;stroke:#534fbc;}#mermaid-svg-FptUC6Cfucsi4GV2 .activeText0,#mermaid-svg-FptUC6Cfucsi4GV2 .activeText1,#mermaid-svg-FptUC6Cfucsi4GV2 .activeText2,#mermaid-svg-FptUC6Cfucsi4GV2 .activeText3{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .done0,#mermaid-svg-FptUC6Cfucsi4GV2 .done1,#mermaid-svg-FptUC6Cfucsi4GV2 .done2,#mermaid-svg-FptUC6Cfucsi4GV2 .done3{stroke:grey;fill:lightgrey;stroke-width:2;}#mermaid-svg-FptUC6Cfucsi4GV2 .doneText0,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText1,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText2,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText3{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .doneText0.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText0.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText1.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText1.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText2.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText2.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText3.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneText3.taskTextOutsideRight{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .crit0,#mermaid-svg-FptUC6Cfucsi4GV2 .crit1,#mermaid-svg-FptUC6Cfucsi4GV2 .crit2,#mermaid-svg-FptUC6Cfucsi4GV2 .crit3{stroke:#ff8888;fill:red;stroke-width:2;}#mermaid-svg-FptUC6Cfucsi4GV2 .activeCrit0,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCrit1,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCrit2,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCrit3{stroke:#ff8888;fill:#bfc7ff;stroke-width:2;}#mermaid-svg-FptUC6Cfucsi4GV2 .doneCrit0,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCrit1,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCrit2,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCrit3{stroke:#ff8888;fill:lightgrey;stroke-width:2;cursor:pointer;shape-rendering:crispEdges;}#mermaid-svg-FptUC6Cfucsi4GV2 .milestone{transform:rotate(45deg) scale(0.8,0.8);}#mermaid-svg-FptUC6Cfucsi4GV2 .milestoneText{font-style:italic;}#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText0,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText1,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText2,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText3{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText0.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText0.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText1.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText1.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText2.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText2.taskTextOutsideRight,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText3.taskTextOutsideLeft,#mermaid-svg-FptUC6Cfucsi4GV2 .doneCritText3.taskTextOutsideRight{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .vert{stroke:navy;}#mermaid-svg-FptUC6Cfucsi4GV2 .vertText{font-size:15px;text-anchor:middle;fill:navy!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .activeCritText0,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCritText1,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCritText2,#mermaid-svg-FptUC6Cfucsi4GV2 .activeCritText3{fill:black!important;}#mermaid-svg-FptUC6Cfucsi4GV2 .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-svg-FptUC6Cfucsi4GV2 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 07-12 07-19 07-26 08-02 08-09 08-16 08-23 08-30 09-06 09-13 09-20 09-27 10-04 Introduction 与 Profile Dependency Profile Overview Attribute Protocol GATT Hierarchy Service / Characteristic / Descriptor Feature Requirements Overview Discovery Read / Write Notification / Indication Descriptor Procedures Opcode Mapping / Timeout L2CAP Requirements GAP Requirements Defined GATT Service Security / SDP Appendix A/B 基础定位数据模型操作过程互操作与系统集成实战附录 GATT Part G 学习阶段规划
8. 每篇文章的学习颗粒度
每篇文章不是只写"概念总结",而是按以下粒度推进:
#mermaid-svg-aCK4fqNbgKg3a4YL{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-aCK4fqNbgKg3a4YL .error-icon{fill:#552222;}#mermaid-svg-aCK4fqNbgKg3a4YL .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-aCK4fqNbgKg3a4YL .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-aCK4fqNbgKg3a4YL .marker{fill:#333333;stroke:#333333;}#mermaid-svg-aCK4fqNbgKg3a4YL .marker.cross{stroke:#333333;}#mermaid-svg-aCK4fqNbgKg3a4YL svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-aCK4fqNbgKg3a4YL p{margin:0;}#mermaid-svg-aCK4fqNbgKg3a4YL .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster-label text{fill:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster-label span{color:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster-label span p{background-color:transparent;}#mermaid-svg-aCK4fqNbgKg3a4YL .label text,#mermaid-svg-aCK4fqNbgKg3a4YL span{fill:#333;color:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL .node rect,#mermaid-svg-aCK4fqNbgKg3a4YL .node circle,#mermaid-svg-aCK4fqNbgKg3a4YL .node ellipse,#mermaid-svg-aCK4fqNbgKg3a4YL .node polygon,#mermaid-svg-aCK4fqNbgKg3a4YL .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-aCK4fqNbgKg3a4YL .rough-node .label text,#mermaid-svg-aCK4fqNbgKg3a4YL .node .label text,#mermaid-svg-aCK4fqNbgKg3a4YL .image-shape .label,#mermaid-svg-aCK4fqNbgKg3a4YL .icon-shape .label{text-anchor:middle;}#mermaid-svg-aCK4fqNbgKg3a4YL .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-aCK4fqNbgKg3a4YL .rough-node .label,#mermaid-svg-aCK4fqNbgKg3a4YL .node .label,#mermaid-svg-aCK4fqNbgKg3a4YL .image-shape .label,#mermaid-svg-aCK4fqNbgKg3a4YL .icon-shape .label{text-align:center;}#mermaid-svg-aCK4fqNbgKg3a4YL .node.clickable{cursor:pointer;}#mermaid-svg-aCK4fqNbgKg3a4YL .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-aCK4fqNbgKg3a4YL .arrowheadPath{fill:#333333;}#mermaid-svg-aCK4fqNbgKg3a4YL .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-aCK4fqNbgKg3a4YL .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-aCK4fqNbgKg3a4YL .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aCK4fqNbgKg3a4YL .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-aCK4fqNbgKg3a4YL .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aCK4fqNbgKg3a4YL .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster text{fill:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL .cluster span{color:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-aCK4fqNbgKg3a4YL .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-aCK4fqNbgKg3a4YL rect.text{fill:none;stroke-width:0;}#mermaid-svg-aCK4fqNbgKg3a4YL .icon-shape,#mermaid-svg-aCK4fqNbgKg3a4YL .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-aCK4fqNbgKg3a4YL .icon-shape p,#mermaid-svg-aCK4fqNbgKg3a4YL .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-aCK4fqNbgKg3a4YL .icon-shape .label rect,#mermaid-svg-aCK4fqNbgKg3a4YL .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-aCK4fqNbgKg3a4YL .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-aCK4fqNbgKg3a4YL .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-aCK4fqNbgKg3a4YL :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 原文句子
逐句翻译
术语拆解
协议意图
工程实现
抓包对应
易错点
本篇总结
9. 总结
这版学习计划的特点是:
-
严格按规范目录覆盖,不再把小节合并掉。
-
所有子章节都有归属文章,包括废弃章节、References、Appendix。
-
重点章节拆得更细,尤其是:
-
Attribute caching
-
Robust Caching
-
Characteristic Descriptor
-
CCCD
-
Read / Write / Notify / Indicate
-
ATT Opcode mapping
-
L2CAP / GAP interoperability
-
Database Hash
-
一句话概括:
GATT 不是一个"读写接口"那么简单,它是一整套基于 ATT 的服务数据库模型、访问过程、缓存机制、安全规则和互操作约束。
这套计划就是把这座"蓝牙服务大厦"从地基、楼层、房间号、门锁、访客登记表,一层一层拆开看。