该怎么理解BLE ATT protocol是Sequential Protocol
ATT PDU有六种:
- command: client->server, not need server to response;
- request:client->server,need server to response;
- response:server->client, that is response the request from client;
- notification:server->client,not need client to confirmation;
- indication:server->client,need client to confirmation;
- confirmation:client->server, that is response the indication from server;
通过如下这种图来说明 ATT是有序协议;
从上面这张图可以发现的点:
- client发出去的request,server一定要做出response;
- sever发出去的indication,client一定要做出confirmation;
- note1表示server可以在发送response之前进行发出notification,因为notification可以在任何时刻发出;
- note2表示client可以在接受response之前进行发出command,因为command发送也是可以在任何时刻发出;
- note3表示server可以在收到confirmation之前发出notification,因为notification可以在任何时刻发出;
- note4表示client可以在收到server的indication后且在送出confirmation之前发送request或command;