Page 1 of 1

ESP32-C6: wifi_pkt_rx_ctrl_t has no member 'secondary_channel' or 'cwb'

Posted: Tue Jun 13, 2023 9:10 am
by max1337
In my csi_rx_cb I get the struct wifi_csi_info_t which, according to this documentation:

https://docs.espressif.com/projects/esp ... _wifi.html

contains the nested struct wifi_pkt_rx_ctrl_t which contains members like "cwb" or "secondary_channel".
But once I try to compile my code:

Code: Select all

static void csi_rx_cb(void *ctx, wifi_csi_info_t *data) {
        printf("CSI:\tLen %d,2ndChnl: %d,BW: %d\n", data->len, data->rx_ctrl.secondary_channel, data->rx_ctrl.cwb);
	if ( !enable_csi_capture || data->len != NUM_CSI_FRAME_ELEMENTS ) return;

	const uint8_t start_idx = data->first_word_invalid ? 4 : 0;
	if ( xQueueSend(csi_collect_queue, &(data->buf[start_idx]), 10) != pdPASS ) {
		printf("Failed to insert %d CSI data into csi_collect_queue!\n", data->len);
	}
}
I get the compile-time error:
error: 'wifi_pkt_rx_ctrl_t' {aka 'esp_wifi_rxctrl_t'} has no member named 'secondary_channel'
80 | printf("CSI:\tLen %d,2ndChnl: %d,BW: %d\n", data->len, data->rx_ctrl.secondary_channel, data->rx_ctrl.cwb);
| ^
error: 'wifi_pkt_rx_ctrl_t' {aka 'esp_wifi_rxctrl_t'} has no member named 'cwb'
80 | printf("CSI:\tLen %d,2ndChnl: %d,BW: %d\n", data->len, data->rx_ctrl.secondary_channel, data->rx_ctrl.cwb);
why does the actual struct not align with the documentation? The only problem I can think about causing this is, that I am not in promiscuous mode.

Re: ESP32-C6: wifi_pkt_rx_ctrl_t has no member 'secondary_channel' or 'cwb'

Posted: Tue Jun 13, 2023 11:25 am
by bidrohini
This error may occur due to version incompatibility.

Re: ESP32-C6: wifi_pkt_rx_ctrl_t has no member 'secondary_channel' or 'cwb'

Posted: Tue Jun 13, 2023 1:37 pm
by MicroController
IDF version? Correct target set?
Apparently, the necessary IDF changes for the C6 were made in 12/2022.