Hi,
esp_err_t esp_wifi_get_bandwidth(wifi_interface_t ifx, wifi_bandwidth_t *bw);
wifi_bandwidth_t sta_wifi_bandwidth;
esp_wifi_get_bandwidth(WIFI_IF_STA, &sta_wifi_bandwidth);
printf("debug: value is %u"
,sta_wifi_bandwidth);
result-> debug: value is 2
same for AP_IF
typedef enum {
WIFI_BW_HT20 = 0, /* Bandwidth is HT20 */
WIFI_BW_HT40, /* Bandwidth is HT40 */
WIFI_???????, /* enum for value 2 is missing */
} wifi_bandwidth_t;
enum wifi_bandwidth_t not complete
enum wifi_bandwidth_t not complete
Creator of Smart Connected Devices - for EcSUHA.de Project
Re: enum wifi_bandwidth_t not complete
Maybe it is a bit field instead of an enum?
Re: enum wifi_bandwidth_t not complete
This feature is not working to me.
to:
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
or to:
printf("Band :%X\r\n",esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(WIFI_IF_AP , WIFI_BW_HT20));
the answer is:
Band :102
Band :102
that means:
ESP_ERR_WIFI_ARG
I put this code after and before esp_wifi_start() like this:
//--------------------------------------------------------------
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
ESP_ERROR_CHECK( esp_wifi_start() );
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
Anyone get this feature work?
Tks;
Juliano
to:
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
or to:
printf("Band :%X\r\n",esp_wifi_set_bandwidth(WIFI_IF_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(WIFI_IF_AP , WIFI_BW_HT20));
the answer is:
Band :102
Band :102
that means:
ESP_ERR_WIFI_ARG
I put this code after and before esp_wifi_start() like this:
//--------------------------------------------------------------
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
ESP_ERROR_CHECK( esp_wifi_start() );
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20));
printf("Band :%X\r\n",esp_wifi_set_bandwidth(ESP_IF_WIFI_AP , WIFI_BW_HT20));
Anyone get this feature work?
Tks;
Juliano
Re: enum wifi_bandwidth_t not complete
This enum is not declared correctly, HT20 should be 1 and HT40 should be 2. Fix is coming up.
Who is online
Users browsing this forum: No registered users and 59 guests