Fix the typo and tables.

This commit is contained in:
Jin Fang Cheng Cheng 2018-06-28 14:06:26 +08:00
parent 568da37af7
commit dd66dda11e

View file

@ -41,7 +41,7 @@ The following uses Station as an example to illustrate the core parts of the pro
2. The data lengths before and after symmetric encryption/decryption must stay the same. It also supports in-place encryption and decryption. 2. The data lengths before and after symmetric encryption/decryption must stay the same. It also supports in-place encryption and decryption.
The flow chat of BluFi The flow chart of BluFi
----------------------- -----------------------
.. seqdiag:: .. seqdiag::
@ -77,35 +77,64 @@ The frame formats for the communication between the mobile phone App and ESP32 a
The frame format with no fragment (8 bit) The frame format with no fragment (8 bit)
+------------+---------------+-----------------+-------------+----------------+----------------+ +-----------------+----------------+
| LSB - Type | Frame Control | Sequence Number | Data Length | Data | MSB - CheckSum | | Description | Value |
+============+===============+=================+=============+================+================+ +=================+================+
| 1 | 1 | 1 | 1 | ${Data Length} | 2 | | LSB - Type | 1 |
+------------+---------------+-----------------+-------------+----------------+----------------+ +-----------------+----------------+
| Frame Control | 1 |
+-----------------+----------------+
| Sequence Number | 1 |
+-----------------+----------------+
| Data Length | 1 |
+-----------------+----------------+
| Data | ${Data Length} |
+-----------------+----------------+
| MSB - CheckSum | 2 |
+-----------------+----------------+
If the **Frame Ctrl** bit is enabled, the **Total length** bit indicates the length of remaining part of the frame. It can tell the remote how much memory needs to be alloced. If the **Frame Ctrl** bit is enabled, the **Total length** bit indicates the length of remaining part of the frame. It can tell the remote how much memory needs to be alloced.
The frame format with fragments8 bit The frame format with fragments8 bit
+------------+--------------------+----------------+------------+-------------------------------------------+----------------+ +--------------------+-------------------------------------------+
| LSB - Type | FrameControl(Frag) | SequenceNumber | DataLength | Data | MSB - CheckSum | | Description | Value |
+ + + + +----------------------+--------------------+ + +====================+===========================================+
| | | | | Total Content Length | Content | | | LSB - Type | 1 |
+============+====================+================+============+======================+====================+================+ +--------------------+-------------------------------------------+
| 1 | 1 | 1 | 1 | 2 | ${Data Length} - 2 | 2 | | FrameControl(Frag) | 1 |
+------------+--------------------+----------------+------------+----------------------+--------------------+----------------+ +--------------------+-------------------------------------------+
| SequenceNumber | 1 |
+--------------------+-------------------------------------------+
| DataLength | 1 |
+--------------------+----------------------+--------------------+
| | Total Content Length | 2 |
+ Data +----------------------+--------------------+
| | Content | ${Data Length} - 2 |
+--------------------+----------------------+--------------------+
| MSB - CheckSum | 2 |
+--------------------+-------------------------------------------+
Normally, the control frame does not contain data bits, except for Ack Frame. Normally, the control frame does not contain data bits, except for Ack Frame.
The format of Ack Frame8 bit The format of Ack Frame8 bit
+------------------+----------------+------------------+--------------+-----------------------+----------------+ +------------------+--------------------------------------------+
| LSB - Type (Ack) | Frame Control | SequenceNumber | Data Length | Data | MSB - CheckSum | | Description | Value |
+ + + + +-----------------------+ + +------------------+--------------------------------------------+
| | | | | Acked Sequence Number | | | LSB - Type (Ack) | 1 |
+==================+================+==================+==============+=======================+================+ +------------------+--------------------------------------------+
| 1 | 1 | 1 | 1 | 1 | 2 | | Frame Control | 1 |
+------------------+----------------+------------------+--------------+-----------------------+----------------+ +------------------+--------------------------------------------+
| SequenceNumber | 1 |
+------------------+--------------------------------------------+
| DataLength | 1 |
+------------------+-----------------------+--------------------+
+ Data + Acked Sequence Number + 2 +
| | | |
+------------------+-----------------------+--------------------+
| MSB - CheckSum | 2 |
+------------------+--------------------------------------------+
1. Type 1. Type