I am testing the function of transmitting CSI data to the MQTT server using the example source and ESP32-S3 board.
The CSI RX callback specified in the esp_wifi_set_csi_rx_cb() method is as follows.
[app_main.c]
ESP_ERROR_CHECK(esp_wifi_set_csi_rx_cb(wifi_csi_rx_cb, s_ap_info.bssid));
...
static void wifi_csi_rx_cb(void *ctx, wifi_csi_info_t *info)
{
char *buffer = malloc(8 * 1024);
size_t len = 0;
...
if (s_mqtt_connect && MQTT_PUBLISH_ENABLED)
{
int msg_id = esp_mqtt_client_publish(mqtt_client, "/topic/qos0", buffer, 0, 1, 0); // buffer - string format for CSI Info
ESP_LOGI(TAG, "Published CSI data successfully, msg_id=%d", msg_id);
}
...
}
The default value for the CSI ping interval was set to 1 sec using the command line command, and it was confirmed that CSI data was printed at the set interval in thewifi_csi_rx_cb() callback. However, when MQTT publishes CSI data inside a callback, the set interval value is ignored and the callback is called very quickly and the CSI data is printed continuously at very short time intervals(maybe 50ms).
I wonder why this phenomenon occurs. I don't know why the CSI ping interval setting is not effective when doing MQTT publish.
Is there any relation between CSI and MQTT API in ESP-IDF internal API processing?
Can anyone explain this phenomenon?
I am testing the function of transmitting CSI data to the MQTT server using the example source and ESP32-S3 board. The CSI RX callback specified in the
esp_wifi_set_csi_rx_cb()
method is as follows.[app_main.c]
[Configuration]
The default value for the CSI ping interval was set to 1 sec using the command line command, and it was confirmed that CSI data was printed at the set interval in the
wifi_csi_rx_cb()
callback. However, when MQTT publishes CSI data inside a callback, the set interval value is ignored and the callback is called very quickly and the CSI data is printed continuously at very short time intervals(maybe 50ms). I wonder why this phenomenon occurs. I don't know why the CSI ping interval setting is not effective when doing MQTT publish. Is there any relation between CSI and MQTT API in ESP-IDF internal API processing? Can anyone explain this phenomenon?