当前位置:网站首页>BLE之ATT请求
BLE之ATT请求
2022-07-26 10:51:00 【deparks】
BLE之ATT请求
1. mtu交换
request: Exchange MTU Request (client/server都可以发起)
Client Rx MTU: 23
response: Exchange MTU Response
Server Rx MTU: 65
2. 发现服务
request: Find By Type Value Request
start handle: 1
end handle: 65535
attribute type(UUID): primary service
value to find: 0x1801
response: Find By Type Value Response
Attribute Handles:
start handle: 8
end handle: 11
发现所有服务: Read By Group Type Request
start handle: 1
end handle: 65535
attribute type(UUID): primary service
3. 发现特性
request: Read By Type Request
start handle: 23
end handle: 26
attritube type: 0x2803(BT_UUID_GATT_CHRC)
Reponse: Read By Type Response
length: 7(只有7或21:两个值,如果uuid是16 byte,则length为21)
handle: 24
struct gatt_chrc {
u8_t properties=0x12;
u16_t value_handle = 25;
union {
u16_t uuid16 = 0x2a19; // Battery Level
u8_t uuid[16];
};
}
4. 发现描述符
Request: Find Information Request
start handle: 40
end handle: 41
Reponse: Find Information Reponse
handle: 40
UUID: Client Characteristic Configuration
handle: 41
UUID: Report Reference
5. 读特性
Request: Read Request
Attribute Value: 3(Device Name)
Response: Read Response
Attribute Value: MiMouse
6. 写特性
Requese: Write Request
handle: xxx
value: xxx
Reponse: Write Request:
no param
7. 写ccc
Requese: Write Request:
handle: 26(对应Battary Level 的ccc)
value: 1
Reponse: Write Response:
no param
写ccc时协议栈维护了一个链表
8. 发通知
Handle Value Notification
10. 发指示
Handle Value Indication
边栏推荐
- C#halcon用户控件崩溃的一种处理方法
- SQL Server 之Sql语句创建数据库
- @Notblank, @notnull, @notempty differences and uses
- Successfully transplanted stemwin v5.22 on Shenzhou IV development board
- 0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010
- 企鹅龙(DRBL)无盘启动+再生龙(clonezilla)网络备份与还原系统
- 回到顶部的几种方案(js)
- logging基本使用
- 242.有效的字母异位词
- WinPcap packet capturing function pcap_ Loop (), stop the problem
猜你喜欢
随机推荐
使用float实现左中右布局,中间内容自适应
Sword finger offer (53): a string representing a numeric value
SQL Server 之Sql语句创建数据库
Shell script fails to execute repeatedly automatically
按二进制数中1的个数分类
Codepoint 58880 not found in font, aborting. flutter build apk时报错
SCADA和三大工业控制系统PLC、DCS、FCS
0x00007ffd977c04a8 (qt5sqld.dll) (in a.exe): 0xc0000005: an access violation occurred when reading position 0x0000000000000010
pytest pytest.ini配置 用例分组 用例跳过
Flutter TextField设置高度并且自动换行,圆角边框去除下划线
Implementing queues with two stacks
349. 两个数组的交集
Visual conversion of nmap vulnerability scanning results
104.二叉树的最大深度
Summary of the seventh class of pengge C language
Sword finger offer (twenty): stack containing min function
Happens-Before原则深入解读
Many people don't know whether they are looking for Kanban software or Kanban software
MFC中0x003b66c3 处有未经处理的异常: 0xC000041D: 用户回调期间遇到未经处理的异常
Sword finger offer (44): flip the word order sequence








