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

max1337
Posts: 4
Joined: Thu May 11, 2023 8:58 am

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

Postby max1337 » Tue Jun 13, 2023 9:10 am

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.

bidrohini
Posts: 202
Joined: Thu Oct 27, 2022 12:55 pm

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

Postby bidrohini » Tue Jun 13, 2023 11:25 am

This error may occur due to version incompatibility.

MicroController
Posts: 1709
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

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

Postby MicroController » Tue Jun 13, 2023 1:37 pm

IDF version? Correct target set?
Apparently, the necessary IDF changes for the C6 were made in 12/2022.

Who is online

Users browsing this forum: No registered users and 121 guests