]> granicus.if.org Git - esp-idf/commitdiff
esp32: fix invalid channel state information(CSI) data index
authorXiaXiaotian <xiaxiaotian@espressif.com>
Thu, 27 Dec 2018 13:06:58 +0000 (21:06 +0800)
committerXiaXiaotian <xiaxiaotian@espressif.com>
Tue, 22 Jan 2019 12:30:05 +0000 (20:30 +0800)
    Due to a hardware limitation in ESP32, the first four bytes of some
    CSI data is invalid, not the last four bytes.

    Correct a mistake of CSI sub-carrier index in documentation.

components/esp32/include/esp_wifi_types.h
components/esp32/lib
docs/en/api-guides/wifi.rst

index 2a4d2beb727e93a79d1a928c55490916efc9a2df..e16ca19bdf75533a8331004dad43e81fa4d7b87e 100644 (file)
@@ -405,7 +405,7 @@ typedef struct {
 typedef struct {
     wifi_pkt_rx_ctrl_t rx_ctrl;/**< received packet radio metadata header of the CSI data */
     uint8_t mac[6];            /**< source MAC address of the CSI data */
-    bool last_word_invalid;    /**< last four bytes of the CSI data is invalid or not */
+    bool first_word_invalid;   /**< first four bytes of the CSI data is invalid or not */
     int8_t *buf;               /**< buffer of CSI data */
     uint16_t len;              /**< length of CSI data */
 } wifi_csi_info_t;
index 8bbce98da549392214eb852210b50087bb272cc3..f2f850e5006f4780e5d8b9e1860539b4749d0593 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 8bbce98da549392214eb852210b50087bb272cc3
+Subproject commit f2f850e5006f4780e5d8b9e1860539b4749d0593
index 9139e44ce4709ee897b823be0b5a20efb04c89bd..780e2371f7053c42747e0c2b87dba1468b17fbac 100644 (file)
@@ -1458,11 +1458,11 @@ Channel state information (CSI) refers to the channel information of a Wi-Fi con
 +             +--------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
 |             | STBC               |  non STBC   |  non STBC   |     STBC    | non STBC | non STBC | STBC |  non STBC   |     STBC    | non STBC | non STBC |  STBC  |  non STBC   |     STBC    |
 +-------------+--------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
-| sub-carrier | LLTF               | 0~31,-31~-1 | 0~31,-31~-1 | 0~31,-31~-1 |   0~63   |   0~63   | 0~63 |     0~63    |     0~63    |  -64~-1  |  -64~-1  | -64~-1 |    -64~-1   |    -64~-1   |
+| sub-carrier | LLTF               | 0~31,-32~-1 | 0~31,-32~-1 | 0~31,-32~-1 |   0~63   |   0~63   | 0~63 |     0~63    |     0~63    |  -64~-1  |  -64~-1  | -64~-1 |    -64~-1   |    -64~-1   |
 +             +--------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
-| index       | HT-LTF             |      -      | 0~31,-31~-1 | 0~31,-31~-1 |     -    |   0~63   | 0~62 | 0~63,-64~-1 | 0~60,-60~-1 |     -    |  -64~-1  | -62~-1 | 0~63,-64~-1 | 0~60,-60~-1 |
+| index       | HT-LTF             |      -      | 0~31,-32~-1 | 0~31,-32~-1 |     -    |   0~63   | 0~62 | 0~63,-64~-1 | 0~60,-60~-1 |     -    |  -64~-1  | -62~-1 | 0~63,-64~-1 | 0~60,-60~-1 |
 +             +--------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
-|             | STBC-HT-LTF        |      -      |      -      | 0~31,-31~-1 |     -    |     -    | 0~62 |       -     | 0~60,-60~-1 |     -    |     -    | -62~-1 |       -     | 0~60,-60~-1 |
+|             | STBC-HT-LTF        |      -      |      -      | 0~31,-32~-1 |     -    |     -    | 0~62 |       -     | 0~60,-60~-1 |     -    |     -    | -62~-1 |       -     | 0~60,-60~-1 |
 +-------------+--------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
 | total bytes                      |     128     |     256     |     384     |    128   |    256   | 380  |      384    |      612    |    128   |    256   |   376  |      384    |      612    |
 +----------------------------------+-------------+-------------+-------------+----------+----------+------+-------------+-------------+----------+----------+--------+-------------+-------------+
@@ -1474,8 +1474,8 @@ All of the information in the table can be found in the structure wifi_csi_info_
     - Channel bandwidth refers to cwb field of rx_ctrl field. 
     - STBC refers to stbc field of rx_ctrl field. 
     - Total bytes refers to len field. 
-    - The CSI data corresponding to each Long Training Field type is stored in a buffer starting from the buf field. Each item is stored as two bytes: imaginary part followed by real part. The order is: LLTF, HT-LTF, STBC-HT-LTF. However all 3 items may not be present, depending on the packet type (see above).
-    - If last_word_invalid field of wifi_csi_info_t is true, it means that the last four bytes of CSI data is invalid due to a hardware limitation in ESP32. 
+    - The CSI data corresponding to each Long Training Field(LTF) type is stored in a buffer starting from the buf field. Each item is stored as two bytes: imaginary part followed by real part. The order of each item is the same as the sub-carrier in the table. The order of LTF is: LLTF, HT-LTF, STBC-HT-LTF. However all 3 LTFs may not be present, depending on the channel and packet information (see above). 
+    - If first_word_invalid field of wifi_csi_info_t is true, it means that the first four bytes of CSI data is invalid due to a hardware limitation in ESP32. 
     - More information like RSSI, noise floor of RF, receiving time and antenna is in the rx_ctrl field.
 
 .. note::