enum wifi_bandwidth_t not complete

SpenZerX
Posts: 13
Joined: Sun Dec 13, 2015 9:23 am

enum wifi_bandwidth_t not complete

Postby SpenZerX » Thu Dec 22, 2016 8:29 pm

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;
Creator of Smart Connected Devices - for EcSUHA.de Project

WiFive
Posts: 504
Joined: Tue Dec 01, 2015 7:35 am

Re: enum wifi_bandwidth_t not complete

Postby WiFive » Fri Dec 23, 2016 3:34 am

Maybe it is a bit field instead of an enum?

jkvarela
Posts: 2
Joined: Mon Dec 14, 2015 7:15 pm

Re: enum wifi_bandwidth_t not complete

Postby jkvarela » Sun Jan 01, 2017 9:06 pm

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

ESP_igrr
Posts: 277
Joined: Tue Dec 01, 2015 8:37 am

Re: enum wifi_bandwidth_t not complete

Postby ESP_igrr » Wed Jan 04, 2017 12:42 am

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 1 guest